Prime vivsits question

not clear to every test cases please help link is below

Hello @vivan.singh

Errors in your code.

  1. Line 13, i should start from a and NOT a + 1 and go till b (included)
  2. Line 16, j should start from 1 and Not 2 because here we are finding number of divisors and 1 divides every number so โ€œcountโ€ should be incremented for โ€œ1โ€ also.
  3. variable sum should be incremented when count == 2 and NOT count >= 2 because it is written in the problem statement that PM Modi will visit only those countries whose country number has only two divisors.

Modified code