cf/mirror

Long Number

CF
1157B1300· pupil2s256 MB⌨ stdin/stdout
#greedy

Examples

Sample 1of 3
Input
4
1337
1 2 5 4 6 6 3 1 9
Output
1557
Sample 2of 3
Input
5
11111
9 8 7 6 5 4 3 2 1
Output
99999
Sample 3of 3
Input
2
33
1 1 1 1 1 1 1 1 1
Output
33
1157B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)