ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1352. Mersenne Primes

Alex Stoff Check this sequence, PLEASE! [8] // Problem 1352. Mersenne Primes 16 Sep 2005 15:56

2,3,5,7,13,17,19,31,61,89,107,127,521,607,                 1279,2203,2281,3217,4253,4423,9689,9941,                   11213,19937,21701,23209,44497,86243,
110503,132049,216091,756839,859433,
1257787,1398269,2976221,3021377,6972593,
13466917,20996011;

Is it all right? Cuz I got WA...
Help me.
xj.ammo Re: Check this sequence, PLEASE! [7] // Problem 1352. Mersenne Primes 18 Sep 2005 21:18
Yes the sequence is correct. I don't know what is wrong. There must be a problem with your code
Alex Stoff Here is my code // Problem 1352. Mersenne Primes 18 Sep 2005 22:14

Const ... {sequence}

Var n:array[1..40] of byte;
    t,i:byte;
Begin
  Readln(t);
  For i:=1 to t do Readln(n[i]);
  For i:=1 to t do Writeln(a[n[i]]);
END.
Alex Stoff You know, I have TLE [5] // Problem 1352. Mersenne Primes 18 Sep 2005 22:18

I cann't believe it! I Have TLE#4!
Anatoliy 'Tolyan_NO' Tolstobroff Re: You know, I have TLE [4] // Problem 1352. Mersenne Primes 18 Sep 2005 23:53

You hands is normal? :)
Alex Stoff What do you mean "hands". [3] // Problem 1352. Mersenne Primes 19 Sep 2005 00:34
I'm asking for help. What do you mean "hands".
Try printing the output as soon as you read it. You don't know the exact limit for T. So your program behaves abnormally for T>40.
Alex Stoff Thanks a lot! [1] // Problem 1352. Mersenne Primes 20 Sep 2005 19:51

Thank you! I got AC! Thanks.
zsyz_lyj Re: Thanks a lot! // Problem 1352. Mersenne Primes 4 Mar 2009 10:35
Thanks