Getting NZEC in python,while AC in C++

Getting NZEC in code submitted in python, while same thing written in C++ got AC. Can anyone figure out please what is the problem with python on codechef ide?
It’s working on offline ide. Link for python code. Link for C++ code. Link for the problem.

1 Like
RecursionError: maximum recursion depth exceeded in comparison

You have to give costum recurssive limit
here is your accepted code


import sys

def fun(n):
return 0
return fun(n-2)+(n//2)-1
for _ in range(int(input())):

for more have a look at

1 Like

Thanks a lot bro…

1 Like