# Calculate the formula

## Submit

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 7 integers A, B, C, D, R0, R1 and S
And a formula f, where
f(0,0) = R0
f(0,1) = R1
f(n,0) = A * f(n - 1,0) + B * f(n - 1,1)
f(n,1) = C * f(n - 1,0) + D * f(n - 1,1)

Calculate `f(2 ** S - 1,0) % 99999999999997` and `f(2 ** S - 1,1) % 99999999999997`

## Options

exec is denied

rejudge feature is enabled

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

## Sample input:_

```7281 3276 1879 1167 8553 5553 433
4275 9591 1519 3970 2643 9708 304
9068 3338 1328 8038 7241 1709 359
8962 8716 7092 9318 8738 3766 345
9486 6980 5746 1967 4650 8772 275
4217 2211 1791 1286 4370 6110 323
7888 9441 1242 2701 4529 2185 504
4332 1771 9641 4592 8268 4559 505
4218 2098 3650 6696 3156 7341 307
2334 1694 9961 5857 1792 3272 429
1952 4419 5540 4289 4986 8929 289
3159 3905 5849 6601 3197 3562 308
9752 9534 6784 4750 2790 8369 297
8888 1892 3840 3441 1588 5558 493
9240 4760 9232 1196 3353 8992 357
5830 7357 7592 3258 9279 5432 373
2487 4593 3292 5851 6339 2146 367
3675 6462 2350 8830 6117 3693 450
1278 6373 1830 3177 5573 6520 316
1256 2070 7074 9488 3262 8272 298
7272 9474 9296 4887 1550 8822 481
4961 4357 5091 1145 3441 6859 328
3912 4278 6935 2920 9833 5995 312
8529 6257 9443 2034 1443 8426 289
2015 2485 3226 7845 3439 9063 302
3281 5322 3441 4956 3586 9607 288
3901 1790 4185 6628 3095 9723 281
8143 6712 7023 7371 7750 6195 374
3982 1033 5417 8197 6210 4703 460
6031 6950 2854 8290 1313 3320 355
3023 4274 5549 1442 4262 1247 405
7913 5683 1438 8435 1328 5363 370
6439 6736 2271 4082 9700 3548 481
8926 1329 2170 4161 6260 1160 379
1510 6602 7836 6289 2900 3469 472
2816 4467 9351 8823 5655 9470 418
7189 3926 4340 6363 9564 5707 437
5598 3739 4066 1719 5731 5527 405
9175 3974 5429 9760 6015 6257 306
4644 1614 9361 4310 8042 5720 333
1788 6960 2570 9922 2599 2837 283
6331 1485 2877 6030 6532 4658 488
5512 6854 4877 4276 2595 8488 426
2863 3617 3905 2640 3745 3216 361
4278 9195 5984 9190 4643 8898 386
8238 1417 8200 7348 1964 8171 403
5679 6559 8629 4282 7658 9830 392
9910 1314 6605 6838 3558 6278 285
8822 8133 4245 8418 2030 1976 260
5495 1189 2073 9171 5176 6639 391
2362 7699 4751 2630 7714 6470 258
8551 8023 8751 9347 4064 7148 284
6914 9133 9742 2205 4698 7744 272
6195 3949 8007 5169 8241 7024 325
2784 2752 9411 5630 1408 2893 387
2061 3557 2858 3932 8544 6747 287
2804 7191 2523 3329 9001 9182 332
6693 5700 3538 6991 2950 8985 301
5439 5035 2769 1056 9571 7489 256
6748 4169 4213 5645 2098 4672 353
5958 7630 8847 1507 6383 9339 499
7077 6032 6481 1442 2338 3706 506
6016 7556 9255 5809 9552 2719 313
6011 6641 2158 5227 6015 1696 365
2835 3100 2678 3284 7097 6735 309
6185 8519 4745 4147 9083 7811 386
5565 2254 4709 1423 4648 4758 281
2404 4460 4513 6577 9632 7488 285
1779 3998 3107 3014 1410 1217 494
4767 8247 6042 4362 3948 8228 455
1447 9518 8692 4251 7210 4961 257
8508 4703 4915 1527 4674 7047 332
4913 1420 6681 4779 4306 6077 511
7743 4221 2516 8861 1050 4366 281
1496 9876 1703 6223 8095 5175 448
9382 8109 5308 3238 1546 4332 324
9247 9658 4670 8194 3778 1882 441
6993 8473 5087 2748 9954 4057 478
2696 4622 1921 5350 1366 9303 419
2020 3176 6294 4054 2036 8609 363
9089 4373 4312 8225 1890 5675 320
2967 9428 9672 3445 6770 9533 406
5658 8449 2198 1249 4261 8810 446
4463 7985 9342 9096 4319 4139 352
1469 8190 5767 1116 4117 4729 471
9721 2676 1280 9029 9510 7395 430
4057 5456 5472 9134 6962 1688 373
8171 7701 4675 3920 1423 4829 370
2618 4704 5125 2259 1779 8009 321
9487 3658 4237 6277 4365 5791 355
3674 5566 7265 1904 5941 4734 383
6763 3515 4571 9478 1268 7637 498
2753 9485 4145 8776 2803 3484 502
5435 5397 8886 6579 1101 8342 442
4156 5794 3564 4644 7460 8028 482
1941 7107 9963 2912 7258 9856 460
6391 6569 5930 4885 3407 9574 263
3091 6239 8475 2267 7820 5839 402
2812 4391 6931 8989 8059 4181 473
8111 7185 5559 8160 9721 4722 288```

## Sample output:

```35981115602963 11075307654690
43611101319279 75456947952900
31371867269041 98591243623897
48993158224574 53685944071678
56480001662664 73307063438812
4845678969973 16170251417894
81766623755063 60328589548448
60201669736567 43041172410725
9642406025700 38398681870584
97347416442342 84374287617559
35308437031232 92053367990925
49094375372586 42274736492523
4299313728123 1700201831562
67899424877843 78282550331290
55800871918831 10634672671556
7921117797837 74427513634702
54326184955026 17165534797565
2117734808935 66734727508599
28538134153609 50872562926949
67797610255011 77162915971932
55321201979647 9547264859672
33982347717504 46258965117929
78890154630396 46526622280932
83954736714213 44149341700549
14722337964286 27503178493548
75009880459325 84539649358033
13932086331577 94868214460781
92143374860004 3836416803980
55420499697659 9494591524302
764609822323 67825863310769
2090965322564 21399746739309
16062897592802 34298387796704
91333488213824 78822653943905
92378691977084 90181357156937
31662659818908 33836699320956
60766550162446 59577123262490
11527150196655 17067089581841
67102435240397 47665791769932
59501455110041 61856677948035
94359236604431 36102478346361
97653131443670 45528172200617
29587791328786 53901417091863
20838407608440 51288301961764
44320432872016 95903485221400
18070153177913 8516050425484
99939621092265 854390214509
50263914173470 26129842061059
7755297866440 22046979244444
14260671026784 94975896324678
22720372406704 94124607102440
8319298990464 72808236107275
29471158516441 27621267130594
94698623496758 67210406512410
80486753895490 53627643127234
93700000049675 45980161186019
6285844602897 72801078837532
70369632395859 56754323598268
46351147932501 92529644717088
36927452948750 83349559901874
86047915628844 80193233038844
6599190900640 86705548600482
32226077519582 28655218726674
59567701768100 98502631657122
41694259582735 93529527230631
20654841573464 3036564551387
64780422012062 43823736443653
18077484972470 80461155654059
36103429861810 51929377639200
22537718725886 61330333323533
41988083742154 69872421324463
95832571763059 62626852033899
72495516347318 4367004721073
228079707401 64668786854023
71665962118157 8944527496708
56651274150123 20803562171304
29603708678170 62741462960899
30315845875808 97649860417401
8811238948092 66857855748523
63381527506537 77856780368053
43291882376383 32328856732631
98622582270255 71836011165738
59917784977061 28468273944940
79770542492603 87221714059277
56660595989393 54673531375423
10385356118348 8775886938972
75814518869594 50504851249626
41985673873207 54573517261983
55157842246702 34194688860158
86333126946395 45534294822099
22672585384719 4623581169223
4313428847992 27548927685272
15048676642048 78418269472847
72469079932613 13594693901252
1615964652575 86003350610184
78870708737156 5800683687294
95063074124346 72348464277582
31355216195673 86391410015927
22255439418735 72135758224757
95115050741578 27631570750819
46416656536896 26024693041009```

## Ranking

### Ruby_

RankUserSizeTimeDateStatistics
1rotary-o1190.87412020/08/15 16:59:170B / 55B / 57B
2mitchs1282.80512020/08/13 22:50:410B / 60B / 61B
3mitchs (rotary-o)1161.29102020/09/09 17:51:000B / 56B / 53B

### Ruby2_

RankUserSizeTimeDateStatistics
1rotary-o1190.48862020/08/15 16:59:000B / 55B / 57B
2mitchs (rotary-o)1131.79312020/09/09 17:40:440B / 51B / 56B

### Perl_

RankUserSizeTimeDateStatistics
1tails1552.56552020/08/13 16:39:360B / 62B / 89B
2test12192.91282020/08/13 07:35:570B / ?B / ?B
3mitchs (tails)1472.49972020/09/10 10:31:140B / 56B / 87B
4tails1482.54312020/09/09 16:39:140B / 57B / 87B

### Python_

RankUserSizeTimeDateStatistics
1ZED.CWT2162.28392020/09/09 13:54:420B / 117B / 94B
2mitchs1341.87112020/09/09 18:00:380B / 73B / 56B

### Python3_

RankUserSizeTimeDateStatistics
1ZED.CWT2142.49282020/09/09 13:55:060B / 114B / 95B
2mitchs1302.19522020/09/09 18:03:450B / 68B / 58B

### PHP_

RankUserSizeTimeDateStatistics
1McBusLuck29690.21292020/08/12 21:40:160B / 2770B / 0B

### C_

RankUserSizeTimeDateStatistics
1tails2340.91572020/08/21 19:43:540B / 119B / 106B
2mitchs (tails)2300.91672020/09/12 11:01:530B / 114B / 108B

### Java_

RankUserSizeTimeDateStatistics
1rotary-o3530.38442020/08/22 21:10:510B / 228B / 115B
2mitchs (rotary-o)3480.34782020/09/10 09:23:390B / 224B / 114B
3mitchs (phone)3540.35232020/09/10 06:34:020B / 230B / 114B

### Bash_

RankUserSizeTimeDateStatistics
1mitchs860.09652020/08/14 07:18:140B / 40B / 41B
2tails880.99082020/08/14 10:15:140B / 33B / 49B
3mitchs (speed test)1200.06712020/08/14 13:19:030B / 63B / 52B
4tails (mitchs)830.10932020/09/16 11:40:030B / 36B / 41B

### bc_

RankUserSizeTimeDateStatistics
1McBusLuck29720.01682020/08/22 01:46:040B / 2770B / 2B

### dc_

RankUserSizeTimeDateStatistics
1tails1152.78842020/08/13 18:45:560B / 83B / 32B

### Scala_

RankUserSizeTimeDateStatistics
1rotary-o1682.93952020/08/15 21:51:580B / 98B / 61B

### Language Ranking_

RankLangUserSizeScore
1Bashtails (mitchs)8310000
2Ruby2mitchs (rotary-o)1137345
3dctails1157217
4Rubymitchs (rotary-o)1167155
5Python3mitchs1306384
6Pythonmitchs1346194
7Perlmitchs (tails)1475646
8Scalarotary-o1684940
9Cmitchs (tails)2303608
10Javamitchs (rotary-o)3482385
11PHPMcBusLuck2969279
12bcMcBusLuck2972279