Prime Modular Inverse

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

A variant of http://golf.shinh.org/p.rb?Modular+Inverse where M is guaranteed to be prime.

-- mitchs

Options

exec is denied

rejudge feature is enabled

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

Sample input:_

28368057 64807159
6833724 8958449
30066306 47131411
23532257 28097921
2121379 19985087
44002478 79435397
76636788 89748539
6133851 35232247
61948988 88233767
6866732 8066329
3590769 5787071
6049383 9122207
35395194 42309959
17623369 40909997
62185853 70938521
44302771 57057977
24153438 97542299
31743337 33080291
11342522 13286407
59858451 60597881
23930516 27387317
25735603 26913739
3101362 21356429
58859765 80850227
46041381 89265601
704498 5426327
14259758 29562161
74139757 75392677
27019008 45970469
4354090 22928509
1232923 1399351
84980690 87876263
25494710 40914403
60044979 60925213
22364412 46381019
3790574 30591647
559846 2944933
64146287 71505457
563240 1936631
2818534 42692383
39964644 42212143
14621706 41449813
3911898 13326091
19587020 49518719
8068983 50703967
1064231 46124543
22300026 45051301
68636647 92785789
34917969 58496773
27435088 59145677
35416955 96201551
18599318 55603091
16813763 94736099
7694695 9943819
42137805 77739511
55323116 58172483
12065831 51730639
32091789 85430309
21649654 36661921
40698127 69662371
42461225 47271443
6777133 15169901
12192401 52020413
18882447 49139317
95601510 96207523
15318838 16497319
5254959 22446913
25913898 39458039
37011482 41863513
36044286 51721031
4476417 99472031
4744378 56975047
2942047 4510991
31426417 76753709
32322644 89749223
25520828 66736469
16624319 99280703
5121195 67139213
36667655 43833169
16583261 18467327
17148002 65744243
4769648 79340609
54886885 95726537
12915224 81271031
49065181 51494189
22221308 49954259
4449032 12225919
39189307 49128473
19396433 99182519
35126854 40849877
56125157 93154489
5462690 10552471
34742842 83270351
9999919 32397683
2879860 8154071
1859141 33429743
42732662 99392957
26246244 89402497
245790 41562473
250502 1191283

Sample output:

39329263
8349086
24351754
22275383
16146177
30551536
88068720
1057780
14760967
1271035
1273331
6320965
24035529
38543502
5335682
1803079
43179165
5390343
362035
15660319
21769908
4037303
14294694
69036654
46749339
3289334
17478008
72107982
24532708
324705
551566
65872820
16684573
6868253
35229076
29255285
1724054
22661265
887132
4956513
3049662
18346288
893195
37703411
34266679
30621349
42564264
92607292
44886997
32842893
26164329
25427051
9455871
2393313
65791750
7735025
10399659
11226932
35967821
43700756
28398305
13760988
11540745
30767875
70645923
12719841
16794497
13448339
36168386
48323580
26209794
18562358
844793
27715886
8857893
17169625
90404979
15803046
17465020
3419443
1328545
1366406
18703055
11179283
14235775
38271030
8794533
7103906
39307687
13025548
72197498
5553737
44926089
22223105
6911333
1272050
6062181
25102660
29775194
578179

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1mitchs490.04782016/12/30 04:04:260B / 34B / 11B
2teebee490.03482016/12/30 08:39:440B / 34B / 11B
3rotary-o490.03282016/12/30 20:12:530B / 34B / 11B

Ruby2 _

RankUserSizeTimeDateStatistics
1mitchs510.09452016/12/30 04:08:180B / 34B / 14B
2teebee510.08162016/12/30 08:43:340B / 34B / 14B
3rotary-o510.09512016/12/30 20:34:180B / 34B / 14B
4mitchs (alt)610.09002016/12/30 07:40:130B / 27B / 29B

Perl _

RankUserSizeTimeDateStatistics
1teebee440.07972016/12/30 07:31:210B / 23B / 17B

Python _

RankUserSizeTimeDateStatistics
1mitchs590.03022016/12/30 02:18:020B / 39B / 18B
2%20590.02962016/12/30 03:15:530B / 39B / 18B
3hallvabo590.03862016/12/30 05:48:050B / 39B / 19B
4teebee590.03042016/12/30 08:15:420B / 39B / 18B
5Hendrik590.02982016/12/30 09:49:420B / 39B / 18B
6dianne590.03162016/12/30 16:31:380B / 39B / 18B
7lynn590.04702016/12/30 22:36:080B / ?B / ?B
8xnor590.07732016/12/31 07:09:280B / 39B / 18B
9rolf590.02932017/01/01 04:05:010B / 39B / 18B
10xsot590.04012017/01/10 11:57:390B / 39B / 18B

Python3 _

RankUserSizeTimeDateStatistics
1mitchs560.15602016/12/30 02:19:210B / 36B / 19B
2%20560.05812016/12/30 03:17:020B / 36B / 19B
3hallvabo560.05032016/12/30 05:49:490B / 36B / 20B
4teebee560.08642016/12/30 08:16:270B / 36B / 19B
5dianne560.13202016/12/30 16:34:090B / 36B / 19B
6kimiyuki560.06512016/12/30 17:25:260B / 36B / 19B
7lynn560.09982016/12/30 22:37:030B / ?B / ?B
8xsot560.16412017/01/10 11:58:100B / 36B / 19B

PHP _

RankUserSizeTimeDateStatistics
1teebee630.05642016/12/30 08:52:565B / 32B / 25B

Clojure _

RankUserSizeTimeDateStatistics
1teebee540.81422016/12/30 09:31:580B / 34B / 18B

C _

RankUserSizeTimeDateStatistics
1mitchs880.01072016/12/30 14:27:180B / 45B / 43B
2kimiyuki1090.01092016/12/30 17:53:110B / 57B / 52B

Haskell _

RankUserSizeTimeDateStatistics
1henkma800.01372017/01/09 14:57:510B / 52B / 23B

Java _

RankUserSizeTimeDateStatistics
1teebee1430.11952016/12/30 08:07:110B / 104B / 34B
2rotary-o1430.11892017/01/01 12:05:550B / 104B / 34B

Maxima _

RankUserSizeTimeDateStatistics
1teebee480.09272016/12/30 09:00:250B / 32B / 13B

Bash _

RankUserSizeTimeDateStatistics
1tails150.02412016/12/30 06:46:230B / 10B / 4B
2teebee150.02292016/12/30 07:54:220B / 10B / 4B
3%20250.02482016/12/30 03:24:070B / 15B / 9B

Zsh _

RankUserSizeTimeDateStatistics
1%20250.06802016/12/30 03:24:140B / 15B / 9B

Fish _

RankUserSizeTimeDateStatistics
1%20250.07152016/12/30 03:24:100B / 15B / 9B

dc _

RankUserSizeTimeDateStatistics
1%20180.03532016/12/30 03:21:100B / 12B / 6B
2teebee180.03302016/12/30 09:08:550B / 12B / 6B

GolfScript _

RankUserSizeTimeDateStatistics
1mitchs310.16972017/01/20 14:59:300B / 8B / 23B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs170.35492017/01/05 11:57:208B / 6B / 3B

Groovy _

RankUserSizeTimeDateStatistics
1teebee721.12372017/01/02 20:52:290B / 44B / 26B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o812.94432017/01/01 12:13:540B / 54B / 24B

Language Ranking_

RankLangUserSizeScore
1Bashtails1510000
2gs2mitchs178823
3dc%20188333
4Fish%20256000
5Zsh%20256000
6GolfScriptmitchs314838
7Perlteebee443409
8Maximateebee483125
9Rubymitchs493061
10Ruby2mitchs512941
11Clojureteebee542777
12Python3mitchs562678
13Pythonmitchs592542
14PHPteebee632380
15Groovyteebee722083
16Haskellhenkma801875
17Scalarotary-o811851
18Cmitchs881704
19Javateebee1431048

return top