if not num:
elif int(num)>0 and int(num)<100 and count==0:
This solution is giving nzec error…and i have tried many solutions to this problem all with nzec error plzz help…
Here are a few things about this code:-
- your code should break from loop when you encounter 42.it keeps taking input till it reaches end of file
2)the numbers are integers if 1 or 2 digits. so negative numbers like -1 , -24 should also be accepted.
3)there is no need to store numbers in a list. you can output them immediately after taking input
In Python, the print statement automatically starts from a new line, so a better and simpler implementation of this could be like this… https://www.codechef.com/viewsolution/14287171