Test Cases Here :-)

10000

10000

10000

10000

10000

10000

10000

10000

10000

10000

Ans:- 1681

5000

5000

5000

5000

5000

5000

5000

5000

5000

5000

Ans:- 1271

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Ans:- 12870

Re: Test Cases Here :-)

Posted by

ilyas 3 Mar 2010 09:07

You are very stupid!!!

0<ans<9

Re: Test Cases Here :-)

Don't repeat my mistake and remember that you must calculate prime numbers up to 10000 (not to 100!). Maybe this test will help you:

9797

1

1

1

1

1

1

1

1

1

Answer = 4 (9797 = 97 * 101)

Sorry for my English :)

*Edited by author 04.04.2010 19:55*

Re: Test Cases Here :-)

Posted by

asdvv 30 Jun 2014 12:26

oh！！！

thank you very much, i just calculate to sqrt(10000)...

if you have WA in test4, you can try this.

Re: Test Cases Here :-)

Posted by

Otrebus 15 Jan 2015 19:45

ilyas: Please don't call people stupid. Everyone makes mistakes; the author simply forgot to calculate modulo 10.

Re: Test Cases Here :-)

Posted by

ImgJ 26 Mar 2015 02:11

Thanks for tests, I join.

Input: 1 1 1 1 1 1 1 1 1 1

Output: 1

Input: 43 5 49 2 3 5 3 4 5 5

Output: 0

Input: 10000 10000 12 10000 10000 10000 13 10000 10000 29

Output: 2

Input: 99 101 102 103 104 105 106 107 108 109

Output: 6

Re: Test Cases Here :-)

My program passes all these test cases...

Still I am getting wrong answer at 6th test.

Re: Test Cases Here :-)

oh！！！

thank you very much, i just calculate to sqrt(10000)...

if you have WA in test4, you can try this.

I just got accepted. It is enough to calc prime nums up to Num div 2. Because if Num not divided on any prime <= than Num div 2 then Num itself is a prime num.

*Edited by author 22.02.2023 12:10*