Testcase 2 and 3 are showing wring answer?

code:

Hello @myself.yash.srivastav,

There are two issues with your code:

  1. Unnecessary new line statement in the prime function.

  2. There is no need of outer loop while taking input as you are only provide with A0 array.

I have modified your code:

Hope, this would help.
Give a like if you are satisfied.