question - https://hack.codingblocks.com/contests/c/473/760
My answer - https://ide.codingblocks.com/s/43413
please tell what’s wrong in my answer ?
Deepak and primes 2
https://ide.codingblocks.com/s/43474
There are some parts that are leading to tle in your code. For eg, you are finding whether number is divible by prime number or not. Number of prime numbers are around 10^4, and range is 10^5, which leads to complexity of 10^9.
Here is my code for your reference.
My code is accepted at Geeksforgeeks but showing wrong answer over here.
Please correct the code if it is wrong @sanjeetboora @Anubhav-Aron-1353657 @sss, or let me know if there is some problem with the test files.
Finally I got it. After so many hours of debugging.(2+ hours)
Testcase
1
1 5
Correct output
2
3
5
Your output
1
2
3
5 .
Hit like if u get it.
1 Like
Thanksss a lot for the effort . Didn’t realise I missed such a small thing!
<3 <3