my solution is givingruntime nzec error for this code
t = int(raw_input())
while t:
s = raw_input().split()
n = int(s[0])
k = int(s[1])
m = int(s[2])
cnt =0
if n greater than and equal to m:
print β0β
continue
d = 0
while 1:
if n less than and equal to m:
n = (n * k)
cnt = cnt + 1
else:
break
print cnt - 1
t= t-1
but for the same problem another code which is not much different than me is getting accepted
the accepeted code is
tc=int(raw_input())
while(tc):
s=raw_input().split()
n=int(s[0])
k=int(s[1])
m=int(s[2])
d=0
while(1):
n=n*k
d=d+1
if(n greater than m):
d=d-1
break
print d
tc-=1
i am completely unable to figure where i am getting wrong
need urgent help