include<stdio.h>int main() { int t,a,b,i,j,k,ct; scanf("%d",&t); for(i=1;i<=t;i++) { scanf("%d%d",&a,&b);
} printf("\n"); } return 0; } asked 06 Sep '17, 09:24

Please share the question link. From the code it looks like you are trying to find all the primes between a and b. If so, your approach will time out. Just give a large a and b and run your code on your system. You can see how long it takes. Then study segmented sieve and implement that. If you don't know sieve, start with sieveoferatosthenes and do a couple of problems from that. Then move to segmented sieve. answered 06 Sep '17, 10:43

Can you share the question link please