QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#120081#21. GCD-sumcmkakioi100 ✓173ms37112kbC++14950b2023-07-06 13:16:132023-07-06 13:16:16

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-06 13:16:16]
  • 评测
  • 测评结果:100
  • 用时:173ms
  • 内存:37112kb
  • [2023-07-06 13:16:13]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
inline char gc()
{
	static char ibuf[1<<15],*ip1,*ip2;
	if(ip2==ip1) ip2=(ip1=ibuf)+fread(ibuf,1,1<<15,stdin);
	return *ip1++;
}
template<typename Tp> inline void read(Tp &x)
{
	char c=gc(); x=0;
	for(;!isdigit(c);c=gc());
	for(;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+c-48;
}
typedef long long ll;
const int maxn=500005;
int n,m; ll a[maxn],f[maxn],ans[maxn],del[maxn]; unordered_set<ll> S;
signed main()
{
	read(n);
	for(int i=1;i<=n;i++) read(a[i]),ans[n]+=a[i];
	sort(a+1,a+1+n);
	ll x=0; vector<ll> vec;
	for(int i=1;i<=n;i++)
	{
		ll y=__gcd(x,a[i]);
		if(x!=y) vec.push_back(x=y);
	}
	for(int i=1;i<=n;i++)
	{
		if(S.count(a[i])) del[i]=1;
		else S.insert(a[i]);
	}
	for(ll x:vec)
	{
		ll sum=ans[n]-a[1]+x;
		for(int i=n,j=2;j<=n;j++)
			if(del[j]||a[j]%x==0) --i,sum-=a[j],ans[i]=max(ans[i],sum);
	}
	for(int i=1;i<=n;i++) printf("%lld\n",ans[i]);
	return 0;
}

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

7
18 30 10 23 1 3 13

output:

1
31
54
72
85
95
98

result:

ok 7 lines

Test #2:

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

input:

7
11 12 12 15 30 6 10

output:

1
31
46
58
72
84
96

result:

ok 7 lines

Test #3:

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

input:

7
14 19 17 12 5 24 3

output:

1
25
44
61
75
87
94

result:

ok 7 lines

Test #4:

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

input:

7
13 15 19 21 27 28 30

output:

1
31
59
86
107
126
153

result:

ok 7 lines

Test #5:

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

input:

7
4 8 12 13 13 13 24

output:

1
25
41
54
67
79
87

result:

ok 7 lines

Test #6:

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

input:

7
21 6 17 20 5 22 27

output:

1
28
50
71
91
108
118

result:

ok 7 lines

Test #7:

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

input:

7
11 17 16 30 24 21 23

output:

1
31
55
78
99
116
142

result:

ok 7 lines

Test #8:

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

input:

7
13 20 16 4 29 26 5

output:

1
30
56
76
92
105
113

result:

ok 7 lines

Test #9:

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

input:

7
25 17 12 16 13 30 30

output:

1
31
61
86
103
119
143

result:

ok 7 lines

Test #10:

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

input:

7
4 8 12 13 13 13 24

output:

1
25
41
54
67
79
87

result:

ok 7 lines

Test #11:

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

input:

7
25 6 29 7 22 14 30

output:

1
31
60
85
107
121
133

result:

ok 7 lines

Test #12:

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

input:

7
21 24 20 30 2 5 21

output:

1
31
55
76
97
117
123

result:

ok 7 lines

Test #13:

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

input:

7
21 19 26 1 28 7 27

output:

1
29
56
82
103
122
129

result:

ok 7 lines

Test #14:

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

input:

7
26 11 28 24 30 23 24

output:

1
31
59
85
109
142
166

result:

ok 7 lines

Test #15:

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

input:

7
4 8 12 13 13 13 24

output:

1
25
41
54
67
79
87

result:

ok 7 lines

Subtask #2:

score: 5
Accepted

Dependency #1:

100%
Accepted

Test #16:

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

input:

15
11 28 29 11 13 18 23 1 5 20 24 20 23 3 2

output:

1
30
58
82
105
128
148
168
186
199
210
221
226
229
231

result:

ok 15 lines

Test #17:

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

input:

15
9 11 16 26 18 17 11 15 23 2 30 30 30 9 18

output:

1
31
61
91
117
140
158
176
193
209
224
235
246
256
265

result:

ok 15 lines

Test #18:

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

input:

15
22 9 18 3 14 18 4 17 26 26 12 26 8 6 15

output:

1
27
53
79
101
119
137
154
169
183
195
204
212
218
224

result:

ok 15 lines

Test #19:

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

input:

15
27 11 25 28 21 28 19 29 23 16 21 10 17 29 16

output:

1
30
59
87
115
142
167
190
211
232
251
268
284
304
320

result:

ok 15 lines

Test #20:

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

input:

15
2 4 6 8 10 12 14 15 15 15 15 15 15 15 28

output:

1
29
45
60
75
90
105
120
135
149
161
171
179
185
189

result:

ok 15 lines

Test #21:

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

input:

15
28 23 26 12 15 9 9 30 23 16 10 10 9 22 4

output:

1
31
59
85
108
131
153
169
184
196
206
218
228
237
246

result:

ok 15 lines

Test #22:

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

input:

15
4 7 17 3 24 30 22 5 26 11 15 3 6 25 21

output:

1
31
57
82
106
128
149
166
181
192
199
205
210
216
219

result:

ok 15 lines

Test #23:

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

input:

15
21 12 18 10 7 4 4 6 7 14 12 16 9 16 19

output:

1
22
41
59
75
91
105
117
129
139
148
156
164
171
175

result:

ok 15 lines

Test #24:

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

input:

15
22 15 21 22 16 27 10 15 17 14 26 23 30 12 18

output:

1
31
58
84
107
129
151
172
190
207
223
239
254
273
288

result:

ok 15 lines

Test #25:

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

input:

15
2 4 6 8 10 12 14 15 15 15 15 15 15 15 28

output:

1
29
45
60
75
90
105
120
135
149
161
171
179
185
189

result:

ok 15 lines

Test #26:

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

input:

15
20 10 2 25 16 29 5 2 17 7 30 4 30 5 14

output:

1
31
61
90
115
135
152
168
182
192
199
205
210
214
216

result:

ok 15 lines

Test #27:

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

input:

15
10 10 21 15 15 17 20 10 26 6 17 9 12 14 6

output:

1
27
48
68
85
102
117
132
146
158
170
182
192
202
208

result:

ok 15 lines

Test #28:

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

input:

15
26 23 7 9 15 12 16 9 25 9 2 20 8 16 17

output:

1
27
52
75
95
112
128
144
159
171
180
189
198
206
214

result:

ok 15 lines

Test #29:

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

input:

15
10 28 27 20 27 22 27 30 13 17 23 21 30 28 10

output:

1
31
61
89
117
144
171
198
221
243
264
284
303
323
333

result:

ok 15 lines

Test #30:

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

input:

15
2 4 6 8 10 12 14 15 15 15 15 15 15 15 28

output:

1
29
45
60
75
90
105
120
135
149
161
171
179
185
189

result:

ok 15 lines

Subtask #3:

score: 8
Accepted

Test #31:

score: 8
Accepted
time: 2ms
memory: 7684kb

input:

100
268 467 21 173 158 287 36 446 36 340 311 283 58 77 464 119 460 198 405 331 214 331 255 157 418 319 354 289 330 64 11 484 186 129 130 368 370 468 292 180 427 76 87 156 13 379 268 170 3 15 263 52 296 242 7 296 376 148 221 270 218 131 326 198 399 132 270 55 299 444 134 222 278 486 409 72 38 193 359...

output:

1
497
990
1476
1960
2428
2895
3359
3819
4274
4720
5164
5591
6009
6420
6829
7234
7633
8028
8422
8801
9177
9547
9915
10277
10636
10990
11335
11675
12006
12337
12667
12993
13312
13623
13934
14244
14543
14839
15135
15427
15716
16003
16286
16564
16838
17108
17378
17646
17914
18181
18444
18699
18941
19166...

result:

ok 100 lines

Test #32:

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

input:

100
481 171 450 127 152 475 484 86 266 265 354 457 493 439 102 277 387 150 217 412 84 103 78 446 66 133 369 373 193 244 339 173 288 171 330 21 471 473 228 131 139 102 408 59 10 25 472 382 422 375 448 72 242 453 196 337 287 389 497 154 243 77 50 211 216 408 450 370 353 213 154 463 13 459 154 154 201 ...

output:

1
498
991
1475
1957
2438
2913
3386
3858
4329
4798
5261
5720
6177
6630
7080
7530
7978
8424
8863
9299
9733
10158
10582
11004
11416
11824
12232
12621
13008
13390
13765
14138
14508
14877
15231
15584
15923
16260
16590
16917
17219
17513
17807
18095
18382
18659
18936
19208
19474
19739
19984
20228
20471
207...

result:

ok 100 lines

Test #33:

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

input:

100
187 294 383 120 383 131 140 370 192 54 467 391 314 398 147 27 492 72 409 145 346 34 234 342 58 61 174 358 225 27 446 476 111 116 364 40 195 82 392 262 493 486 478 240 234 81 177 150 221 351 200 52 354 123 189 115 340 189 22 353 486 368 241 138 174 276 322 379 404 288 145 350 472 254 286 432 152 ...

output:

1
494
986
1478
1964
2450
2931
3409
3885
4357
4827
5294
5749
6200
6646
7078
7488
7897
8301
8699
9091
9482
9868
10251
10634
11013
11391
11761
12129
12493
12851
13205
13558
13909
14259
14605
14947
15287
15614
15938
16260
16581
16895
17197
17491
17779
18065
18341
18613
18885
19147
19401
19642
19882
2011...

result:

ok 100 lines

Test #34:

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

input:

100
496 500 483 488 491 494 483 497 483 484 489 489 481 498 481 480 482 496 484 485 492 486 482 492 496 499 484 489 485 500 480 481 486 489 499 493 499 485 499 491 480 498 490 484 495 490 488 489 487 487 491 488 487 485 497 493 497 487 488 496 487 490 482 487 489 483 499 488 491 491 483 480 491 485 ...

output:

1
501
1001
1501
2000
2499
2998
3497
3996
4494
4992
5490
5988
6485
6982
7479
7976
8473
8969
9465
10290
10790
11290
11789
12288
12787
13286
13784
14282
14780
15277
15774
16271
16768
17264
17760
18256
18751
19245
19739
20232
20725
21218
21710
22202
22694
23185
23676
24167
24658
25149
25640
26130
26620
...

result:

ok 100 lines

Test #35:

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

input:

100
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245 250 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 ...

output:

1
501
756
1007
1258
1509
1760
2011
2262
2513
2764
3015
3266
3517
3768
4019
4270
4521
4772
5023
5274
5525
5776
6027
6278
6529
6780
7031
7282
7533
7784
8035
8286
8537
8788
9039
9290
9541
9792
10043
10294
10545
10796
11047
11298
11549
11800
12051
12302
12553
12804
13054
13299
13539
13774
14004
14229
14...

result:

ok 100 lines

Test #36:

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

input:

100
134 134 345 219 216 182 314 223 49 318 233 74 112 176 246 195 26 204 429 111 109 38 71 406 411 99 176 349 386 425 379 330 84 138 153 327 482 450 466 170 67 309 121 432 255 15 277 406 184 350 421 321 197 88 234 404 263 194 236 170 255 314 123 147 85 120 490 104 105 314 39 61 451 469 86 18 231 186...

output:

1
491
973
1442
1908
2359
2809
3241
3670
4095
4516
4935
5346
5752
6158
6562
6958
7344
7730
8109
8459
8808
9154
9499
9842
10184
10514
10841
11163
11484
11802
12120
12434
12748
13062
13371
13648
13925
14200
14464
14727
14985
15240
15495
15741
15977
16211
16444
16675
16898
17117
17333
17537
17735
17932
...

result:

ok 100 lines

Test #37:

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

input:

100
273 168 219 39 131 426 25 191 403 78 375 368 406 320 306 264 123 478 135 106 222 222 482 462 177 457 439 242 4 231 365 443 384 448 334 205 357 359 171 389 444 294 304 277 152 30 361 283 156 144 271 15 112 45 112 38 194 176 186 442 386 134 414 79 283 262 91 57 399 82 332 218 70 147 59 287 195 305...

output:

1
489
971
1449
1911
2368
2816
3264
3710
4154
4597
5039
5478
5915
6343
6769
7183
7589
7992
8391
8780
9166
9550
9929
10304
10672
11039
11404
11765
12124
12481
12824
13158
13490
13811
14131
14447
14760
15068
15374
15679
15983
16277
16569
16856
17139
17422
17699
17972
18243
18511
18779
19046
19310
19572...

result:

ok 100 lines

Test #38:

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

input:

100
350 321 186 441 162 194 228 331 274 245 219 315 415 46 240 221 315 490 35 7 449 74 246 183 441 102 87 287 371 41 352 191 422 117 394 183 304 164 209 257 458 221 139 462 226 70 145 268 303 86 277 23 388 133 4 427 462 401 66 322 50 465 235 140 79 435 360 340 3 437 346 216 465 308 394 111 182 449 3...

output:

1
493
983
1448
1913
2375
2837
3299
3757
4214
4663
5112
5558
5999
6440
6881
7318
7753
8180
8602
9017
9420
9821
10215
10609
10997
11375
11746
12106
12458
12808
13154
13494
13825
14147
14468
14783
15098
15406
15711
16015
16318
16618
16905
17192
17469
17745
18019
18287
18544
18799
19046
19292
19537
1977...

result:

ok 100 lines

Test #39:

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

input:

100
496 486 480 496 488 484 483 498 492 495 480 490 488 490 493 483 493 497 493 483 481 486 480 482 482 497 488 489 481 490 494 498 486 485 489 483 494 491 485 482 498 493 485 500 495 488 497 488 483 487 482 495 483 485 490 499 485 497 495 492 481 484 499 500 495 486 487 486 493 494 494 488 494 498 ...

output:

1
501
1001
1501
2001
2500
2999
3498
3996
4494
4992
5490
5987
6484
6981
7478
7974
8470
8966
9462
10290
10790
11290
11790
12289
12788
13286
13784
14282
14779
15276
15773
16269
16765
17261
17756
18251
18746
19241
19736
20230
20724
21218
21712
22206
22700
23193
23686
24179
24672
25164
25656
26147
26638
...

result:

ok 100 lines

Test #40:

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

input:

100
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245 250 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 ...

output:

1
501
756
1007
1258
1509
1760
2011
2262
2513
2764
3015
3266
3517
3768
4019
4270
4521
4772
5023
5274
5525
5776
6027
6278
6529
6780
7031
7282
7533
7784
8035
8286
8537
8788
9039
9290
9541
9792
10043
10294
10545
10796
11047
11298
11549
11800
12051
12302
12553
12804
13054
13299
13539
13774
14004
14229
14...

result:

ok 100 lines

Test #41:

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

input:

100
57 462 192 254 195 87 235 257 385 271 33 224 152 21 6 192 452 418 481 401 488 447 173 95 64 288 391 348 345 499 158 30 222 78 375 2 96 82 100 96 432 307 466 100 201 498 248 262 19 116 242 66 255 399 90 83 416 424 281 79 404 390 426 413 462 31 464 172 49 187 115 59 287 91 181 218 128 32 261 40 16...

output:

1
500
998
1494
1987
2475
2956
3422
3886
4348
4810
5271
5723
6171
6618
7050
7478
7904
8328
8746
9162
9575
9979
10380
10779
11175
11566
11956
12341
12716
13086
13434
13779
14107
14429
14745
15052
15344
15632
15919
16200
16472
16743
17005
17266
17523
17778
18032
18280
18522
18759
18994
19222
19446
1966...

result:

ok 100 lines

Test #42:

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

input:

100
340 282 120 113 479 443 215 227 79 201 450 256 382 62 401 352 465 313 215 493 142 381 270 153 384 266 155 466 300 124 169 264 95 8 230 62 50 85 353 392 475 239 99 211 110 395 328 152 86 130 325 364 204 172 454 54 70 333 170 76 352 369 14 101 44 146 297 490 144 23 235 371 416 14 410 440 254 419 2...

output:

1
494
984
1463
1938
2404
2869
3323
3773
4221
4664
5104
5523
5939
6349
6752
7153
7548
7940
8328
8715
9099
9481
9862
10237
10608
10977
11341
11704
12057
12409
12761
13101
13434
13762
14087
14400
14700
14997
15279
15549
15815
16079
16341
16597
16851
17096
17340
17579
17814
18044
18271
18496
18711
18926...

result:

ok 100 lines

Test #43:

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

input:

100
330 350 83 127 289 312 102 13 463 183 93 351 110 475 319 98 282 176 297 226 64 46 108 101 291 173 388 358 421 197 487 207 356 40 103 212 66 394 315 20 113 86 215 141 413 493 12 332 87 243 368 346 195 18 259 4 22 431 427 159 368 291 45 99 297 186 386 249 363 484 471 56 447 235 335 202 471 155 82 ...

output:

1
500
996
1489
1976
2460
2935
3406
3877
4340
4787
5218
5645
6066
6479
6873
7261
7647
8015
8383
8746
9105
9463
9819
10170
10520
10866
11201
11533
11863
12182
12499
12815
13130
13442
13751
14057
14356
14653
14950
15241
15532
15821
16103
16362
16620
16871
17120
17363
17598
17824
18050
18265
18477
18684...

result:

ok 100 lines

Test #44:

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

input:

100
480 497 491 495 495 492 499 484 496 496 498 486 497 490 498 484 494 498 488 489 498 489 492 492 481 490 480 499 495 498 495 484 489 496 484 499 493 487 486 486 494 487 491 492 482 485 482 495 490 495 488 499 490 489 489 498 490 484 495 482 482 480 486 487 481 489 496 482 481 499 497 491 493 499 ...

output:

1
501
1001
1500
1999
2498
2997
3496
3995
4494
4993
5491
5989
6487
6985
7483
7981
8479
8976
9807
10307
10806
11305
11804
12303
12802
13301
13800
14298
14796
15294
15792
16290
16788
17285
17782
18278
18774
19270
19765
20260
20755
21250
21745
22240
22734
23228
23722
24216
24709
25202
25695
26188
26680
...

result:

ok 100 lines

Test #45:

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

input:

100
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245 250 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 ...

output:

1
501
756
1007
1258
1509
1760
2011
2262
2513
2764
3015
3266
3517
3768
4019
4270
4521
4772
5023
5274
5525
5776
6027
6278
6529
6780
7031
7282
7533
7784
8035
8286
8537
8788
9039
9290
9541
9792
10043
10294
10545
10796
11047
11298
11549
11800
12051
12302
12553
12804
13054
13299
13539
13774
14004
14229
14...

result:

ok 100 lines

Test #46:

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

input:

15
15 30 12 20 1 25 30 30 28 23 5 27 14 15 23

output:

1
31
61
91
119
146
171
194
217
237
252
267
281
293
298

result:

ok 15 lines

Test #47:

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

input:

15
20 22 18 13 11 30 15 1 8 24 27 22 20 30 8

output:

1
31
61
88
112
134
156
176
196
214
229
242
253
261
269

result:

ok 15 lines

Test #48:

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

input:

15
29 12 15 14 10 30 15 25 27 1 18 10 24 2 30

output:

1
31
61
90
117
142
166
184
199
214
228
240
250
260
262

result:

ok 15 lines

Test #49:

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

input:

15
16 11 29 20 19 29 13 19 23 11 28 27 12 27 16

output:

1
30
59
87
114
141
164
184
203
222
238
254
273
289
300

result:

ok 15 lines

Test #50:

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

input:

15
2 4 6 8 10 12 14 15 15 15 15 15 15 15 28

output:

1
29
45
60
75
90
105
120
135
149
161
171
179
185
189

result:

ok 15 lines

Subtask #4:

score: 8
Accepted

Test #51:

score: 8
Accepted
time: 2ms
memory: 7804kb

input:

1270
1 2 6 7 8 9 10 11 13 14 16 18 19 20 22 23 25 26 28 30 31 32 33 37 38 40 42 43 44 45 46 47 48 49 50 52 53 55 56 57 58 59 62 63 64 67 68 69 70 71 72 74 75 77 78 80 85 86 87 88 89 90 92 96 97 98 99 100 101 103 104 105 107 108 109 113 119 122 124 126 128 132 134 135 137 140 143 144 149 150 151 154 ...

output:

1
1996
3990
5983
7975
9966
11955
13943
15928
17912
19895
21873
23849
25824
27796
29767
31737
33706
35674
37641
39607
41570
43531
45490
47447
49402
51354
53304
55251
57197
59142
61084
63024
64963
66900
68836
70770
72703
74632
76560
78487
80413
82337
84260
86182
88103
90023
91941
93856
95770
97683
995...

result:

ok 1270 lines

Test #52:

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

input:

1265
1 2 5 6 7 8 9 10 12 14 15 16 17 18 19 20 24 26 28 29 30 31 32 33 34 35 37 38 39 40 41 43 44 45 46 47 50 56 57 59 62 63 64 65 66 67 68 69 70 71 74 75 77 83 84 85 86 87 88 89 91 92 95 97 98 100 101 102 105 106 107 108 109 110 112 114 115 116 117 118 119 120 122 123 124 125 126 128 129 133 134 136...

output:

1
2001
4000
5998
7994
9989
11983
13976
15968
17957
19945
21932
23917
25901
27883
29864
31841
33817
35792
37766
39738
41709
43678
45646
47612
49575
51537
53496
55454
57411
59367
61321
63274
65225
67175
69124
71072
73019
74965
76909
78852
80794
82735
84675
86613
88549
90481
92412
94342
96271
98198
100...

result:

ok 1265 lines

Test #53:

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

input:

1291
1 2 4 5 8 9 11 12 14 18 19 21 22 23 24 25 28 30 31 32 33 34 35 36 37 39 41 42 43 44 45 48 52 53 54 57 58 61 62 63 64 65 67 71 72 73 74 76 77 78 80 81 82 85 88 89 91 92 97 99 100 101 102 103 104 105 106 107 108 110 113 114 115 118 120 121 122 123 124 126 128 129 132 134 135 137 140 141 142 143 1...

output:

1
2001
4000
5996
7990
9983
11975
13966
15956
17945
19933
21918
23902
25880
27857
29833
31808
33777
35745
37712
39677
41641
43604
45566
47527
49487
51446
53404
55361
57317
59268
61218
63166
65113
67059
69004
70945
72884
74822
76759
78695
80630
82563
84492
86419
88345
90270
92194
94117
96038
97958
998...

result:

ok 1291 lines

Test #54:

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

input:

21
1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 19...

output:

1
2001
4000
5998
7995
9991
11986
13980
15973
17965
19956
21946
23935
25923
27910
29896
31881
33865
35848
37830
41790

result:

ok 21 lines

Test #55:

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

input:

1002
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

output:

1
2001
3002
4002
5001
5999
6996
7992
8987
9981
10974
11966
12957
13947
14936
15924
16911
17897
18882
19866
20849
21831
22812
23792
24771
25749
26726
27702
28677
29651
30624
31596
32567
33537
34506
35474
36441
37407
38372
39336
40299
41261
42222
43182
44141
45099
46056
47012
47967
48921
49874
50826
5...

result:

ok 1002 lines

Test #56:

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

input:

1275
1 3 4 5 6 8 9 10 11 12 13 14 16 17 19 22 23 25 30 33 34 35 36 37 39 42 43 46 47 48 49 51 52 53 56 59 61 62 63 64 65 66 67 69 70 71 72 73 75 77 78 79 80 82 84 87 88 89 90 91 93 97 98 100 101 103 104 105 106 107 108 109 110 112 113 117 119 120 121 124 126 130 131 134 135 138 139 140 141 143 144 1...

output:

1
2001
3999
5995
7990
9984
11977
13969
15960
17949
19937
21924
23910
25895
27877
29858
31837
33814
35790
37765
39739
41712
43684
45655
47624
49592
51559
53523
55486
57447
59407
61366
63324
65281
67236
69189
71141
73092
75042
76989
78935
80880
82823
84765
86706
88646
90585
92522
94458
96392
98324
100...

result:

ok 1275 lines

Test #57:

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

input:

1276
1 6 7 8 9 11 12 13 15 18 20 21 22 25 29 31 32 33 36 37 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 56 57 59 61 63 64 65 66 67 68 69 70 72 73 75 76 77 78 80 81 83 84 85 86 88 90 91 93 95 96 97 99 101 103 104 105 109 110 111 112 113 114 116 117 121 122 123 124 126 130 132 134 137 138 139 141 ...

output:

1
2000
3997
5993
7988
9982
11975
13964
15951
17937
19922
21906
23889
25869
27847
29824
31797
33769
35740
37710
39678
41645
43611
45576
47539
49501
51462
53422
55379
57335
59290
61244
63197
65147
67096
69044
70991
72937
74882
76825
78762
80698
82633
84567
86499
88430
90360
92287
94213
96138
98062
999...

result:

ok 1276 lines

Test #58:

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

input:

1271
1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 18 20 21 22 23 25 26 27 29 30 33 34 35 37 38 40 41 45 46 48 49 50 51 52 53 54 55 56 59 64 66 69 74 75 76 78 82 83 85 86 87 88 89 91 92 93 95 96 97 98 102 103 104 105 106 108 110 112 113 115 116 118 119 121 122 123 124 125 126 127 128 135 136 141 143 145 147 ...

output:

1
1999
3996
5992
7987
9981
11974
13965
15955
17944
19930
21914
23896
25876
27849
29821
31791
33760
35727
37693
39657
41617
43576
45533
47488
49440
51389
53336
55282
57227
59171
61112
63052
64989
66924
68858
70791
72723
74654
76584
78513
80441
82368
84294
86219
88141
90062
91982
93898
95813
97727
996...

result:

ok 1271 lines

Test #59:

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

input:

21
1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 19...

output:

1
2001
4000
5998
7995
9991
11986
13980
15973
17965
19956
21946
23935
25923
27910
29896
31881
33865
35848
37830
41790

result:

ok 21 lines

Test #60:

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

input:

1002
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

output:

1
2001
3002
4002
5001
5999
6996
7992
8987
9981
10974
11966
12957
13947
14936
15924
16911
17897
18882
19866
20849
21831
22812
23792
24771
25749
26726
27702
28677
29651
30624
31596
32567
33537
34506
35474
36441
37407
38372
39336
40299
41261
42222
43182
44141
45099
46056
47012
47967
48921
49874
50826
5...

result:

ok 1002 lines

Test #61:

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

input:

1255
2 4 5 7 8 9 11 12 13 14 17 18 19 23 25 26 27 28 30 33 38 39 41 42 43 44 46 48 49 50 52 55 56 58 59 61 63 66 67 68 71 73 74 76 77 78 79 81 83 84 85 86 88 90 93 95 96 98 100 101 102 103 104 108 109 110 112 113 114 115 117 118 121 122 123 124 125 126 128 129 131 132 133 134 135 136 137 139 142 143...

output:

1
1996
3990
5983
7975
9963
11950
13936
15920
17902
19883
21863
23841
25818
27794
29767
31739
33710
35680
37649
39617
41582
43546
45509
47469
49428
51386
53342
55297
57251
59204
61156
63107
65057
67006
68953
70899
72842
74783
76723
78661
80598
82534
84469
86402
88334
90264
92190
94114
96037
97959
998...

result:

ok 1255 lines

Test #62:

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

input:

1274
2 3 4 5 7 8 9 10 11 12 13 14 16 18 19 21 25 26 27 28 29 30 31 32 34 35 36 37 40 41 44 49 50 52 53 54 55 56 58 59 61 63 65 66 69 71 72 74 76 77 78 79 81 82 83 84 86 87 89 90 91 92 94 95 97 99 100 102 103 105 106 107 108 110 111 112 113 114 116 117 118 119 121 126 127 129 130 131 132 133 135 136 ...

output:

1
2000
3998
5994
7986
9977
11966
13953
15938
17921
19902
21882
23861
25838
27814
29789
31763
33736
35708
37679
39649
41613
43575
45535
47493
49450
51406
53359
55311
57262
59212
61161
63109
65056
67002
68947
70891
72832
74772
76711
78646
80580
82513
84445
86376
88306
90235
92163
94088
96012
97935
998...

result:

ok 1274 lines

Test #63:

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

input:

1262
1 2 3 5 7 9 11 12 13 14 15 18 19 21 22 23 25 26 30 31 33 34 35 36 40 41 42 43 46 47 49 51 52 53 54 55 56 58 59 60 61 62 64 65 68 69 70 72 73 74 76 79 80 81 82 86 87 88 90 92 93 95 98 99 100 102 105 107 108 109 110 112 116 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 1...

output:

1
2001
3999
5993
7986
9978
11969
13959
15948
17936
19922
21907
23891
25873
27854
29834
31813
33790
35765
37739
39712
41684
43654
45623
47591
49558
51523
53486
55446
57405
59363
61320
63276
65231
67185
69138
71090
73037
74983
76928
78872
80815
82757
84698
86638
88577
90513
92447
94379
96310
98239
100...

result:

ok 1262 lines

Test #64:

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

input:

21
1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 19...

output:

1
2001
4000
5998
7995
9991
11986
13980
15973
17965
19956
21946
23935
25923
27910
29896
31881
33865
35848
37830
41790

result:

ok 21 lines

Test #65:

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

input:

1002
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...

output:

1
2001
3002
4002
5001
5999
6996
7992
8987
9981
10974
11966
12957
13947
14936
15924
16911
17897
18882
19866
20849
21831
22812
23792
24771
25749
26726
27702
28677
29651
30624
31596
32567
33537
34506
35474
36441
37407
38372
39336
40299
41261
42222
43182
44141
45099
46056
47012
47967
48921
49874
50826
5...

result:

ok 1002 lines

Test #66:

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

input:

12
1 3 6 10 11 12 15 16 18 19 22 26
22 26 26

output:

1
27
49
68
86
102
117
129
140
150
156
159

result:

ok 12 lines

Test #67:

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

input:

12
6 7 10 15 18 19 20 21 26 27 28 30
27 28 30

output:

1
31
59
86
112
133
153
172
190
205
215
227

result:

ok 12 lines

Test #68:

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

input:

13
1 2 4 7 8 9 12 15 16 19 24 25 30
25 30

output:

1
31
56
80
99
115
130
142
151
159
166
170
172

result:

ok 13 lines

Test #69:

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

input:

10
11 14 19 23 25 26 27 28 29 30
28 29 29 30 30

output:

1
31
60
88
115
141
166
189
208
232

result:

ok 10 lines

Test #70:

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

input:

9
2 4 6 8 10 12 14 15 28
15 15 15 15 15 28

output:

1
29
45
59
71
81
89
95
99

result:

ok 9 lines

Test #71:

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

input:

2000
1048576 1572864 1835008 1966080 2031616 2064384 2080768 2088960 2093056 2095104 2096128 2096640 2096896 2097024 2097088 2097120 2097136 2097144 2097148 2097151 2097152 2097153 2097154 2097155 2097156 2097157 2097158 2097159 2097160 2097161 2097162 2097163 2097164 2097165 2097166 2097167 2097168...

output:

1
2099132
4198262
6297391
8396519
10495646
12594772
14693897
16793021
18892144
20991266
23090387
25189507
27288626
29387744
31486861
33585977
35685092
37784206
39883319
41982431
44081542
46180652
48279761
50378869
52477976
54577082
56676187
58775291
60874394
62973496
65072597
67171697
69270796
71369...

result:

ok 2000 lines

Subtask #5:

score: 14
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #72:

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

input:

2000
696030009118 695920889533 821284927627 187774313755 453004182998 468203089203 216545070443 211275101081 15683052765 808967889455 982792944692 578013030953 737949748187 42238826271 602375945889 293539319158 350846353058 782168749959 514141696269 328127647740 555115769990 65336578822 683655471656...

output:

1
999808785736
1999052748490
2997723128465
3995205044207
4991285892312
5987285878196
6983002660108
7977749762197
8972013323468
9963768647889
10955409959629
11946995537539
12938325302466
13929224345026
14919181275002
15909095040891
16898809513651
17888000598967
18876925130652
19864797906210
208523703...

result:

ok 2000 lines

Test #73:

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

input:

2000
454063267221 298865608094 456621262387 122902004838 50608138290 670414486156 21086979967 502880797046 467513132423 842747135764 41156774768 514931085900 938445506885 924166278005 678898722295 401702113341 435690042909 158391311534 781511632023 168931434275 358951617088 711412264006 375608737272...

output:

1
998209807237
1995885569232
2993132300365
3990374294691
4986779314853
5982432600360
6977906730007
7973266101131
8968486682318
9963664919860
10958758891956
11952518846624
12946232314885
13939870615394
14933177875336
15926254258767
16919269147417
17911570601425
18903685634596
19895789413254
208876391...

result:

ok 2000 lines

Test #74:

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

input:

2000
248311305142 983923288372 182789878107 152179980277 301367682846 604386596740 809379762135 181013202193 992402252463 606701693159 181690365397 498525952378 476049351201 981951219304 373837411323 727501095806 591073430546 687663886327 673869423958 737193526252 170262890857 372779384347 347407882...

output:

1
999915922800
1999469816092
2998276947393
3996665109696
4993875012139
5991073281408
6988254352155
7984940852424
8981599767130
9977836663171
10973881556911
11969914512521
12965930721007
13961026502585
14954848790518
15948260067192
16940825635597
17933260536738
18925662789201
19918046625172
209099619...

result:

ok 2000 lines

Test #75:

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

input:

2000
999999999999 999999999999 999999999990 999999999990 999999999990 999999999982 999999999999 999999999985 999999999988 999999999998 999999999999 999999999997 999999999995 999999999991 999999999988 1000000000000 999999999980 999999999986 999999999998 999999999997 999999999981 999999999996 99999999...

output:

1
1000000000001
2000000000001
3000000000001
4000000000001
5000000000001
6000000000001
7000000000001
8000000000001
9000000000001
10000000000001
11000000000001
12000000000001
13000000000001
14000000000001
15000000000001
16000000000001
17000000000001
18000000000001
19000000000001
20999999999790
2199999...

result:

ok 2000 lines

Test #76:

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

input:

2000
500000000 1000000000 1500000000 2000000000 2500000000 3000000000 3500000000 4000000000 4500000000 5000000000 5500000000 6000000000 6500000000 7000000000 7500000000 8000000000 8500000000 9000000000 9500000000 10000000000 10500000000 11000000000 11500000000 12000000000 12500000000 13000000000 135...

output:

1
1000000000001
1500500000001
2000500000002
2500500000003
3000500000004
3500500000005
4000500000006
4500500000007
5000500000008
5500500000009
6000500000010
6500500000011
7000500000012
7500500000013
8000500000014
8500500000015
9000500000016
9500500000017
10000500000018
10500500000019
11000500000020
1...

result:

ok 2000 lines

Test #77:

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

input:

2000
854220674132 401482595915 619952976637 424866580287 312096845362 399414804498 751725425569 98346377718 880465466138 72301204670 43236145230 90751102076 945640560665 729955466836 506061719386 536839106199 514638797251 356048253549 244481007777 369051452982 873114860982 600960124976 795726605156 ...

output:

1
999610115176
1999142740735
2995873420963
3992290488403
4988133894916
5983832689901
6979525163093
7974677749775
8968270491720
9961787589158
10955160611489
11948503521404
12941588806857
13934002992138
14926374218675
15918637733301
16910442004592
17901202044465
18890445450915
19879153675251
208672156...

result:

ok 2000 lines

Test #78:

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

input:

2000
332620124599 331542734907 547553513899 868985626218 571889235135 596960528504 246589455570 741794129649 642634977386 162742388073 701634284060 976017140383 505394340595 736310654294 948319009657 107691925030 356108013732 924437612178 325744087877 523437489697 168854769364 495078067832 881367711...

output:

1
998873657413
1997641303205
2996083470573
3993299229075
4989850810702
5986179859726
6982157992746
7977862668276
8972235332242
9966558848350
10960807419705
11954380039729
12947434435529
13940077125092
14932298796747
15923183278320
16913408562257
17903481429848
18893114533126
19882653777655
208720878...

result:

ok 2000 lines

Test #79:

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

input:

2000
624250602077 290453326001 724709611117 811422222145 834113664861 595909921401 715769884463 85511165207 507886599778 775702051799 734803601311 524612655382 208752310932 920648182290 3454371173 331343470215 590059369406 541352424334 412207470078 461308196749 313998085550 377315923409 568981230353...

output:

1
999885933657
1999612596113
2999211077313
3998792206134
4997469910753
5996082053735
6993893509466
7989886532288
8985338244984
9980493782761
10975610671833
11969943040704
12963602760545
13956311746676
14948542693882
15940591652664
16931898819711
17923080118147
18913889066099
19903514894925
208926296...

result:

ok 2000 lines

Test #80:

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

input:

2000
999999999997 999999999991 999999999989 999999999983 999999999992 999999999982 999999999980 999999999991 999999999981 999999999998 999999999985 999999999991 999999999988 999999999983 999999999983 999999999993 999999999996 1000000000000 999999999995 999999999985 999999999991 1000000000000 9999999...

output:

1
1000000000001
2000000000001
3000000000001
4000000000001
5000000000001
6000000000001
7000000000001
8000000000001
9000000000001
10000000000001
11000000000001
12000000000001
13000000000001
14000000000001
15000000000001
16000000000001
17000000000001
18000000000001
19000000000001
20999999999790
2199999...

result:

ok 2000 lines

Test #81:

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

input:

2000
500000000 1000000000 1500000000 2000000000 2500000000 3000000000 3500000000 4000000000 4500000000 5000000000 5500000000 6000000000 6500000000 7000000000 7500000000 8000000000 8500000000 9000000000 9500000000 10000000000 10500000000 11000000000 11500000000 12000000000 12500000000 13000000000 135...

output:

1
1000000000001
1500500000001
2000500000002
2500500000003
3000500000004
3500500000005
4000500000006
4500500000007
5000500000008
5500500000009
6000500000010
6500500000011
7000500000012
7500500000013
8000500000014
8500500000015
9000500000016
9500500000017
10000500000018
10500500000019
11000500000020
1...

result:

ok 2000 lines

Test #82:

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

input:

2000
440482242150 267891620079 163358895239 885922911714 87555125950 70447121411 184982229199 20298025378 299241654010 50890281289 591094421604 936176124553 889397946817 111853328000 215895799411 827800248707 640061302504 263688939040 914784130751 215084261643 241710544669 157303848872 682046218375 ...

output:

1
998758791467
1997374775751
2995943656594
3994185309123
4991361254576
5987932524006
6983596202093
7978820613185
8973938605702
9968980175892
10962919087482
11956810587613
12950305343712
13942990007307
14935392835366
15927459743128
16919074834553
17909402920497
18899599833022
19888988980109
208783424...

result:

ok 2000 lines

Test #83:

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

input:

2000
720562874424 997404094057 392671402252 517057606807 45110864671 224264945545 502016315881 911508575901 219913724295 404849067663 636145171160 176057594357 397988259180 181574089393 794251266375 49605704452 947160440264 87001243588 964126883636 779243370876 820205276441 108566904197 687278221750...

output:

1
999610387116
1998629482220
2997572399487
3996000980538
4993405074595
5990191991955
6986874092733
7983308857286
8979637021820
9975685482382
10971529806379
11967360017476
12962725236758
13957762012868
14952593216525
15946905131062
16941148494503
17933163263069
18925098373834
19916686869518
209081643...

result:

ok 2000 lines

Test #84:

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

input:

2000
76211133542 460550127206 170409825280 545368354955 199506958537 283061744934 309073357849 206729458655 7993103228 507372499381 143615468172 670754519773 280326633766 753900596846 287988890731 748965959789 792397304846 553748999047 766804949415 556302199830 927897963598 214082609510 875421404197...

output:

1
998988983588
1997559848133
2995959505484
3993637099660
4991293350000
5987245948846
6983182184234
7979101741072
8974229798979
9968882276754
10962942415641
11955941287395
12947621457478
13939097244204
14930083314639
15921001470698
16911781815067
17902325185288
18892771483740
19883134026461
208731635...

result:

ok 2000 lines

Test #85:

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

input:

2000
999999999980 999999999995 999999999981 999999999997 999999999983 999999999990 999999999989 999999999985 999999999992 999999999983 999999999989 999999999984 1000000000000 999999999991 999999999987 999999999995 999999999983 999999999989 999999999993 999999999988 999999999987 999999999989 99999999...

output:

1
1000000000001
2000000000001
3000000000001
4000000000001
5000000000001
6000000000001
7000000000001
8000000000001
9000000000001
10000000000001
11000000000001
12000000000001
13000000000001
14000000000001
15000000000001
16000000000001
17000000000001
18000000000001
19000000000001
20999999999790
2199999...

result:

ok 2000 lines

Test #86:

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

input:

2000
500000000 1000000000 1500000000 2000000000 2500000000 3000000000 3500000000 4000000000 4500000000 5000000000 5500000000 6000000000 6500000000 7000000000 7500000000 8000000000 8500000000 9000000000 9500000000 10000000000 10500000000 11000000000 11500000000 12000000000 12500000000 13000000000 135...

output:

1
1000000000001
1500500000001
2000500000002
2500500000003
3000500000004
3500500000005
4000500000006
4500500000007
5000500000008
5500500000009
6000500000010
6500500000011
7000500000012
7500500000013
8000500000014
8500500000015
9000500000016
9500500000017
10000500000018
10500500000019
11000500000020
1...

result:

ok 2000 lines

Test #87:

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

input:

15
23 22 29 22 24 3 18 5 23 21 30 12 4 26 9

output:

1
31
60
86
110
133
156
178
200
221
239
251
260
265
271

result:

ok 15 lines

Test #88:

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

input:

15
17 6 18 3 1 22 9 20 10 23 26 3 22 11 18

output:

1
27
50
72
94
114
132
150
167
178
188
197
203
206
209

result:

ok 15 lines

Test #89:

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

input:

15
10 24 10 21 3 25 11 15 13 29 10 11 29 20 24

output:

1
30
59
84
108
132
153
173
188
201
212
224
235
245
255

result:

ok 15 lines

Test #90:

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

input:

15
14 16 22 12 23 28 30 20 22 30 30 29 12 17 25

output:

1
31
61
91
120
148
173
196
218
240
260
278
296
318
330

result:

ok 15 lines

Test #91:

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

input:

15
2 4 6 8 10 12 14 15 15 15 15 15 15 15 28

output:

1
29
45
60
75
90
105
120
135
149
161
171
179
185
189

result:

ok 15 lines

Test #92:

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

input:

2000
1048576 1572864 1835008 1966080 2031616 2064384 2080768 2088960 2093056 2095104 2096128 2096640 2096896 2097024 2097088 2097120 2097136 2097144 2097148 2097151 2097152 2097153 2097154 2097155 2097156 2097157 2097158 2097159 2097160 2097161 2097162 2097163 2097164 2097165 2097166 2097167 2097168...

output:

1
2099132
4198262
6297391
8396519
10495646
12594772
14693897
16793021
18892144
20991266
23090387
25189507
27288626
29387744
31486861
33585977
35685092
37784206
39883319
41982431
44081542
46180652
48279761
50378869
52477976
54577082
56676187
58775291
60874394
62973496
65072597
67171697
69270796
71369...

result:

ok 2000 lines

Subtask #6:

score: 25
Accepted

Dependency #4:

100%
Accepted

Test #93:

score: 25
Accepted
time: 122ms
memory: 34104kb

input:

500000
1978108 7824448 16070992 19363627 20918674 23178033 25062486 27491435 32227144 32504290 34354868 40619808 40976583 48635411 51084349 53889929 53912053 56144437 56280811 57179147 58706967 63857110 64702507 69761358 70785742 72483776 75420984 75589168 75983614 77306423 79136016 80268561 8058065...

output:

1
999999200709
1999997306637
2999993627388
3999984585621
4999970827115
5999954005317
6999930050082
7999905028756
8999877856676
9999843618343
10999808270402
11999769357750
12999729822932
13999690242568
14999650372476
15999608693274
16999565735989
17999522681429
18999477063941
19999430606175
209993834...

result:

ok 500000 lines

Test #94:

score: 0
Accepted
time: 109ms
memory: 33852kb

input:

499999
5586910 5880966 5988221 7453748 8210486 9637837 9845955 12607215 13222857 15196002 16806993 19073472 19435800 22398623 23058676 25745142 28640649 31095531 31560111 32641211 32942527 34105277 37947784 38585418 40681665 44364412 46050834 56505623 63581399 65902676 68539916 68609445 68956978 692...

output:

1
999999754588
1999997294191
2999990817907
3999984321601
4999970086028
5999951484726
6999932480038
7999912654681
8999892698394
9999871898667
10999850895214
11999827634535
12999804191179
13999777887587
14999750893771
15999720784146
16999690593857
17999660019378
18999627059279
19999589589275
209995460...

result:

ok 499999 lines

Test #95:

score: 0
Accepted
time: 133ms
memory: 33916kb

input:

500000
540353 559702 6020150 6029884 6030524 7472864 8762091 10413019 11558207 12148796 15132490 21742204 25040712 28388392 29502011 29707038 31320851 31528642 31653685 31682303 38146202 38757142 38802274 44622145 44756482 46286003 48024672 48939591 49440250 51466105 53301884 54080477 59275835 59282...

output:

1
999996668163
1999993045602
2999986764818
3999980216028
4999973240590
5999963067500
6999952239327
7999940005065
8999927430315
9999914153003
10999900021740
11999879818147
12999855318944
13999829488627
14999801916972
15999774000316
16999743791508
17999711615336
18999671361312
19999627132338
209995803...

result:

ok 500000 lines

Test #96:

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

input:

21
999999999980 999999999981 999999999982 999999999983 999999999984 999999999985 999999999986 999999999987 999999999988 999999999989 999999999990 999999999991 999999999992 999999999993 999999999994 999999999995 999999999996 999999999997 999999999998 999999999999 1000000000000
999999999980 9999999999...

output:

1
1000000000001
2000000000000
2999999999998
3999999999995
4999999999991
5999999999986
6999999999980
7999999999973
8999999999965
9999999999956
10999999999946
11999999999935
12999999999923
13999999999910
14999999999896
15999999999881
16999999999865
17999999999848
18999999999830
20999999999790

result:

ok 21 lines

Test #97:

score: 0
Accepted
time: 32ms
memory: 20808kb

input:

250002
2000000 4000000 6000000 8000000 10000000 12000000 14000000 16000000 18000000 20000000 22000000 24000000 26000000 28000000 30000000 32000000 34000000 36000000 38000000 40000000 42000000 44000000 46000000 48000000 50000000 52000000 54000000 56000000 58000000 60000000 62000000 64000000 66000000 ...

output:

1
1000000000001
1500002000001
2000002000001
2500000000001
2999996000001
3499990000001
3999982000001
4499972000001
4999960000001
5499946000001
5999930000001
6499912000001
6999892000001
7499870000001
7999846000001
8499820000001
8999792000001
9499762000001
9999730000001
10499696000001
10999660000001
11...

result:

ok 250002 lines

Test #98:

score: 0
Accepted
time: 103ms
memory: 33956kb

input:

500000
1313720 3941025 4207370 4904501 6053618 10592322 16996088 17198284 17389792 18019167 18888100 20478954 24636782 25201933 26238348 28501741 30277788 32025287 32906338 34540324 36375442 37157153 38022247 40739813 42788062 44679215 48781996 50462617 52695173 61234928 62811656 63848753 64031351 6...

output:

1
999997394023
1999990350606
2999982933470
3999970383998
4999953964550
5999933811984
6999909813419
7999880652792
8999845841981
9999810947831
10999768568770
11999721748772
12999669843283
13999617589090
14999564882744
15999512011192
16999452838515
17999393653102
18999331390891
19999267818378
209992028...

result:

ok 500000 lines

Test #99:

score: 0
Accepted
time: 94ms
memory: 34024kb

input:

500000
491817 2153389 2295775 2852054 4302695 11078932 15771771 17578489 18115437 21489574 22134893 26950958 29406165 31116633 31529979 34061760 34595010 39303612 39702679 40764367 40787130 40873244 41262848 41733183 42282913 44790918 52616580 56625119 57449110 58200218 59360637 60642265 64841890 69...

output:

1
999996657825
1999991318209
2999984688728
3999977247256
4999965741711
5999954194282
6999941024197
7999924026842
8999906963220
9999887261415
10999865637860
11999843168440
12999820553967
13999790839568
14999761119076
15999731119826
16999701006978
17999670257997
18999634678955
19999597571200
209995555...

result:

ok 500000 lines

Test #100:

score: 0
Accepted
time: 107ms
memory: 34004kb

input:

500000
706676 2396847 5939575 6091149 10874963 11656758 18114939 18833067 21015238 28459264 28583711 29149920 31162158 32854979 36874869 37662987 37668736 37999840 38205607 40149017 48544349 50736545 50904667 56768539 57983962 58926899 60255236 60548868 63433985 70454810 71588575 72568947 74842794 7...

output:

1
999996896533
1999991795893
2999985218636
3999978313570
4999970402120
5999960857217
6999946955801
7999931877180
8999916506976
9999900680420
10999884831112
11999867067040
12999849178946
13999830301099
14999809891941
15999781932899
16999749901100
17999717610527
18999681474021
19999642615132
209996021...

result:

ok 500000 lines

Test #101:

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

input:

21
999999999980 999999999981 999999999982 999999999983 999999999984 999999999985 999999999986 999999999987 999999999988 999999999989 999999999990 999999999991 999999999992 999999999993 999999999994 999999999995 999999999996 999999999997 999999999998 999999999999 1000000000000
999999999980 9999999999...

output:

1
1000000000001
2000000000000
2999999999998
3999999999995
4999999999991
5999999999986
6999999999980
7999999999973
8999999999965
9999999999956
10999999999946
11999999999935
12999999999923
13999999999910
14999999999896
15999999999881
16999999999865
17999999999848
18999999999830
20999999999790

result:

ok 21 lines

Test #102:

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

input:

250002
2000000 4000000 6000000 8000000 10000000 12000000 14000000 16000000 18000000 20000000 22000000 24000000 26000000 28000000 30000000 32000000 34000000 36000000 38000000 40000000 42000000 44000000 46000000 48000000 50000000 52000000 54000000 56000000 58000000 60000000 62000000 64000000 66000000 ...

output:

1
1000000000001
1500002000001
2000002000001
2500000000001
2999996000001
3499990000001
3999982000001
4499972000001
4999960000001
5499946000001
5999930000001
6499912000001
6999892000001
7499870000001
7999846000001
8499820000001
8999792000001
9499762000001
9999730000001
10499696000001
10999660000001
11...

result:

ok 250002 lines

Test #103:

score: 0
Accepted
time: 138ms
memory: 33980kb

input:

500000
10501477 10924407 11370522 11593201 12652776 12869274 13024695 13754669 19405071 22941205 23919636 28665808 30339415 32882781 35001386 35524645 36399974 38653067 41322258 45314672 45798511 48909106 49471875 50916418 52928946 53799954 54405111 55711151 60441306 61181170 62217043 65050874 66808...

output:

1
999999992051
1999999200342
2999996502038
3999993721760
4999989702960
5999984449515
6999976015043
7999960365094
8999940055820
9999914668979
10999887671158
11999858774122
12999827868161
13999795707222
14999762824010
15999727771059
16999690879522
17999652084708
18999611097971
19999568405797
209995208...

result:

ok 500000 lines

Test #104:

score: 0
Accepted
time: 105ms
memory: 35932kb

input:

500000
402450 775089 7082371 10448535 13978966 14835299 15350740 17905571 18524584 19530906 20444925 24018945 35745881 36809328 39186091 40052728 42268000 45627168 46674883 47393140 48468990 52900515 55288420 55498843 55726922 57541014 58736292 60666089 61964196 65652042 66176080 72294017 72760941 7...

output:

1
999993742319
1999985828511
2999975521287
3999964556276
4999953443129
5999940786925
6999926947416
7999912647974
8999896054691
9999878168520
10999859200584
11999837182888
12999812342376
13999784957861
14999754285459
15999723489141
16999688841269
17999649839510
18999609199664
19999566359996
209995220...

result:

ok 500000 lines

Test #105:

score: 0
Accepted
time: 126ms
memory: 33952kb

input:

500000
546907 7045232 11273471 15788418 19622729 28229833 29989141 30026641 34382744 34728132 36160401 42357661 42482308 44697382 47749789 50616327 52939930 53568045 57126272 60981293 65083396 67265051 67516963 69406747 71704358 77092667 82494200 86645825 86730955 88255007 91285423 93875995 95213801...

output:

1
999999325656
1999998288679
2999994551153
3999990507943
4999975417981
5999956194650
6999935524447
7999914839599
8999893241228
9999866865082
10999838672176
11999808879496
12999778290481
13999744089930
14999707965815
15999671381464
16999628760928
17999585308448
18999540880823
19999493032737
209994445...

result:

ok 500000 lines

Test #106:

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

input:

21
999999999980 999999999981 999999999982 999999999983 999999999984 999999999985 999999999986 999999999987 999999999988 999999999989 999999999990 999999999991 999999999992 999999999993 999999999994 999999999995 999999999996 999999999997 999999999998 999999999999 1000000000000
999999999980 9999999999...

output:

1
1000000000001
2000000000000
2999999999998
3999999999995
4999999999991
5999999999986
6999999999980
7999999999973
8999999999965
9999999999956
10999999999946
11999999999935
12999999999923
13999999999910
14999999999896
15999999999881
16999999999865
17999999999848
18999999999830
20999999999790

result:

ok 21 lines

Test #107:

score: 0
Accepted
time: 31ms
memory: 20456kb

input:

250002
2000000 4000000 6000000 8000000 10000000 12000000 14000000 16000000 18000000 20000000 22000000 24000000 26000000 28000000 30000000 32000000 34000000 36000000 38000000 40000000 42000000 44000000 46000000 48000000 50000000 52000000 54000000 56000000 58000000 60000000 62000000 64000000 66000000 ...

output:

1
1000000000001
1500002000001
2000002000001
2500000000001
2999996000001
3499990000001
3999982000001
4499972000001
4999960000001
5499946000001
5999930000001
6499912000001
6999892000001
7499870000001
7999846000001
8499820000001
8999792000001
9499762000001
9999730000001
10499696000001
10999660000001
11...

result:

ok 250002 lines

Test #108:

score: 0
Accepted
time: 74ms
memory: 35820kb

input:

500000
1048576 1572864 1835008 1966080 2031616 2064384 2080768 2088960 2093056 2095104 2096128 2096640 2096896 2097024 2097088 2097120 2097136 2097144 2097148 2097151 2097152 2097153 2097154 2097155 2097156 2097157 2097158 2097159 2097160 2097161 2097162 2097163 2097164 2097165 2097166 2097167 20971...

output:

1
2597132
5194262
7791391
10388519
12985646
15582772
18179897
20777021
23374144
25971266
28568387
31165507
33762626
36359744
38956861
41553977
44151092
46748206
49345319
51942431
54539542
57136652
59733761
62330869
64927976
67525082
70122187
72719291
75316394
77913496
80510597
83107697
85704796
8830...

result:

ok 500000 lines

Subtask #7:

score: 35
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Test #109:

score: 35
Accepted
time: 147ms
memory: 33816kb

input:

500000
512892720742 282039982772 316636420407 10771564742 833301433313 990950032683 233733628379 796845866941 545204223467 519807925936 726661878379 601266701311 380482541864 206608987210 13645806094 421102451579 242531098047 540239813279 207714828533 825325978938 209851143757 861440412782 805442824...

output:

1
999995730949
1999989507642
2999983083211
3999975094292
4999967068518
5999958418873
6999949160295
7999938481496
8999923113462
9999907554191
10999889123765
11999870667091
12999851866526
13999832272100
14999811407409
15999787917562
16999763038616
17999724013175
18999684889837
19999645252259
209996036...

result:

ok 500000 lines

Test #110:

score: 0
Accepted
time: 140ms
memory: 37112kb

input:

500000
727111533579 523435987356 918513620459 920427609694 688782825402 392977964218 671263700916 724169631620 584182836316 440649095787 364356626199 182170103899 697385218456 780817917170 897969926325 4529771537 608926784097 550884980661 80549226267 813560890691 753170975023 148568933407 4321669568...

output:

1
999999677589
1999997651768
2999990634016
3999983545589
4999975803328
5999967548516
6999958675881
7999943892805
8999924413589
9999902832802
10999874539665
11999841274878
12999806833679
13999772388087
14999736346198
15999699624084
16999662005032
17999620905065
18999573989469
19999524797083
209994744...

result:

ok 500000 lines

Test #111:

score: 0
Accepted
time: 143ms
memory: 33828kb

input:

500000
92828459910 447367866121 708293702143 314033161193 53936728323 245748263179 374258089167 789838097817 835580693033 818729375307 833676042314 624915754637 427691603541 418008136465 594102140955 509734946809 761255591115 395794663498 807858142752 305040097238 986684134708 874996546989 123793808...

output:

1
999997785335
1999988789260
2999975149528
3999960278374
4999942996293
5999919089387
6999894033528
7999868656359
8999843093049
9999816215325
10999789182876
11999759019095
12999727248158
13999689128704
14999648966625
15999608093574
16999565555035
17999521979715
18999476536050
19999429227998
209993747...

result:

ok 500000 lines

Test #112:

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

input:

500000
999999999995 1000000000000 999999999993 999999999996 999999999992 999999999981 999999999996 1000000000000 999999999998 999999999984 999999999994 999999999986 999999999992 999999999988 999999999989 999999999986 999999999989 999999999992 999999999983 999999999994 999999999988 999999999981 99999...

output:

1
1000000000001
2000000000001
3000000000001
4000000000001
5000000000001
6000000000001
7000000000001
8000000000001
9000000000001
10000000000001
11000000000001
12000000000001
13000000000001
14000000000001
15000000000001
16000000000001
17000000000001
18000000000001
19000000000001
20999999999790
2199999...

result:

ok 500000 lines

Test #113:

score: 0
Accepted
time: 48ms
memory: 26448kb

input:

500000
2000000 4000000 6000000 8000000 10000000 12000000 14000000 16000000 18000000 20000000 22000000 24000000 26000000 28000000 30000000 32000000 34000000 36000000 38000000 40000000 42000000 44000000 46000000 48000000 50000000 52000000 54000000 56000000 58000000 60000000 62000000 64000000 66000000 ...

output:

1
1000000000001
1500002000001
2000002000002
2500002000003
3000002000004
3500002000005
4000002000006
4500002000007
5000002000008
5500002000009
6000002000010
6500002000011
7000002000012
7500002000013
8000002000014
8500002000015
9000002000016
9500002000017
10000002000018
10500002000019
11000002000020
1...

result:

ok 500000 lines

Test #114:

score: 0
Accepted
time: 155ms
memory: 34036kb

input:

500000
870159580285 335581601132 101725324138 298195250463 61902063622 302363095629 889876774705 336171595926 94988820979 277608957464 228369637870 630855005259 764104020772 635162182162 289568565133 100989596990 236991730296 826180869623 422633498126 83484884057 652727391701 510554706088 6320840158...

output:

1
999997919090
1999993015460
2999988024342
3999982818912
4999976863817
5999968896585
6999960307741
7999950987337
8999941278119
9999931295891
10999916827279
11999901558829
12999878678516
13999853573433
14999827539551
15999801465475
16999775252715
17999748653167
18999714215689
19999679471644
209996424...

result:

ok 500000 lines

Test #115:

score: 0
Accepted
time: 138ms
memory: 33852kb

input:

500000
316246179582 295950735760 739100693516 256071823229 668511080073 400699978297 667530406821 504690365241 984689078498 997614185463 25866742903 704532354905 688730981379 908808746308 708647917067 647608298869 484697185091 403603924732 111947982935 957943469103 860084559569 245648083722 71804731...

output:

1
999999828024
1999999467191
2999995459057
3999991185009
4999986594000
5999977092628
6999967447803
7999956730123
8999945052380
9999930572725
10999915894839
11999900804235
12999885089174
13999865260139
14999844619613
15999823105898
16999801519690
17999779097563
18999745005957
19999708376087
209996705...

result:

ok 500000 lines

Test #116:

score: 0
Accepted
time: 173ms
memory: 33896kb

input:

500000
660910114025 51101064721 207985328163 77990900029 42269886399 274846210958 151343645204 260719936547 326377528548 858483021821 810573467927 726591749998 291396371014 27112361528 346155957787 487685625377 964122554894 805601088189 437348195147 378405247313 713054499199 201451855338 48097920759...

output:

1
999996651958
1999990477152
2999981619624
3999972082698
4999959215384
5999941276562
6999922469010
7999903148157
8999879587670
9999855545672
10999829599347
11999803091293
12999774854310
13999745345483
14999715405731
15999683577999
16999647551155
17999611372219
18999574263763
19999537095984
209994987...

result:

ok 500000 lines

Test #117:

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

input:

500000
999999999993 999999999996 999999999995 999999999999 999999999997 999999999980 999999999990 999999999997 999999999993 999999999982 999999999991 1000000000000 999999999983 999999999998 999999999988 999999999999 999999999992 999999999986 999999999987 999999999987 999999999998 999999999999 999999...

output:

1
1000000000001
2000000000001
3000000000001
4000000000001
5000000000001
6000000000001
7000000000001
8000000000001
9000000000001
10000000000001
11000000000001
12000000000001
13000000000001
14000000000001
15000000000001
16000000000001
17000000000001
18000000000001
19000000000001
20999999999790
2199999...

result:

ok 500000 lines

Test #118:

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

input:

500000
2000000 4000000 6000000 8000000 10000000 12000000 14000000 16000000 18000000 20000000 22000000 24000000 26000000 28000000 30000000 32000000 34000000 36000000 38000000 40000000 42000000 44000000 46000000 48000000 50000000 52000000 54000000 56000000 58000000 60000000 62000000 64000000 66000000 ...

output:

1
1000000000001
1500002000001
2000002000002
2500002000003
3000002000004
3500002000005
4000002000006
4500002000007
5000002000008
5500002000009
6000002000010
6500002000011
7000002000012
7500002000013
8000002000014
8500002000015
9000002000016
9500002000017
10000002000018
10500002000019
11000002000020
1...

result:

ok 500000 lines

Test #119:

score: 0
Accepted
time: 146ms
memory: 31988kb

input:

500000
898633392951 465865715617 267550892806 614490378484 767260890070 749958887638 440222876901 112586303631 181858348767 5816174607 948717177835 845379660048 848652263393 16427969143 684865038336 830541626519 320719102807 785865563465 157864378184 971076121291 871711307849 109259861687 7753516387...

output:

1
999996050886
1999991238435
2999985186055
3999976711367
4999967270919
5999957052518
6999945397894
7999930860928
8999914166060
9999895252969
10999875215905
11999855132330
12999833355770
13999805693539
14999776977740
15999747784679
16999716611262
17999683729209
18999649791817
19999613942167
209995759...

result:

ok 500000 lines

Test #120:

score: 0
Accepted
time: 160ms
memory: 32756kb

input:

500000
997873899665 32187726690 919654346073 468378882916 17677816223 947296969622 97881774724 688787989505 886135039915 630257719198 994548013823 619423206881 79053932367 535628734185 707223396018 293485789526 428907500980 22118907255 321388964274 892682156453 814513752835 153860708379 501759024606...

output:

1
999997503962
1999993747691
2999989580010
3999984876756
4999978660198
5999972028285
6999964600757
7999955092972
8999945022603
9999934213389
10999923363563
11999911649244
12999895312024
13999878027500
14999854276930
15999825479873
16999795098660
17999762028127
18999726105134
19999689895510
209996517...

result:

ok 500000 lines

Test #121:

score: 0
Accepted
time: 123ms
memory: 32024kb

input:

500000
877947625963 339960036179 434231117104 884477867703 21867548277 999209046735 606157138542 701327031117 411699433326 545869367556 331795102584 681235282100 651460538532 395925074950 545536166579 483193166943 575891300226 14328004278 199400771437 413968601749 253016617755 577051379031 859677375...

output:

1
999999644445
1999996010076
2999990995830
3999984009067
4999976252178
5999965888671
6999948668539
7999928823928
8999904036537
9999877797171
10999851423263
11999821613735
12999786742647
13999751600525
14999712830410
15999672774782
16999630143719
17999585330602
18999540299884
19999487744758
209994342...

result:

ok 500000 lines

Test #122:

score: 0
Accepted
time: 70ms
memory: 17224kb

input:

500000
999999999990 999999999988 999999999982 999999999996 999999999987 999999999999 999999999993 999999999987 999999999983 999999999991 999999999992 999999999995 999999999993 999999999986 999999999983 999999999991 999999999997 999999999991 999999999998 999999999988 999999999993 999999999987 9999999...

output:

1
1000000000001
2000000000001
3000000000001
4000000000001
5000000000001
6000000000001
7000000000001
8000000000001
9000000000001
10000000000001
11000000000001
12000000000001
13000000000001
14000000000001
15000000000001
16000000000001
17000000000001
18000000000001
19000000000001
20999999999790
2199999...

result:

ok 500000 lines

Test #123:

score: 0
Accepted
time: 48ms
memory: 23356kb

input:

500000
2000000 4000000 6000000 8000000 10000000 12000000 14000000 16000000 18000000 20000000 22000000 24000000 26000000 28000000 30000000 32000000 34000000 36000000 38000000 40000000 42000000 44000000 46000000 48000000 50000000 52000000 54000000 56000000 58000000 60000000 62000000 64000000 66000000 ...

output:

1
1000000000001
1500002000001
2000002000002
2500002000003
3000002000004
3500002000005
4000002000006
4500002000007
5000002000008
5500002000009
6000002000010
6500002000011
7000002000012
7500002000013
8000002000014
8500002000015
9000002000016
9500002000017
10000002000018
10500002000019
11000002000020
1...

result:

ok 500000 lines

Test #124:

score: 0
Accepted
time: 79ms
memory: 31924kb

input:

500000
1048576 1572864 1835008 1966080 2031616 2064384 2080768 2088960 2093056 2095104 2096128 2096640 2096896 2097024 2097088 2097120 2097136 2097144 2097148 2097151 2097152 2097153 2097154 2097155 2097156 2097157 2097158 2097159 2097160 2097161 2097162 2097163 2097164 2097165 2097166 2097167 20971...

output:

1
2597132
5194262
7791391
10388519
12985646
15582772
18179897
20777021
23374144
25971266
28568387
31165507
33762626
36359744
38956861
41553977
44151092
46748206
49345319
51942431
54539542
57136652
59733761
62330869
64927976
67525082
70122187
72719291
75316394
77913496
80510597
83107697
85704796
8830...

result:

ok 500000 lines

Extra Test:

score: 0
Extra Test Passed