QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#395781#3158. Baumkuchenssqxy100 ✓62ms6020kbC++17902b2024-04-21 18:50:532024-04-21 18:50:54

详细

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 1ms
memory: 3596kb

input:

100
1
934
744
263
530
701
509
753
257
257
120
712
352
844
706
109
394
331
367
170
933
918
848
973
869
981
224
550
593
165
170
552
428
191
625
636
921
945
311
863
485
364
302
711
237
877
432
930
398
676
492
191
345
135
426
630
31
728
127
744
335
105
761
750
621
257
933
573
614
491
510
120
406
696
50
...

output:

16907

result:

ok single line: '16907'

Test #2:

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

input:

100
12
428
43
107
969
213
2
511
481
659
572
332
815
848
565
198
626
439
932
19
488
152
188
914
180
996
751
751
914
563
135
274
548
522
831
141
558
679
727
504
598
409
894
989
239
86
94
189
721
212
747
388
711
210
888
669
104
474
901
675
106
184
953
371
788
303
411
906
111
401
997
143
586
861
48
925
...

output:

15942

result:

ok single line: '15942'

Test #3:

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

input:

100
975
596
811
674
56
731
96
246
706
695
949
874
354
475
761
742
757
645
144
641
738
680
136
150
530
211
608
418
256
788
374
627
446
113
173
596
154
54
184
718
656
18
177
78
777
400
655
729
3
162
456
871
317
695
382
931
481
605
387
360
208
955
80
703
366
454
733
837
433
564
18
108
584
911
468
117
5...

output:

15828

result:

ok single line: '15828'

Test #4:

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

input:

100
23
818
653
925
696
472
154
626
979
617
143
598
89
733
918
405
744
396
750
408
937
303
768
46
564
341
399
897
52
808
768
998
979
651
810
331
361
717
162
294
210
754
99
131
635
544
890
89
32
693
402
675
295
694
166
950
766
738
459
842
49
944
230
216
390
210
389
755
244
502
272
517
565
278
913
6
61...

output:

16904

result:

ok single line: '16904'

Test #5:

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

input:

100
748
157
949
606
455
195
360
431
324
884
25
448
203
848
877
50
793
589
305
134
559
843
415
568
729
507
392
1
993
119
399
719
869
976
580
120
364
597
380
917
467
841
233
431
415
156
572
312
180
797
301
217
904
994
56
729
482
906
30
38
898
287
658
378
683
555
507
758
530
581
642
867
853
934
661
491...

output:

17389

result:

ok single line: '17389'

Test #6:

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

input:

100
1
481765934
85377744
270216263
191391530
812669701
553475509
445349753
344887257
730417257
812158120
147699712
880268352
889772844
686078706
105754109
182546394
949118331
220137367
979932170
89957933
873226918
715669848
486937973
196032869
777206981
68706224
843638550
212567593
883488165
9647761...

output:

16948442867

result:

ok single line: '16948442867'

Test #7:

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

input:

100
211082012
152299428
223840043
287487107
593400969
735206213
589759002
69834511
668882481
808284659
201886572
14983332
86000815
361784848
761170565
801013198
730103626
5748439
576460932
267998019
287998488
883570152
659169188
28409914
145324180
148026996
783671751
994411751
6364914
968295563
5599...

output:

15749912117

result:

ok single line: '15749912117'

Test #8:

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

input:

100
182559975
41127596
716688811
3823674
999845056
98508731
220256096
600558246
747030706
575147695
145222949
718559874
348928354
109934475
377520761
288380742
209526757
401155645
166723144
287531641
2183738
905284680
347176136
934901150
163821530
198427211
70386608
3224418
204255256
646953788
18290...

output:

12770430850

result:

ok single line: '12770430850'

Test #9:

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

input:

100
403305023
517512818
877548653
589473925
844934696
509860472
713161154
927004626
646230979
195355617
248501143
162346598
445357089
274341733
475831918
33644405
860692744
441680396
153542750
333654408
383555937
399374303
178883768
827166046
499751564
868830341
167033399
452444897
796613052
3102878...

output:

14624403817

result:

ok single line: '14624403817'

Test #10:

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

input:

100
296877748
91507157
695475949
106023606
857575455
853016195
394623360
73113431
408884324
362645884
600221025
311361448
331020203
789630848
78408877
64206050
886071793
806799589
97749305
4909134
461651559
931894843
154736415
418544568
434491729
722318507
325228392
39987001
107488993
97051119
82953...

output:

15874736216

result:

ok single line: '15874736216'

Subtask #2:

score: 15
Accepted

Dependency #1:

100%
Accepted

Test #11:

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

input:

400
1
934
744
263
530
701
509
753
257
257
120
712
352
844
706
109
394
331
367
170
933
918
848
973
869
981
224
550
593
165
170
552
428
191
625
636
921
945
311
863
485
364
302
711
237
877
432
930
398
676
492
191
345
135
426
630
31
728
127
744
335
105
761
750
621
257
933
573
614
491
510
120
406
696
50
...

output:

65676

result:

ok single line: '65676'

Test #12:

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

input:

400
748
157
949
606
455
195
360
431
324
884
25
448
203
848
877
50
793
589
305
134
559
843
415
568
729
507
392
1
993
119
399
719
869
976
580
120
364
597
380
917
467
841
233
431
415
156
572
312
180
797
301
217
904
994
56
729
482
906
30
38
898
287
658
378
683
555
507
758
530
581
642
867
853
934
661
491...

output:

68173

result:

ok single line: '68173'

Test #13:

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

input:

400
767
824
840
75
511
803
323
146
923
237
834
348
735
279
312
10
614
438
818
214
151
604
70
288
492
550
56
206
630
669
630
253
812
251
971
646
392
91
775
565
18
959
354
817
175
784
717
408
9
895
257
264
291
250
896
883
907
50
24
450
854
565
740
65
803
74
644
712
60
548
170
977
153
834
405
349
90
26...

output:

63645

result:

ok single line: '63645'

Test #14:

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

input:

400
662
441
371
701
901
135
236
86
478
431
982
180
824
93
363
684
339
789
119
376
957
967
329
805
832
136
388
359
695
964
593
310
551
663
750
974
408
509
668
479
790
195
947
492
887
581
729
835
671
461
36
186
70
896
488
427
956
432
67
611
961
32
199
294
80
491
493
782
700
328
240
43
782
693
98
878
5...

output:

65504

result:

ok single line: '65504'

Test #15:

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

input:

400
528
200
230
292
927
163
304
220
71
933
286
107
432
606
882
202
462
19
944
370
773
182
931
67
535
293
361
253
785
630
694
824
588
454
766
75
564
843
822
770
921
487
817
7
902
589
798
501
903
795
823
892
560
573
589
45
878
360
767
148
785
788
107
394
454
568
848
58
16
128
257
878
910
992
152
697
3...

output:

67388

result:

ok single line: '67388'

Test #16:

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

input:

400
1
481765934
85377744
270216263
191391530
812669701
553475509
445349753
344887257
730417257
812158120
147699712
880268352
889772844
686078706
105754109
182546394
949118331
220137367
979932170
89957933
873226918
715669848
486937973
196032869
777206981
68706224
843638550
212567593
883488165
9647761...

output:

60313929966

result:

ok single line: '60313929966'

Test #17:

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

input:

400
296877748
91507157
695475949
106023606
857575455
853016195
394623360
73113431
408884324
362645884
600221025
311361448
331020203
789630848
78408877
64206050
886071793
806799589
97749305
4909134
461651559
931894843
154736415
418544568
434491729
722318507
325228392
39987001
107488993
97051119
82953...

output:

61698743241

result:

ok single line: '61698743241'

Test #18:

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

input:

400
388644767
258014824
763144840
559325075
832982511
16619803
403802323
397147146
74369923
307241237
619990834
86024348
824415735
556587279
105910312
359827010
846594614
307819438
61699818
225550214
696848151
808026604
629056070
481858288
229915492
73836550
760810056
549232206
535702630
104135669
6...

output:

63131701076

result:

ok single line: '63131701076'

Test #19:

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

input:

400
826490662
390762441
861357371
893645701
637483901
368099135
379383236
928979086
476924478
312626431
73516982
354374180
951453824
755605093
790560363
419045684
245988339
97808789
418483119
760015376
262302957
668891967
430736329
153562805
10596832
294751136
248578388
132096359
262283695
305217964...

output:

60982890316

result:

ok single line: '60982890316'

Test #20:

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

input:

400
692599528
306397200
304812230
225612292
381935927
166680163
780253304
855681220
117046071
1823933
37331286
367543107
781905432
695350606
133836882
635710202
162073462
523589019
842632944
296293370
366875773
170398182
922619931
950624067
349095535
81746293
881238361
6692253
496135785
265634630
28...

output:

60967674887

result:

ok single line: '60967674887'

Subtask #3:

score: 30
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #21:

score: 30
Accepted
time: 1ms
memory: 3780kb

input:

8000
5934
7744
6263
1530
9701
5509
9753
7257
7257
8120
9712
8352
2844
8706
4109
6394
8331
7367
2170
7933
6918
9848
7973
2869
6981
6224
8550
7593
8165
6170
6552
428
6191
2625
636
4921
7945
9311
9863
8485
7364
3302
4711
7237
1877
432
9930
398
676
492
4191
9345
8135
8426
1630
4031
2728
9127
1744
7335
4...

output:

13292207

result:

ok single line: '13292207'

Test #22:

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

input:

8000
8219
9554
4782
6798
7871
1317
3998
1112
7258
5334
4952
6992
3688
8215
5865
2326
6620
51
3324
3696
2256
6425
2450
7765
1093
9114
7229
284
5089
4176
6933
4304
8307
9059
8646
9207
969
7028
415
755
6244
9239
9769
6115
2869
2636
5779
7218
954
308
4243
4499
3277
8717
4834
81
5072
1878
8009
2926
4523
...

output:

13370965

result:

ok single line: '13370965'

Test #23:

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

input:

8000
504
1364
3301
2065
6041
7125
8243
8615
906
6197
192
1984
8180
4077
7621
8259
4909
2735
4479
3107
1242
9354
575
2660
8853
8357
5908
2975
2013
5829
7315
8180
4070
5494
304
3492
345
8394
967
9378
1475
1528
1179
8641
7509
4839
1629
7685
1232
3772
7942
3301
2066
5360
8039
6130
3769
8277
627
8517
129...

output:

13358052

result:

ok single line: '13358052'

Test #24:

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

input:

8000
6438
6822
1820
7333
7860
6581
2487
6118
907
3411
5432
625
9024
3586
3025
4192
3199
5419
5633
8871
228
5931
8701
7556
2965
7600
4587
5666
8937
3834
7696
8407
9834
5576
8315
7778
3368
9760
7871
1648
355
7465
2589
7519
2148
7042
7478
8153
1510
3588
1641
8455
856
5651
1243
8531
2465
1028
3244
460
1...

output:

13482954

result:

ok single line: '13482954'

Test #25:

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

input:

8000
8723
8632
339
2601
6030
2389
6732
9973
908
4274
672
9265
3516
9448
4781
124
1488
8102
6788
8282
5565
8860
3178
2452
7077
491
3265
4709
9508
5488
8078
2283
1949
2010
6325
2064
6392
7478
8423
3918
9234
3402
7647
45
6788
9246
3328
8621
1789
3404
1692
7257
5998
5943
4447
4580
1162
7427
9509
6051
84...

output:

13376721

result:

ok single line: '13376721'

Test #26:

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

input:

8000
868583364
118142469
198195446
164708766
853246738
144038813
138909486
566796601
927005014
640557176
94720503
59329240
495269279
11765527
359977888
774406387
575046221
885340895
926533284
34767099
795279011
227627964
92368746
65348531
220056215
678443408
489533964
937890107
724851367
551062511
7...

output:

1280490432744

result:

ok single line: '1280490432744'

Test #27:

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

input:

8000
667933894
626955362
55464443
981203543
805405745
723193368
57511937
435150606
669681213
205264014
170552141
839330948
57941263
990171418
602599447
671627673
903836641
273988152
613521074
953899941
891626752
819915698
265897382
783031411
548282266
654554337
552091034
196357718
867424343
65723139...

output:

1251189477661

result:

ok single line: '1251189477661'

Test #28:

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

input:

8000
990577244
965011225
542843435
637260607
88991
942100408
270279552
225582711
150635777
11296252
864850212
46785907
68295594
442406771
218870258
836864267
436414169
837871053
700955615
115868163
276244658
524427329
125280394
139808672
908446429
513117281
49360105
294255821
544251136
64252828
8363...

output:

1264066724295

result:

ok single line: '1264066724295'

Test #29:

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

input:

8000
375400113
117377729
619880111
833360292
292929044
731718820
640254962
465074454
319441783
83011546
880851844
339034202
652816015
613575953
665484802
296364242
432981753
660297502
675166637
26089689
778329834
160696341
226616709
978196658
337472681
970892527
983995568
104624378
943136950
7101299...

output:

1239776203233

result:

ok single line: '1239776203233'

Test #30:

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

input:

8000
495177813
67961599
662119234
673749584
204478912
25934587
523198003
529489503
832748589
44646650
809562291
49774639
38664927
147512762
335664675
421188978
101454814
869455155
591377754
23197219
674357676
520880349
85516344
899984818
92439385
636719801
432988219
444374586
584243046
664829976
659...

output:

1263728280562

result:

ok single line: '1263728280562'

Test #31:

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

input:

8000
1
2
1
1
1
1
1
2
2
2
2
2
2
1
1
1
2
2
1
1
2
2
1
2
1
1
1
1
2
1
1
2
1
2
1
2
1
1
2
1
1
1
1
2
2
2
2
1
2
2
2
2
1
2
1
1
2
1
1
1
2
1
1
1
1
2
2
2
2
2
1
2
1
2
1
1
2
2
1
2
1
2
1
2
1
1
1
1
2
2
1
1
2
1
2
2
2
2
2
1
2
1
1
1
1
2
1
2
1
2
2
2
2
1
1
2
1
2
2
2
1
2
1
2
2
2
2
2
2
1
2
2
1
1
2
1
2
2
1
1
2
1
2
1
2
1
2
1...

output:

5977

result:

ok single line: '5977'

Test #32:

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

input:

8000
1
1
2
2
1
2
2
2
1
1
2
2
2
1
2
2
2
1
1
1
1
2
1
1
2
2
2
2
2
1
1
2
2
2
2
2
1
2
2
2
1
1
2
2
2
2
2
1
2
2
1
2
2
1
2
2
2
1
1
2
1
2
1
2
2
1
1
1
1
1
2
2
1
1
1
1
2
1
2
2
1
2
2
1
1
1
2
2
2
2
2
2
1
1
1
1
1
2
1
1
1
2
1
2
1
1
1
2
1
1
1
1
1
1
1
2
2
2
1
1
1
2
2
2
1
2
2
2
2
1
1
2
2
1
2
2
2
2
1
2
2
1
1
2
2
1
1
2...

output:

5973

result:

ok single line: '5973'

Test #33:

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

input:

8000
1
2
1
1
1
1
2
2
2
2
1
2
1
1
1
2
2
2
1
1
2
2
2
2
1
2
2
1
1
1
2
2
2
1
1
1
1
2
2
1
2
1
1
2
2
1
2
1
2
2
2
2
1
2
1
1
2
1
1
1
2
1
2
1
1
1
2
2
2
1
1
2
2
1
1
1
1
1
2
2
1
2
2
2
2
1
1
1
1
2
1
1
1
1
1
2
2
2
1
1
1
1
1
1
1
2
1
2
1
2
2
2
1
1
1
2
2
1
2
1
1
2
1
2
2
1
2
2
2
1
1
1
2
1
2
1
2
2
2
1
1
2
2
1
2
1
2
2...

output:

5967

result:

ok single line: '5967'

Test #34:

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

input:

8000
1
1
2
1
1
1
2
2
2
2
1
1
1
2
2
1
2
1
1
1
1
1
1
2
2
1
2
2
2
1
1
2
1
1
2
2
2
1
1
1
1
1
1
2
1
1
1
1
2
1
1
1
2
2
1
1
1
1
1
2
2
1
2
2
1
1
2
2
1
1
1
2
2
1
2
1
2
2
1
1
1
2
1
2
1
2
1
1
1
1
2
2
1
1
1
2
2
1
1
2
1
2
2
2
1
2
2
1
1
1
1
2
1
2
1
2
1
1
2
1
1
2
2
2
1
1
2
2
1
2
1
1
1
2
1
1
1
2
1
1
1
1
1
2
1
2
1
2...

output:

5986

result:

ok single line: '5986'

Test #35:

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

input:

8000
1
1
1
2
1
1
1
2
2
2
1
1
2
1
1
1
2
1
2
2
1
1
1
2
2
2
1
1
2
2
2
2
1
2
1
1
1
1
1
2
2
2
1
1
1
2
1
1
2
2
2
2
1
1
1
1
1
1
1
1
1
1
2
1
1
2
1
2
1
2
1
1
1
2
1
1
1
2
1
2
1
2
2
2
1
1
1
1
2
2
2
2
1
1
2
1
1
2
2
2
1
1
1
1
2
1
1
1
2
2
2
1
1
1
2
2
1
1
1
1
2
2
2
1
2
2
2
2
1
2
1
2
1
1
1
1
2
2
1
1
2
1
2
2
1
2
2
2...

output:

5997

result:

ok single line: '5997'

Subtask #4:

score: 50
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #36:

score: 50
Accepted
time: 59ms
memory: 5924kb

input:

100000
1
481765934
85377744
270216263
191391530
812669701
553475509
445349753
344887257
730417257
812158120
147699712
880268352
889772844
686078706
105754109
182546394
949118331
220137367
979932170
89957933
873226918
715669848
486937973
196032869
777206981
68706224
843638550
212567593
883488165
9647...

output:

15680591115190

result:

ok single line: '15680591115190'

Test #37:

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

input:

100000
906726309
812049720
702297474
68345536
518685719
412172303
964632260
978832181
726106973
807341252
556482447
844611644
46778216
468110693
819669294
686073252
861574745
339553718
294444836
58175385
442242568
82603378
443056269
170860740
846161052
795724624
430225396
895360785
56339889
91835300...

output:

15705541142987

result:

ok single line: '15705541142987'

Test #38:

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

input:

100000
420467900
682196175
620851954
227599220
622428108
225222235
898889487
80126676
685933493
411143526
616692099
831444611
250430353
251442905
97916951
973980892
885527104
210340342
260865784
747636370
102062983
463033674
703330670
497131531
694713226
553773166
890209774
806335041
429109994
75357...

output:

15679726400398

result:

ok single line: '15679726400398'

Test #39:

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

input:

100000
980258639
463165319
973946538
26910071
299169074
97736252
211682393
30944544
423587095
950843013
143344699
673725207
798446623
4083362
694448682
273598064
703360531
644635344
708878487
666941967
977432693
290597530
398568458
484554806
438499101
488830021
240422490
547069207
198985890
38355338...

output:

15698175935343

result:

ok single line: '15698175935343'

Test #40:

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

input:

100000
856686689
854724203
462003285
122033888
964380172
769930423
936252441
807255329
39866566
355253106
223224436
807945154
807799259
597235274
586575287
136474814
103978996
103802947
888806238
260371034
603509250
792795301
781186892
963193163
63668947
428798055
460821136
977180177
283864186
35049...

output:

15689376333611

result:

ok single line: '15689376333611'

Test #41:

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

input:

100000
42609286
93662558
934961734
914373723
217675494
576876486
991168611
564952203
669987438
860430009
894672179
314229530
236408747
534946245
683325569
191484388
469054382
10689946
30265478
382548476
268894267
299712321
907814752
964247125
452329359
626345846
997767497
295830662
405353246
3725472...

output:

15683516458733

result:

ok single line: '15683516458733'

Test #42:

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

input:

100000
684367733
686254201
517965052
739640756
319571475
813232527
665413064
478833964
319453817
323033402
102634512
990522071
442402887
953576050
617575530
252707569
40772054
655355975
202741294
37338057
97713277
576016794
907631386
417208917
858436977
76801976
90970213
464089722
851851134
83425327...

output:

15619377384234

result:

ok single line: '15619377384234'

Test #43:

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

input:

100000
489375393
494159975
493409191
568162661
887294363
278974122
695841857
805669721
105526627
42252874
897427063
610809627
64927473
886796564
128703252
456598545
421139925
340092356
13338973
106568176
936973551
137633770
735667292
191505967
639161003
544558783
99328434
904551
253449984
600132357
...

output:

15732112149286

result:

ok single line: '15732112149286'

Test #44:

score: 0
Accepted
time: 57ms
memory: 5936kb

input:

100000
587399376
944137668
981615539
565391144
624857145
732955992
446036757
826437980
852380687
236907219
439594994
181735619
540977448
283513048
664198281
879397817
486825739
441483372
159835402
233232391
742353654
404633660
913896314
156311447
525784405
33997826
834065073
471374349
51888312
96151...

output:

15693948298071

result:

ok single line: '15693948298071'

Test #45:

score: 0
Accepted
time: 62ms
memory: 5956kb

input:

100000
251943085
874522492
650947912
434427776
743927115
898907589
360120762
124338150
754023713
41568107
371795820
460733622
495551329
996587850
580218595
3920604
38974680
420855135
730449442
28197916
289489068
495149606
687731618
736822529
327359559
132422777
799572827
862424895
902517148
27858316...

output:

15662255576973

result:

ok single line: '15662255576973'

Test #46:

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

input:

100000
1
2
2
1
2
1
1
1
1
1
2
2
2
2
2
1
2
1
1
2
1
2
2
1
1
1
2
2
1
1
2
2
2
1
1
2
1
1
1
1
1
2
2
1
1
1
2
2
2
2
2
1
1
1
2
2
1
2
1
2
1
1
1
2
1
1
1
1
2
1
2
2
2
2
2
2
2
2
1
1
2
1
1
2
2
2
1
2
1
1
2
2
1
2
1
1
2
2
1
2
2
2
1
1
1
1
2
1
1
1
2
2
1
2
1
2
2
1
2
1
2
2
2
2
2
2
1
1
2
1
1
2
2
2
1
1
2
1
1
2
2
1
2
1
1
2
2...

output:

75209

result:

ok single line: '75209'

Test #47:

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

input:

100000
1
2
2
1
2
1
1
2
1
1
1
2
2
2
2
1
2
1
1
2
1
1
2
1
1
2
1
2
1
1
1
2
2
2
1
2
1
1
1
2
1
2
2
1
1
2
2
2
1
1
2
1
1
1
1
2
1
2
1
2
2
1
2
2
1
2
1
2
2
2
2
2
2
2
2
2
1
2
1
1
2
1
1
2
2
1
1
2
1
2
2
2
1
1
2
1
1
1
2
2
2
2
2
1
1
2
2
1
1
2
2
2
1
1
2
2
2
1
2
1
2
2
1
2
2
2
1
1
2
2
1
1
2
1
1
1
2
2
2
2
2
1
2
2
1
1
2...

output:

75041

result:

ok single line: '75041'

Test #48:

score: 0
Accepted
time: 21ms
memory: 5932kb

input:

100000
1
2
2
2
2
1
1
2
1
2
1
1
2
1
2
1
2
1
1
2
1
2
1
1
1
2
2
2
2
2
1
1
1
1
2
2
1
2
1
2
2
1
1
2
2
2
1
1
1
2
2
2
1
1
1
2
1
2
1
2
1
2
1
2
1
1
1
1
2
2
2
2
1
2
2
2
1
1
1
1
2
1
1
2
1
2
2
2
1
1
1
2
1
2
2
2
2
1
1
1
2
1
2
1
1
1
2
1
1
2
2
2
1
2
1
1
2
2
2
1
1
1
2
1
2
1
1
2
2
2
1
1
2
1
2
2
1
1
2
1
1
1
1
1
1
2
2...

output:

74939

result:

ok single line: '74939'

Extra Test:

score: 0
Extra Test Passed