Get NZEC error while executing this code.
tried on other IDE’s and it runs perfectly fine.
def main():
a=int(input())
b=int(input())
c=1
d=0
if b%10==1:
print(‘0’)
else:
while c<b/2:
c=f©
if b%c==0:
d=d+1
print(d)
def f©:
c=c*2
return c
main()
Provide a solution link instead of pasting your code (CodeChef: Practical coding for everyone in your case) or just indent it properly. Explain what you have done briefly.
I found 2 things wrong with your latest submission.
- line 2 has
n, q = input().split()
butn
andq
have not been converted toint
. You did convert the listsb
andc
( you have done this part correctly in previous submissions ). - The lists
b
andc
should only be read once instead of in every query.
The link to this code is
https://www.codechef.com/viewsolution/24975293
I tried custom input and it was running fine