1 01 Example test 1 (n = 10, m = 3, ans = 13)
\r
2 02 min n, min m (n = 1, m = 1, ans = 239)
\r
3 03 min n, min m (n = 1, m = 1, ans = 1000)
\r
4 04 n = 7, m = 2, ans = 718
\r
5 05 n = 13, m = 5, ans = 999
\r
6 06 n = 239, m = 15, ans = 1
\r
7 07 n = 1, m = 100, ans = 566
\r
8 08 n = 7, m = 99, ans = 1
\r
9 09 n = 97, m = 68, ans = 2
\r
10 10 n = 64, m = 17, ans = 3
\r
11 11 n = 54, m = 83, ans = 4
\r
12 12 n = 55, m = 88, ans = 5
\r
13 13 n = 35103, m = 57, ans = 362
\r
14 14 n = 1, m = 26, ans = 209
\r
15 15 n = 98480, m = 63, ans = 302
\r
16 16 n = 68, m = 76, ans = 248
\r
17 17 n = 52602, m = 90, ans = 205
\r
18 18 n = 55, m = 4, ans = 190
\r
19 19 n = 44237, m = 90, ans = 301
\r
20 20 n = 51, m = 32, ans = 304
\r
21 21 n = 50631, m = 77, ans = 195
\r
22 22 n = 7, m = 59, ans = 395
\r
23 23 n = 992987, m = 97, ans = 508
\r
24 24 n = 13, m = 95, ans = 677
\r
25 25 n = 999018, m = 100, ans = 858
\r
26 26 n = 161, m = 99, ans = 747
\r
27 27 n = 993884, m = 93, ans = 921
\r
28 28 n = 604, m = 93, ans = 775
\r
29 29 n = 995536, m = 91, ans = 708
\r
30 30 n = 822, m = 98, ans = 539
\r
31 31 n = 998664, m = 94, ans = 840
\r
32 32 n = 215, m = 94, ans = 600
\r
33 33 big n, big m, big answer (n = 995752, m = 100, ans = 1270)
\r
34 34 big n, big m, big answer (n = 993944, m = 91, ans = 1050)
\r
35 35 big n, big m, big answer (n = 993854, m = 92, ans = 1338)
\r
36 36 big n, big m, big answer (n = 994154, m = 94, ans = 1486)
\r
37 37 big n, big m, big answer (n = 998646, m = 96, ans = 1042)
\r
38 38 big n, big m, big answer (n = 999816, m = 91, ans = 1693)
\r
39 39 big n, big m, big answer (n = 999639, m = 92, ans = 1655)
\r
40 40 big n, big m, big answer (n = 999528, m = 100, ans = 1816)
\r
41 41 big n, big m, big answer (n = 999526, m = 92, ans = 1674)
\r
42 42 big n, big m, big answer (n = 999106, m = 94, ans = 1877)
\r
43 43 max n, max m, big answer (n = 1000000, m = 100, ans = 1952)
\r
44 44 max n, max m, big answer (n = 1000000, m = 100, ans = 1963)
\r
45 45 max n, max m, big answer (n = 1000000, m = 100, ans = 1974)
\r
46 46 max n, max m, big answer (n = 1000000, m = 100, ans = 1982)
\r
47 47 max n, max m, big answer (n = 1000000, m = 100, ans = 1990)
\r
48 48 max n, max m, max answer (n = 1000000, m = 100, ans = 2000)
\r