Find the nearest 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

Find the nearest prime,if the number is itself a prime,output itself -- Deb

Options

exec is denied

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

Sample input:_

17594
29886
6269
16149
40158
24093
52524
55834
20937
36614
42691
45873
55069
19217
63346
29984
59297
53110
28135
48127
39485
3307
31360
36976
15039
60722
51595
16637
32
61775
25099
57302
20739
47127
64734
55449
63191
42944
14009
29962
39757
12885
50941
51978
6695
12376
63284
14068
24046
49750
59914
18338
28869
21210
6495
8657
53216
57212
53128
27477
38008
35159
25267
36795
56925
27834
21991
63998
52275
43442
54133
26033
1606
29723
24676
47106
41890
55863
46433
49913
39388
1579
60487
17726
33905
57404
49576
36877
28561
35887
61886
57631
38187
35121
16436
17079
38068
63861
43288
50860
24427
36727
57779
32130
59019
54863
61771
12312
32449
15167
54793
30751
1286
60146
17149
47218
52680
13154
59678
12648
64901
25135
41406
25752
12259
51784
28618
47522
49250
8996
30892
9171
37829
26235
38496
57496
19839
30939
21410
39878
25769
46861
9070
37481
224
54163
1424
24922
11622
63517
10104
19277
38816
55194
33480
60570
32845
13519
995
12585
29342
61673
23344
38195
17608
9093
24564
59381
36607
53226
59413
15285
5017
37960
17667
56556
16415
38696
35960
7480
38855
1155
48105
51919
37118
30362
4719
54594
12547
11900
5748
1289
57515
21605
25586
1864
21996
20876
31488
6360

Sample output:

17597
29881
6269
16141
40153
24091
52529
55837
20939
36607
42689
45869
55073
19219
63347
29983
59281
53113
28123
48131
39499
3307
31357
36973
15031
60719
51593
16633
31
61781
25097
57301
20743
47129
64747
55441
63197
42943
14009
29959
39761
12889
50951
51977
6691
12377
63281
14071
24043
49747
59921
18341
28867
21211
6491
8663
53201
57203
53129
27479
38011
35159
25261
36793
56923
27827
21991
63997
52267
43441
54133
26029
1607
29723
24677
47111
41887
55871
46439
49919
39383
1579
60493
17729
33911
57397
49559
36877
28559
35879
61879
57637
38189
35117
16433
17077
38069
63863
43291
50857
24421
36721
57781
32119
59021
54869
61781
12301
32443
15161
54787
30757
1283
60149
17159
47221
52673
13151
59671
12647
64901
25127
41411
25747
12263
51787
28619
47521
49253
8999
30893
9173
37831
26237
38501
57493
19841
30937
21407
39877
25771
46861
9067
37483
223
54163
1423
24923
11621
63521
10103
19273
38821
55201
33479
60589
32843
13523
997
12583
29339
61673
23339
38197
17609
9091
24571
59377
36607
53231
59417
15287
5021
37957
17669
56543
16417
38693
35963
7481
38851
1153
48109
51913
37117
30367
4721
54601
12547
11897
5749
1289
57503
21601
25583
1861
21997
20873
31489
6359

Sample input:_

616217295
875493420
867883457
246828156
558270377
282006685
701166384
230641685
735007143
990052117
496598116
712942476
101744456
963517061
899721505
1023800271
99520082
858974698
602341590
995570046
25313912
742712630
670406564
603635697
343550752
697292313
896522855
293656345
743404287
225108429
781611241
762361908
1039767671
802759388
763370139
783976976
561805130
740196151
406812976
84887810
567783252
1055974834
303553937
89872357
1017987675
118864757
1014442958
1068926805
88534465
556960021

Sample output:

616217293
875493407
867883447
246828149
558270409
282006689
701166383
230641693
735007139
990052117
496598119
712942463
101744453
963517057
899721533
1023800291
99520073
858974681
602341601
995570039
25313903
742712629
670406549
603635693
343550743
697292317
896522857
293656367
743404283
225108439
781611241
762361937
1039767671
802759393
763370137
783976987
561805133
740196161
406812979
84887807
567783253
1055974831
303553963
89872333
1017987671
118864747
1014442963
1068926849
88534489
556960007

Sample input:_

20312742
532327935
434557159
749538495
130711618
10978047
94874544
143843850
352522790
960176027
306736142
222733907
841453451
507985992
508830923
778752916
853519064
867097934
307429974
303871328
328299099
931813929
146715551
76356052
730759288
925320239
497720844
148350779
469459692
414672805
19458360
643894312
532104776
1045051277
516881175
228743237
607439643
487211262
467343732
258935715
233398307
559253790
269917960
884664887
688310108
99378231
574870509
724248318
59119240
572750273
840482624
363718920
1002859772
635084662
543811729
636070226
915521032
112283692
648187270
897549629
510440003
774513676
562962043
228729229
492751646
432068118
542701715
265766932
974083260
561429794
838250946
909018453
997579154
104388042
562509534
68654954
626961824
1017293161
329152745
141273037
816410755
613721634
933003628
444506051
4268321
522040664
353925324
670162092
864433795
369839748
373686454
206309579
704776907
1028538321
759925389
580536277
966745607
301385768
888915357
734458821
594817806
676292147
391963590
180762411
50791683
19778674
577455105
160497872
249438575
262225820
539502168
22607310
10725629
578571523
260376678
434176430
464002656
120169746
936898510
51130355
216575774
586866268
328012308
20465713
547018504
559918126
198478790
567198865
140080239
276366224
304905264
667004090
361019340
1018166440
388885236
392932871
571774080
14902797
923468566
703763906
344173268
23792860
251571109
808097086
247268514
299246598
211571591
71266182
645367642
924278231

Sample output:

20312713
532327933
434557153
749538499
130711627
10978043
94874551
143843849
352522787
960176027
306736139
222733897
841453451
507985969
508830937
778752911
853519061
867097921
307429949
303871339
328299091
931813943
146715557
76356053
730759291
925320239
497720843
148350767
469459729
414672809
19458371
643894301
532104779
1045051291
516881173
228743239
607439653
487211267
467343727
258935711
233398303
559253801
269917951
884664889
688310113
99378221
574870507
724248307
59119237
572750273
840482609
363718921
1002859763
635084669
543811721
636070207
915521027
112283681
648187273
897549619
510440003
774513671
562962031
228729211
492751639
432068123
542701723
265766929
974083259
561429797
838250951
909018457
997579153
104388049
562509529
68654953
626961823
1017293161
329152753
141273029
816410747
613721639
933003619
444506047
4268321
522040663
353925343
670162099
864433793
369839749
373686457
206309573
704776903
1028538307
759925391
580536269
966745607
301385783
888915341
734458831
594817787
676292167
391963589
180762401
50791691
19778669
577455107
160497871
249438583
262225811
539502163
22607311
10725629
578571559
260376679
434176433
464002663
120169757
936898489
51130351
216575771
586866263
328012303
20465707
547018501
559918111
198478789
567198859
140080243
276366227
304905281
667004087
361019317
1018166441
388885243
392932879
571774079
14902799
923468563
703763927
344173273
23792861
251571101
808097089
247268509
299246587
211571573
71266183
645367673
924278233

Ranking

Python _

RankUserSizeTimeDateStatistics
1hallvabo980.24522011/04/10 21:31:450B / 56B / 30B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima1030.53502011/04/22 09:01:260B / ?B / ?B

PARI/GP _

RankUserSizeTimeDateStatistics
1teebee630.08492012/04/02 00:28:180B / 44B / 19B

J _

RankUserSizeTimeDateStatistics
1I., S.460.18002011/08/19 05:35:180B / 18B / 28B

C _

RankUserSizeTimeDateStatistics
1not990.16512011/04/12 19:48:370B / 46B / 53B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai (embed)11380.23542011/04/12 15:21:070B / 526B / 608B

Haskell _

RankUserSizeTimeDateStatistics
1sjoerd_visscher1130.77852011/04/11 03:57:110B / 58B / 51B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*1100.17382011/04/12 23:24:180B / 68B / 35B
2*yuko*980.06082012/01/09 12:58:540B / 60B / 29B

Maxima _

RankUserSizeTimeDateStatistics
1pooq941.12402011/04/12 20:08:470B / 58B / 32B

bc _

RankUserSizeTimeDateStatistics
1Carlos Gutierrez1801.23862011/04/13 03:39:220B / 94B / 79B

Groovy _

RankUserSizeTimeDateStatistics
1nn1037.72232011/04/11 13:28:380B / 63B / 37B

Language Ranking_

RankLangUserSizeScore
1JI., S.4610000
2PARI/GPteebee637301
3Maximapooq944893
4Pythonhallvabo984693
5Fortran*yuko*984693
6Cnot994646
7Groovynn1034466
8Common LISPkozima1034466
9Haskellsjoerd_visscher1134070
10bcCarlos Gutierrez1802555
11OCamlm.ukai (embed)1138404

return to the top page