Wednesday, June 27, 2018

SNGPG - Prime Generator The Easiest Question Ever : Classical

#The solution in Python 3 is as follows:

for _ in range(int(input())):
a, b = map(int, input().split())
if a < 4:
print (min(3,b)-a+1)            #Just observe the output pattern
else:
print(0)


#Keep visiting for more solutions of SPOJ problems in Python 3.Thank you!!!