DEEPAK AND PRIMES II tle

question = https://hack.codingblocks.com/contests/c/452/760
solution = https://ide.codingblocks.com/#/s/21016

Precompute the primes between the given range and answer the test cases in O(1).
Anyway its not just TLE thing , your code is printing 1 also as a prime .
Test cases :
1
0 20
Code -> https://ide.codingblocks.com/#/s/21091