nzec error

why this code is giving runtime error(nzec) in python… plese help!!

import math
test = input()
while test>0:
    if n==0:
        print '0'
        j = int(math.log(n,2))
        print int(pow(2,j))

Could you specify which question this is? i think you should try and replace input() by int(raw_input().strip())

Can you provide the problem link ? It’s working fine for me.

Check here :
1 Like

thnks it workd for me, its a peer question
i dont know why it was not working for input()

^Due to unexpected whitespaces in i/p.