Can someone explain me why this guy's code is more efficient than mine (python 3.6)

my code - CodeChef: Practical coding for everyone

other guy - CodeChef: Practical coding for everyone

i am not complaining but trying to understand

@sarthak_jai217 other guy’s code is not more efficient. But other guy’s program executing time is 0.01 and yours is 0.02 because, you used the int() fuction and he used the float(). You know, float() take less time then int().

The time taken differs by 0.01; you can easily submit the exact same code twice in a row and see that much of a difference in time taken:

1 Like