cf/mirror

Mathematical Problem

CF
1986D1400· specialist2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
18
2
10
2
74
2
00
2
01
3
901
3
101
5
23311
6
987009
7
1111111
20
99999999999999999999
20
00000000000000000000
4
0212
18
057235283621345395
4
1112
20
19811678487321784121
4
1121
4
2221
3
011
Output
10
74
0
1
9
1
19
0
11
261
0
0
0
12
93
12
24
0
1986D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)