Getting runtime(nzec) error for solution submitted in python whereas similar approach worked in C. Am I missing something that in python. The solution for http://www.codechef.com/problems/DCE05 in python is http://www.codechef.com/viewsolution/4087688 and in c is http://www.codechef.com/viewsolution/4087748. Can anyone point what is the wrong that Iam doing in python.
Instead of just :
The reason may be that the author has left leading white spaces at the end of input,the strip() function just removes all the leading white spaces,there is no problem with these leading white spaces for ‘c’ because scanf() ignores them,where as for input() method in python,the input should be strictly integer.By the way I think your algorithm may not pass the Time limit? just think about it.I guess this may help you