In following problem of july19 cook-off - https://www.codechef.com/COOK108A/problems/EXPTPROD .
I made two submissions , the first one is https://www.codechef.com/viewsolution/25426877 (using cin,cout)
and the second one is
https://www.codechef.com/viewsolution/25426959 (using scanf,print)
I tested few more times and i saw that first code was taking less time (0.96 secs) whereas the second one taking 1.02 secs .
I know the difference is very less , but if time-limit was 1 sec then it might have created problem.
What is the reason behind it ? I mean printf,scanf should work faster then cin,cout.