QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#370896#6362. Accommodation Plan_happy_WA 377ms86736kbC++143.5kb2024-03-29 18:55:402024-03-29 18:55:40

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 8912kb

input:

5 2 7
1 2 4
3 2 8
2 4 2
4 5 6

output:

12

result:

ok 1 number(s): "12"

Test #2:

score: 0
Accepted
time: 377ms
memory: 86736kb

input:

100000 6851 454171387
1 2 699608
2 3 27930
3 4 719630
4 5 1020888
2 6 763543
6 7 351259
4 8 486314
2 9 1387365
6 10 1288357
4 11 545529
11 12 516390
7 13 222352
12 14 1374608
13 15 118475
13 16 65492
15 17 924923
3 18 1143588
6 19 441762
12 20 1196602
17 21 1406265
15 22 865475
17 23 897062
21 24 35...

output:

95272333

result:

ok 1 number(s): "95272333"

Test #3:

score: 0
Accepted
time: 0ms
memory: 8136kb

input:

8 6 737945515
6 4 3454
6 5 39228
6 8 90331
6 7 31904
6 2 64718
6 3 69991
6 1 58925

output:

20160

result:

ok 1 number(s): "20160"

Test #4:

score: 0
Accepted
time: 2ms
memory: 7412kb

input:

8 5 573891853
8 3 845070
8 1 2304293
8 2 7165015
8 5 8512198
8 6 4711032
8 7 8764253
8 4 5876665

output:

6720

result:

ok 1 number(s): "6720"

Test #5:

score: 0
Accepted
time: 2ms
memory: 7668kb

input:

8 8 672635007
7 3 975710134
7 6 618246273
7 8 903412606
7 4 267301617
7 2 151872591
7 1 678749289
7 5 945399588

output:

0

result:

ok 1 number(s): "0"

Test #6:

score: 0
Accepted
time: 2ms
memory: 8708kb

input:

8 3 3095530
2 4 6015
2 3 2822
2 6 6598
2 1 8970
2 8 4664
2 7 7370
2 5 1425

output:

336

result:

ok 1 number(s): "336"

Test #7:

score: 0
Accepted
time: 2ms
memory: 7420kb

input:

8 6 19228
6 7 60
6 2 61
6 3 48
6 8 50
6 4 31
6 1 80
6 5 74

output:

20160

result:

ok 1 number(s): "20160"

Test #8:

score: 0
Accepted
time: 2ms
memory: 7672kb

input:

8 1 9476
8 3 21
8 4 20
8 7 32
8 6 44
8 5 5
8 2 4
8 1 49

output:

8

result:

ok 1 number(s): "8"

Test #9:

score: 0
Accepted
time: 0ms
memory: 7264kb

input:

8 8 762771948
3 6 67798
6 5 29033
5 1 46925
1 4 63404
4 2 62686
2 7 28707
7 8 43653

output:

40320

result:

ok 1 number(s): "40320"

Test #10:

score: 0
Accepted
time: 3ms
memory: 9064kb

input:

8 6 236053664
8 6 7426363
6 5 4228183
5 2 8931107
2 3 2377463
3 4 7969748
4 7 6516277
7 1 869296

output:

20160

result:

ok 1 number(s): "20160"

Test #11:

score: 0
Accepted
time: 2ms
memory: 8660kb

input:

8 3 895307116
8 1 562601320
1 6 995045068
6 7 762245166
7 4 900560333
4 2 904657319
2 3 693933408
3 5 740726094

output:

6

result:

ok 1 number(s): "6"

Test #12:

score: 0
Accepted
time: 2ms
memory: 7384kb

input:

8 6 6478494
6 4 7929
4 7 7277
7 3 4616
3 8 3211
8 1 5309
1 5 3659
5 2 8934

output:

20160

result:

ok 1 number(s): "20160"

Test #13:

score: 0
Accepted
time: 0ms
memory: 8724kb

input:

8 8 98347
5 3 71
3 2 78
2 7 70
7 4 1
4 8 49
8 1 25
1 6 22

output:

40320

result:

ok 1 number(s): "40320"

Test #14:

score: 0
Accepted
time: 0ms
memory: 7848kb

input:

8 8 1021
3 7 8
7 8 39
8 5 49
5 4 20
4 1 5
1 2 22
2 6 44

output:

40320

result:

ok 1 number(s): "40320"

Test #15:

score: 0
Accepted
time: 2ms
memory: 8192kb

input:

8 2 937341485
3 4 10326
3 8 38111
4 2 94903
8 7 27951
2 6 87423
7 1 71485
6 5 54079

output:

56

result:

ok 1 number(s): "56"

Test #16:

score: 0
Accepted
time: 0ms
memory: 7340kb

input:

8 8 163056691
7 3 6152073
7 2 5986799
3 6 1018535
2 5 6195760
6 1 4076813
5 4 6053416
1 8 610159

output:

40320

result:

ok 1 number(s): "40320"

Test #17:

score: 0
Accepted
time: 0ms
memory: 8668kb

input:

8 6 972755033
8 5 76876568
5 1 326110430
1 6 533819049
6 2 512217855
2 4 268926040
4 3 536052600
3 7 585723821

output:

720

result:

ok 1 number(s): "720"

Test #18:

score: 0
Accepted
time: 2ms
memory: 8496kb

input:

8 1 9861459
7 2 4835
7 3 2634
2 6 156
3 4 9057
6 8 1437
4 1 6443
8 5 5528

output:

8

result:

ok 1 number(s): "8"

Test #19:

score: 0
Accepted
time: 0ms
memory: 8176kb

input:

8 1 68953
8 7 87
8 1 93
7 4 59
1 2 76
4 5 74
2 3 75
5 6 54

output:

8

result:

ok 1 number(s): "8"

Test #20:

score: 0
Accepted
time: 2ms
memory: 7520kb

input:

8 7 9862
3 7 8
3 5 8
7 1 35
5 8 14
1 2 44
8 4 35
2 6 45

output:

40320

result:

ok 1 number(s): "40320"

Test #21:

score: 0
Accepted
time: 3ms
memory: 9072kb

input:

8 4 962167918
3 6 132
6 8 62001
8 5 26403
5 7 93215
7 2 13434
2 1 56213
1 4 70902

output:

1680

result:

ok 1 number(s): "1680"

Test #22:

score: 0
Accepted
time: 0ms
memory: 8656kb

input:

8 1 825218502
2 5 8075962
5 4 7818298
4 7 4883799
7 8 4487180
8 3 1828837
3 6 6013343
6 1 5936665

output:

8

result:

ok 1 number(s): "8"

Test #23:

score: 0
Accepted
time: 2ms
memory: 8088kb

input:

8 1 50202950
2 7 598899556
2 5 889975695
7 8 462045061
7 3 559969878
5 1 138885967
5 6 331379106
8 4 477174698

output:

8

result:

ok 1 number(s): "8"

Test #24:

score: 0
Accepted
time: 0ms
memory: 7476kb

input:

8 4 3435911
7 3 9289
3 2 3356
2 6 205
6 4 2806
4 1 9215
1 5 3953
5 8 9911

output:

1680

result:

ok 1 number(s): "1680"

Test #25:

score: 0
Accepted
time: 0ms
memory: 7720kb

input:

8 2 72263
1 6 4
6 2 7
2 7 9
7 8 94
8 4 19
4 5 15
5 3 35

output:

56

result:

ok 1 number(s): "56"

Test #26:

score: 0
Accepted
time: 2ms
memory: 7528kb

input:

8 7 8704
1 6 27
6 4 25
4 5 7
5 7 18
7 8 16
8 2 38
2 3 44

output:

40320

result:

ok 1 number(s): "40320"

Test #27:

score: 0
Accepted
time: 0ms
memory: 8408kb

input:

8 7 136737456
4 2 79741
4 8 14129
2 1 18595
2 5 16686
2 7 25775
2 6 72150
2 3 16748

output:

40320

result:

ok 1 number(s): "40320"

Test #28:

score: 0
Accepted
time: 2ms
memory: 7484kb

input:

8 2 752221529
3 8 6787266
3 2 9999852
8 7 4617094
8 6 8749064
8 1 2713192
8 4 4356668
8 5 5973270

output:

56

result:

ok 1 number(s): "56"

Test #29:

score: 0
Accepted
time: 2ms
memory: 7484kb

input:

8 4 127650867
8 7 438372990
8 5 680731055
7 1 453840959
7 4 95303777
7 2 167530414
7 6 154070086
7 3 126705611

output:

0

result:

ok 1 number(s): "0"

Test #30:

score: 0
Accepted
time: 0ms
memory: 8008kb

input:

8 7 1851579
1 7 7993
1 2 6847
7 6 1374
7 8 4445
7 5 746
7 3 2801
7 4 4566

output:

40320

result:

ok 1 number(s): "40320"

Test #31:

score: 0
Accepted
time: 2ms
memory: 7980kb

input:

8 4 51381
8 6 36
8 3 25
6 4 30
6 5 71
6 2 16
6 1 63
6 7 64

output:

1680

result:

ok 1 number(s): "1680"

Test #32:

score: 0
Accepted
time: 3ms
memory: 9052kb

input:

8 6 7545
4 5 12
4 8 46
5 3 42
5 2 22
5 7 26
5 1 38
5 6 32

output:

20160

result:

ok 1 number(s): "20160"

Test #33:

score: 0
Accepted
time: 3ms
memory: 9288kb

input:

8 1 161563889
2 8 90757
8 7 61173
8 3 42695
7 1 1948
8 4 28437
7 6 77134
2 5 38056

output:

8

result:

ok 1 number(s): "8"

Test #34:

score: 0
Accepted
time: 0ms
memory: 7772kb

input:

8 3 269159148
8 3 6589677
8 4 7092939
4 2 8359796
4 5 2763008
5 6 6402824
5 1 8802032
8 7 770083

output:

336

result:

ok 1 number(s): "336"

Test #35:

score: 0
Accepted
time: 0ms
memory: 8036kb

input:

8 7 205098784
7 4 294721443
4 6 943585848
7 2 95388153
2 1 869680499
2 8 70227722
6 3 633701355
6 5 714748785

output:

0

result:

ok 1 number(s): "0"

Test #36:

score: 0
Accepted
time: 2ms
memory: 8212kb

input:

8 2 5234543
8 2 8677
2 6 2624
2 3 5393
3 7 7785
8 1 1118
1 5 2763
1 4 9812

output:

56

result:

ok 1 number(s): "56"

Test #37:

score: 0
Accepted
time: 2ms
memory: 8160kb

input:

8 5 54692
1 4 91
1 5 46
4 3 98
1 2 31
2 7 39
7 6 94
1 8 66

output:

6720

result:

ok 1 number(s): "6720"

Test #38:

score: 0
Accepted
time: 3ms
memory: 9144kb

input:

8 6 9090
8 4 37
8 3 17
4 6 45
3 5 4
4 7 25
5 1 32
3 2 26

output:

20160

result:

ok 1 number(s): "20160"

Test #39:

score: 0
Accepted
time: 2ms
memory: 8576kb

input:

8 3 336133426
7 8 60868
8 3 35665
3 5 64083
5 6 71156
6 1 51550
1 2 97942
1 4 94685

output:

336

result:

ok 1 number(s): "336"

Test #40:

score: 0
Accepted
time: 0ms
memory: 8756kb

input:

8 5 636353663
3 4 6474463
4 1 5172654
1 6 1439718
4 2 1566905
6 5 7911933
5 8 780912
6 7 7813232

output:

6720

result:

ok 1 number(s): "6720"

Test #41:

score: 0
Accepted
time: 2ms
memory: 8640kb

input:

8 2 427770893
4 1 422448192
4 3 999541265
4 7 154314478
3 2 316702027
2 8 336728297
8 6 623876490
6 5 797897669

output:

12

result:

ok 1 number(s): "12"

Test #42:

score: 0
Accepted
time: 2ms
memory: 8864kb

input:

8 5 8617508
7 6 1410
6 5 9303
6 3 2875
3 2 179
2 8 9682
6 4 9163
4 1 4123

output:

6720

result:

ok 1 number(s): "6720"

Test #43:

score: 0
Accepted
time: 0ms
memory: 8756kb

input:

8 7 58002
4 7 77
4 5 88
5 3 55
3 2 15
2 8 23
8 6 28
5 1 12

output:

40320

result:

ok 1 number(s): "40320"

Test #44:

score: 0
Accepted
time: 0ms
memory: 8628kb

input:

8 5 7932
1 2 48
2 8 9
2 4 33
4 5 32
5 6 40
6 3 48
3 7 39

output:

6720

result:

ok 1 number(s): "6720"

Test #45:

score: 0
Accepted
time: 0ms
memory: 7696kb

input:

8 6 360959859
5 8 46336
5 1 93574
5 3 75538
5 2 73691
5 6 56531
5 7 27468
5 4 26796

output:

20160

result:

ok 1 number(s): "20160"

Test #46:

score: 0
Accepted
time: 0ms
memory: 8688kb

input:

8 6 858323986
3 7 377405
3 8 4199380
7 2 3820507
3 5 2620623
2 6 5611340
3 4 3366089
3 1 1498734

output:

20160

result:

ok 1 number(s): "20160"

Test #47:

score: 0
Accepted
time: 2ms
memory: 8600kb

input:

8 5 505218811
1 3 662701248
3 8 745246197
1 6 770584598
1 5 980404495
1 2 102383338
1 4 137999979
3 7 582604382

output:

0

result:

ok 1 number(s): "0"

Test #48:

score: 0
Accepted
time: 2ms
memory: 7528kb

input:

8 8 2000472
7 4 6228
7 6 7736
6 5 4491
7 1 9552
7 2 8389
7 8 4394
7 3 5085

output:

40320

result:

ok 1 number(s): "40320"

Test #49:

score: 0
Accepted
time: 0ms
memory: 7672kb

input:

8 8 4416
1 7 67
1 2 36
2 4 80
1 3 52
1 5 83
1 8 23
8 6 69

output:

40320

result:

ok 1 number(s): "40320"

Test #50:

score: 0
Accepted
time: 3ms
memory: 9096kb

input:

8 4 965
3 7 20
3 8 43
3 2 6
3 4 15
3 1 4
3 6 42
8 5 17

output:

1680

result:

ok 1 number(s): "1680"

Test #51:

score: 0
Accepted
time: 3ms
memory: 8960kb

input:

8 8 240562101
1 8 88731
8 3 32133
8 4 5643
4 2 1469
2 5 62641
4 7 65798
7 6 9163

output:

40320

result:

ok 1 number(s): "40320"

Test #52:

score: 0
Accepted
time: 2ms
memory: 8408kb

input:

8 7 225518501
7 2 7505271
2 8 7886900
2 5 7101876
5 6 4144713
6 1 906840
5 3 205979
3 4 1294068

output:

40320

result:

ok 1 number(s): "40320"

Test #53:

score: 0
Accepted
time: 3ms
memory: 8704kb

input:

8 8 287699432
3 5 46260038
5 4 743215838
5 1 564077825
1 8 363497424
8 6 918347021
1 2 484166692
2 7 748203123

output:

0

result:

ok 1 number(s): "0"

Test #54:

score: 0
Accepted
time: 3ms
memory: 9092kb

input:

8 3 607628
5 4 9970
4 2 872
4 8 5750
8 7 1136
7 1 2636
8 3 9720
3 6 3115

output:

336

result:

ok 1 number(s): "336"

Test #55:

score: 0
Accepted
time: 0ms
memory: 7836kb

input:

8 1 7727
5 6 4
6 4 85
6 2 11
2 3 96
3 8 96
2 7 50
7 1 54

output:

8

result:

ok 1 number(s): "8"

Test #56:

score: 0
Accepted
time: 0ms
memory: 8784kb

input:

8 4 2511
2 1 7
1 4 22
1 5 6
5 7 11
7 8 1
5 3 18
3 6 20

output:

1680

result:

ok 1 number(s): "1680"

Test #57:

score: 0
Accepted
time: 0ms
memory: 8440kb

input:

8 8 324367188
2 6 70179
4 6 15449
6 5 88199
8 5 73343
5 3 49566
1 3 52398
2 7 93607

output:

40320

result:

ok 1 number(s): "40320"

Test #58:

score: 0
Accepted
time: 0ms
memory: 8752kb

input:

8 7 600661881
3 6 721291
4 6 3802161
6 8 2641046
5 8 5240150
8 1 6293440
2 1 1166231
3 7 1893817

output:

40320

result:

ok 1 number(s): "40320"

Test #59:

score: 0
Accepted
time: 2ms
memory: 7648kb

input:

8 4 348282365
5 4 372175298
3 4 468755008
4 8 850332046
7 8 474108216
8 1 279307273
2 1 114957929
5 6 799417013

output:

0

result:

ok 1 number(s): "0"

Test #60:

score: 0
Accepted
time: 2ms
memory: 8132kb

input:

8 8 9683274
4 3 6808
7 3 2103
3 5 2197
2 5 3629
5 1 5791
6 1 7530
4 8 7306

output:

40320

result:

ok 1 number(s): "40320"

Test #61:

score: 0
Accepted
time: 0ms
memory: 7464kb

input:

8 8 97097
6 8 76
1 8 18
8 7 49
2 7 23
7 3 39
5 3 51
6 4 4

output:

40320

result:

ok 1 number(s): "40320"

Test #62:

score: 0
Accepted
time: 0ms
memory: 7236kb

input:

8 4 285
2 3 3
5 3 40
3 6 40
1 6 50
6 8 32
4 8 11
2 7 13

output:

1680

result:

ok 1 number(s): "1680"

Test #63:

score: 0
Accepted
time: 0ms
memory: 8804kb

input:

50 26 915103290
50 22 69691
50 10 32127
50 26 14441
50 28 38472
50 49 56803
50 23 42704
50 43 47172
50 41 44139
50 33 86658
50 34 69027
50 17 71571
50 1 72253
50 40 61585
50 15 3002
50 25 99393
50 45 46752
50 12 87025
50 13 11865
50 16 70433
50 18 75450
50 47 33828
50 24 73639
50 8 48262
50 44 27158...

output:

898371378

result:

ok 1 number(s): "898371378"

Test #64:

score: 0
Accepted
time: 0ms
memory: 7732kb

input:

50 39 430576851
11 37 8823421
11 29 9353898
11 46 9184850
11 8 3760515
11 43 2675518
11 9 9395184
11 42 1418495
11 35 6422094
11 5 373477
11 41 7159452
11 34 8989180
11 16 8797116
11 7 2856688
11 1 5950457
11 45 8401069
11 6 4072267
11 25 6595014
11 40 4511962
11 19 4775319
11 27 1729856
11 14 33143...

output:

86247804

result:

ok 1 number(s): "86247804"

Test #65:

score: 0
Accepted
time: 0ms
memory: 9112kb

input:

50 42 875414464
18 8 86845192
18 39 206300115
18 5 675549998
18 33 761311934
18 31 98252191
18 36 448133803
18 6 24896450
18 35 896243505
18 46 1239709
18 25 821520165
18 20 900189851
18 37 943092219
18 4 592936847
18 24 618252133
18 14 627535096
18 17 836912960
18 41 744327814
18 12 78149552
18 10 ...

output:

626855450

result:

ok 1 number(s): "626855450"

Test #66:

score: 0
Accepted
time: 0ms
memory: 7464kb

input:

50 47 8602515
9 21 4951
9 38 965
9 39 1006
9 32 2127
9 12 5634
9 47 2328
9 17 2540
9 33 2412
9 27 2005
9 28 8990
9 4 5341
9 29 3100
9 25 2802
9 10 8525
9 2 6125
9 11 1661
9 31 911
9 1 8507
9 19 7677
9 36 9649
9 3 2648
9 5 2229
9 23 6001
9 6 3534
9 42 3243
9 13 5497
9 40 9857
9 24 172
9 34 1578
9 50 ...

output:

386434677

result:

ok 1 number(s): "386434677"

Test #67:

score: 0
Accepted
time: 0ms
memory: 8624kb

input:

50 4 86492
20 47 28
20 10 79
20 38 98
20 48 45
20 44 50
20 28 20
20 3 32
20 33 35
20 45 90
20 41 41
20 11 86
20 46 62
20 12 12
20 27 29
20 40 79
20 5 9
20 50 67
20 32 35
20 23 13
20 2 28
20 21 37
20 14 84
20 15 98
20 13 47
20 8 76
20 43 70
20 19 70
20 42 9
20 4 24
20 37 19
20 31 8
20 9 18
20 22 66
2...

output:

5527200

result:

ok 1 number(s): "5527200"

Test #68:

score: 0
Accepted
time: 0ms
memory: 7724kb

input:

50 42 409
45 26 34
45 48 23
45 14 28
45 42 35
45 33 20
45 44 28
45 27 14
45 32 41
45 31 43
45 9 38
45 10 21
45 23 8
45 49 37
45 8 12
45 3 32
45 11 26
45 37 41
45 36 17
45 19 43
45 41 10
45 12 17
45 17 8
45 7 27
45 28 7
45 47 8
45 50 10
45 20 39
45 13 27
45 22 33
45 18 35
45 5 10
45 38 30
45 34 9
45 ...

output:

385325365

result:

ok 1 number(s): "385325365"

Test #69:

score: 0
Accepted
time: 2ms
memory: 7500kb

input:

50 17 794705531
30 19 65237
19 20 9687
20 36 41056
36 37 72768
37 50 40999
50 49 9197
49 45 29663
45 17 25510
17 25 79521
25 38 6548
38 12 53430
12 32 98586
32 11 56308
11 7 59141
7 48 93166
48 21 24994
21 18 90279
18 29 50287
29 8 10856
8 2 31509
2 14 16723
14 10 45141
10 13 45016
13 9 22145
9 16 2...

output:

511377023

result:

ok 1 number(s): "511377023"

Test #70:

score: 0
Accepted
time: 2ms
memory: 7928kb

input:

50 22 502804070
22 4 6976789
4 38 3856321
38 6 8219146
6 32 7244711
32 14 7274716
14 2 744971
2 46 275674
46 25 5882253
25 33 5678294
33 23 1441311
23 3 4158618
3 45 8159134
45 50 3212827
50 36 176934
36 20 5587823
20 29 2665121
29 19 2924924
19 8 9860897
8 43 9931377
43 11 3480047
11 13 802938
13 3...

output:

153738093

result:

ok 1 number(s): "153738093"

Test #71:

score: 0
Accepted
time: 3ms
memory: 8672kb

input:

50 19 952862381
18 22 471347615
22 7 935334411
7 34 784323793
34 26 745845724
26 46 44634682
46 25 477247878
25 49 734356608
49 21 766581026
21 38 720488864
38 37 711722306
37 23 869551870
23 32 288481061
32 16 507163324
16 30 255438887
30 6 106127950
6 43 528275574
43 50 674835534
50 13 828272906
1...

output:

0

result:

ok 1 number(s): "0"

Test #72:

score: 0
Accepted
time: 3ms
memory: 8836kb

input:

50 8 7209672
48 6 5026
6 28 907
28 40 1116
40 26 9716
26 14 3749
14 42 6621
42 11 9699
11 5 600
5 23 5793
23 43 1610
43 1 6881
1 39 1014
39 47 1268
47 21 1639
21 46 7881
46 32 6242
32 10 8243
10 22 1403
22 4 2207
4 18 8536
18 2 9269
2 27 8084
27 45 6509
45 50 3045
50 34 3860
34 44 4832
44 9 9839
9 3...

output:

947016478

result:

ok 1 number(s): "947016478"

Test #73:

score: 0
Accepted
time: 0ms
memory: 8856kb

input:

50 49 65610
11 20 28
20 27 4
27 25 65
25 29 83
29 1 56
1 50 25
50 42 55
42 44 20
44 49 44
49 18 29
18 43 74
43 8 77
8 24 52
24 26 47
26 10 45
10 16 27
16 3 22
3 37 24
37 13 41
13 5 24
5 12 83
12 46 75
46 15 19
15 6 90
6 19 80
19 30 74
30 34 88
34 41 48
41 38 6
38 23 51
23 28 73
28 21 3
21 17 94
17 3...

output:

318608048

result:

ok 1 number(s): "318608048"

Test #74:

score: 0
Accepted
time: 2ms
memory: 7304kb

input:

50 35 9251
30 37 46
37 22 23
22 6 50
6 43 48
43 27 3
27 11 39
11 21 15
21 46 5
46 42 28
42 15 43
15 48 9
48 7 38
7 34 2
34 9 2
9 45 50
45 39 39
39 41 12
41 32 19
32 44 24
44 26 42
26 8 13
8 4 1
4 12 14
12 20 28
20 3 9
3 19 14
19 40 1
40 16 32
16 31 22
31 50 13
50 35 45
35 25 46
25 14 44
14 5 40
5 17...

output:

886083225

result:

ok 1 number(s): "886083225"

Test #75:

score: 0
Accepted
time: 2ms
memory: 7800kb

input:

50 7 114499261
19 44 63054
19 34 2263
19 16 74361
19 41 82090
19 42 8395
19 9 79451
44 2 82689
34 30 63871
16 25 19877
41 31 2585
42 29 68023
9 26 94135
2 48 58384
30 7 11131
25 37 3235
31 22 83133
29 8 88709
26 38 51280
48 43 87567
7 35 99618
37 32 83938
22 14 7177
8 13 84427
38 15 44219
43 50 4807...

output:

417372479

result:

ok 1 number(s): "417372479"

Test #76:

score: 0
Accepted
time: 0ms
memory: 8916kb

input:

50 13 19741689
5 22 3517527
5 32 7253443
5 27 985802
5 40 6841210
5 38 2160166
22 9 4357045
32 39 566603
27 28 791622
40 19 690466
38 48 4360759
9 12 7329665
39 25 3377478
28 15 9562195
19 13 2966064
48 18 6033783
12 37 9063346
25 16 368617
15 6 5087436
13 29 5295647
18 17 6241735
37 30 7749813
16 3...

output:

433496373

result:

ok 1 number(s): "433496373"

Test #77:

score: 0
Accepted
time: 3ms
memory: 9204kb

input:

50 30 735343003
21 30 959336004
21 50 483032180
21 45 140444922
21 10 285984469
21 14 801329249
21 5 443816767
21 9 491694354
30 48 144770723
50 1 747148640
45 18 543946592
10 29 783613008
14 42 861581289
5 2 37849832
9 35 439496612
48 38 74413996
1 32 310375957
18 24 988461669
29 7 354195515
42 49 ...

output:

0

result:

ok 1 number(s): "0"

Test #78:

score: 0
Accepted
time: 2ms
memory: 7464kb

input:

50 7 592636
46 45 8144
46 50 8523
46 21 8521
45 43 4967
50 4 2402
21 11 4153
43 48 8789
4 32 6876
11 7 8421
48 12 1125
32 39 1632
7 42 3927
12 22 7457
39 37 6933
42 29 6231
22 41 4360
37 2 1595
29 19 2146
41 23 7423
2 38 82
19 30 3939
23 8 121
38 36 6748
30 18 8669
8 15 6871
36 34 2925
18 3 6939
15 ...

output:

417372479

result:

ok 1 number(s): "417372479"

Test #79:

score: 0
Accepted
time: 2ms
memory: 7352kb

input:

50 41 68921
17 26 38
17 30 40
17 21 20
17 47 71
17 14 14
26 19 65
30 24 1
21 40 3
47 31 26
14 28 45
19 38 85
24 36 96
40 50 73
31 22 4
28 18 48
38 8 74
36 13 13
50 5 61
22 25 16
18 10 17
8 23 58
13 1 40
5 41 45
25 27 88
10 16 85
23 3 93
1 15 84
41 49 83
27 2 82
16 42 38
3 12 84
15 34 13
49 43 54
2 4...

output:

487258377

result:

ok 1 number(s): "487258377"

Test #80:

score: 0
Accepted
time: 0ms
memory: 8668kb

input:

50 21 8092
23 13 27
23 47 30
13 43 23
47 16 45
43 30 3
16 5 8
30 34 24
5 18 9
34 29 47
18 49 10
29 45 21
49 6 10
45 50 42
6 38 14
50 19 2
38 48 30
19 25 20
48 17 14
25 8 13
17 14 10
8 1 35
14 22 5
1 7 3
22 11 6
7 40 26
11 35 8
40 28 4
35 21 7
28 10 41
21 20 18
10 46 11
20 26 21
46 32 18
26 41 14
32 ...

output:

143232349

result:

ok 1 number(s): "143232349"

Test #81:

score: 0
Accepted
time: 2ms
memory: 7996kb

input:

50 47 994101502
32 11 40613
32 25 28878
32 26 75953
11 9 90477
11 7 74889
11 18 61942
25 3 31356
25 31 24030
25 8 24694
26 50 84444
26 34 94356
26 13 56153
9 14 14523
9 28 4904
9 16 89989
7 47 51795
7 29 51324
7 15 67511
18 12 43626
18 39 39410
18 6 55440
3 44 3930
3 4 70902
3 27 30416
31 40 61027
3...

output:

386434677

result:

ok 1 number(s): "386434677"

Test #82:

score: 0
Accepted
time: 0ms
memory: 8980kb

input:

50 46 536679308
39 8 3244142
39 33 1255036
39 40 9694189
39 2 1440408
8 50 8734146
8 3 3471120
8 15 26762
8 25 1129143
33 30 4972325
33 35 9721684
33 21 6691684
33 41 8700913
40 49 3788672
40 37 152818
40 27 9402445
40 47 234472
2 9 5909040
2 29 243495
2 34 2078542
2 46 6713237
50 10 9011974
50 43 9...

output:

346608671

result:

ok 1 number(s): "346608671"

Test #83:

score: 0
Accepted
time: 0ms
memory: 7952kb

input:

50 7 958015112
39 22 688370300
22 30 741549080
30 27 535044120
27 47 232366960
47 34 125410620
34 32 3533822
32 2 362031875
2 42 864019878
42 8 932318077
8 13 368084419
13 23 718936443
23 18 365742358
18 46 675036586
46 12 918089466
12 5 620552418
5 21 95659485
21 37 738585024
37 35 460978411
35 10 ...

output:

0

result:

ok 1 number(s): "0"

Test #84:

score: 0
Accepted
time: 0ms
memory: 8404kb

input:

50 18 3975600
20 5 5382
20 41 4442
20 35 8814
20 6 3082
20 33 8183
5 18 8608
5 24 2786
5 39 2152
5 8 5233
5 28 5369
41 40 5354
41 37 2394
41 45 3674
41 44 177
41 22 9325
35 42 1692
35 49 7195
35 27 9380
35 19 3205
35 43 9407
6 29 3986
6 31 7925
6 1 6259
6 25 6582
6 47 6206
33 11 203
33 32 6266
33 4 ...

output:

875441647

result:

ok 1 number(s): "875441647"

Test #85:

score: 0
Accepted
time: 2ms
memory: 8344kb

input:

50 32 72231
39 21 68
39 18 11
39 3 58
39 10 78
39 40 7
21 4 80
21 28 82
21 2 57
21 24 15
21 11 29
18 17 100
18 12 36
18 37 87
18 46 71
18 29 62
3 38 18
3 13 99
3 20 90
3 34 16
3 15 56
10 50 49
10 47 61
10 25 92
10 36 100
10 8 88
40 7 14
40 42 23
40 43 61
40 16 17
40 1 100
4 22 69
4 31 37
4 32 53
4 5...

output:

65744707

result:

ok 1 number(s): "65744707"

Test #86:

score: 0
Accepted
time: 2ms
memory: 7988kb

input:

50 14 6933
44 2 32
44 38 14
2 50 48
2 19 32
38 6 14
38 23 1
50 10 38
50 17 48
19 37 48
19 1 49
6 41 1
6 25 21
23 33 36
23 36 32
10 18 11
10 40 40
17 49 18
17 35 3
37 20 41
37 48 2
1 16 23
1 24 45
41 43 16
41 45 11
25 9 34
25 26 11
33 28 9
33 5 47
36 8 19
36 7 49
18 42 26
18 12 6
40 14 37
40 34 5
49 ...

output:

46487194

result:

ok 1 number(s): "46487194"

Test #87:

score: 0
Accepted
time: 2ms
memory: 7568kb

input:

50 45 313895231
32 49 94980
32 38 26684
49 1 98596
49 20 10250
49 10 7377
49 16 74087
49 33 77137
38 36 12727
38 22 84188
38 4 62215
38 27 33599
38 19 63794
38 29 50876
38 44 13765
1 43 22869
1 25 934
1 21 44649
1 30 57042
1 31 75230
1 3 99685
1 28 89601
1 50 94237
1 6 33387
20 15 65889
20 5 59717
2...

output:

469321737

result:

ok 1 number(s): "469321737"

Test #88:

score: 0
Accepted
time: 0ms
memory: 8644kb

input:

50 34 608906527
44 28 6917979
44 48 7938053
28 20 5256628
28 9 8211089
28 8 5974198
28 32 5116637
28 42 7552491
48 5 9486920
48 25 1466664
48 15 4221480
48 4 9923825
48 49 1086406
48 11 3832859
48 29 3173933
20 33 2563763
20 50 7995300
20 38 1597086
20 39 6225271
20 47 366849
20 45 4085629
20 21 215...

output:

117880202

result:

ok 1 number(s): "117880202"

Test #89:

score: 0
Accepted
time: 2ms
memory: 7876kb

input:

50 18 35463029
40 41 945429347
40 10 712371893
41 5 440257467
41 21 224610614
41 8 178749452
41 2 304267799
41 43 712993980
10 15 527336692
10 7 288301737
10 50 967744410
10 12 337446438
10 4 214068390
10 49 425193027
10 34 457447531
5 24 251458129
5 23 16947736
5 22 731199908
5 27 193741082
5 45 27...

output:

0

result:

ok 1 number(s): "0"

Test #90:

score: 0
Accepted
time: 0ms
memory: 8312kb

input:

50 29 7358564
4 30 9443
4 26 2619
30 11 1848
30 6 4914
30 41 8492
30 28 6667
30 50 5766
26 33 3678
26 5 3235
26 24 2044
26 27 4205
26 25 5972
26 21 2349
26 44 9492
11 19 9229
11 39 6610
11 35 7808
11 23 3196
11 1 5126
11 32 4796
11 7 6028
11 9 9841
11 49 8434
6 14 2667
6 31 4095
6 37 8245
6 12 7480
...

output:

821938069

result:

ok 1 number(s): "821938069"

Test #91:

score: 0
Accepted
time: 0ms
memory: 7444kb

input:

50 27 18645
5 14 49
5 12 98
14 7 86
14 32 95
14 48 88
14 23 11
14 6 2
12 45 75
12 8 11
12 26 3
12 18 16
12 27 16
12 4 76
12 33 5
7 9 30
7 15 76
7 34 70
7 10 92
7 29 14
7 22 8
7 17 90
7 47 39
7 24 86
32 1 47
32 30 4
32 42 4
32 50 19
32 37 54
32 49 39
32 35 40
32 19 57
32 39 54
32 25 65
32 41 44
48 43...

output:

560912925

result:

ok 1 number(s): "560912925"

Test #92:

score: 0
Accepted
time: 0ms
memory: 8884kb

input:

50 49 8479
40 22 19
40 7 36
22 19 39
22 45 19
22 41 20
22 37 25
22 46 2
7 48 49
7 3 33
7 6 2
7 27 37
7 4 35
7 36 33
7 44 30
19 18 50
19 32 27
19 23 4
19 14 16
19 11 42
19 17 11
19 15 48
19 26 8
19 5 24
45 10 37
45 31 8
45 28 39
45 47 23
45 35 26
45 33 32
45 24 1
45 34 35
45 1 34
45 8 45
45 12 11
41 ...

output:

318608048

result:

ok 1 number(s): "318608048"

Test #93:

score: 0
Accepted
time: 2ms
memory: 8472kb

input:

50 36 898530176
42 38 28268
42 11 78981
42 45 61196
42 32 29410
11 35 46577
11 10 72851
42 39 29777
11 7 49886
7 31 75127
11 18 76914
38 15 95707
35 40 42842
38 19 36339
18 26 62550
42 24 24201
42 28 46343
42 21 87053
24 9 11754
40 41 48652
41 8 55688
7 5 66722
15 27 51307
41 25 91821
15 2 68404
32 ...

output:

291248284

result:

ok 1 number(s): "291248284"

Test #94:

score: 0
Accepted
time: 2ms
memory: 7892kb

input:

50 17 125844146
16 43 527183
16 40 6671213
43 14 5119639
40 34 5049571
40 9 4512
14 48 5594036
43 3 846071
9 2 1548372
40 4 3832627
4 1 214273
43 35 2932425
14 25 3055548
16 12 1386911
3 20 4023540
25 29 8419678
35 26 3316484
2 8 2179596
35 28 1676896
3 22 8024281
34 36 2580106
26 46 1786936
36 5 12...

output:

511377023

result:

ok 1 number(s): "511377023"

Test #95:

score: 0
Accepted
time: 0ms
memory: 7564kb

input:

50 45 112910946
37 17 393186711
37 21 831096952
21 5 5515608
17 6 43340209
6 23 762192992
17 22 874077626
5 43 592344556
21 19 416748975
5 49 875113091
6 24 200159504
6 48 185953643
37 1 744706119
6 46 469472093
1 33 419651722
17 50 908189819
19 16 283076323
23 44 348644737
5 29 524752524
24 14 5978...

output:

0

result:

ok 1 number(s): "0"

Test #96:

score: 0
Accepted
time: 2ms
memory: 7628kb

input:

50 36 5774233
10 20 3370
20 1 4045
1 28 6879
10 14 5904
28 5 9133
10 23 5302
28 31 953
10 4 3957
20 43 9930
14 46 8060
5 37 7564
37 33 4319
43 15 5655
31 35 5794
31 2 1855
43 12 3156
12 17 9533
37 44 8527
15 41 926
14 30 7645
37 9 3115
4 34 7022
35 42 6138
43 29 6935
28 19 3699
35 47 2334
15 48 3334...

output:

291248284

result:

ok 1 number(s): "291248284"

Test #97:

score: 0
Accepted
time: 3ms
memory: 9044kb

input:

50 19 89251
24 13 30
13 45 31
45 48 85
48 42 88
42 25 66
45 5 44
48 2 94
13 27 48
13 28 47
13 1 22
24 39 21
13 19 10
13 11 100
19 44 90
48 22 72
22 43 28
45 41 33
2 12 45
27 38 1
28 33 38
27 29 92
38 8 41
13 30 87
45 47 89
8 31 27
33 46 83
2 7 71
41 37 43
29 40 20
48 10 79
40 26 52
43 36 73
47 23 17...

output:

14132508

result:

ok 1 number(s): "14132508"

Test #98:

score: 0
Accepted
time: 2ms
memory: 7840kb

input:

50 43 7320
2 38 9
2 8 20
38 16 37
16 20 50
2 13 45
8 49 3
16 26 17
13 31 14
38 28 47
31 11 10
28 15 37
13 3 46
31 22 16
49 10 19
16 9 43
10 40 22
9 44 42
40 18 41
18 19 39
3 6 14
49 12 23
16 45 48
49 24 36
9 50 26
49 17 50
6 48 31
10 35 22
49 39 44
22 5 16
48 21 33
10 1 15
12 25 35
10 23 50
25 46 29...

output:

82602899

result:

ok 1 number(s): "82602899"

Test #99:

score: 0
Accepted
time: 0ms
memory: 7460kb

input:

50 30 218323906
28 21 90090
21 46 8915
21 32 99236
32 50 34086
50 40 14062
40 44 79213
28 9 73082
9 25 28566
25 12 64296
40 39 60907
39 20 57801
12 3 37904
46 30 7173
30 37 8712
12 34 8703
37 18 89022
18 11 34581
11 29 9569
29 6 3340
9 35 38223
37 16 37900
16 22 25526
22 17 68809
37 47 21688
47 1 69...

output:

260699330

result:

ok 1 number(s): "260699330"

Test #100:

score: 0
Accepted
time: 3ms
memory: 8564kb

input:

50 4 198071365
11 19 255316
19 47 8773180
47 14 8882047
14 10 6151221
10 45 2201479
10 17 10019
17 22 7094438
14 42 7616220
42 27 235394
27 49 4228081
11 48 847959
48 5 1575662
5 40 8209362
10 18 9605856
18 12 2420288
14 44 4510486
44 36 7525223
36 31 1312044
31 46 3498548
46 13 9031109
45 1 3165974...

output:

5527200

result:

ok 1 number(s): "5527200"

Test #101:

score: 0
Accepted
time: 0ms
memory: 8292kb

input:

50 6 190358863
39 31 978813607
39 11 797242544
11 45 685161718
11 41 281073244
41 24 899725244
41 30 24537575
30 16 760098856
16 37 189899179
45 38 331580540
38 22 894198523
22 25 855547121
11 21 869616557
21 10 699017431
10 5 212689368
10 7 34546688
25 19 48094174
19 29 388276830
39 17 967293612
17...

output:

0

result:

ok 1 number(s): "0"

Test #102:

score: 0
Accepted
time: 0ms
memory: 8316kb

input:

50 43 9348685
11 32 2733
11 14 3412
14 10 7375
10 46 9597
14 38 2274
46 35 4165
46 48 4599
48 17 741
17 43 4019
43 29 4863
35 30 7242
46 44 7362
44 7 6477
7 45 8192
32 27 5696
27 39 8845
14 9 1216
14 18 1097
9 8 1107
8 24 7632
24 6 5456
6 20 8592
44 37 9985
37 34 8732
38 22 8295
45 19 8319
39 33 946...

output:

82602899

result:

ok 1 number(s): "82602899"

Test #103:

score: 0
Accepted
time: 0ms
memory: 8792kb

input:

50 10 92562
5 16 8
16 25 92
25 22 34
22 24 76
16 46 38
46 19 59
19 21 76
21 13 92
46 17 19
17 23 37
23 27 38
27 30 61
24 28 14
30 12 20
21 35 89
22 10 7
35 32 39
32 41 100
28 45 44
21 34 55
12 33 54
33 49 82
49 2 15
46 38 13
38 7 30
7 11 86
11 36 45
36 29 11
34 4 42
4 18 20
23 44 43
18 9 63
27 43 31...

output:

762363706

result:

ok 1 number(s): "762363706"

Test #104:

score: 0
Accepted
time: 2ms
memory: 7968kb

input:

50 28 6161
35 34 25
34 50 21
35 1 5
1 45 43
50 49 19
49 6 27
6 19 6
19 11 27
50 40 9
40 3 10
3 20 21
20 9 38
9 12 23
35 42 20
42 38 19
38 5 28
5 10 2
5 21 35
21 22 15
22 13 9
13 25 39
11 14 24
14 32 15
32 31 30
25 33 7
33 48 13
3 24 21
38 47 17
47 39 4
39 36 35
40 18 41
18 7 11
45 41 31
41 46 25
48 ...

output:

900997191

result:

ok 1 number(s): "900997191"

Test #105:

score: 0
Accepted
time: 3ms
memory: 9176kb

input:

50 20 97926147
18 5 43442
18 41 11520
18 12 67272
18 44 56227
18 37 25615
18 21 84074
18 9 75619
18 39 35665
18 49 93786
9 8 50285
9 36 61944
12 45 86724
21 32 46240
18 3 35967
18 38 31534
18 42 57949
18 28 16581
32 19 43627
18 40 77251
8 22 56849
9 17 73243
18 29 57647
49 34 99429
18 13 17097
18 4 ...

output:

438107748

result:

ok 1 number(s): "438107748"

Test #106:

score: 0
Accepted
time: 0ms
memory: 8076kb

input:

50 37 715008984
45 11 6791561
45 17 3116596
11 27 5982987
45 23 9318476
45 41 4186729
45 10 4472294
45 33 4525454
45 47 8864975
17 29 4142406
17 26 1874361
45 20 8522900
45 39 8248107
45 5 1278531
45 24 854328
45 8 1350202
45 19 5535731
27 35 8594708
33 48 2872481
27 43 3434608
45 44 5712304
45 42 8...

output:

77475948

result:

ok 1 number(s): "77475948"

Test #107:

score: 0
Accepted
time: 3ms
memory: 8644kb

input:

50 33 267806780
13 16 551058123
13 27 706536340
13 22 794689970
13 48 90174621
13 30 718765990
13 8 506882542
13 43 63215509
13 10 954282740
13 34 495469540
43 17 932465237
10 44 845780166
13 11 886271589
30 32 971255249
13 41 741994718
13 21 724193998
13 39 868980688
22 26 378868688
27 20 663416278...

output:

0

result:

ok 1 number(s): "0"

Test #108:

score: 0
Accepted
time: 0ms
memory: 9108kb

input:

50 46 2731649
44 10 8612
44 3 5867
44 19 1374
19 24 6465
19 39 3743
24 48 7065
48 46 8079
48 43 1646
3 40 6996
44 14 1075
44 49 4899
19 45 3553
43 26 1894
26 15 4178
44 6 9775
48 12 914
19 25 7244
44 32 8451
44 16 5820
45 27 7648
40 1 1857
44 11 1237
10 28 7351
40 30 4813
44 5 6340
49 7 8796
44 9 33...

output:

346608671

result:

ok 1 number(s): "346608671"

Test #109:

score: 0
Accepted
time: 2ms
memory: 7320kb

input:

50 2 71680
12 16 34
12 23 80
16 35 52
16 50 92
12 8 4
12 30 3
12 7 100
7 29 32
12 28 60
8 34 75
12 19 39
35 17 23
17 49 63
19 10 48
7 2 1
7 25 79
8 32 67
12 11 51
25 21 99
32 27 62
29 39 100
27 40 60
17 26 90
12 42 54
42 33 59
12 15 30
12 47 68
49 14 66
12 3 66
30 9 7
12 36 86
21 18 92
12 48 66
23 1...

output:

2450

result:

ok 1 number(s): "2450"

Test #110:

score: 0
Accepted
time: 0ms
memory: 7752kb

input:

50 21 5003
23 12 28
23 26 41
23 25 29
23 45 16
23 19 5
25 14 39
26 47 18
23 34 12
14 17 34
47 20 22
23 36 14
23 1 3
23 40 46
23 42 28
23 30 32
23 8 41
40 39 21
23 10 16
23 49 40
20 13 46
23 6 38
23 2 24
23 44 18
26 21 49
1 35 14
23 50 37
23 28 2
23 27 49
23 7 36
36 43 2
23 37 2
39 48 6
23 31 14
23 1...

output:

143232349

result:

ok 1 number(s): "143232349"

Test #111:

score: 0
Accepted
time: 0ms
memory: 7892kb

input:

50 10 417719876
29 49 52974
49 16 88538
49 36 6944
36 33 82028
33 44 14846
36 37 72766
37 2 65885
2 18 70915
18 3 5911
37 28 31210
28 42 95627
42 17 55334
17 21 15975
21 4 57233
28 15 13641
15 32 63628
32 45 10786
45 34 91818
34 30 55836
30 41 91215
15 23 78079
23 43 14835
43 27 18511
27 6 28812
6 4...

output:

762363706

result:

ok 1 number(s): "762363706"

Test #112:

score: 0
Accepted
time: 0ms
memory: 8060kb

input:

50 25 787236203
17 11 9979832
11 25 6522209
11 24 1328406
24 27 2918558
27 50 4305581
24 8 646601
8 47 8653783
47 48 2808643
48 2 7335659
8 20 1283508
20 33 6148070
33 12 3375697
12 22 4743623
22 18 5430113
20 4 6726457
4 3 6885628
3 36 6342263
36 39 3097365
39 34 991083
34 32 6249915
4 40 3972633
4...

output:

875934861

result:

ok 1 number(s): "875934861"

Test #113:

score: 0
Accepted
time: 3ms
memory: 8776kb

input:

50 2 50287401
9 49 804013503
49 11 218443671
49 39 204964936
39 32 392941997
32 25 259246712
39 14 305625987
14 21 546315703
21 28 718238391
28 1 575363765
14 40 558679055
40 13 184768432
13 4 220203345
4 33 847383798
33 36 886577521
40 35 170348457
35 24 641692913
24 17 423104706
17 42 14365316
42 ...

output:

6

result:

ok 1 number(s): "6"

Test #114:

score: 0
Accepted
time: 2ms
memory: 7880kb

input:

50 7 6114613
49 36 7039
36 27 1570
36 4 5795
4 32 405
32 21 9862
4 15 1007
15 7 3184
7 33 753
33 24 7170
15 47 6587
47 3 5773
3 5 8844
5 12 4599
12 14 1947
47 41 2332
41 2 71
2 20 7410
20 1 2076
1 35 6768
35 17 5752
41 22 2512
22 13 8941
13 44 8162
44 26 1800
26 18 5348
18 11 8290
11 9 2400
22 48 21...

output:

417372479

result:

ok 1 number(s): "417372479"

Test #115:

score: 0
Accepted
time: 2ms
memory: 7884kb

input:

50 47 74990
21 43 61
43 14 13
43 17 81
17 25 49
25 37 35
17 26 99
26 4 60
4 45 15
45 34 29
26 9 82
9 38 51
38 7 62
7 16 36
16 8 77
9 49 80
49 1 43
1 18 69
18 15 45
15 13 11
13 19 97
49 48 44
48 23 87
23 36 74
36 46 59
46 3 37
3 42 33
42 30 80
48 2 6
2 27 58
27 29 65
29 5 6
5 32 86
32 35 55
35 31 28
...

output:

386434677

result:

ok 1 number(s): "386434677"

Test #116:

score: 0
Accepted
time: 3ms
memory: 8496kb

input:

50 15 6548
23 3 4
3 35 2
3 22 12
22 18 19
18 42 24
22 17 21
17 50 43
50 45 23
45 40 19
17 15 24
15 39 12
39 9 15
9 4 33
4 10 40
15 27 22
27 6 28
6 43 21
43 38 19
38 16 3
16 26 9
27 49 36
49 33 7
33 36 33
36 2 21
2 29 17
29 46 17
46 7 10
49 14 24
14 41 30
41 34 20
34 11 5
11 37 29
37 30 31
30 20 6
20...

output:

673538977

result:

ok 1 number(s): "673538977"

Test #117:

score: 0
Accepted
time: 2ms
memory: 7880kb

input:

50 1 583207055
4 24 39475
10 24 43761
24 33 94051
23 33 14993
33 11 52377
12 11 62241
11 40 12041
42 40 56845
40 32 61979
34 32 3622
32 16 56445
19 16 13140
16 47 44730
21 47 70513
47 6 58091
41 6 77012
6 39 52078
28 39 80652
39 7 42581
36 7 89806
7 17 69056
26 17 82257
17 44 24238
50 44 60985
44 35...

output:

50

result:

ok 1 number(s): "50"

Test #118:

score: 0
Accepted
time: 3ms
memory: 8544kb

input:

50 50 562535907
12 29 7135055
45 29 2309316
29 33 6061372
8 33 5256089
33 44 1562352
3 44 5127349
44 14 8663905
35 14 4464711
14 40 6508071
19 40 9344326
40 42 9730068
17 42 6180260
42 31 9056903
18 31 7441859
31 41 1707137
9 41 1602728
41 1 5720696
21 1 2784110
1 48 2189675
39 48 5465084
48 30 2640...

output:

318608048

result:

ok 1 number(s): "318608048"

Test #119:

score: 0
Accepted
time: 2ms
memory: 7456kb

input:

50 2 126817986
14 20 349800610
12 20 163176636
20 19 372078276
1 19 475166064
19 28 359017060
33 28 590411917
28 13 692939067
37 13 362378099
13 4 863424583
30 4 932326461
4 27 842540292
5 27 559292433
27 18 124428249
48 18 211623609
18 32 55065557
35 32 546038642
32 50 447758746
26 50 735307012
50 ...

output:

14

result:

ok 1 number(s): "14"

Test #120:

score: 0
Accepted
time: 3ms
memory: 8560kb

input:

50 44 7654541
34 22 3713
21 22 3593
22 6 5383
17 6 5853
6 16 6798
4 16 4522
16 15 6867
38 15 1692
15 12 5809
26 12 8360
12 35 8997
46 35 1836
35 45 7765
13 45 9435
45 44 5133
47 44 2440
44 23 5051
19 23 2880
23 1 93
28 1 1214
1 43 8631
36 43 1434
43 32 1338
18 32 1954
32 9 4866
29 9 2988
9 48 4238
1...

output:

578220293

result:

ok 1 number(s): "578220293"

Test #121:

score: 0
Accepted
time: 2ms
memory: 7960kb

input:

50 2 55476
29 21 81
27 21 36
21 49 56
45 49 69
49 44 24
50 44 46
44 11 4
23 11 22
11 37 16
4 37 29
37 10 82
28 10 23
10 14 60
36 14 65
14 43 42
9 43 23
43 48 74
34 48 22
48 25 48
18 25 1
25 46 56
40 46 49
46 38 90
6 38 40
38 26 13
33 26 86
26 13 93
39 13 100
13 20 97
24 20 5
20 42 32
1 42 95
42 3 92...

output:

2450

result:

ok 1 number(s): "2450"

Test #122:

score: 0
Accepted
time: 0ms
memory: 7700kb

input:

50 9 1153
50 23 37
37 23 22
23 26 32
35 26 39
26 22 39
41 22 14
22 14 40
6 14 8
14 21 38
7 21 15
21 1 9
30 1 8
1 44 48
18 44 14
44 31 19
16 31 40
31 11 50
39 11 21
11 47 18
19 47 4
47 33 40
4 33 20
33 42 46
36 42 41
42 43 9
3 43 43
43 20 9
13 20 50
20 8 24
29 8 5
8 12 50
45 12 5
12 15 32
27 15 46
15...

output:

774691803

result:

ok 1 number(s): "774691803"

Test #123:

score: 0
Accepted
time: 0ms
memory: 9636kb

input:

500 304 578975925
389 157 34164
389 78 31436
389 244 99282
389 493 1135
389 478 53703
389 212 9131
389 320 3188
389 357 30392
389 385 62423
389 343 14224
389 415 94240
389 430 29149
389 23 8100
389 135 59891
389 211 25904
389 457 60609
389 83 16545
389 413 77218
389 174 71570
389 217 54457
389 122 9...

output:

778437148

result:

ok 1 number(s): "778437148"

Test #124:

score: 0
Accepted
time: 0ms
memory: 8080kb

input:

500 115 555707344
191 111 5947392
191 249 1876476
191 140 3465979
191 281 5503854
191 25 9075994
191 63 215895
191 485 5831776
191 122 9920448
191 459 2532780
191 80 4562495
191 22 8927475
191 482 7322449
191 8 454831
191 78 2312557
191 112 2319126
191 202 1197397
191 215 7192975
191 79 4094510
191 ...

output:

436705963

result:

ok 1 number(s): "436705963"

Test #125:

score: 0
Accepted
time: 4ms
memory: 9516kb

input:

500 46 864176844
45 178 166568240
45 220 871486277
45 202 921268697
45 25 483467360
45 110 308591271
45 301 233177187
45 413 139578728
45 159 850514997
45 382 990381051
45 288 243995730
45 144 775412263
45 315 117460668
45 432 555674792
45 228 869705779
45 358 444980107
45 488 141306531
45 257 48251...

output:

119777536

result:

ok 1 number(s): "119777536"

Test #126:

score: 0
Accepted
time: 3ms
memory: 8564kb

input:

500 489 3874787
336 454 7504
336 156 1646
336 269 9625
336 329 4990
336 430 7766
336 217 2584
336 470 6947
336 209 1265
336 85 3754
336 276 1883
336 368 8027
336 184 4310
336 410 3662
336 234 5299
336 366 920
336 69 8730
336 314 4205
336 433 1949
336 212 8150
336 496 9693
336 464 2916
336 349 1836
3...

output:

768979525

result:

ok 1 number(s): "768979525"

Test #127:

score: 0
Accepted
time: 3ms
memory: 8720kb

input:

500 57 45879
275 323 85
275 150 69
275 25 66
275 216 92
275 495 7
275 173 48
275 298 89
275 90 55
275 77 13
275 256 6
275 405 56
275 96 4
275 454 57
275 81 95
275 363 85
275 227 18
275 94 55
275 430 67
275 249 77
275 132 67
275 278 62
275 60 91
275 374 57
275 64 28
275 486 81
275 261 78
275 69 14
27...

output:

883206947

result:

ok 1 number(s): "883206947"

Test #128:

score: 0
Accepted
time: 3ms
memory: 7960kb

input:

500 421 8955
369 168 37
369 217 24
369 377 44
369 461 41
369 389 4
369 29 19
369 300 6
369 400 9
369 459 16
369 141 22
369 177 11
369 187 8
369 52 46
369 10 35
369 40 37
369 162 43
369 414 6
369 195 39
369 81 38
369 476 24
369 421 12
369 394 21
369 385 7
369 343 50
369 494 28
369 273 17
369 201 34
3...

output:

917212597

result:

ok 1 number(s): "917212597"

Test #129:

score: 0
Accepted
time: 4ms
memory: 9004kb

input:

500 202 898769654
61 476 56599
476 389 18093
389 450 55423
450 165 44793
165 354 53428
354 101 67091
101 38 95388
38 322 53125
322 384 49382
384 172 94478
172 264 89232
264 245 42403
245 52 41640
52 235 48054
235 241 5686
241 348 60634
348 117 81752
117 157 14566
157 193 72846
193 399 45880
399 270 ...

output:

376638000

result:

ok 1 number(s): "376638000"

Test #130:

score: 0
Accepted
time: 3ms
memory: 7864kb

input:

500 48 777677667
374 36 8234050
36 57 3275721
57 414 4176932
414 406 7912091
406 77 8409762
77 75 9540800
75 482 5711405
482 30 4640111
30 12 5745738
12 379 324783
379 247 208024
247 2 7055990
2 419 8542993
419 287 5359634
287 411 9843344
411 373 1295308
373 312 4530322
312 211 2787274
211 227 5312
...

output:

687695526

result:

ok 1 number(s): "687695526"

Test #131:

score: 0
Accepted
time: 4ms
memory: 9668kb

input:

500 61 941624761
400 342 803191677
342 398 862197230
398 262 413676934
262 381 78025320
381 466 858107663
466 80 872799920
80 3 119074199
3 324 568760659
324 449 941176043
449 293 625276279
293 156 80113100
156 232 280324639
232 201 573754574
201 313 172197292
313 211 275078018
211 249 98643878
249 ...

output:

0

result:

ok 1 number(s): "0"

Test #132:

score: 0
Accepted
time: 4ms
memory: 8212kb

input:

500 288 2481943
178 164 2221
164 222 2276
222 78 9515
78 472 5778
472 324 1749
324 131 2586
131 321 4909
321 494 8705
494 254 2253
254 323 1020
323 375 7662
375 122 9100
122 112 4073
112 396 8520
396 137 2606
137 162 2300
162 31 3476
31 454 930
454 170 7665
170 231 5423
231 143 9068
143 169 5839
169...

output:

381652904

result:

ok 1 number(s): "381652904"

Test #133:

score: 0
Accepted
time: 4ms
memory: 8472kb

input:

500 399 49190
133 211 12
211 485 95
485 194 80
194 48 22
48 210 97
210 351 40
351 28 71
28 347 49
347 411 74
411 13 50
13 260 55
260 109 40
109 349 92
349 100 73
100 118 4
118 299 39
299 399 37
399 315 38
315 372 36
372 356 39
356 37 73
37 225 21
225 239 5
239 123 20
123 64 61
64 174 75
174 75 40
75...

output:

906825272

result:

ok 1 number(s): "906825272"

Test #134:

score: 0
Accepted
time: 4ms
memory: 9564kb

input:

500 464 7796
410 363 3
363 43 1
43 147 20
147 35 4
35 206 29
206 146 47
146 100 48
100 267 41
267 201 18
201 191 38
191 151 9
151 130 11
130 323 25
323 470 16
470 13 19
13 227 4
227 478 27
478 292 22
292 235 9
235 432 38
432 420 42
420 50 32
50 456 25
456 342 2
342 176 23
176 236 5
236 122 35
122 39...

output:

998541861

result:

ok 1 number(s): "998541861"

Test #135:

score: 0
Accepted
time: 4ms
memory: 9100kb

input:

500 497 778371895
216 468 4751
468 175 78859
175 194 88450
194 250 61665
250 364 859
364 416 11781
416 292 8562
292 464 44854
464 494 40140
494 383 51520
383 202 22952
202 265 42477
265 339 12024
339 273 52763
273 455 52147
455 279 79664
279 399 84617
399 410 65610
410 384 28791
384 448 74682
448 14...

output:

948108938

result:

ok 1 number(s): "948108938"

Test #136:

score: 0
Accepted
time: 0ms
memory: 9456kb

input:

500 86 999647990
411 457 4931861
411 2 4887886
411 199 320327
411 433 2967722
411 48 9057192
411 183 5334138
411 177 9359775
411 187 8958696
411 38 1119775
411 244 6521278
411 482 6981018
411 250 1598452
411 225 8406712
411 61 2334857
411 254 6425924
411 488 6708886
411 159 1288550
411 197 9920927
4...

output:

679084373

result:

ok 1 number(s): "679084373"

Test #137:

score: 0
Accepted
time: 2ms
memory: 8960kb

input:

500 384 19072678
357 32 557940887
357 447 201052467
357 227 822326384
357 254 112656759
357 304 362679549
357 206 243793862
357 21 876940913
357 372 186938331
32 435 6556829
447 65 89846640
227 493 588412801
254 362 591834355
304 332 179721509
206 90 810208633
21 366 761013930
372 449 539704307
435 ...

output:

0

result:

ok 1 number(s): "0"

Test #138:

score: 0
Accepted
time: 0ms
memory: 9200kb

input:

500 99 5864907
302 269 201
302 317 3997
302 312 3463
302 438 1540
302 189 9484
302 51 1382
302 482 6145
302 500 9264
302 185 156
302 452 7697
302 342 8082
302 33 292
302 457 1741
302 333 1588
302 13 5871
302 171 1532
302 385 6806
269 393 7581
317 74 2641
312 72 1028
438 257 4034
189 299 9675
51 375 ...

output:

323555934

result:

ok 1 number(s): "323555934"

Test #139:

score: 0
Accepted
time: 3ms
memory: 7948kb

input:

500 444 28308
144 134 28
144 381 97
144 333 51
144 75 79
144 444 24
144 89 62
144 280 55
144 113 52
144 483 90
144 394 66
144 301 81
144 122 23
134 87 55
381 415 15
333 281 60
75 466 23
444 207 8
89 260 100
280 55 20
113 85 93
483 261 35
394 236 65
301 156 23
122 188 41
87 208 72
415 17 62
281 4 53
...

output:

478735989

result:

ok 1 number(s): "478735989"

Test #140:

score: 0
Accepted
time: 3ms
memory: 7904kb

input:

500 199 9341
355 343 40
355 120 45
355 418 10
355 80 9
355 256 37
355 314 28
355 398 28
355 477 16
355 266 49
355 469 45
355 240 18
355 262 15
355 190 1
355 125 5
355 387 16
355 112 2
355 390 8
355 136 25
355 491 1
355 167 15
343 451 6
120 362 1
418 92 12
80 416 26
256 196 35
314 73 28
398 411 17
47...

output:

189035449

result:

ok 1 number(s): "189035449"

Test #141:

score: 0
Accepted
time: 3ms
memory: 8608kb

input:

500 87 98165624
325 196 58704
325 23 78104
325 43 99404
325 413 69902
325 403 1923
325 174 28173
325 28 55487
325 86 64517
325 462 20394
325 226 46512
325 322 68910
325 280 76018
325 392 187
325 329 32545
325 425 9069
325 193 10279
325 41 30476
325 143 66886
325 191 44406
325 2 57052
196 171 97371
1...

output:

140928455

result:

ok 1 number(s): "140928455"

Test #142:

score: 0
Accepted
time: 0ms
memory: 9624kb

input:

500 19 366842505
459 422 1555298
459 28 631543
459 285 7695860
459 164 2301490
459 30 8573584
459 231 9989575
459 45 3887950
459 1 7395847
459 95 1914766
459 130 7801827
459 93 6714559
459 263 4462422
459 50 1262301
459 409 9667586
459 103 6523835
459 86 9078937
459 458 9981314
459 59 4803838
422 47...

output:

415683680

result:

ok 1 number(s): "415683680"

Test #143:

score: 0
Accepted
time: 4ms
memory: 9116kb

input:

500 195 801553299
301 388 548651841
301 362 838684896
301 338 271660152
301 39 516948960
301 474 2302282
301 249 368513525
301 115 595186575
301 289 137733323
301 277 92870082
301 290 394547477
301 342 896500964
301 337 904881433
388 332 42021535
388 486 640306545
388 231 278159789
388 302 643172879...

output:

0

result:

ok 1 number(s): "0"

Test #144:

score: 0
Accepted
time: 0ms
memory: 9160kb

input:

500 410 9247872
421 303 830
421 203 3887
421 50 3851
421 194 8626
421 169 3677
421 129 4752
421 408 6689
421 423 3571
421 263 9292
421 280 436
303 493 168
303 225 703
303 264 7666
303 460 570
303 361 6737
303 248 2291
303 498 9979
303 430 4392
303 81 7155
303 454 7180
203 145 5333
203 471 9863
203 4...

output:

260961976

result:

ok 1 number(s): "260961976"

Test #145:

score: 0
Accepted
time: 3ms
memory: 8384kb

input:

500 285 66210
216 363 54
216 376 14
216 154 76
216 21 61
216 341 16
216 390 49
216 352 49
363 105 14
363 284 26
363 88 73
363 296 17
363 450 58
363 477 45
363 371 30
376 33 85
376 205 9
376 94 79
376 242 59
376 52 96
376 40 4
376 140 53
154 288 17
154 305 14
154 239 29
154 96 65
154 120 81
154 14 22...

output:

190039152

result:

ok 1 number(s): "190039152"

Test #146:

score: 0
Accepted
time: 2ms
memory: 8540kb

input:

500 243 8183
203 415 17
203 62 25
203 93 27
203 304 38
203 8 23
203 319 24
203 352 19
203 339 14
203 199 27
203 169 35
203 305 25
203 467 48
203 431 40
203 133 37
203 286 35
203 328 27
415 3 40
415 193 46
415 342 10
415 31 41
415 212 21
415 258 15
415 335 14
415 27 17
415 120 15
415 77 25
415 433 40...

output:

854222821

result:

ok 1 number(s): "854222821"

Test #147:

score: 0
Accepted
time: 3ms
memory: 7720kb

input:

500 473 977767866
80 300 67009
80 61 45361
300 206 34244
300 139 10357
300 365 69627
300 420 35691
300 389 53077
61 232 10924
61 494 16884
61 261 66056
61 203 8799
61 17 49459
61 178 76854
61 82 88349
206 267 55430
206 475 33286
206 16 8190
206 396 528
206 32 59650
206 448 70421
206 12 39422
206 327...

output:

685190891

result:

ok 1 number(s): "685190891"

Test #148:

score: 0
Accepted
time: 4ms
memory: 9548kb

input:

500 56 883780124
281 444 4837126
281 153 2954542
444 351 6375201
444 316 5328289
444 193 1635258
444 108 7898488
444 476 9612308
153 375 3574909
153 228 608805
153 160 7677054
153 157 4115081
153 222 1415396
153 251 2550585
153 339 9342083
351 386 7191804
351 333 1589042
351 247 6416284
351 132 8482...

output:

53791007

result:

ok 1 number(s): "53791007"

Test #149:

score: 0
Accepted
time: 3ms
memory: 8488kb

input:

500 18 24225408
114 199 272870498
114 278 539362794
199 113 331093133
199 51 720993920
199 140 66465352
199 27 346957719
199 86 493233189
278 435 903366830
278 379 383495611
278 454 474150632
278 433 549505209
278 98 204589126
278 412 217928510
278 38 49545752
113 311 765371752
113 268 645562544
113...

output:

0

result:

ok 1 number(s): "0"

Test #150:

score: 0
Accepted
time: 4ms
memory: 9388kb

input:

500 413 7598132
476 31 965
476 388 1459
31 385 5265
31 497 4639
31 414 2609
31 64 6383
31 94 2714
388 225 4129
388 123 2070
388 360 8429
388 238 471
388 76 9150
388 413 3819
388 307 3591
385 485 2256
385 295 308
385 417 3050
385 158 8959
385 159 9716
385 336 181
385 211 6436
385 202 3529
385 137 424...

output:

876355258

result:

ok 1 number(s): "876355258"

Test #151:

score: 0
Accepted
time: 4ms
memory: 9580kb

input:

500 127 69521
83 404 10
83 91 88
404 342 28
404 308 5
404 203 47
404 217 4
404 302 31
91 375 47
91 374 80
91 369 78
91 197 80
91 293 58
91 18 97
91 427 27
342 433 49
342 500 6
342 244 87
342 81 45
342 392 14
342 324 69
342 39 20
342 463 79
342 215 74
308 386 9
308 279 9
308 198 70
308 124 7
308 144 ...

output:

295073649

result:

ok 1 number(s): "295073649"

Test #152:

score: 0
Accepted
time: 4ms
memory: 9116kb

input:

500 478 7024
298 55 47
298 46 48
55 63 1
55 340 40
55 212 17
55 118 13
55 473 8
46 160 1
46 289 16
46 219 43
46 492 33
46 226 32
46 416 38
46 179 25
63 440 27
63 28 46
63 363 48
63 480 26
63 128 12
63 313 20
63 255 22
63 341 33
63 384 37
340 411 20
340 43 20
340 280 45
340 111 18
340 397 12
340 415 ...

output:

229186615

result:

ok 1 number(s): "229186615"

Test #153:

score: 0
Accepted
time: 4ms
memory: 8860kb

input:

500 267 297561595
232 331 53880
232 302 81998
232 64 4670
232 416 28539
331 39 7227
64 375 97145
302 96 22097
302 191 5242
39 374 96077
375 493 20920
374 309 59532
309 54 2484
302 236 82401
96 209 7137
493 171 56758
374 349 89378
493 437 1680
64 387 2962
171 277 44470
387 175 99332
375 340 46387
232...

output:

88492462

result:

ok 1 number(s): "88492462"

Test #154:

score: 0
Accepted
time: 3ms
memory: 7724kb

input:

500 193 956007343
251 348 9462022
348 465 3133941
251 74 3769932
465 286 8676998
465 54 6777196
251 402 1741101
251 78 4281919
251 261 7454334
402 221 3644967
261 380 5393311
402 34 2476718
74 145 945035
34 415 7333871
348 299 6648978
251 367 9308724
380 302 2763683
78 268 7443168
465 165 6081101
34...

output:

616718288

result:

ok 1 number(s): "616718288"

Test #155:

score: 0
Accepted
time: 3ms
memory: 8008kb

input:

500 33 101673325
424 295 368581261
295 145 85566499
424 62 833351095
424 355 466155479
145 169 410721151
145 441 834100923
169 211 562731011
169 26 216535928
145 434 512917359
355 7 73110497
355 274 650162373
145 190 883339608
295 61 871543008
62 102 207944048
61 479 896358837
441 477 504672468
169 ...

output:

0

result:

ok 1 number(s): "0"

Test #156:

score: 0
Accepted
time: 4ms
memory: 8568kb

input:

500 224 981096
486 203 9267
203 278 8318
486 450 8537
278 449 6044
449 57 2879
203 223 1736
57 63 7652
57 326 2193
278 419 2973
203 71 6207
63 316 8167
278 218 9423
57 458 1784
57 22 606
63 342 9048
218 297 5578
419 267 2959
450 287 2454
218 65 6895
316 183 7405
278 446 5476
267 171 7482
267 55 857
...

output:

108132864

result:

ok 1 number(s): "108132864"

Test #157:

score: 0
Accepted
time: 4ms
memory: 9492kb

input:

500 172 48639
412 381 48
412 162 75
381 211 26
162 406 43
162 214 65
162 283 87
412 37 87
412 349 51
381 147 79
37 284 23
211 405 27
349 317 92
405 404 58
405 172 67
404 246 81
162 70 15
349 109 76
406 414 30
214 140 27
246 419 66
70 213 48
406 164 57
147 19 51
214 78 86
172 344 44
412 179 38
211 49...

output:

436118070

result:

ok 1 number(s): "436118070"

Test #158:

score: 0
Accepted
time: 4ms
memory: 8468kb

input:

500 21 8569
354 149 18
354 231 30
354 336 28
336 427 36
427 189 31
354 280 2
149 191 1
354 362 21
231 13 49
191 76 19
189 276 35
276 215 30
354 79 41
189 137 28
336 257 30
231 221 40
231 97 28
191 398 40
354 410 39
76 236 31
221 432 49
79 453 38
354 206 45
191 69 2
189 6 16
149 203 3
6 35 16
206 2 2...

output:

47366589

result:

ok 1 number(s): "47366589"

Test #159:

score: 0
Accepted
time: 3ms
memory: 7896kb

input:

500 358 177163836
353 497 44215
497 67 50471
353 212 57248
212 210 24047
210 262 18075
262 42 9273
42 45 58087
45 227 25087
210 83 18404
83 108 50105
108 397 66817
210 137 47283
42 248 1138
248 407 97824
407 96 55654
262 318 88398
212 64 95544
407 175 51258
175 304 60997
304 449 78854
449 481 43775
...

output:

571698841

result:

ok 1 number(s): "571698841"

Test #160:

score: 0
Accepted
time: 4ms
memory: 9636kb

input:

500 231 472944962
93 257 4376801
257 383 2655699
257 412 8981363
412 492 640640
383 21 4192248
21 397 6917119
397 128 5537387
21 470 4871676
470 418 5199883
418 366 5122998
366 175 9282254
128 269 3963159
470 379 4518166
93 326 1232644
326 361 6872994
361 220 9322742
383 10 4692934
10 132 2208329
39...

output:

298141677

result:

ok 1 number(s): "298141677"

Test #161:

score: 0
Accepted
time: 3ms
memory: 8180kb

input:

500 356 179121242
255 301 84076155
301 65 670062093
255 34 677094883
34 268 174992255
65 320 511952843
268 499 91484967
320 190 563979889
190 338 221208536
338 104 225518457
104 221 120500495
221 294 241497925
294 398 923559529
338 287 19562890
287 276 219962964
276 279 296867615
279 443 250223113
2...

output:

0

result:

ok 1 number(s): "0"

Test #162:

score: 0
Accepted
time: 4ms
memory: 9200kb

input:

500 227 4620956
177 121 3319
121 358 8110
358 464 3673
464 122 8512
122 319 1270
319 389 6548
389 403 7499
403 433 4951
433 436 7696
403 423 3840
423 384 5615
436 354 2428
354 479 7879
479 315 4009
384 412 4077
412 253 1432
436 333 3075
333 181 2622
389 73 9996
73 167 6330
333 182 6239
182 72 7852
7...

output:

903720835

result:

ok 1 number(s): "903720835"

Test #163:

score: 0
Accepted
time: 0ms
memory: 8764kb

input:

500 13 51949
281 119 82
119 219 98
219 241 90
241 63 29
63 282 59
282 46 50
241 498 68
119 395 9
498 37 80
498 230 77
281 300 14
37 355 27
46 75 52
300 70 68
70 459 42
230 54 22
54 135 21
135 184 17
184 356 70
54 308 16
308 163 51
119 416 58
416 373 25
230 428 67
428 25 30
25 232 35
282 62 9
300 80 ...

output:

279748442

result:

ok 1 number(s): "279748442"

Test #164:

score: 0
Accepted
time: 4ms
memory: 9108kb

input:

500 65 7411
122 210 27
210 73 16
122 401 29
122 234 44
234 119 17
119 26 19
26 488 1
488 211 11
122 371 47
371 159 13
119 241 10
241 396 11
488 300 24
401 380 29
122 8 12
8 343 5
343 2 35
2 246 48
246 81 49
81 450 40
450 150 8
150 199 44
199 305 40
305 186 17
8 218 29
218 194 2
396 480 17
480 42 34
...

output:

627824911

result:

ok 1 number(s): "627824911"

Test #165:

score: 0
Accepted
time: 0ms
memory: 8236kb

input:

500 448 496957565
256 68 73843
256 372 6217
256 22 95507
256 232 58422
372 294 26537
372 378 55260
378 59 83855
22 130 71717
256 7 52880
22 283 49330
68 429 52646
256 102 95747
256 351 42692
351 269 24886
256 21 1110
59 208 91309
130 306 43078
283 305 3316
7 150 79457
256 33 29729
256 339 14778
256 ...

output:

564055174

result:

ok 1 number(s): "564055174"

Test #166:

score: 0
Accepted
time: 0ms
memory: 9428kb

input:

500 164 840139477
55 367 6998618
367 373 9537833
367 28 5708302
55 20 1717835
367 477 8626804
55 253 2654470
28 285 8167777
55 230 6700663
253 272 4216785
55 371 1649519
55 185 5604105
55 299 1098290
28 298 9176443
253 456 4394107
230 122 2048365
299 19 9535555
230 428 2662491
55 323 9140034
55 198 ...

output:

788393007

result:

ok 1 number(s): "788393007"

Test #167:

score: 0
Accepted
time: 0ms
memory: 9496kb

input:

500 179 256569159
175 372 846750945
175 399 933244904
372 318 756221331
175 337 274888806
175 472 484116917
472 424 995155124
175 381 359647480
472 322 35435773
175 262 468000172
175 165 369812995
381 398 990493759
322 212 421021249
318 177 968225027
175 275 145420626
381 219 16270899
175 112 142094...

output:

0

result:

ok 1 number(s): "0"

Test #168:

score: 0
Accepted
time: 3ms
memory: 8344kb

input:

500 38 8003921
153 302 8824
153 275 2339
153 58 6638
153 334 6598
302 114 5923
153 80 7555
80 101 5428
153 48 4658
153 351 8433
302 162 3217
114 142 7749
153 124 9883
153 431 9446
153 500 8873
153 277 5551
114 122 5080
124 458 2299
153 217 7661
153 483 1203
153 23 7493
431 341 3194
162 263 3328
153 ...

output:

523329822

result:

ok 1 number(s): "523329822"

Test #169:

score: 0
Accepted
time: 0ms
memory: 8628kb

input:

500 355 55259
354 343 40
354 9 27
354 224 12
354 251 65
354 434 12
354 219 37
354 37 66
354 151 46
354 190 48
224 402 83
354 20 15
354 114 67
354 88 99
20 381 97
190 157 16
354 110 56
20 410 79
354 432 81
343 369 75
151 63 74
354 272 73
251 342 22
354 271 9
354 6 41
354 236 67
354 238 86
354 304 93
...

output:

647086778

result:

ok 1 number(s): "647086778"

Test #170:

score: 0
Accepted
time: 4ms
memory: 9644kb

input:

500 300 6252
195 113 13
195 345 38
195 265 27
265 217 42
195 203 49
195 329 17
195 268 2
195 481 17
195 279 44
217 440 6
195 442 34
195 242 28
195 429 10
195 73 4
265 72 44
265 164 23
73 36 39
73 421 34
217 48 40
195 454 28
442 67 10
73 239 2
265 46 18
481 32 42
195 465 28
242 241 22
195 177 25
242 ...

output:

293480838

result:

ok 1 number(s): "293480838"

Test #171:

score: 0
Accepted
time: 0ms
memory: 8596kb

input:

500 50 81592511
316 152 91341
152 261 2390
152 192 12310
192 55 19579
55 226 94063
192 298 86442
298 353 27158
353 450 91457
450 17 38641
298 297 42081
297 28 80254
28 111 37065
111 271 2505
271 415 16807
297 149 9148
149 100 49067
100 108 32540
108 167 23837
167 209 47730
209 459 43281
149 264 1607...

output:

664172482

result:

ok 1 number(s): "664172482"

Test #172:

score: 0
Accepted
time: 3ms
memory: 7724kb

input:

500 201 62109800
205 206 8694155
206 248 4289504
206 145 4251718
145 298 185429
298 315 4129114
145 246 5772570
246 9 3392840
9 162 2262074
162 234 3460637
246 112 5824317
112 394 4269983
394 23 284150
23 126 9679043
126 249 1595801
112 4 7031777
4 310 2237584
310 214 672298
214 268 8094862
268 271 ...

output:

0

result:

ok 1 number(s): "0"

Test #173:

score: 0
Accepted
time: 0ms
memory: 8132kb

input:

500 195 334017076
267 90 233948564
90 146 912272016
90 39 35884864
39 204 958520480
204 446 824339433
39 125 460738252
125 480 846887650
480 15 956218662
15 382 626867066
125 436 409338238
436 8 178373964
8 1 291717584
1 222 439990740
222 455 934418429
436 337 790796102
337 384 444785854
384 448 711...

output:

0

result:

ok 1 number(s): "0"

Test #174:

score: 0
Accepted
time: 4ms
memory: 8804kb

input:

500 349 1386885
216 242 8618
242 204 7081
242 93 905
93 450 3887
450 162 3259
93 397 4375
397 334 8481
334 313 6993
313 105 3490
397 270 7678
270 433 7507
433 395 6694
395 132 7079
132 209 9179
270 439 889
439 337 7694
337 82 1896
82 393 5569
393 405 8578
405 459 4861
439 365 4149
365 194 2517
194 4...

output:

340853867

result:

ok 1 number(s): "340853867"

Test #175:

score: 0
Accepted
time: 0ms
memory: 9536kb

input:

500 388 34378
102 123 38
123 26 94
123 172 81
172 407 27
407 170 87
172 463 52
463 161 82
161 201 46
201 393 55
463 4 42
4 476 92
476 98 3
98 278 37
278 493 75
4 180 2
180 304 98
304 422 23
422 195 23
195 396 60
396 130 83
180 480 86
480 86 59
86 292 90
292 205 2
205 126 32
126 251 51
251 280 92
480...

output:

238167895

result:

ok 1 number(s): "238167895"

Test #176:

score: 0
Accepted
time: 0ms
memory: 8568kb

input:

500 344 9285
324 309 49
309 277 26
309 293 19
293 284 6
284 378 38
293 189 3
189 413 10
413 167 2
167 231 8
189 35 10
35 329 43
329 384 48
384 155 33
155 346 11
35 214 17
214 30 10
30 313 37
313 230 8
230 200 41
200 355 15
214 486 28
486 209 3
209 420 14
420 198 41
198 45 1
45 354 18
354 24 48
486 3...

output:

321852866

result:

ok 1 number(s): "321852866"

Test #177:

score: 0
Accepted
time: 0ms
memory: 8648kb

input:

500 9 282658410
291 254 28056
171 254 25005
254 231 54756
235 231 66812
231 38 21448
464 38 59562
38 102 60743
420 102 85214
102 209 18758
285 209 10716
209 53 10862
305 53 53924
53 383 5808
500 383 27032
383 225 93578
220 225 71648
225 381 70535
374 381 20817
381 394 29515
332 394 4972
394 12 70448...

output:

81792910

result:

ok 1 number(s): "81792910"

Test #178:

score: 0
Accepted
time: 0ms
memory: 8880kb

input:

500 101 559484204
287 410 473665
38 410 7975054
410 247 1931655
457 247 4780110
247 496 559129
140 496 4306154
496 58 1410790
497 58 7500975
58 152 529273
122 152 6579117
152 446 986842
234 446 5620158
446 437 7921971
170 437 1347526
437 190 754358
128 190 6684091
190 289 4312382
73 289 9252455
289 ...

output:

982407369

result:

ok 1 number(s): "982407369"

Test #179:

score: 0
Accepted
time: 3ms
memory: 8516kb

input:

500 406 257911799
205 363 502666818
26 363 20143441
363 354 490544954
388 354 289917791
354 5 732873018
169 5 358756201
5 467 661935063
349 467 113287298
467 326 742397674
379 326 796055096
326 139 133709972
52 139 959703616
139 437 894966657
419 437 13108307
437 378 855242609
343 378 403650130
378 ...

output:

0

result:

ok 1 number(s): "0"

Test #180:

score: 0
Accepted
time: 0ms
memory: 9360kb

input:

500 332 8598069
475 333 7186
300 333 8003
333 280 8575
151 280 2088
280 92 2967
430 92 7398
92 161 8234
140 161 821
161 345 2351
65 345 6681
345 121 8329
442 121 1728
121 37 3320
109 37 3867
37 427 8562
297 427 5216
427 223 2818
376 223 1501
223 231 6432
349 231 4704
231 351 3538
187 351 2982
351 38...

output:

246560965

result:

ok 1 number(s): "246560965"

Test #181:

score: 0
Accepted
time: 0ms
memory: 8516kb

input:

500 87 94904
174 185 67
44 185 39
185 41 45
476 41 53
41 36 64
199 36 58
36 37 93
171 37 61
37 15 4
499 15 66
15 116 49
38 116 6
116 334 55
251 334 5
334 410 47
176 410 86
410 111 93
242 111 53
111 29 86
42 29 11
29 154 44
135 154 98
154 53 75
64 53 62
53 222 51
344 222 76
222 443 3
469 443 54
443 1...

output:

140928455

result:

ok 1 number(s): "140928455"

Test #182:

score: 0
Accepted
time: 0ms
memory: 8704kb

input:

500 124 8688
133 219 23
183 219 5
219 448 14
154 448 15
448 173 11
276 173 23
173 66 11
232 66 13
66 167 30
433 167 9
167 367 17
70 367 5
367 332 40
446 332 33
332 222 47
363 222 47
222 65 28
303 65 27
65 309 20
151 309 33
309 78 14
366 78 6
78 451 7
356 451 22
451 338 16
264 338 45
338 93 36
488 93...

output:

486843279

result:

ok 1 number(s): "486843279"

Test #183:

score: 0
Accepted
time: 10ms
memory: 12132kb

input:

5000 2516 573394575
2341 2089 56093
2341 1577 64143
2341 3175 76585
2341 2331 8952
2341 3319 28077
2341 674 71225
2341 4891 18992
2341 4097 59387
2341 3718 93829
2341 2456 53100
2341 2626 7761
2341 3743 78950
2341 4188 59882
2341 3281 28975
2341 277 26561
2341 1094 2499
2341 1098 99586
2341 2103 968...

output:

625755706

result:

ok 1 number(s): "625755706"

Test #184:

score: 0
Accepted
time: 10ms
memory: 12180kb

input:

5000 2266 407431448
2617 3123 4532535
2617 205 4455201
2617 4623 3392278
2617 25 7566372
2617 897 8558210
2617 2309 9264527
2617 4512 7023402
2617 753 8310844
2617 1141 3377703
2617 4677 4546168
2617 955 7928472
2617 460 2556867
2617 3901 9171470
2617 4566 3730003
2617 3193 7825578
2617 1386 1423199...

output:

611501620

result:

ok 1 number(s): "611501620"

Test #185:

score: 0
Accepted
time: 13ms
memory: 11448kb

input:

5000 1843 700303361
3088 1630 185190890
3088 2422 893713999
3088 4065 633484291
3088 2375 727696505
3088 2996 239343000
3088 902 124660425
3088 4313 744942156
3088 400 317660126
3088 3343 409136179
3088 1657 479832288
3088 3546 896339093
3088 925 291668455
3088 2582 815072498
3088 3163 803894429
308...

output:

519007839

result:

ok 1 number(s): "519007839"

Test #186:

score: 0
Accepted
time: 7ms
memory: 11608kb

input:

5000 2623 4818315
1355 3811 5682
1355 2594 136
1355 2895 7288
1355 1860 7643
1355 2893 5676
1355 3097 7646
1355 1509 301
1355 340 5761
1355 2500 6511
1355 2563 3798
1355 2570 4235
1355 4574 9227
1355 3446 135
1355 2608 2762
1355 986 6759
1355 455 3342
1355 1316 1170
1355 1319 7929
1355 1087 2296
135...

output:

124560867

result:

ok 1 number(s): "124560867"

Test #187:

score: 0
Accepted
time: 4ms
memory: 11976kb

input:

5000 1604 85307
3142 3027 89
3142 4177 39
3142 3139 57
3142 4112 7
3142 13 71
3142 2029 73
3142 84 87
3142 4628 43
3142 181 14
3142 1067 53
3142 3434 44
3142 201 39
3142 1059 9
3142 3263 34
3142 2604 42
3142 3073 52
3142 1261 43
3142 774 53
3142 3907 7
3142 1314 85
3142 926 30
3142 353 36
3142 4700 ...

output:

796960871

result:

ok 1 number(s): "796960871"

Test #188:

score: 0
Accepted
time: 13ms
memory: 11460kb

input:

5000 3689 7705
98 4122 7
98 3573 48
98 3969 30
98 4922 7
98 4311 49
98 1774 30
98 3706 47
98 4538 15
98 3128 15
98 2459 38
98 4813 39
98 1820 33
98 699 32
98 623 18
98 2990 29
98 4976 3
98 953 39
98 1785 45
98 3150 6
98 2830 1
98 2180 4
98 4495 48
98 3091 36
98 770 22
98 4524 42
98 952 21
98 119 22
...

output:

401182438

result:

ok 1 number(s): "401182438"

Test #189:

score: 0
Accepted
time: 12ms
memory: 12712kb

input:

5000 2607 747964113
48 2024 94754
2024 1448 95940
1448 1848 54139
1848 1855 23317
1855 87 69941
87 4745 73766
4745 3835 48126
3835 85 56504
85 3052 76106
3052 1357 83194
1357 308 64428
308 907 45751
907 4158 37926
4158 549 97231
549 3371 57891
3371 4067 51209
4067 1050 56260
1050 962 71496
962 1016 ...

output:

856071517

result:

ok 1 number(s): "856071517"

Test #190:

score: 0
Accepted
time: 16ms
memory: 12452kb

input:

5000 4507 334434475
81 3335 3264332
3335 527 7500051
527 2279 2882451
2279 2017 9975533
2017 1587 428046
1587 698 2952445
698 4941 387816
4941 1623 8925825
1623 3141 7297397
3141 913 1711347
913 3505 960681
3505 4930 1034911
4930 432 372430
432 1948 6737141
1948 4405 6106993
4405 4819 5004064
4819 1...

output:

0

result:

ok 1 number(s): "0"

Test #191:

score: 0
Accepted
time: 3ms
memory: 13492kb

input:

5000 2166 482783982
27 2324 703268444
2324 4659 308428364
4659 4625 920734667
4625 4366 829823238
4366 4472 107872134
4472 2096 188024839
2096 1679 695557137
1679 3067 581322924
3067 3259 606301358
3259 4731 197640305
4731 1305 464817138
1305 4400 957836711
4400 4665 163112340
4665 1512 712110435
15...

output:

0

result:

ok 1 number(s): "0"

Test #192:

score: 0
Accepted
time: 17ms
memory: 13380kb

input:

5000 4434 8201279
1621 4200 9710
4200 993 8630
993 659 8992
659 2634 9315
2634 1970 6809
1970 1238 4742
1238 1059 1788
1059 47 9090
47 2783 6265
2783 1101 8226
1101 2186 2894
2186 4646 1915
4646 4476 9520
4476 3672 7025
3672 3023 5322
3023 4630 5657
4630 3121 7941
3121 1560 4256
1560 1434 7338
1434 ...

output:

0

result:

ok 1 number(s): "0"

Test #193:

score: 0
Accepted
time: 12ms
memory: 12364kb

input:

5000 445 64426
878 2649 51
2649 319 18
319 2466 80
2466 2497 97
2497 2669 83
2669 1042 49
1042 3833 25
3833 1450 42
1450 212 93
212 3852 86
3852 719 86
719 1753 67
1753 1185 68
1185 4734 14
4734 3908 30
3908 1879 19
1879 3096 94
3096 28 73
28 4938 78
4938 2286 16
2286 2719 76
2719 3357 31
3357 386 4...

output:

37516599

result:

ok 1 number(s): "37516599"

Test #194:

score: 0
Accepted
time: 13ms
memory: 12952kb

input:

5000 233 6546
4471 3017 17
3017 2041 11
2041 1999 41
1999 4023 43
4023 4735 22
4735 2350 38
2350 1509 23
1509 4668 23
4668 174 35
174 4180 31
4180 3986 27
3986 2014 13
2014 1898 5
1898 1269 35
1269 338 45
338 802 27
802 3661 31
3661 1484 16
1484 1616 4
1616 73 36
73 3079 3
3079 175 19
175 3436 13
34...

output:

459066465

result:

ok 1 number(s): "459066465"

Test #195:

score: 0
Accepted
time: 3ms
memory: 11748kb

input:

5000 2697 772790546
332 1284 95033
332 2843 31693
332 3796 13490
332 1261 54910
332 4684 67794
332 4483 68748
332 3148 20918
332 221 34191
332 3812 70184
332 2519 96903
332 2188 77960
332 364 91779
332 3305 55087
332 3829 89221
332 4729 99920
332 3254 2533
332 1055 70368
332 3009 92693
332 4597 7352...

output:

745075672

result:

ok 1 number(s): "745075672"

Test #196:

score: 0
Accepted
time: 15ms
memory: 13096kb

input:

5000 940 996596286
4798 4428 5386117
4798 2839 7596816
4798 3437 7160501
4798 3739 2554779
4798 2569 6705772
4798 1281 3752229
4798 533 4316614
4798 1455 5927491
4798 4690 3843822
4798 2729 3992891
4798 4696 9256059
4798 2962 6797582
4798 4912 1175
4798 2170 4323000
4798 4477 8584929
4798 2525 66595...

output:

146559469

result:

ok 1 number(s): "146559469"

Test #197:

score: 0
Accepted
time: 13ms
memory: 11340kb

input:

5000 2489 560231899
2735 104 282951240
2735 813 797919636
2735 3127 376660370
2735 2368 416592756
2735 2316 251389252
2735 2613 500947926
2735 3210 990209914
2735 3634 243658025
2735 4398 355639810
2735 1547 888070990
2735 726 179294566
2735 2349 951343670
2735 3849 620326442
2735 4178 45440713
2735...

output:

0

result:

ok 1 number(s): "0"

Test #198:

score: 0
Accepted
time: 7ms
memory: 12164kb

input:

5000 437 1584243
4259 3467 7524
4259 3975 6504
4259 1286 9500
4259 715 4839
4259 241 4541
4259 1502 7467
4259 2613 7826
4259 3682 7507
4259 1740 5357
4259 2490 4257
4259 1609 8795
4259 1590 4713
4259 4445 7096
4259 93 1182
4259 4094 4869
4259 3342 4712
4259 2622 3287
4259 791 3595
4259 2659 5106
425...

output:

510726188

result:

ok 1 number(s): "510726188"

Test #199:

score: 0
Accepted
time: 15ms
memory: 12236kb

input:

5000 4287 67736
1240 2491 9
1240 2203 4
1240 2801 99
1240 3582 88
1240 4296 30
1240 3656 58
1240 1073 41
1240 663 80
1240 4629 23
1240 1519 27
1240 3611 10
1240 4550 31
1240 2342 3
1240 4286 11
1240 4889 87
1240 4269 58
1240 1047 84
1240 969 49
1240 4493 48
1240 1148 30
1240 3363 30
1240 2568 17
124...

output:

42152490

result:

ok 1 number(s): "42152490"

Test #200:

score: 0
Accepted
time: 15ms
memory: 11728kb

input:

5000 3264 5388
2194 2755 17
2194 1138 4
2194 2862 5
2194 516 42
2194 4528 38
2194 1928 4
2194 3979 36
2194 900 14
2194 3734 12
2194 2042 5
2194 2219 29
2194 3198 41
2194 4947 36
2194 2518 48
2194 1174 23
2194 4387 12
2194 4629 10
2194 4568 33
2194 2817 47
2194 980 9
2194 4674 44
2194 1550 22
2194 14...

output:

67269665

result:

ok 1 number(s): "67269665"

Test #201:

score: 0
Accepted
time: 14ms
memory: 11500kb

input:

5000 1299 947360083
2190 576 51022
2190 4126 9246
2190 2554 27855
2190 268 96775
2190 1951 94527
2190 2181 89371
2190 4936 85331
2190 2509 16468
2190 3098 89878
2190 2882 29377
2190 3595 10169
2190 1597 69823
2190 3706 23343
2190 2059 29063
2190 4244 48631
2190 2794 83398
2190 484 45048
2190 3996 40...

output:

969698913

result:

ok 1 number(s): "969698913"

Test #202:

score: 0
Accepted
time: 9ms
memory: 12460kb

input:

5000 3182 923599313
3709 1901 3463671
3709 1032 7086989
3709 3512 9635070
3709 1411 9648808
3709 732 202202
3709 1097 7116643
3709 1787 9898891
3709 3983 9847185
3709 1721 1009001
3709 818 6959692
3709 1516 7734103
3709 642 2965837
3709 2455 3265209
3709 1651 2539006
3709 760 7007011
3709 53 9434189...

output:

958498628

result:

ok 1 number(s): "958498628"

Test #203:

score: 0
Accepted
time: 9ms
memory: 12924kb

input:

5000 2004 637679816
3646 4290 697665605
3646 3258 820328797
3646 3568 478787103
3646 2978 725313379
3646 928 609720962
3646 3403 746530202
3646 2575 694064200
3646 3840 440823204
3646 3528 513639316
3646 3616 456549034
3646 764 845462822
3646 3960 739575000
3646 4051 233575152
3646 4036 824054282
36...

output:

0

result:

ok 1 number(s): "0"

Test #204:

score: 0
Accepted
time: 11ms
memory: 11708kb

input:

5000 2248 191399
195 3986 6018
195 4999 8208
195 3163 1172
195 2500 5972
195 4044 4341
195 975 1659
195 2720 6563
195 2141 8748
195 3213 2489
195 131 2916
195 931 1483
3986 951 8689
3986 1590 8656
3986 1872 3937
3986 788 9888
3986 937 1484
3986 2464 2319
3986 1305 4445
3986 516 5705
3986 4335 2567
3...

output:

936823185

result:

ok 1 number(s): "936823185"

Test #205:

score: 0
Accepted
time: 7ms
memory: 13160kb

input:

5000 2320 71046
2441 1796 96
2441 1645 36
2441 1201 93
2441 2039 88
2441 219 10
2441 2109 96
2441 3784 49
2441 86 71
2441 3989 59
2441 1845 81
2441 770 38
2441 4525 90
2441 4404 87
2441 3757 4
2441 4390 50
2441 3568 9
2441 1627 3
2441 3853 21
2441 42 75
2441 1144 80
2441 4052 12
2441 119 87
2441 297...

output:

369058928

result:

ok 1 number(s): "369058928"

Test #206:

score: 0
Accepted
time: 7ms
memory: 12480kb

input:

5000 4807 8421
3628 2314 28
3628 4922 45
3628 2960 36
3628 1272 40
3628 1206 4
3628 4923 26
3628 879 24
3628 2716 13
3628 2378 46
3628 1598 41
3628 786 20
3628 2161 22
3628 4867 45
3628 3142 36
3628 3641 8
3628 1923 37
3628 1210 23
3628 1428 2
3628 3530 18
3628 2040 36
3628 4905 48
3628 1125 17
3628...

output:

603868054

result:

ok 1 number(s): "603868054"

Test #207:

score: 0
Accepted
time: 7ms
memory: 11584kb

input:

5000 1389 972186516
4314 220 51954
4314 1339 50115
220 1097 62608
220 2895 50731
220 1198 14447
220 1556 64363
220 34 85801
1339 3817 49745
1339 3826 98745
1339 3607 19972
1339 2846 94556
1339 76 52779
1339 333 90971
1339 1308 48494
1097 2006 93096
1097 3801 64637
1097 4218 96968
1097 2917 52433
109...

output:

917856217

result:

ok 1 number(s): "917856217"

Test #208:

score: 0
Accepted
time: 3ms
memory: 12684kb

input:

5000 1911 440536932
3244 4120 4618508
3244 4583 1541225
4120 356 6834058
4120 1813 6820039
4120 1977 6551348
4120 2009 8922824
4120 4723 5448352
4583 972 256976
4583 2862 8734175
4583 4992 8365668
4583 1434 4767709
4583 1232 987956
4583 3289 4423693
4583 3915 6272346
356 808 5787717
356 386 587876
3...

output:

668808596

result:

ok 1 number(s): "668808596"

Test #209:

score: 0
Accepted
time: 7ms
memory: 12084kb

input:

5000 4623 860351926
4932 3870 407244209
4932 2920 967155778
3870 4593 107579173
3870 1427 875881132
3870 4271 593842513
3870 3594 673085375
3870 3019 846888287
2920 3584 662759702
2920 1508 227922975
2920 2746 671638821
2920 3193 174770182
2920 80 216663782
2920 4459 87614841
2920 186 141791159
4593...

output:

0

result:

ok 1 number(s): "0"

Test #210:

score: 0
Accepted
time: 11ms
memory: 11928kb

input:

5000 955 3574364
3158 3403 9488
3158 1750 7616
3403 505 3016
3403 306 8653
3403 4637 2514
3403 1954 9948
3403 269 5850
1750 428 9892
1750 1139 8502
1750 1593 9620
1750 2008 1574
1750 118 6875
1750 1209 3882
1750 2538 1431
505 3702 7092
505 2948 9100
505 421 8255
505 4956 8646
505 3177 5295
505 195 6...

output:

136641724

result:

ok 1 number(s): "136641724"

Test #211:

score: 0
Accepted
time: 15ms
memory: 13052kb

input:

5000 3865 74357
4599 2557 26
4599 4397 87
2557 3403 55
2557 4621 92
2557 1006 100
2557 1799 87
2557 599 29
4397 276 48
4397 950 50
4397 176 88
4397 4433 27
4397 311 69
4397 2580 48
4397 738 75
3403 4469 89
3403 1563 14
3403 762 73
3403 980 11
3403 3943 96
3403 3525 6
3403 4405 34
3403 4782 11
3403 1...

output:

89317338

result:

ok 1 number(s): "89317338"

Test #212:

score: 0
Accepted
time: 9ms
memory: 11352kb

input:

5000 543 9966
2095 3809 23
2095 176 32
3809 3836 24
3809 1576 10
3809 2318 38
3809 2936 4
3809 959 7
176 1705 11
176 4458 12
176 4732 29
176 792 20
176 3749 24
176 2185 4
176 689 3
3836 1549 20
3836 4330 47
3836 1454 47
3836 1180 25
3836 3748 10
3836 3926 40
3836 837 17
3836 4834 47
3836 2027 15
157...

output:

640769091

result:

ok 1 number(s): "640769091"

Test #213:

score: 0
Accepted
time: 8ms
memory: 12188kb

input:

5000 3776 851788758
21 1099 91509
1099 2043 2600
1099 3441 79283
3441 4326 9535
2043 939 56746
2043 201 19016
2043 1567 53100
1099 2658 9567
2658 3841 60837
3441 4278 12908
2043 379 57233
201 4987 67003
1099 3132 51213
939 2397 52012
1567 3856 94321
4278 4561 56743
379 384 41052
4561 3021 69619
939 ...

output:

692252693

result:

ok 1 number(s): "692252693"

Test #214:

score: 0
Accepted
time: 10ms
memory: 12860kb

input:

5000 1448 807731447
3640 2929 7259069
3640 1873 1960380
1873 4638 3354789
2929 3924 6005003
4638 74 7418399
4638 2276 2080281
3640 945 7706415
74 4744 5871579
4638 4405 5972870
4405 1645 5162580
1645 891 9631512
74 134 6127818
4638 1136 1257196
1136 40 1109564
3640 1991 3048754
4744 2826 422418
4744...

output:

193924528

result:

ok 1 number(s): "193924528"

Test #215:

score: 0
Accepted
time: 7ms
memory: 11272kb

input:

5000 1842 937799843
2691 1882 818716849
1882 1828 150727374
2691 4055 385350256
1828 1193 677566655
1882 1740 868446960
1882 2167 121368188
1193 2666 87103019
1193 3078 193983612
2691 4746 205322542
2167 670 503236859
1193 2187 789392327
4746 3532 740633800
2167 1579 982714747
2691 2382 843163997
40...

output:

0

result:

ok 1 number(s): "0"

Test #216:

score: 0
Accepted
time: 18ms
memory: 12896kb

input:

5000 62 6957328
708 2192 1115
708 2012 3338
2012 3871 9358
708 4291 4737
2192 418 2376
2192 4051 727
4051 3487 5137
4291 1155 7446
2192 1471 7926
4291 2497 1483
708 512 1151
512 2372 6210
4291 3229 9507
3871 4299 2484
4299 616 8043
2372 3170 3347
3170 1007 9062
4299 2687 5172
512 1803 1372
1155 426 ...

output:

51156631

result:

ok 1 number(s): "51156631"

Test #217:

score: 0
Accepted
time: 13ms
memory: 12176kb

input:

5000 2707 20771
3901 2627 9
3901 4186 30
2627 1283 99
1283 1929 55
4186 370 31
1929 2524 18
1929 2483 99
1929 299 61
299 4539 43
2483 3643 54
4186 96 60
1283 4056 31
96 4083 55
3643 942 40
96 1436 62
370 3915 23
4056 1077 9
942 2994 68
2524 61 33
2994 256 94
3643 3367 77
2994 606 33
1283 4768 13
405...

output:

708541117

result:

ok 1 number(s): "708541117"

Test #218:

score: 0
Accepted
time: 17ms
memory: 11436kb

input:

5000 2086 8808
2269 3644 4
2269 4931 33
4931 2691 23
4931 3919 11
3644 4056 35
3644 2489 32
2489 1076 32
3919 2213 34
2691 1816 20
2213 3341 5
2213 3492 39
2213 4130 9
4130 2258 14
2258 1656 45
2258 4693 43
2213 4817 32
3919 4925 44
4925 810 8
2269 3797 39
3797 719 13
3797 1662 12
4693 2677 30
2691 ...

output:

747152416

result:

ok 1 number(s): "747152416"

Test #219:

score: 0
Accepted
time: 18ms
memory: 13048kb

input:

5000 1570 876615191
2453 4068 59329
4068 3495 49487
3495 267 13009
4068 2375 11392
3495 2618 97086
4068 1833 72556
1833 3270 62648
2453 676 76964
2375 4986 13862
4986 1952 94331
4068 3749 83142
3749 289 58759
3749 2129 73528
676 382 81129
267 149 19611
149 1720 91050
2129 1128 58264
3270 1391 999
40...

output:

130156132

result:

ok 1 number(s): "130156132"

Test #220:

score: 0
Accepted
time: 11ms
memory: 12960kb

input:

5000 2881 29701770
1196 4439 8127393
4439 2897 8653149
2897 2198 5892468
2198 3452 7718855
3452 1412 9615818
1196 746 6532769
2198 4504 5838217
1196 3340 6658385
3340 2650 1843374
2897 2666 555182
2666 1400 6859285
4504 615 7595879
615 4467 7892215
4467 1527 6105635
1196 3797 1288242
1412 4074 83549...

output:

0

result:

ok 1 number(s): "0"

Test #221:

score: 0
Accepted
time: 10ms
memory: 12116kb

input:

5000 4461 15247760
690 4262 627528938
4262 3492 676052581
690 2583 944163130
2583 4050 184094269
690 1467 719005860
1467 3635 88374443
3635 3610 355124481
3492 4898 357850456
4898 1515 153949388
4050 1613 237456634
1613 3600 553262341
3610 2497 186488790
2497 2966 821026648
3600 2010 173625990
3492 ...

output:

0

result:

ok 1 number(s): "0"

Test #222:

score: 0
Accepted
time: 18ms
memory: 12668kb

input:

5000 1873 340292
4116 239 2226
239 1475 9749
4116 4747 7189
4747 4101 2069
4747 3626 1272
4101 938 6579
4116 1100 6682
1100 1574 803
1574 4997 9481
4997 1922 9964
4747 501 8440
4101 90 8632
1574 4526 975
4526 4391 3643
4391 4441 7474
4441 2515 2583
2515 1878 8229
1878 1363 6221
1363 1848 8399
1100 1...

output:

232585256

result:

ok 1 number(s): "232585256"

Test #223:

score: 0
Accepted
time: 10ms
memory: 12900kb

input:

5000 1548 24081
3933 3685 45
3685 1364 97
1364 3418 60
3685 2466 47
2466 279 47
279 4263 93
4263 3831 23
3418 659 99
3933 4589 24
4589 1635 8
1635 4808 54
4808 3346 83
3346 636 30
3346 2181 74
1635 2469 60
2469 707 53
707 3387 27
3387 3040 41
3040 449 29
449 4897 45
4897 4224 100
449 3115 96
2469 43...

output:

917733436

result:

ok 1 number(s): "917733436"

Test #224:

score: 0
Accepted
time: 10ms
memory: 12444kb

input:

5000 2821 7649
1969 3734 10
3734 4639 9
4639 2708 32
3734 228 28
3734 1222 28
1222 2898 32
2898 1722 16
1722 2457 12
2457 4687 7
4687 4043 39
4043 1562 14
1969 1141 42
1141 2750 33
228 3171 5
3171 3288 11
3288 3733 28
1141 2310 2
3171 945 6
2457 1800 29
1800 1338 33
1338 2900 31
2900 605 26
3733 401...

output:

350821102

result:

ok 1 number(s): "350821102"

Test #225:

score: 0
Accepted
time: 15ms
memory: 11432kb

input:

5000 1660 51184728
3253 3148 32619
3253 4462 2686
3253 1069 42592
3253 1936 73056
4462 4100 30863
4100 4914 93276
4462 4494 50863
4462 3882 74733
3253 4586 75487
3253 1461 73371
3253 4690 82684
3253 2815 84843
3253 2965 3218
4462 2825 56985
3253 508 64084
4586 3358 67972
3253 1120 25327
1461 1802 22...

output:

571398135

result:

ok 1 number(s): "571398135"

Test #226:

score: 0
Accepted
time: 7ms
memory: 11632kb

input:

5000 2419 691863581
670 4390 3798076
670 85 6362099
670 1246 5139129
85 1185 4169887
670 4885 3332599
670 1039 2638142
670 605 1365436
670 266 931978
85 1271 8161828
670 4734 4832564
670 2523 5208756
670 4412 6913691
670 3039 4019887
4390 130 3437114
4885 4516 116648
130 1621 2086625
85 87 8807256
6...

output:

779794162

result:

ok 1 number(s): "779794162"

Test #227:

score: 0
Accepted
time: 9ms
memory: 12324kb

input:

5000 1680 797728381
4010 2106 609653866
2106 871 312453286
4010 2093 134207691
4010 2263 254111888
2093 591 684022513
591 442 282117133
4010 4362 544744152
4010 3680 792867451
4010 3929 646151771
4010 2589 973808921
2589 4921 414162444
4010 1008 754354177
4010 587 591706952
871 733 703234645
4010 29...

output:

914938645

result:

ok 1 number(s): "914938645"

Test #228:

score: 0
Accepted
time: 15ms
memory: 13024kb

input:

5000 2876 3723257
379 3340 890
379 3976 4550
3340 401 321
379 1623 4168
379 450 8446
3340 2405 4400
379 2055 392
1623 2368 9954
379 326 1849
379 4567 1996
379 2833 5184
379 217 4637
379 70 5713
379 2623 212
2368 380 2672
3976 3399 5607
379 487 7919
2405 4020 1926
70 3824 5349
4567 443 7151
2405 60 8...

output:

767374406

result:

ok 1 number(s): "767374406"

Test #229:

score: 0
Accepted
time: 9ms
memory: 12844kb

input:

5000 389 94687
1641 1260 97
1260 4026 15
4026 1629 57
1641 3463 32
1641 4774 68
1629 3739 90
1641 2960 32
3463 1171 3
1641 1375 1
1641 2948 32
1641 241 46
3739 3572 52
1641 3273 54
4774 2131 61
4774 1869 79
2948 4766 3
1641 175 38
1641 351 33
1641 1084 4
1641 863 70
1084 4119 71
3572 3252 55
1641 29...

output:

214987032

result:

ok 1 number(s): "214987032"

Test #230:

score: 0
Accepted
time: 7ms
memory: 11352kb

input:

5000 4365 6491
1939 1566 7
1939 931 41
1566 568 14
1939 3030 32
3030 3816 16
1939 2855 8
1566 777 44
1939 4610 3
1939 3501 44
568 1194 29
1939 1386 40
3030 2140 43
3030 4880 3
2855 2055 22
1939 4171 26
1939 4403 49
1939 4209 15
1939 2851 46
3030 3201 26
2855 402 12
2855 1082 38
1939 32 34
1939 3166 ...

output:

542046418

result:

ok 1 number(s): "542046418"

Test #231:

score: 0
Accepted
time: 12ms
memory: 12020kb

input:

5000 1750 76011161
3641 503 47815
503 726 36087
503 4575 40120
4575 65 83999
65 3682 68114
4575 4871 81694
4871 4099 9507
4099 2828 83207
2828 947 44876
4871 1106 76444
1106 129 14056
129 390 16208
390 1927 22060
1927 707 68013
1106 3336 26927
3336 255 61368
255 4869 61645
4869 2426 8050
2426 3923 9...

output:

556371037

result:

ok 1 number(s): "556371037"

Test #232:

score: 0
Accepted
time: 17ms
memory: 12060kb

input:

5000 3852 618866608
1861 4295 9863264
4295 4371 8818736
4295 4310 5243134
4310 490 6073705
490 2568 4735975
4310 2561 8646530
2561 4564 8714519
4564 2262 7170403
2262 1892 8801047
2561 3732 7217871
3732 4741 1798434
4741 4089 9419044
4089 4087 9610508
4087 4461 9006177
3732 1717 3684447
1717 589 944...

output:

965404513

result:

ok 1 number(s): "965404513"

Test #233:

score: 0
Accepted
time: 7ms
memory: 12768kb

input:

5000 4299 875176298
3336 3880 479554425
3880 2266 480789046
3880 4282 316832840
4282 1484 583874270
1484 4015 683500810
4282 3624 486351542
3624 4450 243801714
4450 1189 153083470
1189 4115 751742474
3624 3740 568478058
3740 2320 453201271
2320 4279 286883301
4279 3029 505381376
3029 1499 479687889
...

output:

0

result:

ok 1 number(s): "0"

Test #234:

score: 0
Accepted
time: 17ms
memory: 11800kb

input:

5000 4687 2330413
896 779 3695
779 365 7800
779 15 5641
15 4433 2367
4433 1571 2455
15 4534 9145
4534 2868 2886
2868 1886 5239
1886 1330 7389
4534 2167 1251
2167 1406 3105
1406 4816 8716
4816 3959 4925
3959 2208 1589
2167 1929 4322
1929 181 4857
181 607 8044
607 199 3555
199 2281 998
2281 1426 4780
...

output:

844543280

result:

ok 1 number(s): "844543280"

Test #235:

score: 0
Accepted
time: 17ms
memory: 12432kb

input:

5000 1935 73806
111 1699 52
1699 4782 31
1699 3081 70
3081 4334 76
4334 1867 29
3081 1065 5
1065 3347 75
3347 1771 41
1771 610 95
1065 2511 27
2511 2073 17
2073 1798 100
1798 1913 75
1913 3216 24
2511 3985 32
3985 4633 79
4633 4725 2
4725 2468 72
2468 1418 81
1418 3173 23
3985 4644 33
4644 722 91
72...

output:

529270023

result:

ok 1 number(s): "529270023"

Test #236:

score: 0
Accepted
time: 13ms
memory: 11552kb

input:

5000 908 8036
2302 1372 38
1372 2843 11
1372 825 18
825 2321 21
2321 3160 22
825 548 33
548 2642 21
2642 3846 45
3846 1531 18
548 1289 19
1289 4692 9
4692 4932 11
4932 1064 35
1064 2440 42
1289 1399 19
1399 1591 40
1591 300 8
300 1540 8
1540 1230 21
1230 2759 25
1399 3722 34
3722 2315 1
2315 1031 41...

output:

312901763

result:

ok 1 number(s): "312901763"

Test #237:

score: 0
Accepted
time: 16ms
memory: 11804kb

input:

5000 2336 557532007
1535 4164 98998
2702 4164 88265
4164 3513 19650
2416 3513 22525
3513 4552 94976
25 4552 4994
4552 368 46200
3362 368 1133
368 3684 1587
537 3684 77834
3684 3805 18068
2539 3805 67918
3805 1186 19527
2879 1186 40044
1186 2528 63259
4194 2528 47303
2528 147 66509
382 147 72520
147 ...

output:

498922150

result:

ok 1 number(s): "498922150"

Test #238:

score: 0
Accepted
time: 16ms
memory: 11984kb

input:

5000 2402 548246583
493 4963 256657
1624 4963 1098267
4963 563 3781660
1077 563 700568
563 2148 1324683
688 2148 9683223
2148 3249 4132444
1732 3249 2559818
3249 4588 6535141
4806 4588 5497691
4588 3580 7482849
2948 3580 6749216
3580 2378 3982539
2789 2378 7666701
2378 4789 8094575
376 4789 2390121
...

output:

0

result:

ok 1 number(s): "0"

Test #239:

score: 0
Accepted
time: 9ms
memory: 12376kb

input:

5000 2786 201532706
1294 1449 701833955
1728 1449 519327572
1449 2342 831459702
879 2342 530654466
2342 1953 299570207
101 1953 541769467
1953 3810 114415321
3315 3810 970817564
3810 507 430087702
72 507 279129768
507 1743 195498739
659 1743 1255331
1743 4773 524041900
3585 4773 928873825
4773 2207 ...

output:

0

result:

ok 1 number(s): "0"

Test #240:

score: 0
Accepted
time: 17ms
memory: 12400kb

input:

5000 604 2485281
270 1285 1550
4373 1285 9569
1285 3141 8158
2700 3141 4031
3141 3848 1273
3387 3848 4813
3848 3711 1380
4621 3711 7416
3711 753 7456
2967 753 1137
753 4147 4787
3118 4147 3497
4147 25 8838
3280 25 5983
25 765 7393
1214 765 6086
765 2467 1172
4272 2467 9066
2467 1090 8152
819 1090 88...

output:

754693488

result:

ok 1 number(s): "754693488"

Test #241:

score: -100
Wrong Answer
time: 16ms
memory: 11560kb

input:

5000 1974 85945
4779 3327 50
4028 3327 46
3327 2353 13
4371 2353 41
2353 223 42
460 223 64
223 1018 97
3701 1018 9
1018 4449 92
4962 4449 4
4449 2483 89
2302 2483 86
2483 3617 61
2364 3617 97
3617 4982 41
323 4982 73
4982 1892 73
3077 1892 97
1892 1203 9
3760 1203 23
1203 2224 90
2928 2224 56
2224 1...

output:

140181398

result:

wrong answer 1st numbers differ - expected: '458559003', found: '140181398'