Page 9 of 11

10235 why not AC?

Posted: Fri Mar 23, 2012 10:31 pm
by cse.mehedi
Plz any one help me!
:( :( :oops:

Code: Select all

Removed after AC

Re: 10235 why not AC?

Posted: Wed Mar 28, 2012 12:06 am
by brianfry713
101 is prime, not emirp, it has to be a different prime after reversal.

Re: 10235 why not AC?

Posted: Wed Mar 28, 2012 3:55 am
by cse.mehedi
brianfry713 wrote:101 is prime, not emirp, it has to be a different prime after reversal.
Thank u!!!!!!!!! :D

10235 - Simply Emirp WA

Posted: Thu Nov 15, 2012 11:07 pm
by starain
Remove after accepted

Re: 10235 - Simply Emirp WA

Posted: Sat Nov 17, 2012 5:02 am
by brianfry713
change these lines:

Code: Select all

while(!cin.eof())
{
cin >>input;
to:

Code: Select all

while(cin >>input) {

Re: 10235 - Simply Emirp WA

Posted: Sat Nov 17, 2012 1:59 pm
by starain
Can you please explain the reason.

Re: 10235 - Simply Emirp WA

Posted: Mon Nov 19, 2012 11:45 pm
by brianfry713
There may be whitespace at the end of the last line. Usually there is at least a newline character at the end of every line, including the last one.

Re: WA in 10235

Posted: Sat Mar 23, 2013 3:27 am
by sirajul

Code: Select all

deleted after ac

Re:Ned some input for 10235

Posted: Sat Aug 03, 2013 2:29 pm
by moudud99
Can anyone give some input?I can use them to find my mistake.

Re: 10235 - Simply Emirp WA

Posted: Tue Oct 15, 2013 10:55 pm
by The-PHx
plz tell me how to optimize this solution cause it's getting TL

Code: Select all

deleted

Re: 10235 - Simply Emirp WA

Posted: Wed Oct 16, 2013 8:30 pm
by brianfry713
Precompute whether each possible input is prime or not.

Re: 10235 - Simply Emirp WA

Posted: Thu Oct 17, 2013 3:12 pm
by The-PHx
sorry I don't understand what should I do
I mean that the code is doing it right >> i think

Re: 10235 - Simply Emirp WA

Posted: Thu Oct 17, 2013 7:53 pm
by brianfry713
Before you read any input compute whether each possible N is prime.
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes

Re: 10235 - Simply Emirp WA

Posted: Thu Oct 24, 2013 1:32 pm
by The-PHx
thanks for the great help
I think it's clear now

simply emrip 10235

Posted: Tue Nov 05, 2013 10:52 am
by jokerz
I don't know why i am getting WA :roll: WA :roll: ...please anyone help me....
Here is the link of my code:
http://ideone.com/NeMde2