SPOJ Prime Generator Python コードで実行時エラー NZEC が発生します。なぜですか?
testcases = raw_input(" ")
def isPrime(n):
result = True
if n != 0 and n != 1 and n % 2 != 0 and n % 5 != 0 and n % 7 != 0 and n % 9 != 0:
if n > 9:
for i in range(11,n):
if isPrime(i):
if n % i == 0:
result = False
return result
else:
return result
else:
return False
for count in range(0,testcases):
m,n = raw_input(" ").split()
m = int(m)
n = int(n)
for i in range(m,n+1):
if isPrime(i):
print i