Nth prime

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Given n, output nth prime number.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

3
5
7
11
9413
9419
9421
9431
9433
9437
9439
9461
9463
9467
9473
9479
9491
9649
9661
9677
9679
9689
9697
9719
9721
9733
9739
9743
9749
9767
9769
9781
9787
9791
9803
9811
9817
9829
9833
9839
9851
9857
9859
9871
9883
9887
9901
9907
9923
9929
9931
9941
9949
9967
9973
13
17
19
797
809
811
821
823
827
829
839
853
857
859
863
877
881
883
887
907
911
919
929
937
941
23
29
31
37
9497
9511
9521
9533
9539
9547
9551
9587
9601
9613
9619
9623
9629
9631
9643
41
43
47
53
59
61
67
71
73
79
83
89
97
101
103
107
109
113
127
131
137
139
149
151
157
163
167
173
179
181
191
193
197
199
211
223
227
229
233
239
241
251
257
263
269
271
277
281
283
293
307
311
313
317
331
9497
9511
9521
9533
9539
9547
9551
9587
9601
9613
9619
9623
9629
9631
9643
337
347
349
353
797
809
811
821
823
827
829
839
853
857
859
863
877
881
883
887
907
911
919
929
937
941
359
367
373
379
383
389
397
401
409
419
421
431
433
439
443
449
457
461
463
467
479
487
491
499
503
509
521
523
541
547
557
563
569
571
577
587
593
599
601
607
613
617
619
631
641
643
647
653
659
661
673
677
683
691
701
709
719
727
733
739
743
751
757
761
769
773
787
947
953
967
971
977
983
991
997
9497
9511
9521
9533
9539
9547
9551
9587
9601
9613
9619
9623
9629
9631
9643

Sample output:

5
11
17
31
97931
98009
98017
98207
98221
98269
98299
98519
98543
98597
98669
98731
98887
100693
100829
101051
101081
101161
101267
101489
101503
101627
101701
101741
101807
102001
102019
102121
102197
102229
102359
102461
102533
102653
102679
102797
102953
103049
103069
103231
103399
103451
103613
103681
103913
103979
103991
104087
104161
104381
104471
41
59
67
6113
6217
6229
6311
6323
6353
6361
6469
6599
6653
6661
6691
6823
6841
6863
6899
7057
7109
7193
7283
7351
7417
83
109
127
157
98927
99079
99149
99317
99391
99497
99551
99923
100129
100279
100357
100391
100459
100483
100609
179
191
211
241
277
283
331
353
367
401
431
461
509
547
563
587
599
617
709
739
773
797
859
877
919
967
991
1031
1063
1087
1153
1171
1201
1217
1297
1409
1433
1447
1471
1499
1523
1597
1621
1669
1723
1741
1787
1823
1847
1913
2027
2063
2081
2099
2221
98927
99079
99149
99317
99391
99497
99551
99923
100129
100279
100357
100391
100459
100483
100609
2269
2341
2351
2381
6113
6217
6229
6311
6323
6353
6361
6469
6599
6653
6661
6691
6823
6841
6863
6899
7057
7109
7193
7283
7351
7417
2417
2477
2549
2609
2647
2683
2719
2749
2803
2897
2909
3001
3019
3067
3109
3169
3229
3259
3299
3319
3407
3469
3517
3559
3593
3637
3733
3761
3911
3943
4027
4091
4133
4153
4217
4273
4339
4397
4421
4463
4517
4549
4567
4663
4759
4787
4801
4877
4933
4943
5021
5059
5107
5189
5281
5381
5441
5503
5557
5623
5651
5701
5749
5801
5851
5869
6037
7481
7523
7607
7649
7699
7753
7841
7883
98927
99079
99149
99317
99391
99497
99551
99923
100129
100279
100357
100391
100459
100483
100609

Ranking

Perl _

RankUserSizeTimeDateStatistics
1tybalt89732.76272010/09/29 06:53:230B / ?B / ?B
2dcutter952.08202010/09/24 02:11:350B / 44B / 51B

Python _

RankUserSizeTimeDateStatistics
1hallvabo922.95672010/09/24 03:51:110B / 57B / 26B
2recursive1000.68662010/09/28 02:18:550B / 61B / 31B
3hallvabo (alt)1010.21932010/09/29 10:33:330B / 50B / 39B

PHP _

RankUserSizeTimeDateStatistics
1o-cn1031.72152010/09/30 21:38:190B / ?B / ?B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima1122.11482010/09/23 17:23:590B / 59B / 40B

JavaScript _

RankUserSizeTimeDateStatistics
1nn942.57102010/09/23 20:08:190B / 49B / 44B

PARI/GP _

RankUserSizeTimeDateStatistics
1teebee280.07182012/03/27 10:51:250B / 21B / 7B

J _

RankUserSizeTimeDateStatistics
1cddddr200.10912011/05/27 19:06:360B / 10B / 10B
2pooq210.05812011/01/25 00:06:020B / 10B / 11B

C _

RankUserSizeTimeDateStatistics
1inaniwa960.88882010/09/23 14:50:240B / 46B / 50B
2nn1010.19192010/09/29 15:07:490B / 45B / 55B
3schpey1230.82242010/09/29 23:19:550B / 57B / 66B
4hallvabo1290.02332010/09/25 00:43:140B / 62B / 67B
5Debanjan1340.08782010/09/23 14:09:001B / ?B / ?B
6yaya1370.51242010/09/26 02:58:270B / 67B / 67B
7llhuii(inaniwa)930.24562015/01/16 22:21:290B / ?B / ?B
8debanjan1190.00302010/09/30 04:33:290B / ?B / ?B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai1362.49922010/09/29 13:40:500B / 72B / 59B

Java _

RankUserSizeTimeDateStatistics
1hallvabo2090.29562010/09/25 00:50:170B / 128B / 75B
2teebee1950.28362010/11/30 00:46:020B / 117B / 71B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*1750.41862010/09/26 18:31:590B / 116B / 46B
2*yuko*1671.06542014/03/02 11:34:330B / 110B / 46B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*1120.11942010/09/25 16:19:380B / 65B / 44B
2*yuko*1070.06962011/11/25 06:32:480B / 60B / 44B

Octave _

RankUserSizeTimeDateStatistics
1teebee(pooq)380.23022013/08/14 06:21:530B / 23B / 15B
2pooq430.64182013/03/05 21:13:400B / 24B / 19B

AWK _

RankUserSizeTimeDateStatistics
1Priyank770.94452010/11/03 18:35:530B / ?B / ?B

Bash _

RankUserSizeTimeDateStatistics
1Priyank842.78002010/11/03 17:58:500B / ?B / ?B

gs2 _

RankUserSizeTimeDateStatistics
1whio100.24012017/06/09 03:45:413B / 3B / 4B

z80 _

RankUserSizeTimeDateStatistics
1*yuko*1491.41932010/09/29 21:25:5086B / 34B / 24B
2*yuko*1021.46802010/10/01 00:26:3361B / 17B / 17B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr340.77122010/09/23 18:45:250B / 19B / 12B
2leonid340.39552010/09/29 22:30:550B / 19B / 12B
3eban500.35162010/09/24 13:22:230B / 29B / 18B

Language Ranking_

RankLangUserSizeScore
1gs2whio1010000
2Jcddddr205000
3PARI/GPteebee283571
4gorubymurky-satyr342941
5Octaveteebee(pooq)382631
6Perltybalt89731369
7AWKPriyank771298
8BashPriyank841190
9Pythonhallvabo921086
10Cllhuii(inaniwa)931075
11JavaScriptnn941063
12z80*yuko*102980
13PHPo-cn103970
14Fortran*yuko*107934
15Common LISPkozima112892
16OCamlm.ukai136735
17Pascal*yuko*167598
18Javateebee195512

return top