UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#184034#3296. 数组wanghao200810057528ms1292kbC++111.4kb2023-08-10 09:03:442023-08-10 14:56:26

answer

#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for(int i=a;i<=n;i++)
typedef long long LL;
typedef pair<int,int> PII;
#define x first
#define y second
inline LL read()
{
	LL s=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){s=(s<<3)+(s<<1)+(ch-'0');ch=getchar();}
	return s*f;
}
inline void write(LL x)
{
	if(x<0){putchar('-');x=-x;}
	if(x>9)write(x/10);
	putchar(x%10+'0');
}
inline void print(LL x,char ch){write(x);putchar(ch);}
LL T;
void output(int fir,int sec,int len)
{
	if(sec==10)
	{
		fir++;
		if(fir==10)len++,sec=1,fir=1;
		else sec=fir;
	}
	printf("%d",fir);
	rep(i,2,len)printf("%d",sec);
	puts("");
	
}
bool check(string s,int len,int d)
{
	rep(i,2,len-1)
	{
		if(s[i]-'0'>d)return false;
		if(s[i]-'0'<d)return true;
	}
	return false;
}
int main()
{
	scanf("%lld",&T);
	while(T--)
	{
		string s;cin>>s;
		if(s.size()==1||s=="10")
		{
			puts("11");
			continue;
		}
		int len=s.size();
		int fir=s[0]-'0',sec=s[1]-'0',maxn=-1;
		if(s.size()==2)
		{
			if(fir<=sec)output(fir,sec+1,len);
			if(fir>sec)output(fir,fir,len);
			continue;
		}
		if(fir>sec)output(fir,fir,len);
		if(fir==sec)
		{
			if(check(s,len,sec))output(fir,sec,len);
			else output(fir,sec+1,len);
		}
		if(fir<sec)
		{
			if(check(s,len,sec))output(fir,sec,len);
			else output(fir,sec+1,len);
		}
	}
	return 0;
}



详细

小提示:点击横条可展开更详细的信息

Subtask #1:

score: 20
Accepted

Test #1:

score: 20
Accepted
time: 0ms
memory: 1288kb

input:

1000
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...

output:

11
11
11
11
11
11
11
11
11
11
12
13
14
15
16
17
18
19
22
22
22
23
24
25
26
27
28
29
33
33
33
33
34
3...

result:

ok 1000 numbers

Subtask #2:

score: 20
Accepted

Test #2:

score: 20
Accepted
time: 0ms
memory: 1288kb

input:

1000
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...

output:

11
11
11
11
11
11
11
11
11
11
12
13
14
15
16
17
18
19
22
22
22
23
24
25
26
27
28
29
33
33
33
33
34
3...

result:

ok 1000 numbers

Test #3:

score: 0
Accepted
time: 427ms
memory: 1288kb

input:

100000
791885
996289
805204
986137
703132
318696
858261
389943
933851
897127
577120
60042
361457
207...

output:

799999
999999
888888
999999
777777
333333
888888
399999
999999
899999
577777
66666
366666
222222
444...

result:

ok 100000 numbers

Test #4:

score: 0
Accepted
time: 463ms
memory: 1288kb

input:

100000
76669
179333
310815
282354
615528
971444
613724
860454
570634
864147
616125
973124
690369
274...

output:

77777
188888
333333
288888
666666
999999
666666
888888
577777
888888
666666
999999
699999
277777
377...

result:

ok 100000 numbers

Test #5:

score: 0
Accepted
time: 432ms
memory: 1292kb

input:

100000
75255
741782
126696
900280
714940
143835
389796
422901
718487
84640
442488
13359
930886
10213...

output:

77777
777777
133333
999999
777777
144444
399999
444444
777777
88888
444444
14444
999999
111111
88888...

result:

ok 100000 numbers

Test #6:

score: 0
Accepted
time: 504ms
memory: 1288kb

input:

100000
855981
277549
752560
220220
932997
843726
15023
373016
587923
901308
327341
327424
591901
952...

output:

888888
277777
777777
222222
999999
888888
15555
377777
588888
999999
333333
333333
599999
999999
777...

result:

ok 100000 numbers

Test #7:

score: 0
Accepted
time: 519ms
memory: 1292kb

input:

100000
267564
759047
22743
537454
337141
640550
949526
773573
353488
793499
124460
155074
956945
150...

output:

277777
777777
23333
555555
344444
666666
999999
777777
355555
799999
133333
155555
999999
155555
455...

result:

ok 100000 numbers

Test #8:

score: 0
Accepted
time: 386ms
memory: 1292kb

input:

100000
910618
480238
557006
382094
222413
262756
979754
398020
97079
832687
926566
672083
119602
892...

output:

999999
488888
566666
388888
233333
266666
999999
399999
99999
888888
999999
677777
122222
899999
166...

result:

ok 100000 numbers

Subtask #3:

score: 20
Accepted

Test #9:

score: 20
Accepted
time: 9ms
memory: 1288kb

input:

1000
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...

output:

11
11
11
11
11
11
11
11
11
11
12
13
14
15
16
17
18
19
22
22
22
23
24
25
26
27
28
29
33
33
33
33
34
3...

result:

ok 1000 numbers

Test #10:

score: 0
Accepted
time: 411ms
memory: 1288kb

input:

100000
791885
996289
805204
986137
703132
318696
858261
389943
933851
897127
577120
60042
361457
207...

output:

799999
999999
888888
999999
777777
333333
888888
399999
999999
899999
577777
66666
366666
222222
444...

result:

ok 100000 numbers

Test #11:

score: 0
Accepted
time: 421ms
memory: 1292kb

input:

100000
76669
179333
310815
282354
615528
971444
613724
860454
570634
864147
616125
973124
690369
274...

output:

77777
188888
333333
288888
666666
999999
666666
888888
577777
888888
666666
999999
699999
277777
377...

result:

ok 100000 numbers

Test #12:

score: 0
Accepted
time: 486ms
memory: 1292kb

input:

100000
75255
741782
126696
900280
714940
143835
389796
422901
718487
84640
442488
13359
930886
10213...

output:

77777
777777
133333
999999
777777
144444
399999
444444
777777
88888
444444
14444
999999
111111
88888...

result:

ok 100000 numbers

Test #13:

score: 0
Accepted
time: 511ms
memory: 1292kb

input:

100000
855981
277549
752560
220220
932997
843726
15023
373016
587923
901308
327341
327424
591901
952...

output:

888888
277777
777777
222222
999999
888888
15555
377777
588888
999999
333333
333333
599999
999999
777...

result:

ok 100000 numbers

Test #14:

score: 0
Accepted
time: 502ms
memory: 1288kb

input:

100000
267564
759047
22743
537454
337141
640550
949526
773573
353488
793499
124460
155074
956945
150...

output:

277777
777777
23333
555555
344444
666666
999999
777777
355555
799999
133333
155555
999999
155555
455...

result:

ok 100000 numbers

Test #15:

score: 0
Accepted
time: 455ms
memory: 1292kb

input:

100000
910618
480238
557006
382094
222413
262756
979754
398020
97079
832687
926566
672083
119602
892...

output:

999999
488888
566666
388888
233333
266666
999999
399999
99999
888888
999999
677777
122222
899999
166...

result:

ok 100000 numbers

Test #16:

score: 0
Accepted
time: 553ms
memory: 1292kb

input:

100000
204631512
20956440
792187166
690879520
179965485
993816058
88227972
335903751
582690390
73231...

output:

222222222
22222222
799999999
699999999
188888888
999999999
88888888
344444444
588888888
777777777
79...

result:

ok 100000 numbers

Test #17:

score: 0
Accepted
time: 561ms
memory: 1292kb

input:

100000
869114016
547228929
980628037
217936747
911856585
352362651
25674811
23091409
930632433
83232...

output:

888888888
555555555
999999999
222222222
999999999
355555555
26666666
23333333
999999999
888888888
77...

result:

ok 100000 numbers

Test #18:

score: 0
Accepted
time: 387ms
memory: 1292kb

input:

100000
524784921
873820765
252996945
657851506
231191546
632342190
302821594
478283608
486126882
669...

output:

555555555
888888888
255555555
666666666
233333333
666666666
333333333
488888888
488888888
677777777
...

result:

ok 100000 numbers

Test #19:

score: 0
Accepted
time: 459ms
memory: 1292kb

input:

100000
869636992
54908734
810009406
911602295
544714769
989346733
518141638
79361232
455135330
81875...

output:

888888888
55555555
888888888
999999999
555555555
999999999
555555555
79999999
455555555
888888888
23...

result:

ok 100000 numbers

Test #20:

score: 0
Accepted
time: 404ms
memory: 1288kb

input:

100000
466755805
782420093
576017457
765294983
312310203
252250401
348429878
791934642
401236947
975...

output:

477777777
788888888
577777777
777777777
333333333
255555555
355555555
799999999
444444444
99999999
5...

result:

ok 100000 numbers

Test #21:

score: 0
Accepted
time: 485ms
memory: 1292kb

input:

100000
773704693
421095157
727753394
103572001
82761780
324644756
769999908
35468778
534828451
66948...

output:

777777777
444444444
777777777
111111111
88888888
333333333
777777777
35555555
555555555
677777777
99...

result:

ok 100000 numbers

Test #22:

score: 0
Accepted
time: 532ms
memory: 1288kb

input:

100000
308215273
401823708
668336802
987213434
2686821
995101578
442093388
44997103
310929497
490497...

output:

333333333
444444444
677777777
999999999
2777777
999999999
444444444
45555555
333333333
499999999
222...

result:

ok 100000 numbers

Test #23:

score: 0
Accepted
time: 554ms
memory: 1288kb

input:

100000
733609784
891164818
752996165
615733149
735251016
561631495
38742297
562696713
292894880
9017...

output:

777777777
899999999
777777777
666666666
777777777
566666666
38888888
566666666
299999999
999999999
3...

result:

ok 100000 numbers

Test #24:

score: 0
Accepted
time: 465ms
memory: 1292kb

input:

100000
809586330
128170534
293195140
193456064
880600093
121785887
564594516
929761574
731956706
367...

output:

888888888
133333333
299999999
199999999
888888888
122222222
566666666
999999999
777777777
377777777
...

result:

ok 100000 numbers

Test #25:

score: 0
Accepted
time: 380ms
memory: 1288kb

input:

100000
788495073
433807760
452982272
601925562
2582556
555042397
132007359
477960671
478885287
84905...

output:

788888888
444444444
455555555
666666666
2666666
555555555
133333333
488888888
488888888
888888888
88...

result:

ok 100000 numbers

Test #26:

score: 0
Accepted
time: 455ms
memory: 1292kb

input:

100000
27584880
5657341
756998164
94725165
997591456
251374516
224908912
431084988
228771236
6808586...

output:

27777777
5666666
777777777
99999999
999999999
255555555
233333333
444444444
233333333
688888888
9999...

result:

ok 100000 numbers

Test #27:

score: 0
Accepted
time: 420ms
memory: 1292kb

input:

100000
223894334
187152382
444943494
884464120
82172896
247451422
538618827
377625836
416387621
2289...

output:

233333333
188888888
455555555
888888888
88888888
255555555
555555555
377777777
444444444
233333333
9...

result:

ok 100000 numbers

Test #28:

score: 0
Accepted
time: 553ms
memory: 1292kb

input:

100000
713875491
878619150
951564612
764943587
719908618
104071863
105599166
323892296
674035577
464...

output:

777777777
888888888
999999999
777777777
777777777
111111111
111111111
333333333
677777777
466666666
...

result:

ok 100000 numbers

Subtask #4:

score: 40
Accepted

Test #29:

score: 40
Accepted
time: 3ms
memory: 1288kb

input:

1000
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...

output:

11
11
11
11
11
11
11
11
11
11
12
13
14
15
16
17
18
19
22
22
22
23
24
25
26
27
28
29
33
33
33
33
34
3...

result:

ok 1000 numbers

Test #30:

score: 0
Accepted
time: 514ms
memory: 1288kb

input:

100000
791885
996289
805204
986137
703132
318696
858261
389943
933851
897127
577120
60042
361457
207...

output:

799999
999999
888888
999999
777777
333333
888888
399999
999999
899999
577777
66666
366666
222222
444...

result:

ok 100000 numbers

Test #31:

score: 0
Accepted
time: 412ms
memory: 1292kb

input:

100000
76669
179333
310815
282354
615528
971444
613724
860454
570634
864147
616125
973124
690369
274...

output:

77777
188888
333333
288888
666666
999999
666666
888888
577777
888888
666666
999999
699999
277777
377...

result:

ok 100000 numbers

Test #32:

score: 0
Accepted
time: 467ms
memory: 1292kb

input:

100000
75255
741782
126696
900280
714940
143835
389796
422901
718487
84640
442488
13359
930886
10213...

output:

77777
777777
133333
999999
777777
144444
399999
444444
777777
88888
444444
14444
999999
111111
88888...

result:

ok 100000 numbers

Test #33:

score: 0
Accepted
time: 298ms
memory: 1292kb

input:

100000
855981
277549
752560
220220
932997
843726
15023
373016
587923
901308
327341
327424
591901
952...

output:

888888
277777
777777
222222
999999
888888
15555
377777
588888
999999
333333
333333
599999
999999
777...

result:

ok 100000 numbers

Test #34:

score: 0
Accepted
time: 350ms
memory: 1292kb

input:

100000
267564
759047
22743
537454
337141
640550
949526
773573
353488
793499
124460
155074
956945
150...

output:

277777
777777
23333
555555
344444
666666
999999
777777
355555
799999
133333
155555
999999
155555
455...

result:

ok 100000 numbers

Test #35:

score: 0
Accepted
time: 485ms
memory: 1288kb

input:

100000
910618
480238
557006
382094
222413
262756
979754
398020
97079
832687
926566
672083
119602
892...

output:

999999
488888
566666
388888
233333
266666
999999
399999
99999
888888
999999
677777
122222
899999
166...

result:

ok 100000 numbers

Test #36:

score: 0
Accepted
time: 513ms
memory: 1288kb

input:

100000
204631512
20956440
792187166
690879520
179965485
993816058
88227972
335903751
582690390
73231...

output:

222222222
22222222
799999999
699999999
188888888
999999999
88888888
344444444
588888888
777777777
79...

result:

ok 100000 numbers

Test #37:

score: 0
Accepted
time: 475ms
memory: 1288kb

input:

100000
869114016
547228929
980628037
217936747
911856585
352362651
25674811
23091409
930632433
83232...

output:

888888888
555555555
999999999
222222222
999999999
355555555
26666666
23333333
999999999
888888888
77...

result:

ok 100000 numbers

Test #38:

score: 0
Accepted
time: 508ms
memory: 1288kb

input:

100000
524784921
873820765
252996945
657851506
231191546
632342190
302821594
478283608
486126882
669...

output:

555555555
888888888
255555555
666666666
233333333
666666666
333333333
488888888
488888888
677777777
...

result:

ok 100000 numbers

Test #39:

score: 0
Accepted
time: 476ms
memory: 1288kb

input:

100000
869636992
54908734
810009406
911602295
544714769
989346733
518141638
79361232
455135330
81875...

output:

888888888
55555555
888888888
999999999
555555555
999999999
555555555
79999999
455555555
888888888
23...

result:

ok 100000 numbers

Test #40:

score: 0
Accepted
time: 545ms
memory: 1288kb

input:

100000
466755805
782420093
576017457
765294983
312310203
252250401
348429878
791934642
401236947
975...

output:

477777777
788888888
577777777
777777777
333333333
255555555
355555555
799999999
444444444
99999999
5...

result:

ok 100000 numbers

Test #41:

score: 0
Accepted
time: 456ms
memory: 1292kb

input:

100000
773704693
421095157
727753394
103572001
82761780
324644756
769999908
35468778
534828451
66948...

output:

777777777
444444444
777777777
111111111
88888888
333333333
777777777
35555555
555555555
677777777
99...

result:

ok 100000 numbers

Test #42:

score: 0
Accepted
time: 332ms
memory: 1288kb

input:

100000
308215273
401823708
668336802
987213434
2686821
995101578
442093388
44997103
310929497
490497...

output:

333333333
444444444
677777777
999999999
2777777
999999999
444444444
45555555
333333333
499999999
222...

result:

ok 100000 numbers

Test #43:

score: 0
Accepted
time: 464ms
memory: 1288kb

input:

100000
733609784
891164818
752996165
615733149
735251016
561631495
38742297
562696713
292894880
9017...

output:

777777777
899999999
777777777
666666666
777777777
566666666
38888888
566666666
299999999
999999999
3...

result:

ok 100000 numbers

Test #44:

score: 0
Accepted
time: 422ms
memory: 1288kb

input:

100000
809586330
128170534
293195140
193456064
880600093
121785887
564594516
929761574
731956706
367...

output:

888888888
133333333
299999999
199999999
888888888
122222222
566666666
999999999
777777777
377777777
...

result:

ok 100000 numbers

Test #45:

score: 0
Accepted
time: 549ms
memory: 1288kb

input:

100000
788495073
433807760
452982272
601925562
2582556
555042397
132007359
477960671
478885287
84905...

output:

788888888
444444444
455555555
666666666
2666666
555555555
133333333
488888888
488888888
888888888
88...

result:

ok 100000 numbers

Test #46:

score: 0
Accepted
time: 439ms
memory: 1292kb

input:

100000
27584880
5657341
756998164
94725165
997591456
251374516
224908912
431084988
228771236
6808586...

output:

27777777
5666666
777777777
99999999
999999999
255555555
233333333
444444444
233333333
688888888
9999...

result:

ok 100000 numbers

Test #47:

score: 0
Accepted
time: 447ms
memory: 1288kb

input:

100000
223894334
187152382
444943494
884464120
82172896
247451422
538618827
377625836
416387621
2289...

output:

233333333
188888888
455555555
888888888
88888888
255555555
555555555
377777777
444444444
233333333
9...

result:

ok 100000 numbers

Test #48:

score: 0
Accepted
time: 548ms
memory: 1292kb

input:

100000
713875491
878619150
951564612
764943587
719908618
104071863
105599166
323892296
674035577
464...

output:

777777777
888888888
999999999
777777777
777777777
111111111
111111111
333333333
677777777
466666666
...

result:

ok 100000 numbers

Test #49:

score: 0
Accepted
time: 559ms
memory: 1288kb

input:

100000
135806718865277604
433488697237064428
104487668799067799
948885847794268359
98025964281514892...

output:

144444444444444444
444444444444444444
111111111111111111
999999999999999999
999999999999999999
77777...

result:

ok 100000 numbers

Test #50:

score: 0
Accepted
time: 532ms
memory: 1288kb

input:

100000
106135626176533121
555020125180187154
316652399333242543
973473114695245588
92133469947500826...

output:

111111111111111111
555555555555555555
333333333333333333
999999999999999999
999999999999999999
88888...

result:

ok 100000 numbers

Test #51:

score: 0
Accepted
time: 564ms
memory: 1292kb

input:

100000
61598567673726352
761464049262880695
441620432464491623
206113875091745308
509979109073625981...

output:

66666666666666666
777777777777777777
444444444444444444
222222222222222222
555555555555555555
255555...

result:

ok 100000 numbers

Test #52:

score: 0
Accepted
time: 609ms
memory: 1292kb

input:

100000
610728551146268685
544077509021535915
552254934657603776
186850680463437923
61438306376597082...

output:

666666666666666666
555555555555555555
555555555555555555
188888888888888888
666666666666666666
88888...

result:

ok 100000 numbers

Test #53:

score: 0
Accepted
time: 753ms
memory: 1288kb

input:

100000
221325362891781877
283282778996982447
181945670066002485
498287212696667548
29617078490571872...

output:

222222222222222222
288888888888888888
188888888888888888
499999999999999999
299999999999999999
26666...

result:

ok 100000 numbers

Test #54:

score: 0
Accepted
time: 735ms
memory: 1292kb

input:

100000
989966448027055407
356649534510123657
770534619313038589
644476959966555213
14089574443689030...

output:

999999999999999999
366666666666666666
777777777777777777
666666666666666666
144444444444444444
66666...

result:

ok 100000 numbers

Test #55:

score: 0
Accepted
time: 694ms
memory: 1288kb

input:

100000
769770128868128156
727784173161057103
66793427791784278
859531129851852794
56987278123557650
...

output:

777777777777777777
777777777777777777
67777777777777777
888888888888888888
57777777777777777
5555555...

result:

ok 100000 numbers

Test #56:

score: 0
Accepted
time: 599ms
memory: 1292kb

input:

100000
593243610995045793
803911216827697168
178899163965063569
754056407405078490
31502323648137596...

output:

599999999999999999
888888888888888888
188888888888888888
777777777777777777
333333333333333333
66666...

result:

ok 100000 numbers

Test #57:

score: 0
Accepted
time: 503ms
memory: 1288kb

input:

100000
599334438573826643
902933829771470860
354863876550704530
208855086312372513
60743677404092404...

output:

599999999999999999
999999999999999999
355555555555555555
222222222222222222
666666666666666666
88888...

result:

ok 100000 numbers

Test #58:

score: 0
Accepted
time: 566ms
memory: 1288kb

input:

100000
122116544709140049
265252587530607357
313807953473911896
965672232591794164
10691417836808958...

output:

122222222222222222
266666666666666666
333333333333333333
999999999999999999
111111111111111111
99999...

result:

ok 100000 numbers

Test #59:

score: 0
Accepted
time: 675ms
memory: 1292kb

input:

100000
961813054521340322
714329540394713443
157740139971296334
193534091951764769
24818346608623463...

output:

999999999999999999
777777777777777777
166666666666666666
199999999999999999
255555555555555555
13333...

result:

ok 100000 numbers

Test #60:

score: 0
Accepted
time: 573ms
memory: 1288kb

input:

100000
384150205026529238
411826874839147290
913985552940591499
690156252519155839
77517610536828867...

output:

388888888888888888
444444444444444444
999999999999999999
699999999999999999
777777777777777777
77777...

result:

ok 100000 numbers

Test #61:

score: 0
Accepted
time: 727ms
memory: 1292kb

input:

100000
716701363199871577
761517966597813511
572208514428425478
518191776202812689
51233856474665621...

output:

777777777777777777
777777777777777777
577777777777777777
555555555555555555
555555555555555555
78888...

result:

ok 100000 numbers

Test #62:

score: 0
Accepted
time: 713ms
memory: 1288kb

input:

100000
866002114898496117
288821163646833298
260203039260106915
359775780462472042
50406121242595092...

output:

888888888888888888
288888888888888888
266666666666666666
366666666666666666
555555555555555555
88888...

result:

ok 100000 numbers

Test #63:

score: 0
Accepted
time: 668ms
memory: 1292kb

input:

100000
178512833719899879
958915724234018449
146350458717087463
987212499939273494
44015665795214376...

output:

188888888888888888
999999999999999999
155555555555555555
999999999999999999
444444444444444444
16666...

result:

ok 100000 numbers

Test #64:

score: 0
Accepted
time: 714ms
memory: 1292kb

input:

100000
847431928027754874
389870430803780133
313585719684874124
184438049668529787
54260429255295819...

output:

888888888888888888
399999999999999999
333333333333333333
188888888888888888
555555555555555555
67777...

result:

ok 100000 numbers

Test #65:

score: 0
Accepted
time: 779ms
memory: 1288kb

input:

100000
719639118078249762
500551493719809251
484788738806260311
936838895561809008
64708890199082087...

output:

777777777777777777
555555555555555555
488888888888888888
999999999999999999
666666666666666666
77777...

result:

ok 100000 numbers

Test #66:

score: 0
Accepted
time: 758ms
memory: 1288kb

input:

100000
805807415541392382
287775486701650902
591754475467285207
811294079446584196
17824279480108501...

output:

888888888888888888
288888888888888888
599999999999999999
888888888888888888
188888888888888888
27777...

result:

ok 100000 numbers

Test #67:

score: 0
Accepted
time: 615ms
memory: 1292kb

input:

100000
429323348614098216
309981497389054748
944391299738343424
930911194869734738
84098070156155985...

output:

444444444444444444
333333333333333333
999999999999999999
999999999999999999
888888888888888888
44444...

result:

ok 100000 numbers

Test #68:

score: 0
Accepted
time: 577ms
memory: 1292kb

input:

100000
438130380620493725
589475624316289619
293852453429496333
556517055212959614
48391937499661027...

output:

444444444444444444
599999999999999999
299999999999999999
566666666666666666
488888888888888888
69999...

result:

ok 100000 numbers

Test #69:

score: 0
Accepted
time: 713ms
memory: 1292kb

input:

100000
102320004124357224
361366105341232528
823873681636625944
330151888571065217
86991043708178461...

output:

111111111111111111
366666666666666666
888888888888888888
333333333333333333
888888888888888888
47777...

result:

ok 100000 numbers

Test #70:

score: 0
Accepted
time: 642ms
memory: 1288kb

input:

100000
652691070018354538
1372297897078330
390955416290093354
67393119642552693
68861289202571989
71...

output:

666666666666666666
1444444444444444
399999999999999999
67777777777777777
68888888888888888
777777777...

result:

ok 100000 numbers

Test #71:

score: 0
Accepted
time: 539ms
memory: 1288kb

input:

100000
930123954205924866
184348140002016782
253137071306258751
87697815523342131
463427884784303558...

output:

999999999999999999
188888888888888888
255555555555555555
88888888888888888
466666666666666666
555555...

result:

ok 100000 numbers

Test #72:

score: 0
Accepted
time: 599ms
memory: 1292kb

input:

100000
924994893690944813
883684029690909998
252356713237404721
943076381365212719
33705439103014788...

output:

999999999999999999
888888888888888888
255555555555555555
999999999999999999
344444444444444444
88888...

result:

ok 100000 numbers

Test #73:

score: 0
Accepted
time: 716ms
memory: 1288kb

input:

100000
526511481860473130
195552159341471923
911132224385521917
502959265606109118
77455915841945383...

output:

555555555555555555
199999999999999999
999999999999999999
555555555555555555
77777777777777777
477777...

result:

ok 100000 numbers

Test #74:

score: 0
Accepted
time: 457ms
memory: 1288kb

input:

100000
488704599192985472
646604004593713942
477223026392136014
437114274906607407
55672668263364925...

output:

488888888888888888
666666666666666666
477777777777777777
444444444444444444
566666666666666666
44444...

result:

ok 100000 numbers

Test #75:

score: 0
Accepted
time: 506ms
memory: 1288kb

input:

100000
582617583085728930
161989675068811849
221860481006103696
685313819960308617
98156294793425454...

output:

588888888888888888
166666666666666666
222222222222222222
688888888888888888
999999999999999999
34444...

result:

ok 100000 numbers

Test #76:

score: 0
Accepted
time: 663ms
memory: 1292kb

input:

100000
316147161637697613
19952942050198331
358858374108235543
407450159679956256
333524386476141619...

output:

333333333333333333
19999999999999999
366666666666666666
444444444444444444
344444444444444444
444444...

result:

ok 100000 numbers

Test #77:

score: 0
Accepted
time: 745ms
memory: 1288kb

input:

100000
868490133016343994
993078619964958928
47120095505689314
846090012720765289
924448538075215544...

output:

888888888888888888
999999999999999999
47777777777777777
888888888888888888
999999999999999999
177777...

result:

ok 100000 numbers

Test #78:

score: 0
Accepted
time: 709ms
memory: 1292kb

input:

100000
474246755681434468
598886362822377170
862172349467990524
934823691849366675
54482834139515953...

output:

477777777777777777
599999999999999999
888888888888888888
999999999999999999
555555555555555555
33333...

result:

ok 100000 numbers

Test #79:

score: 0
Accepted
time: 735ms
memory: 1288kb

input:

100000
364880861476033835
370327918309246470
648683232950281588
658677384376679977
29603503126686858...

output:

366666666666666666
377777777777777777
666666666666666666
666666666666666666
299999999999999999
55555...

result:

ok 100000 numbers

Test #80:

score: 0
Accepted
time: 670ms
memory: 1292kb

input:

100000
24443607989259101
873019653270635421
956479244514119188
99795926011673151
971385144643662640
...

output:

24444444444444444
888888888888888888
999999999999999999
99999999999999999
999999999999999999
6666666...

result:

ok 100000 numbers

Test #81:

score: 0
Accepted
time: 536ms
memory: 1292kb

input:

100000
203971687459882218
239230220478813187
165932540015791802
817472658870618384
38571912297844983...

output:

222222222222222222
244444444444444444
166666666666666666
888888888888888888
388888888888888888
77777...

result:

ok 100000 numbers

Test #82:

score: 0
Accepted
time: 765ms
memory: 1292kb

input:

100000
60402453536471065
744864811358093975
996478974297900551
209976722510654002
621621047623407201...

output:

66666666666666666
777777777777777777
999999999999999999
222222222222222222
666666666666666666
455555...

result:

ok 100000 numbers

Test #83:

score: 0
Accepted
time: 753ms
memory: 1292kb

input:

100000
903650723553515588
684025018732685582
370340980774521502
589845519821365956
12968313242313700...

output:

999999999999999999
688888888888888888
377777777777777777
599999999999999999
133333333333333333
38888...

result:

ok 100000 numbers

Test #84:

score: 0
Accepted
time: 459ms
memory: 1288kb

input:

100000
384555579688474880
512682384521072245
918463302851992791
822748563403178323
65639632220276958...

output:

388888888888888888
555555555555555555
999999999999999999
888888888888888888
666666666666666666
99999...

result:

ok 100000 numbers

Test #85:

score: 0
Accepted
time: 546ms
memory: 1288kb

input:

100000
78265529123924022
788196317722160912
184801737767250048
305113810741683078
916217444260075494...

output:

78888888888888888
788888888888888888
188888888888888888
333333333333333333
999999999999999999
266666...

result:

ok 100000 numbers

Test #86:

score: 0
Accepted
time: 696ms
memory: 1292kb

input:

100000
739566871206687450
327804179745846072
704228269330174069
89057774941827466
25281995289561404
...

output:

777777777777777777
333333333333333333
777777777777777777
89999999999999999
25555555555555555
2999999...

result:

ok 100000 numbers

Test #87:

score: 0
Accepted
time: 495ms
memory: 1292kb

input:

100000
30160623328444125
596747087162018349
672021305005583740
982825818266335703
577091079637421242...

output:

33333333333333333
599999999999999999
677777777777777777
999999999999999999
577777777777777777
999999...

result:

ok 100000 numbers

Test #88:

score: 0
Accepted
time: 416ms
memory: 1292kb

input:

100000
315652227948018680
913581931316755164
576930484710921438
394731485201149295
29966354540229791...

output:

333333333333333333
999999999999999999
577777777777777777
399999999999999999
299999999999999999
88888...

result:

ok 100000 numbers

Test #89:

score: 0
Accepted
time: 632ms
memory: 1288kb

input:

100000
518584998474046963
99457154502034132
48222669594110686
611752215692020458
249604475819631374
...

output:

555555555555555555
99999999999999999
48888888888888888
666666666666666666
255555555555555555
2555555...

result:

ok 100000 numbers

Test #90:

score: 0
Accepted
time: 653ms
memory: 1292kb

input:

100000
8371770621326201
900218389090895412
673185173868081614
341189662996528322
679368673704817715
...

output:

8888888888888888
999999999999999999
677777777777777777
344444444444444444
688888888888888888
4666666...

result:

ok 100000 numbers

Test #91:

score: 0
Accepted
time: 689ms
memory: 1288kb

input:

100000
300622610936656914
843253295603061639
499173522005063035
54161159009932985
443067942016401052...

output:

333333333333333333
888888888888888888
499999999999999999
55555555555555555
444444444444444444
777777...

result:

ok 100000 numbers

Test #92:

score: 0
Accepted
time: 386ms
memory: 1288kb

input:

100000
7871615609823805
982889236495458011
970334637820576870
82380926395487999
325977055489605299
1...

output:

7888888888888888
999999999999999999
999999999999999999
88888888888888888
333333333333333333
12222222...

result:

ok 100000 numbers

Test #93:

score: 0
Accepted
time: 561ms
memory: 1292kb

input:

100000
655467949324093491
636570948980988459
811451263257420555
503412971458688950
55969669176954154...

output:

666666666666666666
666666666666666666
888888888888888888
555555555555555555
566666666666666666
78888...

result:

ok 100000 numbers

Test #94:

score: 0
Accepted
time: 438ms
memory: 1292kb

input:

100000
977108678972288043
778251095594358237
939372025090715632
991600912066475617
76399837295379124...

output:

999999999999999999
788888888888888888
999999999999999999
999999999999999999
777777777777777777
66666...

result:

ok 100000 numbers

Test #95:

score: 0
Accepted
time: 775ms
memory: 1292kb

input:

100000
278478666293030131
719243870346151858
489285647036823226
344323011148833357
81858180780379155...

output:

288888888888888888
777777777777777777
499999999999999999
344444444444444444
888888888888888888
66666...

result:

ok 100000 numbers

Test #96:

score: 0
Accepted
time: 623ms
memory: 1288kb

input:

100000
418103092517451101
8812751985149652
77042714579852743
472791489301702898
733222981735215708
1...

output:

444444444444444444
8888888888888888
77777777777777777
477777777777777777
777777777777777777
16666666...

result:

ok 100000 numbers

Test #97:

score: 0
Accepted
time: 643ms
memory: 1292kb

input:

100000
288261622024300005
733440912184386673
389121068751170413
62858002944554478
202376154729042748...

output:

288888888888888888
777777777777777777
399999999999999999
66666666666666666
222222222222222222
233333...

result:

ok 100000 numbers

Test #98:

score: 0
Accepted
time: 632ms
memory: 1288kb

input:

100000
39949649565646771
793967908714427187
451939469916072478
257449842508031906
958154235934639159...

output:

39999999999999999
799999999999999999
455555555555555555
266666666666666666
999999999999999999
177777...

result:

ok 100000 numbers

Test #99:

score: 0
Accepted
time: 724ms
memory: 1292kb

input:

100000
277734849983943825
490680733959469035
322168945880807088
730818571898321785
77277045215438525...

output:

277777777777777777
499999999999999999
333333333333333333
777777777777777777
777777777777777777
56666...

result:

ok 100000 numbers

Test #100:

score: 0
Accepted
time: 775ms
memory: 1288kb

input:

100000
176821756905379967
736964080376654768
591767848427164587
826429686109076687
27850307135109147...

output:

177777777777777777
777777777777777777
599999999999999999
888888888888888888
288888888888888888
77777...

result:

ok 100000 numbers

Test #101:

score: 0
Accepted
time: 683ms
memory: 1288kb

input:

100000
974602464271334994
747474015460747636
623974008707484348
147943032678674691
98364551302838006...

output:

999999999999999999
777777777777777777
666666666666666666
155555555555555555
999999999999999999
14444...

result:

ok 100000 numbers

Test #102:

score: 0
Accepted
time: 510ms
memory: 1292kb

input:

100000
798216025894642713
519175024746842636
598975747938125625
213008430152261493
87197934519858086...

output:

799999999999999999
555555555555555555
599999999999999999
222222222222222222
888888888888888888
99999...

result:

ok 100000 numbers

Test #103:

score: 0
Accepted
time: 561ms
memory: 1292kb

input:

100000
654700450930267214
365319451968541382
94448792417266742
204703390202608706
819203149837466607...

output:

666666666666666666
366666666666666666
99999999999999999
222222222222222222
888888888888888888
388888...

result:

ok 100000 numbers

Test #104:

score: 0
Accepted
time: 525ms
memory: 1292kb

input:

100000
167476884224546880
2570101450933050
664355344808132135
675307011556844573
877607480996630490
...

output:

177777777777777777
2666666666666666
666666666666666666
677777777777777777
888888888888888888
8888888...

result:

ok 100000 numbers

Test #105:

score: 0
Accepted
time: 400ms
memory: 1288kb

input:

100000
56533959011798455
322329340368230881
447711424423965971
173011400533899238
189687037258693402...

output:

56666666666666666
333333333333333333
455555555555555555
177777777777777777
199999999999999999
566666...

result:

ok 100000 numbers

Test #106:

score: 0
Accepted
time: 312ms
memory: 1292kb

input:

100000
705309327801724917
741177227633713866
114873201543071174
880786012627336366
92066580096804150...

output:

777777777777777777
777777777777777777
122222222222222222
888888888888888888
999999999999999999
48888...

result:

ok 100000 numbers

Test #107:

score: 0
Accepted
time: 726ms
memory: 1292kb

input:

100000
274827764866369586
187363161593124694
824239345628051347
348152008344370117
79214788120800053...

output:

277777777777777777
188888888888888888
888888888888888888
355555555555555555
799999999999999999
44444...

result:

ok 100000 numbers

Test #108:

score: 0
Accepted
time: 570ms
memory: 1292kb

input:

100000
988736514910493067
332815315621413468
921231936095011568
113319738833290419
48063638947163076...

output:

999999999999999999
333333333333333333
999999999999999999
122222222222222222
488888888888888888
88888...

result:

ok 100000 numbers