Why do I get an NZEC?

What if return type of main is void?We can’t use return 0; then?

Hey! I have the same problem. I get NZEC in every question and I always have to use a try and an empty catch block to make it go away. Since you asked this question in 2014, i hope you understood how it works by now…I’m a newbie here. please tell me how to solve this problem

try this.
you can take a list as an input in a single line.

lst_input = list(map(int, input().strip().split(" ")))`

put your input statements inside try block , i think this may help
:slight_smile: happy programming

cook your dish here

n=input()
for i in range(int(n)):
    number = int(input())
    rev_number=0
    while number>0:
        lastdigit = number % 10
        number = number // 10
        rev_number = (rev_number *10)+lastdigit
    print(rev_number)

can anyone tell me why do i get an NZEC and EOFerror in this codePreformatted text

I am also getting NCEZ error , EOF error in the First input for T , when i run it in my pc’s ide it works fine but in codechef ide its not working , I tried raw_input and everything , nothing seems to workmy python soln code

In Python, if there is a need to take the input from a single line try using input().strip().split(" "). This will remove the extra spaces in the string. Thus the split will work good.

If you are using C-programming then please see if you are using void main(). Use int main() this should resolve your problem.

you might not have entered an input that happened to me.

Are u solved this problem because i am getting same problem can u please elaborate it…