Here’s my code
for i in xrange(int(raw_input())): x = raw_input().split(" ") for j in range(int(x[0]), int(x[1])): prime = True for y in range(2, j): if j%y == 0: prime = False if prime and j!= 2: print j
It should run perfectly, what’s the deal?