nzec error in codechef while writing code in python -
this code giving runtime error (nzec) when compile in codchef.
test_cases = int(raw_input()) result = 0 def output(x): if(x/2 >= 2): global result; result += x/2 - 1; output(x-2); else: print result; result = 0; while(test_cases > 0): base = int(raw_input()); output(base); test_cases = test_cases - 1;
nzec error thrown code in codechef if there exception thrown. input not work c, c++ while using python on codechef -
you can use
import sys test_cases = sys.stdin.read().split()
now iterate on test_cases. more info here
also use sys.stdout.write()
outputs rather print
Comments
Post a Comment