Tetration Mod

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 2 integers S and M
And a formula f, where
f(n) = (S ↑↑ n) % M
↑↑ is the tetration operator

Output `i` and `f(i)`, where
(f(i - 1) != f(i)) ∧ (∀x∈ℕ, (x > i) → (f(x) == f(i)))

Options

exec is denied

rejudge feature is enabled

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

Sample input:_

934894138 103042792
754651342 857351062
997845325 610644235
872815191 898207672
528102597 221586295
729855799 106369722
793693593 335972642
438140384 707062366
320046171 153519887
928032564 743005544
944706402 768220227
168331181 926887130
174806515 288316992
131513632 754689359
761380487 591110118
839483291 476828131
295108315 267463150
811250827 267302189
431861167 966832879
340049565 769480017
406359102 386023452
212316527 830625788
115300291 231459280
188477504 203317071
191308752 793664626
462690512 644459570
229744257 726592018
396269054 666268122
234772271 394102485
511226068 614776124
668841331 655869006
590288041 403105255
466995500 273350351
719099234 845457071
159380346 121948279
928891444 329604299
997048948 591448876
527515609 966069026
630600235 987660921
350595536 238432421
252584146 384508561
421111017 907253731
217190286 443898716
303404154 440386797
441711927 568202537
820027230 307604400
420541478 400329686
699639455 491985681
872913881 707412832
414525119 849902560
825608008 897567109
845732465 899516451
931393145 200867237
142635172 841105842
680811711 331155170
658980134 432037440
360832323 444587770
191156838 986671316
886560811 586107527
728160012 532227849
205481058 723230401
952374271 586767762
707912124 469726748
312127260 679795518
833361544 944386022
979945405 377234145
129508209 148482929
666557697 890957955
521110765 486096744
923174577 804966909
324204834 385378002
515623006 996892771
336469831 395687536
304816219 894814850
891612808 724055218
820887361 284092262
950291311 104216823
369720750 685601517
155398954 694471763
364116527 423773637
982628076 710830191
980998609 490195446
916611595 375690922
510533510 361555013
689059722 513866181
734690160 953671245
358344736 547608294
581316549 510948917
582551945 760655596
136121168 851598819
239220045 573069037
108125313 365666637
903892652 435275686
399626543 209019435
972131969 122623740
474690502 101200540
529770955 475086060
959291822 510655507
861752852 267040161
940491618 918648103
601794451 692679642
441454917 641298262
578960866 701733107
875209706 590934151
439870182 300506558
518817894 206247180
359851726 730124614
888091345 652337724
921681116 100679447
143152493 984031686
452960438 826915302
891005866 512040375
915113071 879254695
845107095 939629967
836949928 882577645
938106475 293512360
146452481 922366183
386161125 738137211
944367728 525336032
392853173 177301382
377014196 849534196
431942874 732277252
972360497 235373339
576789398 131167334
350299547 848796284
110184659 381088336
404003412 446965111
574239014 372710977
771132999 787504569
363434096 326247100
326821968 486802494
299311260 344300258
417358169 999246801
117629862 793334123
965702389 414769976
372609884 661846194
918980799 498316653
866953614 686577115
537242778 334286873
190802394 284905806
114225633 295853298
818085044 159875614
788149678 832926532
396689772 595127681
611678366 167879583
554967833 445973569
504627709 915123853
264411584 658634774
703876983 986325627
175866097 380555468
444248900 155852992
745937303 603168907
493890179 370984558
648201941 356653306
111143997 978606182
258648390 536952867
748933471 623745345
511270429 570414471
878550558 956524369
116427612 851106603
651232072 225755962
996124826 346928011
400951778 886948404
267390670 849316581
895030543 682204470
889903175 908702875
496088684 530112696
680128189 984082201
451625244 730586483
392014623 159509675
228346810 429240296
795740131 383220087
882056800 699671070
983727664 277976376
526541324 441475572
647694861 494112649
147443257 156705583
425310437 663535366
966462412 271767676
847826362 886495387
459728042 293745074
635994175 425032392
217795752 452114769
386929658 291133922
298228090 633759910
794589217 736153611
708162077 594404865
620928771 135611918
222412927 386305676
654171139 153278417
971107032 825848313
875354695 903410699
575559964 554666351
699888580 218520222
594618213 432091259
599567347 317979636
898657481 293040051
400703335 878463579
423696739 617616398
373691847 272027824

Sample output:

7 100451704
5 89604136
3 488454560
6 753192223
2 91822977
5 44447065
4 243394591
4 177838094
6 114650436
5 196739016
5 201971880
5 745238941
3 126683275
5 130802698
4 48687047
6 453891715
4 17767425
4 211919353
4 707995919
5 182652744
5 266108016
5 643623791
3 152987131
6 151624759
5 555873274
6 176844786
5 268629583
4 363149788
3 27354221
8 72606864
5 645518209
4 154276136
5 255064512
5 503218367
4 14357294
7 262153108
5 483838120
3 245923753
4 937511401
6 16894708
4 5002780
5 795385361
4 305770512
6 236794674
6 275570868
4 10010400
7 29997826
6 478611431
6 333369113
4 667078079
6 17488375
4 382086593
3 94617872
5 22668058
7 331100751
5 426975616
5 348844367
5 628226992
4 49300786
5 65673984
6 40232015
5 458976163
5 453052472
9 655248738
7 551851862
3 298176325
3 15346204
4 587062212
3 212595901
3 626311239
5 217330632
9 5888544
4 49191671
6 805603379
6 177021920
5 156146585
4 48027910
5 458616447
6 594497472
5 198095012
5 418883988
3 291371515
5 11244505
6 47122638
6 161614545
3 308650965
4 519826894
5 262755589
6 742752129
6 465730171
4 527901321
4 75294318
6 316351468
3 85838432
5 49506809
5 62398176
3 69905695
5 429333378
7 162135046
4 752135285
3 620108959
4 421026327
6 574677974
7 476001065
6 112416550
3 119191896
6 132056412
3 404356717
4 42227167
5 874405235
5 733572616
3 135341341
2 36937146
5 697037673
5 334336511
7 177618115
6 161763986
5 217953225
4 160576768
5 176863643
4 361366328
5 37591520
5 221600871
6 99351864
6 775303191
3 263722923
4 217572010
6 9224662
4 137162070
5 212417596
6 429018444
5 154527574
6 164660666
10 194116420
4 335988349
5 484677088
4 152878428
8 507046051
5 264470173
6 14968674
4 113610723
4 104323444
7 51886424
6 308600231
4 62970841
4 426149059
5 759079375
5 294478132
5 338438505
5 67604805
5 137130880
3 321247147
5 128627155
5 9555237
5 882368765
4 357710364
8 490625701
6 10272019
6 922366330
6 9790536
3 118244672
6 25511862
6 174477436
6 623330860
6 599913427
4 382461000
6 180495160
4 610717212
4 267778636
4 8615347
5 133102088
5 203335210
4 168539590
3 223532224
6 139333648
5 31657632
5 299017
3 324231299
4 78526436
7 217882645
6 256164024
5 356978407
6 73791102
7 50445340
4 338130640
4 717235177
5 164223752
4 126810611
10 91095791
6 47517969
6 664527132
7 591330638
5 120501733
6 113177932
7 309042204
5 301596943
5 65476106
4 711391384
4 595454241
4 140019591

Ranking

Ruby2 _

RankUserSizeTimeDateStatistics
1mitchs1500.34392020/09/29 13:22:430B / 76B / 66B
2mitchs (alt)1551.03022020/09/29 12:59:220B / 82B / 63B
3rotary-o1561.94302020/09/28 23:39:350B / 85B / 62B
4mitchs (rotary-o)1480.32532020/10/08 16:30:380B / 75B / 65B

Perl _

RankUserSizeTimeDateStatistics
1tails1932.01642020/09/25 15:14:240B / 88B / 101B
2mitchs (tails)1891.98262020/10/09 08:51:390B / 77B / 108B

PHP _

RankUserSizeTimeDateStatistics
1McBusLuck23420.20712020/09/11 20:28:100B / 1943B / 0B

PARI/GP _

RankUserSizeTimeDateStatistics
1mitchs1090.05022020/09/14 06:01:060B / 62B / 46B

C _

RankUserSizeTimeDateStatistics
1tails2180.23602020/09/25 15:31:000B / 103B / 114B
2rotary-o2220.03672020/09/27 13:55:070B / 108B / 113B
3tails (mitchs, rotary-o)2040.24622020/10/09 10:28:500B / 94B / 109B
4mitchs (tails, rotary-o)2060.23702020/10/09 02:02:470B / 95B / 110B
5mitchs (tails)2110.25362020/10/08 18:56:260B / 97B / 113B

Bash _

RankUserSizeTimeDateStatistics
1mitchs1080.04812020/09/14 06:06:330B / 53B / 50B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o2337.62612020/09/27 10:48:063B / 133B / 76B

Language Ranking_

RankLangUserSizeScore
1Bashmitchs10810000
2PARI/GPmitchs1099908
3Ruby2mitchs (rotary-o)1487297
4Perlmitchs (tails)1895714
5Ctails (mitchs, rotary-o)2045294
6Scalarotary-o2334635
7PHPMcBusLuck2342461

return to the top page