def power(num,div):
incre =0
while(num%div == 0):
num = num/div
incre +=1
return incre
test_case = int(raw_input())
lim = 0
while lim < test_case:
power = (raw_input())
x = power.split()
a = int(x[0])
b = int(x[1])
lim +=1
print power(a,b)
在我遇到此错误之前,Python 曾经正常工作。