QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#585936#9261. Toll RoadLuSter_MAC ✓78ms9468kbC++201.1kb2024-09-23 23:14:352024-09-23 23:14:35

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
2 10 1 1
E 0
T 10
2 10 3 2
E 0
T 10
5 40 5 6
E 0
T 40
T 20
E 30
E 10
10 9 5 6
T 5
E 6
T 7
E 8
T 9
E 0
T 1
E 2
T 3
E 4

output:

1
2
15
28

result:

ok 4 number(s): "1 2 15 28"

Test #2:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

1000
10 100 470 207
T 24
T 93
E 1
T 100
E 27
T 10
E 79
E 92
E 12
E 0
10 100 58 505
T 20
E 28
T 100
E 12
T 34
E 25
T 68
E 49
T 23
E 0
10 100 279 821
E 33
T 100
E 41
E 87
E 0
T 22
T 74
E 28
T 20
E 89
10 100 455 923
E 55
T 47
T 14
E 0
T 15
E 53
T 2
T 100
E 49
E 79
10 100 950 216
T 76
T 91
T 100
E 37
T ...

output:

1449
464
2232
3640
1296
4596
304
2163
2226
712
56
1526
1534
1848
16
768
3360
385
3661
2576
544
438
4956
592
301
1392
4712
136
600
1248
1760
2340
1561
1240
1092
3199
4776
4272
516
3246
1768
696
912
189
3675
119
1120
5208
4446
1744
1808
4264
3344
2712
3568
4354
4942
672
112
3240
2072
2552
3640
672
263...

result:

ok 1000 numbers

Test #3:

score: 0
Accepted
time: 1ms
memory: 3500kb

input:

1000
10 100 314 631
E 79
E 25
T 100
T 52
E 0
T 66
T 43
E 59
T 5
E 89
10 100 336 291
E 46
E 6
T 100
E 74
E 23
E 5
E 96
T 78
E 0
E 36
10 100 337 157
T 40
E 90
E 0
E 83
T 24
T 100
T 87
T 10
T 76
T 60
10 100 198 942
E 23
T 68
T 8
E 0
E 30
E 79
T 63
E 99
T 19
T 100
10 100 333 497
E 32
E 56
T 6
E 0
T 100
...

output:

2512
2328
1099
1584
2495
2782
2368
1048
574
3648
5680
5048
696
1984
552
3176
1400
4200
736
5352
4272
2432
3774
5736
352
2478
1008
416
3528
1351
1032
592
3592
3941
4975
4891
987
1584
4912
1112
2711
1280
2828
4586
5496
776
296
432
3192
1112
96
656
1920
1832
1480
1384
3296
4000
455
780
824
2184
3054
19...

result:

ok 1000 numbers

Test #4:

score: 0
Accepted
time: 1ms
memory: 3560kb

input:

1000
10 100 455 759
E 0
T 83
T 24
T 11
T 100
T 89
T 86
E 65
T 8
E 52
10 100 64 303
T 83
E 0
T 100
E 68
T 46
E 41
T 45
T 52
E 91
E 47
10 100 444 240
E 87
T 100
E 15
E 40
E 0
E 6
T 53
E 50
E 71
E 21
10 100 66 352
T 69
T 100
T 33
E 26
T 97
E 0
T 95
T 6
E 21
T 46
10 100 449 435
E 45
E 88
T 53
T 100
T 58...

output:

3640
512
1920
528
3045
3792
1176
567
4487
5782
3325
2954
7155
3376
549
4028
3248
1184
1022
1908
5355
2538
2682
5068
2700
1016
2659
672
280
636
2800
1320
1267
3864
208
632
1312
5976
2934
1888
752
5334
1920
808
624
6960
4746
5943
2766
3015
3724
1992
1992
240
1888
4985
7696
2086
1016
1184
3931
5656
159...

result:

ok 1000 numbers

Test #5:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

1000
10 100 3 183
T 76
E 22
E 0
T 19
E 27
T 36
T 46
T 100
E 97
T 30
10 100 32 896
E 71
E 87
E 0
T 100
T 96
E 2
T 41
T 59
E 84
E 83
10 100 795 256
T 22
T 48
T 50
E 0
T 12
E 27
T 100
T 23
E 31
T 63
10 100 944 637
E 1
E 81
E 0
E 40
T 100
E 36
T 68
E 93
E 51
E 56
10 100 916 179
T 81
T 55
T 100
T 4
E 0
T...

output:

24
256
2048
5096
1253
427
5117
64
2248
3752
616
1488
3342
1008
3930
368
2472
1872
2464
2856
402
1692
5544
2016
584
4483
520
408
1776
3626
160
259
960
2706
544
63
312
3300
4162
3169
224
3893
5133
3568
4501
440
238
352
4212
856
966
896
1112
5509
1928
936
5208
1920
1448
1712
3424
520
5336
872
5880
4181...

result:

ok 1000 numbers

Test #6:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

1000
10 100 655 607
E 0
T 73
E 93
E 32
T 60
T 9
T 100
T 47
T 29
E 34
10 100 623 223
E 54
T 85
E 31
T 100
T 27
E 42
E 13
E 0
E 6
T 39
10 100 67 408
T 20
T 30
E 33
E 29
E 0
T 100
T 78
T 99
E 11
T 87
10 100 505 660
T 84
E 99
E 32
E 73
T 82
T 100
E 11
E 49
E 37
E 0
10 100 978 606
T 56
E 0
T 62
T 100
E 5...

output:

4249
1561
536
4040
4242
5133
2352
2248
2624
3390
2912
6524
3968
1491
1600
368
4456
5024
1904
1088
2080
688
1048
304
1576
384
2144
4570
4487
2552
1638
1267
2144
2040
120
574
1512
1832
2680
1568
2248
2628
2568
2352
4350
4230
2968
1981
1816
424
2793
3584
2232
3832
3115
1631
5443
3256
4898
280
1536
464
...

result:

ok 1000 numbers

Test #7:

score: 0
Accepted
time: 50ms
memory: 3668kb

input:

1000
500 1000000000 244885652 364951468
T 996361420
E 55599773
E 69272306
T 70761873
T 316059304
T 255784846
E 0
E 583889902
E 868743310
E 317696701
T 750898001
E 701945698
E 406719816
E 715666153
E 611741061
E 961983436
E 744582896
E 855975340
E 705418997
E 732604443
T 586078356
E 772371619
T 74714...

output:

105601656180
232489401920
62175440719
41998602380
260872949961
268708154108
180635526036
219518767092
15153210234
122029908061
214898151512
164750824734
124782937020
17032515764
129995284140
59535397196
220609493776
115311036883
137962113430
136677395712
35107935240
88132855788
182392539194
28876682...

result:

ok 1000 numbers

Test #8:

score: 0
Accepted
time: 51ms
memory: 3564kb

input:

1000
500 1000000000 523467201 543034892
E 106894235
E 226810391
T 638854309
E 371432577
T 461100721
E 102885454
T 960073025
T 404861356
T 929546325
T 873348729
E 933346787
T 459078431
T 639332583
T 402285310
T 523273836
E 125362243
E 494698900
T 464692798
T 459085180
T 72638930
E 300083777
E 6269766...

output:

200218724898
175335858102
56757908592
238531645659
72642262180
41533677408
100647792
244549392054
119101502268
86607848250
48380587452
4192200000
58883821129
229594041618
306135819162
162462014478
24261867750
124736750694
2283042114
55969089748
71742622020
43803525810
69172905168
5468859210
19315794...

result:

ok 1000 numbers

Test #9:

score: 0
Accepted
time: 54ms
memory: 3604kb

input:

1000
500 1000000000 391983341 426151020
T 916133952
T 143127466
T 468166691
E 382384147
E 616840164
E 547842812
T 472103584
E 79968546
T 315972962
E 240556788
T 60928805
E 595051723
T 647995485
E 971354421
E 887338351
T 87025532
T 275496985
E 700369297
T 492435868
T 877879438
E 165294401
T 376867156...

output:

149049483420
193258132479
253302009026
211773606158
167814424584
153253980666
223817463981
272824133664
113050592800
129980841675
84656215384
100913603982
49041132370
12225521625
53177193650
6174504126
6147098307
218719471096
144438610206
30685169160
282680037210
40742407872
310039048632
32493634469...

result:

ok 1000 numbers

Test #10:

score: 0
Accepted
time: 54ms
memory: 3564kb

input:

1000
500 1000000000 965532185 604234444
E 36621763
E 915784865
E 910518917
T 426804512
E 553348699
T 914508733
E 45685627
T 487103637
E 607519219
T 410911420
E 1227306
E 196971187
E 798498242
E 282248778
T 833460920
T 821675768
T 571450772
T 839467934
T 271258285
E 85845006
E 73284760
E 628997048
T ...

output:

231421792052
4203446190
295024303856
204496569045
361189931648
13180112832
235394688438
117060570484
182730704244
125236476000
69450918150
49853217672
39889013625
303041063219
172367143080
21523208910
99899317231
32255380326
37825003854
152410371260
60404988750
138862285010
304040323958
268283072610...

result:

ok 1000 numbers

Test #11:

score: 0
Accepted
time: 50ms
memory: 3664kb

input:

1000
500 1000000000 539081030 782317868
E 507930564
T 21657244
T 630556761
T 61222112
E 110800809
T 395585019
E 137090729
T 409215118
E 29075223
T 928705990
T 885653351
T 522245296
E 312118190
T 666384323
T 83120809
T 356676438
E 796881521
T 139477206
E 594183283
T 296437909
T 426615492
E 964426432
...

output:

231481828940
259812814176
263262416712
110380479000
38733471824
213021951644
14918974938
92118842808
49584964160
130763280570
153432939954
154991639259
139936582300
62161828599
245194821534
8733308384
81692342562
107767989960
241457166853
222989250324
164420794920
246389197317
271793093914
525770647...

result:

ok 1000 numbers

Test #12:

score: 0
Accepted
time: 60ms
memory: 3716kb

input:

100
5000 1000000000 622863313 480399515
E 209605507
T 832753840
E 483059198
T 418168416
E 310576627
E 828372274
E 990447149
T 658523886
E 729469185
E 954998420
E 476499257
E 765439178
T 33623815
T 994174337
T 560355018
E 864103747
E 331235423
E 492784579
T 763710189
T 771996760
T 698435610
T 6400378...

output:

1801017781735
122625545154
1550559181671
1530019752768
1932008592318
268932299034
2582117624758
2158945782441
1887617370912
838642186722
1866992842680
569717956626
1216597316032
3410050371151
2125660641016
1699552199746
1225899558856
998199895490
1991327181102
585639859687
2424375872562
998422542953...

result:

ok 100 numbers

Test #13:

score: 0
Accepted
time: 61ms
memory: 3720kb

input:

100
5000 1000000000 196412158 658482939
E 108536220
T 370072054
E 468347154
T 688630585
E 526731927
E 284781337
E 440595585
T 628879434
T 900098685
E 994024477
E 54465319
T 336384400
T 173828828
T 891867915
E 784180885
E 628121093
E 113847790
E 302664579
E 566461217
T 298505801
E 546164817
E 6187009...

output:

981667965684
2568046866165
1136259114991
2253242631056
2472924800100
556198545040
2827285442835
1279991710712
408926468958
653107480749
881252551011
1718987468730
2869087382796
1221431023930
1141069939119
1183871729505
1683182113708
486214663350
577845584274
706406509326
1821562922706
1795429018068
...

result:

ok 100 numbers

Test #14:

score: 0
Accepted
time: 60ms
memory: 3944kb

input:

100
5000 1000000000 64928298 836566363
E 568615015
E 125108290
T 942874628
E 475481791
E 310079339
T 539035412
T 702072940
E 553745630
T 444690856
E 307750221
E 329899180
E 594094239
T 893530316
T 920346362
E 143766854
E 29349119
T 203705695
T 2043953
E 100952796
E 906522290
T 233429577
E 685047187
...

output:

324511633404
499187789982
917189101363
355783686720
1453110272853
169513772604
1914265024236
2698806158463
1878728657820
2883982841307
885738077994
1080924597696
957472764066
2184957007237
610364106660
2487937455834
2512772991556
3165255226306
2070929994224
3018460856926
2927058879018
1387834741776
...

result:

ok 100 numbers

Test #15:

score: 0
Accepted
time: 60ms
memory: 3888kb

input:

100
5000 1000000000 638477143 14649787
E 670177896
E 988332718
E 315776490
T 779049436
E 396930080
T 442508964
T 249320094
T 896614347
E 168842289
E 480422884
E 796386480
E 10482662
E 527141879
T 439287024
E 766356830
T 233164467
T 610485333
T 682692730
T 541716813
E 346011055
T 687344636
T 91795081...

output:

55288296138
1794065165568
2478809330124
3118680786585
847294896582
1391759073600
32197514580
535442039870
814642817940
2460849795078
2409418502040
2321879951058
2147797268874
1055909801234
825072454214
2259149264744
2529387876006
1256992115141
1362675351156
1230830213964
2246751372248
2420488162690
...

result:

ok 100 numbers

Test #16:

score: 0
Accepted
time: 61ms
memory: 3920kb

input:

100
5000 1000000000 212025987 897765915
E 802205380
T 995807169
E 352652611
E 972827962
E 61590718
E 82675447
E 972155180
E 670225177
T 438035263
T 845897342
E 32419302
T 139944651
E 753659533
E 634713310
E 975967874
E 10188353
E 170688409
T 664279877
E 89385334
T 880106476
T 565375660
T 698890786
T...

output:

1059705883026
319783489307
250460618080
1282328620776
1025356245999
3439097581925
18415601430
2993302573392
2220452208662
2711972782344
7393916513
423462592182
1043274071168
1227667416861
935860429350
1852218079680
1348666870480
1575495619808
1207170970625
1635511328682
136084234524
235630995327
583...

result:

ok 100 numbers

Test #17:

score: 0
Accepted
time: 69ms
memory: 3924kb

input:

10
50000 1000000000 637025302 163642365
E 839688278
E 415478844
E 43400410
T 121410193
E 391242174
E 241572770
T 122576628
T 404032332
E 448074494
E 699963307
T 279423095
T 891782877
T 722973947
T 25839909
E 630078076
T 750391068
T 568249491
T 919610727
T 213257546
E 116673072
T 152801103
T 29086299...

output:

6156553056030
18301849256434
36593478275610
13704493890672
5502054558064
8158321954068
29553983227759
3158410124395
25192312080026
15140317988796

result:

ok 10 numbers

Test #18:

score: 0
Accepted
time: 66ms
memory: 4008kb

input:

10
50000 1000000000 505541443 341725789
E 619200055
T 196542270
T 439960756
E 605015002
E 990429121
T 811165491
E 869669585
E 889371708
E 292704791
E 47559636
T 833442795
E 841788654
E 167774827
E 485451720
T 207528161
E 881188084
E 553724360
E 827990100
T 391215742
E 96877218
E 341812045
T 57455354...

output:

12815400539078
3289143862480
7761563075058
5658299358972
8828925208020
3078024679653
6969467252387
6331075646844
1094578565106
11315791453560

result:

ok 10 numbers

Test #19:

score: 0
Accepted
time: 69ms
memory: 4092kb

input:

10
50000 1000000000 933866095 519809213
E 691010897
T 229384575
T 239648196
E 423251070
E 362036543
E 708817405
T 585943646
T 163623703
E 679753758
E 455386943
T 818802801
T 831820505
T 571227997
T 468729436
T 656489494
E 750205381
T 117344422
E 970900182
T 351569080
E 501060010
T 154577642
E 650076...

output:

19479330447962
34353597644236
10220733904290
24755051776707
2699205477462
24744942544938
3616336539396
14144445185704
15087404716530
8459346516632

result:

ok 10 numbers

Test #20:

score: 0
Accepted
time: 69ms
memory: 3928kb

input:

10
50000 1000000000 802382235 697892637
E 301492593
T 185304715
T 349605835
E 124527100
T 490141916
E 519950557
T 245440842
T 88377525
T 533839688
T 719066967
E 618709189
T 301044204
T 590260046
E 127063939
E 224641840
T 585445075
E 864537368
E 568788413
T 269000759
T 25217147
T 852341055
T 44453361...

output:

26161901283219
14141438669826
29267093820912
430951830400
7213629299961
2610644541981
31900810253089
6376500729768
4923358087515
6311685521436

result:

ok 10 numbers

Test #21:

score: 0
Accepted
time: 65ms
memory: 3940kb

input:

10
50000 1000000000 80963784 581008766
E 480700335
T 729340791
T 824723300
T 239448978
T 941616005
E 323203127
T 911377263
T 511074711
T 36786616
T 854054711
T 447678960
E 698837188
T 257391818
T 141628800
E 934587381
T 903459528
E 322942332
T 247792497
T 606861752
E 129978620
T 488665535
E 93899147...

output:

4048027272432
17908087747836
13728419691246
11080476935528
3848178104622
19543153842841
10021637199552
18224502827260
17008169646
18462329067900

result:

ok 10 numbers

Test #22:

score: 0
Accepted
time: 72ms
memory: 7984kb

input:

1
500000 1000000000 700168272 836587323
T 552122284
E 213541054
T 60389010
T 217064437
T 235832246
E 889033714
E 274536977
E 223753291
E 341561904
T 753651775
T 226478138
T 166330841
E 582505530
T 436169197
T 204766163
T 386764872
E 664491637
T 407489001
T 986561640
T 476501564
E 617437670
E 1252427...

output:

279420717055653

result:

ok 1 number(s): "279420717055653"

Test #23:

score: 0
Accepted
time: 66ms
memory: 8532kb

input:

1
500000 1000000000 978749820 14670747
T 839542484
E 718497649
T 196477089
T 955827518
E 618255083
E 637880524
E 313439053
E 310979760
E 809921609
E 873605653
T 331697233
T 40834940
E 347751941
T 105146379
T 129494897
E 964628042
E 463300376
E 67656416
E 296893985
E 711783979
E 630863946
E 266118047...

output:

5501530125000

result:

ok 1 number(s): "5501530125000"

Test #24:

score: 0
Accepted
time: 69ms
memory: 7620kb

input:

1
500000 1000000000 847265960 897786875
E 707631413
T 412573748
T 366590116
E 589085622
E 268864823
T 440555292
E 200015368
E 230657368
E 665803821
E 635141385
E 736099096
T 203731084
E 625418354
E 176243819
T 557778165
T 458431415
E 853291006
T 942034308
E 359401418
E 870359300
E 104933753
E 344182...

output:

324054886489025

result:

ok 1 number(s): "324054886489025"

Test #25:

score: 0
Accepted
time: 73ms
memory: 8848kb

input:

1
500000 1000000000 420814805 370837595
E 547455560
E 291107102
E 59702496
T 170011925
E 673820622
T 316917490
E 383635003
T 362299848
E 749173230
T 331862302
T 593353361
T 522514243
E 865614599
T 613502841
E 627906543
E 315668662
T 457703802
E 945131966
T 741450720
T 972801249
E 988412822
E 6961407...

output:

139016630912840

result:

ok 1 number(s): "139016630912840"

Test #26:

score: 0
Accepted
time: 68ms
memory: 9148kb

input:

1
500000 1000000000 849139457 253953723
E 753440887
T 669548981
E 504494795
E 727428232
T 352877120
E 360298818
T 800651986
E 340931310
T 10172254
E 196177692
E 57658102
E 945512556
E 14012466
T 41645860
E 586119995
T 874644439
T 684677810
E 316110303
E 621707527
E 709597891
E 691390397
T 596077627
...

output:

95203441446855

result:

ok 1 number(s): "95203441446855"

Test #27:

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

input:

1
500 1000000000 548764661 836040458
E 228937029
E 800222732
T 852203223
T 452064748
E 772648397
T 837556495
E 127339167
E 515653499
E 291268694
E 213478972
T 119066628
T 905179917
T 927250734
T 323539292
T 174144716
T 693747097
E 569405531
T 911123217
E 275595824
T 121013169
E 715786980
T 123451976...

output:

241906137498

result:

ok 1 number(s): "241906137498"

Test #28:

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

input:

1
500 1000 523 598
T 663
E 562
E 921
E 895
E 222
T 991
T 730
E 546
E 653
T 144
E 323
E 296
E 614
T 458
E 611
T 171
T 632
E 693
E 573
T 413
E 137
T 352
T 198
E 267
E 405
T 25
E 898
E 662
E 212
E 819
T 189
T 778
T 207
E 379
E 577
E 403
T 165
E 391
T 226
T 450
E 918
E 439
T 976
T 310
T 922
T 103
E 908
...

output:

206694

result:

ok 1 number(s): "206694"

Test #29:

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

input:

1
20 100 21 38
T 20
E 0
T 52
E 25
E 68
T 41
E 14
E 18
T 48
E 78
T 66
T 65
T 36
T 100
T 73
T 62
T 21
T 40
T 96
T 4

output:

366

result:

ok 1 number(s): "366"

Test #30:

score: 0
Accepted
time: 56ms
memory: 3912kb

input:

1000
429 1000000000 10 10
T 898056807
T 392559821
T 814896296
T 294341847
T 996444923
T 521100189
T 857955588
T 844337565
T 57015663
T 828352480
T 513760099
T 16950320
T 778053037
T 79937267
T 14678100
T 99662016
T 919597235
T 831305777
T 874356567
T 520246842
T 40537618
T 867546924
T 512397227
T 50...

output:

4280
5130
1210
1900
760
20
3770
7880
4590
4000
950
250
4860
8840
2720
16340
8150
1890
5450
3120
11290
9040
9070
90
6130
820
11810
3470
770
2080
1700
150
4580
1160
790
10670
3070
890
2500
2090
10
15210
4010
7480
13050
26140
2730
350
1400
790
17470
13870
2170
12240
1030
5960
10420
16340
8060
6070
4610...

result:

ok 1000 numbers

Test #31:

score: 0
Accepted
time: 54ms
memory: 3660kb

input:

1000
451 1000000000 10 10
T 781203729
T 19396124
T 14682938
T 299763301
T 869512633
T 747457666
T 761130334
T 906419717
T 759970516
T 491583183
T 429524968
T 748461036
T 733866500
T 526738028
T 91252689
T 606315158
T 203516913
T 800503718
T 404513434
T 810886298
T 506531779
T 586545403
T 8558340
T 3...

output:

4500
9300
4920
8530
240
1220
16270
2460
4400
740
590
1060
20
5330
3890
3610
7470
3630
1330
15320
3930
1820
7190
230
27870
7780
7150
850
2650
1490
280
6880
7970
25500
1560
5230
3410
7060
3360
4600
430
18430
12060
27260
7250
6280
14590
2480
4390
1190
270
7030
4880
1220
650
7080
730
3600
1830
2110
1302...

result:

ok 1000 numbers

Test #32:

score: 0
Accepted
time: 54ms
memory: 3620kb

input:

1000
767 1000000000 10 10
T 869090611
T 949150897
T 919663956
T 478114118
T 522209043
T 752453315
T 638049197
T 259932725
T 735500456
T 41014027
T 18380630
T 139699618
T 445060603
T 446840953
T 181989733
T 944756979
T 768157201
T 510026854
T 646752619
T 244630616
T 772196541
T 111727992
T 442807202
...

output:

7660
1700
8140
110
5560
520
420
1540
270
1150
5010
590
12480
11760
7390
17040
3920
400
11190
780
1360
1770
10880
4590
1870
460
510
3240
40
2600
2560
2890
4890
3210
3110
2530
21670
5170
38080
9580
2560
18230
350
1890
6750
300
3430
13180
13830
8490
12750
3830
4580
430
480
430
1760
1050
30
120
870
1785...

result:

ok 1000 numbers

Test #33:

score: 0
Accepted
time: 54ms
memory: 3680kb

input:

1000
185 1000000000 10 10
T 59813533
T 245408961
T 370364583
T 364484938
T 70184513
T 99976656
T 994434204
T 900039571
T 385549758
T 543856861
T 151972069
T 514064785
T 282910143
T 534379033
T 884449453
T 890930752
T 405248507
T 208399149
T 991945143
T 107712476
T 486517029
T 240288423
T 336516918
T...

output:

1840
460
4650
10580
5830
19980
3460
1410
460
19560
25810
1350
400
250
6840
40
270
4490
5290
760
1550
16670
6640
640
170
6420
140
3930
3660
10920
950
4050
4220
17870
4940
220
20230
3930
1370
1140
2000
3670
2640
4310
1380
7390
2200
6340
3780
8430
9900
6680
1100
5420
7810
3380
8270
11320
4750
10200
943...

result:

ok 1000 numbers

Test #34:

score: 0
Accepted
time: 54ms
memory: 3764kb

input:

1000
54 1000000000 10 10
E 641865209
T 219430794
T 623950693
T 681771375
T 162443186
T 903742520
T 2933567
T 653705826
T 592627061
T 879208386
T 713894697
T 848657501
T 702515504
E 0
T 918239652
T 909969012
T 740775211
T 962570074
T 418677483
T 221224688
T 252914341
T 18972203
T 882524706
T 69036599...

output:

520
7750
2890
4020
1000
1540
12270
440
4390
7370
2380
3440
30
5910
5420
3830
3490
9080
6150
19140
1370
5170
10
2430
9180
6540
190
4560
4370
25550
2880
1130
1180
49920
1270
7040
940
1360
5070
60
4080
2670
28170
17060
5900
1670
1220
4270
2620
2290
9560
3140
2520
8730
1540
10670
690
7390
1710
2620
4150...

result:

ok 1000 numbers

Test #35:

score: 0
Accepted
time: 50ms
memory: 3548kb

input:

1000
67 1000000000 10 10
T 697777766
T 209900253
T 618930982
T 880211969
T 619018914
T 814703046
T 547297654
E 424209703
E 120196021
T 152518565
T 481855591
E 534515904
T 397010470
T 785971664
E 9873595
T 780152242
E 24549164
E 807631673
T 57208340
T 822155949
T 567072461
T 653450262
T 398682271
T 6...

output:

600
660
4140
930
7700
80
7050
1260
1670
4870
330
4580
840
3120
140
710
10170
4240
450
2050
1180
7760
810
780
1700
1510
2880
2670
5980
7260
480
3160
2230
5100
14810
4300
1800
4270
790
660
7380
4640
710
10410
2530
1880
270
2200
2540
1830
1690
60
2430
50
2500
9610
22250
2750
2430
15040
3530
6370
8860
3...

result:

ok 1000 numbers

Test #36:

score: 0
Accepted
time: 55ms
memory: 3648kb

input:

1000
329 1000000000 10 10
T 136113289
T 821593833
E 201375234
E 94440302
T 339541716
T 712871485
T 967628616
E 374544546
T 474414031
T 65026731
E 83941408
T 660502342
E 568080844
T 226372234
E 12275520
T 496587593
T 196089848
T 1000000000
T 149546782
T 232230679
T 869226626
E 238769915
T 746196375
T...

output:

2550
4830
4500
1820
1220
7450
6470
2390
2390
3820
8890
5690
10000
1350
7180
370
12340
8710
9690
690
1150
9610
12650
1120
1960
1480
830
880
7290
13600
320
3840
2950
570
300
2260
5610
7930
1210
660
250
5120
4610
6870
6330
2860
3860
2420
8570
2550
6580
6540
2250
750
1000
4920
2160
5150
1600
2710
7160
3...

result:

ok 1000 numbers

Test #37:

score: 0
Accepted
time: 50ms
memory: 3652kb

input:

1000
214 1000000000 10 10
E 813984295
E 349161751
E 921101825
E 138127594
E 771642247
E 995768491
E 158675589
E 349449868
E 879714886
E 0
E 63247173
E 413087552
E 679479466
E 133053821
E 427170352
E 788941133
E 674015094
E 49048461
E 202736056
E 827901725
E 290088312
E 372089829
E 893016777
E 970664...

output:

2130
1020
2380
6220
1890
1770
25600
460
7410
2550
2310
7990
8810
10050
11700
2280
2290
3250
4230
3500
4110
1750
4120
8100
2260
4520
1930
12480
480
4280
12170
6660
3570
8790
5520
3810
4000
3680
11650
6020
1590
2110
13680
10920
2250
2790
1280
240
8610
330
5430
820
22190
15820
3400
31760
2230
7680
3290...

result:

ok 1000 numbers

Test #38:

score: 0
Accepted
time: 54ms
memory: 3620kb

input:

1000
241 1000000000 10 10
E 461817279
E 443486902
E 346409934
E 574185248
E 504176901
E 749490896
E 270024253
E 117195287
E 437358442
E 221485052
E 607757840
E 634704824
E 691719540
E 659305679
E 457938023
E 980719172
E 13496169
E 485743994
E 135899618
E 377067464
E 642724051
E 840021231
E 777567176...

output:

2400
540
2960
8900
1670
1950
6650
2130
18320
8190
9890
680
590
7780
16920
7370
2830
7640
120
2820
33490
12030
4850
10
1680
320
1930
1430
3360
6000
11050
830
3990
3030
340
460
3510
1210
2570
5060
80
780
6670
2090
460
9170
5420
1050
6870
800
3360
5760
850
2880
4340
4070
6510
7690
4900
370
1430
4190
96...

result:

ok 1000 numbers

Test #39:

score: 0
Accepted
time: 50ms
memory: 3648kb

input:

1000
202 1000000000 10 10
E 591692810
E 916819141
E 844791510
E 55042442
E 22116788
E 954228013
E 783150030
E 974053318
E 781219169
E 960026889
E 488250529
E 936679608
E 10134265
E 99464562
E 700665992
E 742356344
E 937444155
E 674118267
E 523007528
E 695749272
E 87152273
E 700146068
E 998334406
E 4...

output:

2010
1630
12370
10710
23170
10030
12130
1080
3330
7530
8650
4920
13780
550
870
8730
9040
7610
3370
5740
760
13820
260
3560
980
16470
5110
3930
6290
530
1500
6950
810
3940
1000
8700
750
140
120
9060
210
4570
3890
7660
22930
4370
10770
3570
6240
15970
7410
5570
1010
7630
2200
8640
410
5780
5480
7760
3...

result:

ok 1000 numbers

Test #40:

score: 0
Accepted
time: 54ms
memory: 3904kb

input:

1000
329 1000000000 10 10
E 250628309
E 792489751
E 205539328
E 256322590
E 772633363
E 290324104
E 202457966
E 649083564
E 376471205
E 921972569
E 750666157
E 769423208
E 283354178
E 62236130
E 368191360
E 105342192
E 264230697
E 145864539
E 795927462
E 471718524
E 530957860
E 887518298
E 724856739...

output:

3280
3770
1410
170
2990
6310
220
1430
930
8060
2530
11410
2170
4620
2990
8490
5400
8160
15240
1890
6640
6090
3760
7600
2510
1210
6880
1990
5540
9320
10060
3160
4170
1350
6930
490
4140
1770
5040
4170
4310
8370
21950
6680
3510
6600
2250
930
860
730
16870
4270
1530
1840
5700
12740
10560
310
950
7400
21...

result:

ok 1000 numbers

Test #41:

score: 0
Accepted
time: 54ms
memory: 3660kb

input:

1000
428 1000000000 10 10
E 856892571
E 922024930
E 322904152
E 199476166
E 995105370
E 981637683
E 567833156
E 379113850
E 941730008
E 103898693
E 973196820
E 935227689
E 696869349
E 446725944
E 270948229
E 483375055
E 471289850
E 871019476
E 496831668
E 521478384
E 667712109
E 399584717
E 57840169...

output:

4250
120
8030
5820
7530
440
3430
2060
6480
13790
5130
1920
7970
470
3250
1400
11380
9000
2280
2550
3420
9020
160
3350
2800
9350
410
9800
3460
7300
5000
340
3490
6840
2040
440
19870
4390
4050
7370
4290
5350
3950
3830
3460
160
910
3760
1180
1110
2550
500
3150
1790
4070
3420
2180
25830
13270
130
1950
4...

result:

ok 1000 numbers

Test #42:

score: 0
Accepted
time: 54ms
memory: 3624kb

input:

1000
1657 1000000000 10 10
E 447030006
E 591357425
T 671331915
E 961658208
E 672464554
E 306465707
T 232738700
E 544540502
E 885949662
E 555791235
E 682030707
E 914857826
E 425353160
E 600345433
E 789572648
E 39779038
E 603636248
E 55562534
E 614941429
E 176462937
T 149481430
E 738015772
E 333517063...

output:

15240
1500
8130
590
2690
20
5920
3230
8340
15060
7610
6800
540
1370
1300
850
4100
1170
4070
5420
1040
3410
2830
2390
7430
1720
890
2840
3580
370
6740
9700
2540
4430
400
1190
5410
5600
400
330
6640
880
14400
9080
4200
16590
4460
5240
11240
7080
910
9700
2520
8180
2760
3970
4070
2340
9120
11110
9590
5...

result:

ok 1000 numbers

Test #43:

score: 0
Accepted
time: 55ms
memory: 3732kb

input:

1000
290 1000000000 10 10
E 50479609
E 532115832
T 642545553
T 1000000000
T 262485410
E 999541183
T 317038534
E 883932604
T 502121110
E 87111767
E 653499594
E 552037262
E 656071387
E 269586940
T 477853280
E 97957866
E 61078764
T 189273875
E 952477674
E 238011656
E 518245980
E 542549056
T 864256256
E...

output:

2330
1280
900
2730
1780
8150
3670
3900
5710
1420
4930
5370
14480
2340
6300
1900
11660
1600
5690
2580
5090
2520
8200
2750
18380
5840
11450
12600
70
210
1870
2400
3530
4250
5060
2060
19620
8100
2120
1290
5670
7080
4530
390
4980
2560
2720
4750
5580
7070
5260
2060
1710
400
740
6250
900
11210
1280
460
44...

result:

ok 1000 numbers

Test #44:

score: 0
Accepted
time: 61ms
memory: 3696kb

input:

1000
401 1000000000 10 15
T 925909013
T 37177322
T 657775736
T 896383262
E 0
T 465446174
T 560311987
T 964205816
T 84003846
T 358553093
T 618696139
T 62859827
T 218059302
T 602247389
T 240561082
T 756574460
T 854797515
T 351407152
T 118374065
T 840307777
T 793214139
T 284273920
T 78347207
T 39674237...

output:

4000
1750
9850
10
2650
11260
520
12510
10
50
10790
9260
1900
8420
4010
4890
8580
1760
5610
4950
10760
2260
6640
2580
8090
14920
890
4580
520
2280
18040
3140
4440
580
1170
1970
10320
4250
5100
2440
3670
1820
350
8680
1370
5590
6580
8260
6070
10720
1380
1090
2630
9870
10650
11200
6660
1320
9790
990
25...

result:

ok 1000 numbers

Test #45:

score: 0
Accepted
time: 50ms
memory: 3668kb

input:

1000
666 1000000000 10 15
T 863039299
T 364878906
T 659732226
T 93806392
T 758649410
T 526826843
T 470449559
T 893406990
T 907184497
T 758817822
T 344341789
T 174019029
T 320096413
T 234086759
T 320361745
T 310410473
T 60596794
T 335928123
T 89172496
T 966817757
T 417963889
T 791866352
T 60281855
T ...

output:

6650
2040
1060
8420
7360
13460
1180
10860
330
8210
21510
4180
3030
1940
18810
5890
10940
4340
290
1200
2630
3590
1500
15970
10
1390
1310
2000
2050
1920
1390
8260
2540
4620
4180
2730
1730
1650
6420
1830
15730
3240
1740
180
7430
7330
2750
6240
870
8600
1640
6480
4570
3550
320
600
730
110
6200
1960
10
...

result:

ok 1000 numbers

Test #46:

score: 0
Accepted
time: 55ms
memory: 3684kb

input:

1000
1625 1000000000 10 15
T 817407398
T 68146875
T 474314028
T 586193725
T 283196153
T 1000000000
T 935164386
T 893770732
T 259078295
T 554022168
T 618311221
T 369416916
T 340556782
T 761258447
T 314249076
T 948470612
T 60444654
T 979932696
T 302745399
T 75662598
T 328805742
T 733086922
T 324518836...

output:

16230
4760
170
580
1330
11370
250
1700
1640
3860
640
13790
6010
120
2120
11140
20
8610
22890
1960
6460
6210
3600
10
2040
1070
240
6440
980
950
1550
13420
8430
1900
1360
17450
2170
12910
2330
6320
1530
6690
5110
3040
1550
4230
3340
1620
14960
3410
2930
6320
890
4800
6700
1310
5020
12180
2360
1290
212...

result:

ok 1000 numbers

Test #47:

score: 0
Accepted
time: 53ms
memory: 3752kb

input:

1000
345 1000000000 10 15
T 914123420
T 825035572
T 930573396
T 156405644
T 852365053
T 13511870
T 269045764
T 651396694
T 581876516
T 672584540
T 188838958
T 305697824
T 289747103
T 409751016
T 568580116
T 500657523
T 827765811
T 566026463
T 973300127
T 636420170
T 831642648
T 527534623
T 8149776
T...

output:

3440
6895
5200
3040
2230
22460
4390
2170
4920
4230
2850
3300
1670
2450
150
20640
23500
13020
4310
5360
5000
6700
3760
1590
3790
6200
10735
22115
4650
1220
3210
3810
5770
950
270
760
580
940
2260
2790
8280
1640
12680
1270
840
2640
5720
21780
8330
5045
5340
27925
3850
8265
6425
10090
6665
6240
16030
3...

result:

ok 1000 numbers

Test #48:

score: 0
Accepted
time: 55ms
memory: 3624kb

input:

1000
323 1000000000 10 15
T 553910797
T 252642582
T 42071302
T 917961307
T 160211291
T 520561392
T 117699464
T 538170866
T 538253745
T 988913482
T 493039915
T 445498586
T 280215661
T 574048244
T 741694176
E 635000640
T 264882401
T 84412699
T 273929583
T 13240077
T 195670884
T 851787029
T 12519745
T ...

output:

3200
1975
1355
2500
260
1915
3090
15655
2780
11840
5220
2980
50
710
18030
985
1260
6825
1730
7775
6365
4760
1850
180
3295
8155
3180
1085
2615
2365
1940
7240
5280
15685
9045
3320
1050
5645
1130
3850
250
1370
190
3045
18000
1130
1970
7195
3635
4500
1270
24040
2565
2960
3540
16285
6510
13720
21500
6390...

result:

ok 1000 numbers

Test #49:

score: 0
Accepted
time: 47ms
memory: 3920kb

input:

1000
110 1000000000 10 15
E 695237849
T 219853592
T 851519711
T 5719926
T 675330742
T 348176452
T 843303805
T 274035551
T 973723168
T 668151191
T 104338635
T 381947859
T 358087369
T 749987793
T 837558670
T 395957213
T 588668255
T 447416093
T 845077814
T 972621403
T 772448752
T 949499400
T 906096947
...

output:

1040
1270
695
3455
4645
280
5250
4185
1980
1005
17890
3790
1250
1120
635
320
40
2495
3280
920
25045
615
1605
10070
2280
8005
180
5065
6370
21055
5620
5520
8565
350
6330
200
4305
2815
2125
13970
10725
3125
6520
6225
4050
430
3380
315
3085
1845
820
1390
16535
7615
3540
6095
4030
1135
2390
9230
6135
15...

result:

ok 1000 numbers

Test #50:

score: 0
Accepted
time: 52ms
memory: 3676kb

input:

1000
2070 1000000000 10 15
T 572889775
T 714856210
T 916200790
E 403843334
E 393059182
T 556590431
E 54870815
T 780756056
T 770674800
T 925813344
E 59116754
T 791194024
T 911895352
T 915596307
T 946358523
T 455739984
T 15359198
T 702951098
T 892897211
E 671647957
T 782217265
T 800437546
E 386509962
...

output:

18380
4535
12060
7760
1680
2175
3195
340
3680
285
1720
3310
8635
635
910
22015
50
2025
2775
1665
755
12400
1235
5090
3500
17995
17895
190
7610
10
3820
1010
1020
990
695
760
5660
5615
90
18375
21145
3515
8790
730
915
15410
12140
7155
1410
310
6650
305
2490
2410
1815
5735
620
505
9495
1220
1305
9160
1...

result:

ok 1000 numbers

Test #51:

score: 0
Accepted
time: 55ms
memory: 3908kb

input:

1000
265 1000000000 10 15
E 226672524
E 753339852
E 368137677
E 913016952
E 732410955
E 64348916
E 485214103
E 537333197
E 240831000
E 585939278
E 659662446
E 431458234
E 132192630
E 954114409
T 1000000000
E 438556486
E 788069853
E 233015316
E 890377148
E 767055784
E 677111000
E 104662186
E 65738614...

output:

2640
300
1430
6850
3840
14310
880
1700
2540
4510
2580
13190
2380
4470
2640
1080
8820
13890
4740
1370
1640
8970
16390
6290
5700
7350
200
5820
1220
490
1530
7000
7630
4010
14980
7460
2300
9380
14460
560
6290
1080
900
2870
1670
10670
2780
370
1330
6410
9050
560
13680
3150
5030
10090
740
6390
5140
400
3...

result:

ok 1000 numbers

Test #52:

score: 0
Accepted
time: 51ms
memory: 3688kb

input:

1000
1004 1000000000 10 15
E 336735593
E 496676405
E 536935167
E 150423879
E 513895760
E 322868495
E 518141507
E 919811248
E 482686609
E 490986250
E 770557406
E 690314475
E 625457045
E 432965839
E 535646265
E 968511242
E 478485929
E 22800936
E 608076714
E 773289715
E 285908108
E 89361648
E 283790515...

output:

10030
2700
990
360
4340
7440
1350
6020
5460
4100
2880
1040
1960
2000
5190
1520
9230
220
9010
3650
450
3670
2150
170
7420
20
100
5200
9100
6490
290
17540
15000
5770
1780
1210
2570
4050
8120
3020
570
1530
1160
1900
6320
7310
1780
5960
9590
3690
1320
130
2010
1180
2210
5680
5240
3840
3510
2080
9310
546...

result:

ok 1000 numbers

Test #53:

score: 0
Accepted
time: 55ms
memory: 3564kb

input:

1000
524 1000000000 10 15
E 872185490
E 353116861
E 429479147
E 195727080
E 374404829
E 545857112
E 293005681
E 998644456
E 587009077
E 859511932
E 540660415
E 182252344
E 340406059
E 413230226
E 708050087
E 936374547
E 32254656
E 258903750
E 856502543
E 117833346
E 566395345
E 144095503
E 322790951...

output:

5220
730
6130
3960
6470
3800
260
4470
3810
3120
2030
3020
14070
15120
4360
680
8600
1940
2440
1790
11320
4070
3170
10260
560
3140
890
14920
210
3400
3550
3620
1000
2550
5240
20
1040
330
3180
1420
5050
6930
1410
9590
1290
1100
5720
260
5530
50
18280
9780
5230
260
360
350
10400
1300
1620
6940
270
1057...

result:

ok 1000 numbers

Test #54:

score: 0
Accepted
time: 50ms
memory: 3916kb

input:

1000
666 1000000000 10 15
E 733418552
E 104944598
E 900044592
E 826146797
E 488424769
E 235649108
E 165791474
E 843751691
E 627758775
E 911279020
E 419403475
E 763907845
E 880719872
E 950484866
E 12838222
E 258372446
E 202132203
E 561911412
E 171034211
E 911944474
E 457332140
E 121336493
E 535134840...

output:

6650
2650
40
1880
5840
11620
5620
12295
17800
370
740
5430
4530
7210
2300
1200
1840
8740
12530
850
7330
1130
5020
14060
3140
2410
420
5820
2895
4630
2610
2160
6220
8570
5840
3340
1900
340
11535
24040
4180
130
1230
1800
10
3430
2990
4130
3080
6450
16270
17710
680
18470
4310
1530
5890
2250
11385
4525
...

result:

ok 1000 numbers

Test #55:

score: 0
Accepted
time: 54ms
memory: 3920kb

input:

1000
242 1000000000 10 15
E 84946302
E 359514637
E 500238299
E 606592307
E 618730635
E 602348274
E 898150797
E 579326589
E 639277286
E 107102714
E 168965593
E 113258119
E 245023889
E 868351943
E 2383205
E 755986731
E 975048296
E 35322090
E 5398996
E 949275280
E 729695513
E 102979244
E 686083442
E 83...

output:

2375
3440
340
11900
4855
6325
2185
2030
1865
1750
4335
4890
1290
1590
1150
370
16080
2370
22455
4235
4310
15480
2265
4915
4230
1205
360
540
2620
10350
10270
7935
8125
1655
4620
1940
1130
5265
7225
2505
8120
12875
4940
10
20160
13890
6225
6035
1490
12745
14035
1325
2485
480
1020
12860
130
4220
70
232...

result:

ok 1000 numbers

Test #56:

score: 0
Accepted
time: 55ms
memory: 3612kb

input:

1000
458 1000000000 10 15
E 334904397
E 494604206
E 153436818
E 755849926
E 144329493
E 384724862
E 777023852
E 802834082
T 343835601
E 620303479
E 189752634
E 534177658
E 755191983
E 21810570
E 662866235
E 314318742
E 857743340
E 183501003
E 2043492
E 709894765
E 363403469
E 309349821
T 178286554
E...

output:

4405
3330
2550
5830
3020
9430
7895
2495
14750
3205
3535
30660
7385
2595
6310
10780
4485
10
7260
1200
5560
1670
930
7210
1735
7280
1815
1860
1695
16090
10
7635
6020
1455
2775
3040
4335
560
695
4465
10845
180
3030
1935
7780
2595
8365
8565
710
9175
23460
9215
1085
2440
19510
8155
5265
5230
8995
8450
11...

result:

ok 1000 numbers

Test #57:

score: 0
Accepted
time: 51ms
memory: 3672kb

input:

1000
169 1000000000 10 15
E 676660971
T 726751024
E 222705685
E 0
T 719004451
T 974903065
E 934156969
E 137313726
T 814357281
E 490430548
E 822467947
T 362762947
E 531309632
T 224161331
E 295422482
E 541746572
E 53496619
T 163821329
E 447528282
E 149804202
E 993038298
E 332520203
T 773987009
E 17048...

output:

1500
3135
2675
3190
6330
1445
1415
3735
16970
4520
1795
1445
10660
5955
3385
27650
2660
1075
11400
750
14450
3385
515
1545
245
2800
830
1415
11245
3130
9340
4495
5600
520
185
2810
1655
1750
13745
455
370
650
3465
2135
3880
1905
2310
4155
2405
8095
1855
1580
2640
645
190
7210
4605
9130
2150
240
3890
...

result:

ok 1000 numbers

Test #58:

score: 0
Accepted
time: 71ms
memory: 8512kb

input:

1
500000 1000000000 10 10
T 518899389
T 765670107
T 501712135
T 471122687
T 685615611
T 582628249
T 253808603
T 820658878
T 290527975
T 388165599
T 453191982
T 647304735
T 256906238
T 625479248
T 683289596
T 661131023
T 676947027
T 639455407
T 238671529
T 642620502
T 896158395
T 886229017
T 56780479...

output:

4999990

result:

ok 1 number(s): "4999990"

Test #59:

score: 0
Accepted
time: 71ms
memory: 9412kb

input:

1
500000 1000000000 10 10
T 699532515
T 636380578
T 313578300
T 589515418
T 937267952
T 549543447
T 286541430
T 475398502
T 386416169
T 47859691
T 938963015
T 989064659
T 627377870
T 397917225
T 913607491
T 14875770
T 726620107
T 638632068
T 579320616
T 50562883
T 273471790
T 634163288
T 824263584
T...

output:

4999960

result:

ok 1 number(s): "4999960"

Test #60:

score: 0
Accepted
time: 72ms
memory: 7508kb

input:

1
500000 1000000000 10 10
T 50910306
T 633018010
T 363352971
T 55860716
T 664970941
T 689614618
T 279386274
T 615166780
T 82151009
T 560542124
T 179497644
T 630881485
T 619161141
T 946529492
T 755730271
T 631994267
T 38359561
T 632806842
T 931396003
T 54842707
T 788671839
T 643718024
T 607090471
T 4...

output:

4999610

result:

ok 1 number(s): "4999610"

Test #61:

score: 0
Accepted
time: 71ms
memory: 9084kb

input:

1
500000 1000000000 10 10
T 780022239
T 129188861
T 744547974
T 202233644
T 944250389
T 72278652
T 835228212
T 662293430
T 856963988
T 586681189
T 981741206
T 98565156
T 621819984
T 892280053
T 168136983
T 278831155
T 405491971
T 841422116
T 622785051
T 403833559
T 976669974
T 379738976
T 514419386
...

output:

4995210

result:

ok 1 number(s): "4995210"

Test #62:

score: 0
Accepted
time: 71ms
memory: 7556kb

input:

1
500000 1000000000 10 10
T 282501714
T 672759907
T 356552064
T 809399019
T 553952680
T 631310109
T 478989163
T 53690104
T 552642382
T 188745812
T 424553058
T 322811193
T 540882350
T 203467627
T 585570813
T 120276964
T 816882421
T 917030835
T 690225262
T 279748019
T 796125558
T 818298540
T 472363892...

output:

4951250

result:

ok 1 number(s): "4951250"

Test #63:

score: 0
Accepted
time: 72ms
memory: 8936kb

input:

1
500000 1000000000 10 10
T 885929784
T 597220496
T 334609724
T 433497602
T 766464537
T 458789253
T 261657894
T 8617307
E 658757835
T 609394143
T 569603830
T 183396990
T 214368537
T 673744799
T 361434455
T 726937479
T 640286834
T 300761799
T 95094201
T 203209249
T 808905378
T 60466741
T 318076469
E ...

output:

4588330

result:

ok 1 number(s): "4588330"

Test #64:

score: 0
Accepted
time: 72ms
memory: 7756kb

input:

1
500000 1000000000 10 10
E 293975293
E 247912200
T 513604247
T 575543571
T 92966877
E 251509331
T 675492999
E 970155322
E 189088716
T 646229558
T 449199724
T 759102677
T 840216414
T 954190141
T 829961314
T 823001131
T 188029781
T 109214926
T 441260102
T 401001607
T 246579386
E 842314041
T 544546301...

output:

3889910

result:

ok 1 number(s): "3889910"

Test #65:

score: 0
Accepted
time: 71ms
memory: 8412kb

input:

1
500000 1000000000 10 10
E 863373358
E 518278850
E 254608784
E 998354211
E 800119953
E 686744152
E 439342362
E 246109451
E 986375245
E 120384417
E 649138682
E 232323440
E 757147136
E 411559652
E 51637953
E 808508793
E 485390698
E 351253025
E 317475263
E 892434843
E 809308040
E 174358606
E 884217272...

output:

4999980

result:

ok 1 number(s): "4999980"

Test #66:

score: 0
Accepted
time: 75ms
memory: 7784kb

input:

1
500000 1000000000 10 10
E 599504178
E 975155705
E 188611731
E 926298537
E 424706564
E 620746748
E 38569878
E 788836145
E 117487707
E 359082198
E 981380709
E 721044417
E 947708516
E 504494863
E 432413988
E 2630097
E 987821041
E 76013628
E 848061438
E 742356120
E 659699992
E 42799738
E 869350510
E 9...

output:

4999920

result:

ok 1 number(s): "4999920"

Test #67:

score: 0
Accepted
time: 71ms
memory: 7900kb

input:

1
500000 1000000000 10 10
E 305802671
E 66580473
E 399410747
E 265369352
E 292184912
E 842780309
E 636700350
E 805098257
E 367789563
E 499792293
E 549308598
E 380545835
E 987042073
E 631499901
E 99044654
E 26285648
E 346921227
E 713113700
E 818513169
E 440643519
E 706885205
E 194527064
E 218489107
E...

output:

4999510

result:

ok 1 number(s): "4999510"

Test #68:

score: 0
Accepted
time: 75ms
memory: 7488kb

input:

1
500000 1000000000 10 10
E 272889152
E 328362643
E 242930928
E 536116133
E 743643657
E 346050509
E 654048767
E 731497745
E 253858309
E 926880830
E 869764
E 868289264
E 259330919
E 626791628
E 413215305
E 373117219
E 255871169
E 597181244
E 797478911
E 194817111
E 877376826
E 237247222
E 899883813
E...

output:

4995080

result:

ok 1 number(s): "4995080"

Test #69:

score: 0
Accepted
time: 71ms
memory: 9468kb

input:

1
500000 1000000000 10 10
E 881412596
E 26260162
E 448976884
E 720425444
E 197930788
E 628467591
E 651342888
E 482388763
E 634053741
E 870125573
E 367300474
E 119515796
E 325813431
E 338278007
E 321647938
E 551488646
E 345410662
E 906728653
E 160191857
E 578621115
E 913763880
E 955828281
E 596239463...

output:

4950590

result:

ok 1 number(s): "4950590"

Test #70:

score: 0
Accepted
time: 71ms
memory: 8532kb

input:

1
500000 1000000000 10 10
E 806999892
E 561571412
E 723001759
T 802611871
T 217645291
E 912310446
E 920187498
E 453416648
E 221009074
E 497271807
E 257605741
T 782731597
E 390570310
E 677285910
E 726960340
E 814565631
E 806659468
E 698553156
E 456597833
E 17777685
E 127832158
E 758482772
E 991429689...

output:

4585690

result:

ok 1 number(s): "4585690"

Test #71:

score: 0
Accepted
time: 72ms
memory: 8320kb

input:

1
500000 1000000000 10 10
E 958966758
E 769633754
E 876531842
T 842147406
E 359389275
E 426459345
T 345798041
T 904399999
E 843794979
T 120655354
E 519000505
E 434929232
E 921187120
T 566340093
E 600254127
E 760810443
T 118184454
T 643879693
E 111885868
E 262662318
E 486314622
E 555033946
E 39854882...

output:

3891120

result:

ok 1 number(s): "3891120"

Test #72:

score: 0
Accepted
time: 71ms
memory: 8056kb

input:

1
500000 1000000000 10 15
T 684096666
T 643255049
T 2815709
T 298347121
T 255412179
T 257505672
T 842428275
T 198128692
T 34224156
T 472822032
T 528226786
T 191726180
T 374192695
T 472210146
T 292637262
T 114186225
T 274328245
T 388430719
T 585017016
T 603220343
T 773484631
T 800823334
T 222817533
T...

output:

4999990

result:

ok 1 number(s): "4999990"

Test #73:

score: 0
Accepted
time: 71ms
memory: 9468kb

input:

1
500000 1000000000 10 15
T 254044550
T 128963883
T 797049176
T 358603746
T 918058795
T 751931891
T 219662610
T 299235980
T 474601166
T 46485947
T 368436488
T 529800988
T 574024677
T 808185001
T 351455343
T 4930834
T 355412834
T 915058185
T 85352018
T 884665249
T 254946900
T 9658055
T 984359988
T 67...

output:

4999970

result:

ok 1 number(s): "4999970"

Test #74:

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

input:

1
500000 1000000000 10 15
T 248035043
T 243707303
T 44547271
T 665053842
T 771091368
T 767910803
T 93477875
T 932519862
T 875673143
T 271614898
T 880270066
T 474961214
T 405762564
T 116903232
T 110402426
T 224582773
T 153771920
T 85479876
T 348202678
T 701649553
T 896405408
T 799039414
T 425858852
T...

output:

4999700

result:

ok 1 number(s): "4999700"

Test #75:

score: 0
Accepted
time: 75ms
memory: 7784kb

input:

1
500000 1000000000 10 15
T 136539959
T 208163194
T 765116546
T 502382526
T 473655024
T 23518682
T 243052779
T 536893426
T 893090766
T 268836197
T 488092632
T 969398715
T 892554983
T 771453051
T 684788506
T 155445686
T 770208493
T 656357018
T 839895909
T 557690512
T 16687297
T 730709756
T 466875991
...

output:

4997555

result:

ok 1 number(s): "4997555"

Test #76:

score: 0
Accepted
time: 75ms
memory: 8172kb

input:

1
500000 1000000000 10 15
T 62750453
T 401872920
T 125126551
T 631347779
T 315475024
T 294245967
T 873649005
T 32276353
T 227092047
T 831120390
T 755598401
T 587063839
T 142215038
T 197103499
T 288426417
T 867431844
T 364555156
T 626123225
T 347306640
T 447977089
T 664107176
T 779076558
T 511938506
...

output:

4974980

result:

ok 1 number(s): "4974980"

Test #77:

score: 0
Accepted
time: 71ms
memory: 7832kb

input:

1
500000 1000000000 10 15
T 788621559
T 184278345
E 668567239
T 317955364
T 116286762
T 710213808
T 779335523
T 717658847
T 810395566
T 919584599
T 342974087
T 597315720
T 69767912
T 971956830
T 699706969
T 552862817
T 996163488
T 580643330
T 64002363
T 411571564
T 408767102
T 902046576
T 533525775
...

output:

4794560

result:

ok 1 number(s): "4794560"

Test #78:

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

input:

1
500000 1000000000 10 15
T 5627931
T 55106092
T 681128425
E 123981867
E 982364717
T 689802132
E 341468381
T 414678184
T 136054584
T 563651275
T 170791775
T 936111284
T 440392235
E 872223488
E 318751859
T 121170315
T 824137450
T 375066273
E 447096306
T 823435289
E 40109341
T 141876909
T 943555682
T ...

output:

4443270

result:

ok 1 number(s): "4443270"

Test #79:

score: 0
Accepted
time: 75ms
memory: 7512kb

input:

1
500000 1000000000 10 15
E 976700591
E 339474154
E 882509877
E 676788257
E 450027934
E 370724744
E 570704829
E 845896588
E 352709984
E 282341970
E 922214945
E 143752151
E 167393254
E 797185003
E 570906745
E 820405265
E 349412118
E 820447076
E 916619332
E 13459604
E 608875042
E 62634408
E 870678502
...

output:

4999990

result:

ok 1 number(s): "4999990"

Test #80:

score: 0
Accepted
time: 67ms
memory: 8796kb

input:

1
500000 1000000000 10 15
E 988784758
E 143499280
E 725939834
E 557807382
E 761908747
E 358893093
E 302801281
E 422953258
E 244746640
E 808639176
E 434692075
E 725502527
E 418861660
E 777850603
E 362501976
E 251789106
E 194381865
E 366347053
E 336502769
E 207554670
E 43084285
E 513957433
E 782734241...

output:

4999965

result:

ok 1 number(s): "4999965"

Test #81:

score: 0
Accepted
time: 72ms
memory: 8592kb

input:

1
500000 1000000000 10 15
E 772203973
E 698741761
E 529505588
E 742633524
E 318943602
E 405060851
E 777752635
E 787738812
E 515501962
E 871214478
E 372636063
E 532155027
E 781585391
E 620484519
E 935427178
E 111547642
E 739628155
E 629931984
E 654731733
E 977014756
E 285145527
E 904963486
E 34835067...

output:

4999670

result:

ok 1 number(s): "4999670"

Test #82:

score: 0
Accepted
time: 75ms
memory: 8356kb

input:

1
500000 1000000000 10 15
E 734046199
E 709790630
E 968187786
E 563320346
E 193462594
E 4887209
E 481509804
E 88999453
E 781849266
E 315388956
E 52722803
E 481492069
E 655403840
E 801039042
E 963919036
E 270410466
E 369001619
E 652056308
E 518367463
E 619155009
E 928616608
E 778270479
E 831558503
E ...

output:

4997740

result:

ok 1 number(s): "4997740"

Test #83:

score: 0
Accepted
time: 71ms
memory: 8412kb

input:

1
500000 1000000000 10 15
E 51086749
E 327747337
E 291857379
E 402336511
E 388935219
E 771745781
E 34011152
E 237340260
E 702756730
E 42710092
E 829503701
E 308953877
E 435342533
T 62710077
E 983372614
E 172945670
E 583782993
E 242153130
E 17754370
E 359751694
E 578340008
E 664633819
E 169859123
E 9...

output:

4975220

result:

ok 1 number(s): "4975220"

Test #84:

score: 0
Accepted
time: 63ms
memory: 8888kb

input:

1
500000 1000000000 10 15
E 933257664
E 727721663
E 346527267
E 938504904
E 307104121
T 30650620
E 716901958
E 375853953
E 846867771
E 130050110
T 940428128
E 839507161
E 735802646
E 70024712
E 360481260
E 308076035
E 893876518
E 734557499
E 268952024
E 822943136
E 771154907
E 308286378
E 280817957
...

output:

4792990

result:

ok 1 number(s): "4792990"

Test #85:

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

input:

1
500000 1000000000 10 15
T 373886233
E 715486140
E 312502301
T 562962367
E 683496096
E 875056753
E 436352924
E 833037931
T 994759062
T 23363785
E 364785354
E 162356647
E 509162142
E 124810900
E 890591897
T 785759770
E 734298094
E 832823490
E 268385578
E 429340226
E 461164825
E 724337501
T 64355793
...

output:

4443565

result:

ok 1 number(s): "4443565"

Test #86:

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

input:

1
500000 1000000000 10 19
T 947240199
T 6004340
T 706163981
T 232346660
T 572331251
T 136341126
T 434208279
T 153165821
T 72725252
T 510369691
T 686797808
T 675050262
T 867784922
T 260661870
T 350841068
T 847317048
T 637964692
T 537727765
T 838268612
T 980470755
T 854593018
T 111542303
T 184608311
T...

output:

4999980

result:

ok 1 number(s): "4999980"

Test #87:

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

input:

1
500000 1000000000 10 19
T 702625423
T 562569757
T 1661483
T 210522696
T 761925718
T 350475556
T 383833176
T 889003826
T 419255283
T 744895888
T 114272635
T 300508636
T 758398361
T 492881211
T 100603847
T 942446399
T 315948366
T 82701144
T 847922346
T 851357873
T 132335376
T 8189783
T 779095724
T 9...

output:

4999974

result:

ok 1 number(s): "4999974"

Test #88:

score: 0
Accepted
time: 71ms
memory: 7504kb

input:

1
500000 1000000000 10 19
T 751948183
T 511434188
T 518800781
T 140453551
T 918934430
T 837330710
T 628684226
T 737999098
T 555811363
T 909654276
T 888310213
T 787016419
T 983534523
T 873804043
T 306145170
T 330261176
T 323107790
T 244519760
T 838411569
T 732336717
T 457039175
T 554914985
T 15533490...

output:

4999928

result:

ok 1 number(s): "4999928"

Test #89:

score: 0
Accepted
time: 71ms
memory: 8828kb

input:

1
500000 1000000000 10 19
T 589144659
T 770985443
T 406678403
T 297987796
T 896940397
T 693967292
T 760544073
T 187867699
T 433851772
T 281503915
T 285258534
T 500383825
T 879056401
T 125209370
T 536535731
T 720441128
T 565358776
T 65245173
T 306307889
T 914897751
T 494198015
T 89124020
T 362254409
...

output:

4999451

result:

ok 1 number(s): "4999451"

Test #90:

score: 0
Accepted
time: 67ms
memory: 8700kb

input:

1
500000 1000000000 10 19
T 110761543
T 708944415
T 381529836
T 195610497
T 25143581
T 365997159
T 470806030
T 757681505
T 883521326
T 889161777
T 801641832
T 59177766
T 483866032
T 585495769
T 195756119
T 109354059
T 924619414
T 767961644
T 537232842
T 639136560
T 766988003
T 767851371
T 583599491
...

output:

4995056

result:

ok 1 number(s): "4995056"

Test #91:

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

input:

1
500000 1000000000 10 19
T 282295614
T 386781088
E 217223510
T 636315180
T 249507890
T 332692826
E 388798000
T 594981545
T 634612042
T 604613806
T 139191256
T 546606290
T 497669948
T 330491954
T 105668256
T 162157510
T 509712127
T 633972378
E 525922738
T 76348038
T 531879679
T 524567922
T 276502343...

output:

4958671

result:

ok 1 number(s): "4958671"

Test #92:

score: 0
Accepted
time: 76ms
memory: 8032kb

input:

1
500000 1000000000 10 19
T 859628633
T 971908682
T 297323347
T 846698312
T 7964386
T 577924847
T 922784642
T 617689658
E 295748747
T 235874801
T 161700942
E 598914466
E 985171101
E 363871735
T 965294814
E 805674539
T 357770760
E 662426738
T 592700232
E 235793863
T 470745010
T 935343432
T 642668097
...

output:

4888967

result:

ok 1 number(s): "4888967"

Test #93:

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

input:

1
500000 1000000000 10 19
E 249225166
E 456508136
E 959137372
E 740852418
E 532414681
E 23043246
E 515167870
E 220651332
E 201380290
E 800063273
E 911339908
E 189601986
E 291989806
E 92173587
E 529880474
E 565506536
E 355937756
E 243737768
E 879523670
E 502960250
E 973245042
E 29038321
E 203050286
E...

output:

4999990

result:

ok 1 number(s): "4999990"

Test #94:

score: 0
Accepted
time: 75ms
memory: 8248kb

input:

1
500000 1000000000 10 19
E 854193994
E 987488881
E 662827063
E 971137394
E 820889324
E 920228855
E 98816929
E 210806513
E 740385708
E 540524998
E 436021138
E 741365365
E 222794458
E 311371191
E 174086220
E 840744017
E 48851012
E 726213816
E 108748973
E 597164530
E 923202325
E 766393206
E 427606458
...

output:

4999975

result:

ok 1 number(s): "4999975"

Test #95:

score: 0
Accepted
time: 71ms
memory: 8588kb

input:

1
500000 1000000000 10 19
E 820827207
E 799289681
E 193408851
E 251619731
E 309697430
E 35283294
E 68386164
E 222835927
E 750831730
E 50476923
E 408101206
E 386378665
E 608547555
E 184804921
E 987798702
E 344766417
E 696785535
E 420507932
E 978889501
E 769672077
E 859681005
E 676231623
E 641642862
E...

output:

4999929

result:

ok 1 number(s): "4999929"

Test #96:

score: 0
Accepted
time: 71ms
memory: 8096kb

input:

1
500000 1000000000 10 19
E 594514399
E 582386472
E 566602872
E 36330751
E 158396880
E 809635180
E 651855239
E 373780321
E 912962089
E 237517869
E 244262686
E 490142403
E 856133572
E 943800787
E 139637830
E 702370219
E 102919746
E 208305150
E 666542095
E 144821288
E 528516713
E 681295490
E 979487043...

output:

4999473

result:

ok 1 number(s): "4999473"

Test #97:

score: 0
Accepted
time: 72ms
memory: 7560kb

input:

1
500000 1000000000 10 19
E 1720511
E 814748439
E 237540916
E 633618599
E 430242812
E 799063090
E 928029319
E 557050920
E 127962674
E 402191162
E 169365809
E 108186204
E 631212247
E 833088853
E 661416032
E 460256592
E 689360549
E 487034692
E 804708371
E 485085617
E 706116323
E 905364541
E 814964741
...

output:

4995088

result:

ok 1 number(s): "4995088"

Test #98:

score: 0
Accepted
time: 75ms
memory: 8148kb

input:

1
500000 1000000000 10 19
E 136175973
E 257314296
E 327998434
E 155679385
E 314220010
E 734933309
E 610236263
E 522977795
E 265238228
E 919849922
E 231349666
E 660221264
E 787622954
E 609740510
E 3516722
T 815038179
E 407147032
E 947476506
E 239559787
E 900089042
E 780843392
E 145605893
E 940853847
...

output:

4958639

result:

ok 1 number(s): "4958639"

Test #99:

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

input:

1
500000 1000000000 10 19
E 917330482
E 425363371
E 837723720
E 137960718
E 312903301
E 276154256
E 744682988
T 19482757
T 915358708
E 272267990
E 67740085
E 611150562
E 38144740
E 30126434
E 171263679
T 631698808
E 877539985
E 245956494
E 580219390
E 692284552
E 765299503
E 685279582
E 657664935
E ...

output:

4889244

result:

ok 1 number(s): "4889244"

Test #100:

score: 0
Accepted
time: 25ms
memory: 3956kb

input:

100
5000 4999 80 64
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

319936
274945
149970
139972
134973
394921
349930
39992
79984
339932
104979
119976
129974
69986
99980
209958
394921
69986
79984
164967
304939
54989
29994
464907
4999
94981
349930
199960
139972
129974
159968
69986
254949
239952
349930
184963
109978
239952
69986
269946
104979
59988
69986
134973
184963
...

result:

ok 100 numbers

Test #101:

score: 0
Accepted
time: 30ms
memory: 3664kb

input:

100
5000 4999 62 21
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

104937
69986
334933
444911
344931
19992
414917
359784
34993
269838
159914
14997
14997
84966
234953
149970
214957
134919
249850
334933
134919
159968
344795
239871
169900
269946
384779
94962
129974
174930
344793
4997
129974
179928
219956
69972
89982
179964
279944
154932
29982
89946
344793
299825
49990...

result:

ok 100 numbers

Test #102:

score: 0
Accepted
time: 29ms
memory: 3668kb

input:

100
5000 4999 39 67
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

194911
189810
39960
224885
19988
79952
354807
194922
199800
199800
9994
99960
84949
294705
34986
119976
269862
249850
174965
134865
124975
64974
179892
184922
44982
44991
24990
39984
89946
204795
339827
239838
94962
294941
39992
39992
374631
119928
19988
59964
424759
184889
439738
39976
139944
19988...

result:

ok 100 numbers

Test #103:

score: 0
Accepted
time: 30ms
memory: 3668kb

input:

100
5000 4999 88 52
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

259324
129948
64857
9996
159840
144739
49910
84875
229402
4991
94962
269759
59844
269697
344547
104910
49926
394462
44883
199825
309814
169694
279720
389631
74895
179768
184926
74970
44919
194715
94962
49890
119754
169694
149940
224505
89766
59868
473588
114899
209454
284031
289740
114954
59796
1895...

result:

ok 100 numbers

Test #104:

score: 0
Accepted
time: 29ms
memory: 3604kb

input:

100
5000 4999 59 88
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

294941
209958
219956
99980
29994
249950
14997
9998
299940
144971
384923
199960
59988
189962
284943
364927
324935
319936
344931
49990
229954
184963
259948
159968
29994
289942
179964
94981
164967
294941
64987
99980
264947
109978
244951
14997
79984
299940
24995
144971
69986
64987
134973
209958
19996
15...

result:

ok 100 numbers

Test #105:

score: 0
Accepted
time: 29ms
memory: 3660kb

input:

100
5000 4999 37 42
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

184963
139972
269946
69986
24995
294941
364927
174965
59988
179892
379924
364927
114931
349801
259868
154969
189886
34979
454727
54967
19992
194922
84983
4999
94981
244951
29994
224955
4997
144942
104979
14997
394921
199960
299940
149917
144971
59964
154969
269946
254847
104937
129974
184963
54978
1...

result:

ok 100 numbers

Test #106:

score: 0
Accepted
time: 26ms
memory: 3884kb

input:

100
5000 4999 15 91
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

74970
4998
49990
9996
84949
259855
409590
69966
204877
4999
344931
404919
129948
14994
349790
324814
284829
64974
34986
99940
94905
114977
184963
49990
79984
359791
204878
104979
329802
324935
114954
219956
269861
39992
444911
139972
94981
174876
249950
59964
9996
19996
164934
139944
259844
384923
1...

result:

ok 100 numbers

Test #107:

score: 0
Accepted
time: 25ms
memory: 3664kb

input:

100
5000 4999 32 83
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

159936
79926
319424
364489
139944
194871
74925
79961
59940
354503
64909
304329
54901
234671
174755
204877
184667
84966
489118
79824
179604
219692
394638
79920
99860
369926
334718
139804
209706
389610
139860
139944
39979
24990
159776
264813
29970
419748
274582
19992
179748
9982
124725
59964
69902
214...

result:

ok 100 numbers

Test #108:

score: 0
Accepted
time: 34ms
memory: 8536kb

input:

1
500000 499999 61 2
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57...

output:

999998

result:

ok 1 number(s): "999998"

Test #109:

score: 0
Accepted
time: 38ms
memory: 7768kb

input:

1
500000 499999 35 60
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

17499965

result:

ok 1 number(s): "17499965"

Test #110:

score: 0
Accepted
time: 38ms
memory: 8016kb

input:

1
500000 499999 13 6
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57...

output:

2999982

result:

ok 1 number(s): "2999982"

Test #111:

score: 0
Accepted
time: 38ms
memory: 9148kb

input:

1
500000 499999 94 59
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

29499823

result:

ok 1 number(s): "29499823"

Test #112:

score: 0
Accepted
time: 38ms
memory: 7748kb

input:

1
500000 499999 64 9
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57...

output:

4499991

result:

ok 1 number(s): "4499991"

Test #113:

score: 0
Accepted
time: 34ms
memory: 7784kb

input:

1
500000 499999 45 66
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

22499955

result:

ok 1 number(s): "22499955"

Test #114:

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

input:

1
500000 499999 67 31
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

15499721

result:

ok 1 number(s): "15499721"

Test #115:

score: 0
Accepted
time: 38ms
memory: 8048kb

input:

1
500000 499999 32 54
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

15998926

result:

ok 1 number(s): "15998926"

Test #116:

score: 0
Accepted
time: 38ms
memory: 8252kb

input:

1
500000 499999 19 82
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

9499981

result:

ok 1 number(s): "9499981"

Test #117:

score: 0
Accepted
time: 29ms
memory: 8580kb

input:

1
500000 499999 96 31
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

15499969

result:

ok 1 number(s): "15499969"

Test #118:

score: 0
Accepted
time: 30ms
memory: 9368kb

input:

1
500000 499999 78 85
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

38999773

result:

ok 1 number(s): "38999773"

Test #119:

score: 0
Accepted
time: 33ms
memory: 7728kb

input:

1
500000 499999 56 38
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

18999886

result:

ok 1 number(s): "18999886"

Test #120:

score: 0
Accepted
time: 33ms
memory: 9148kb

input:

1
500000 499999 25 88
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

12499950

result:

ok 1 number(s): "12499950"

Test #121:

score: 0
Accepted
time: 39ms
memory: 9408kb

input:

1
500000 499999 3 42
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57...

output:

1499994

result:

ok 1 number(s): "1499994"

Test #122:

score: 0
Accepted
time: 29ms
memory: 8016kb

input:

1
500000 499999 100 75
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E ...

output:

37499325

result:

ok 1 number(s): "37499325"

Test #123:

score: 0
Accepted
time: 38ms
memory: 8940kb

input:

1
500000 499999 22 16
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

7998992

result:

ok 1 number(s): "7998992"

Test #124:

score: 0
Accepted
time: 34ms
memory: 7560kb

input:

1
500000 499999 16 56
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

7999984

result:

ok 1 number(s): "7999984"

Test #125:

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

input:

1
500000 499999 98 1
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57...

output:

499999

result:

ok 1 number(s): "499999"

Test #126:

score: 0
Accepted
time: 33ms
memory: 8164kb

input:

1
500000 499999 75 59
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

29499823

result:

ok 1 number(s): "29499823"

Test #127:

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

input:

1
500000 499999 57 5
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57...

output:

2499995

result:

ok 1 number(s): "2499995"

Test #128:

score: 0
Accepted
time: 39ms
memory: 9308kb

input:

1
500000 499999 30 62
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

14999940

result:

ok 1 number(s): "14999940"

Test #129:

score: 0
Accepted
time: 30ms
memory: 9056kb

input:

1
500000 499999 4 8
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57
...

output:

1999992

result:

ok 1 number(s): "1999992"

Test #130:

score: 0
Accepted
time: 33ms
memory: 7468kb

input:

1
500000 499999 97 17
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 5...

output:

8499915

result:

ok 1 number(s): "8499915"

Test #131:

score: 0
Accepted
time: 38ms
memory: 7736kb

input:

1
500000 499999 8 13
E 0
E 1
E 2
E 3
E 4
E 5
E 6
E 7
E 8
E 9
E 10
E 11
E 12
E 13
E 14
E 15
E 16
E 17
E 18
E 19
E 20
E 21
E 22
E 23
E 24
E 25
E 26
E 27
E 28
E 29
E 30
E 31
E 32
E 33
E 34
E 35
E 36
E 37
E 38
E 39
E 40
E 41
E 42
E 43
E 44
E 45
E 46
E 47
E 48
E 49
E 50
E 51
E 52
E 53
E 54
E 55
E 56
E 57...

output:

3999855

result:

ok 1 number(s): "3999855"

Test #132:

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

input:

1
2 1 1 1
E 0
T 1

output:

1

result:

ok 1 number(s): "1"

Extra Test:

score: 0
Extra Test Passed