n C C++ C++ long long Java Python, range Python, while 10^7 0.13* 0.18* 0.15 0.35 1.3 2.1 10^9 0.25** 0.29** 0.44 0.86 191 276 Wrong output: * -2004260032 instead of 50000005000000 ** -243309312 instead of 500000000500000000 Bit 6666666666555555555544444444443333333333222222222211111111110000000000 position 9876543210987654321098765432109876543210987654321098765432109876543210 >>> bin(10**9) '0b111011100110101100101000000000' >>> bin(50000005000000) '0b1011010111100110001000100010010110101101000000' >>> bin(-2004260032+2^32) '0b10001000100010010110101101000000' >>> bin(500000000500000000) '0b11011110000010110110101100111110001011111110110010100000000' >>> bin(-243309312+2^32) '0b11110001011111110110010100000000'