Unfortunately your test output for C is wrong. Variable sum should be declared as 'long'. In Lenovo G50-80 - Python: 11s, ruby: 10s, nodejs: 0.192s, C: 0.01s, Java: 0.112s, Go: 0.334s.
PS: ruby gives 5000000050000000 while all others give 4999999950000000 as the sum.