TopCoder

Caido
$\mathbb{W}\mathcal{aimai}\sim$

User's AC Ratio

90.5% (19/21)

Submission's AC Ratio

50.0% (36/72)

Tags

Description

Input Format

Output Format

Sample Input 1

4 4
2024
4167
4266
2024

Sample Output 1

6174
6174
6174
6174

Sample Input 2

3 5
50985
53955
95355

Sample Output 2

75933
53955
59994

Hints

Problem Source

2024 TOI 初選
測資來源:TWPCA GitHub

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 2~5 輸入滿足 $d = 3$ 或 $d = 4$ 12
3 0~1, 6~15 輸入滿足 $2 \le d \le 6$ 且 1$ \le n \le 100$ 24
4 0~35 無額外限制 64

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 1048576 65536 1 3 4
1 1000 1048576 65536 1 3 4
2 1000 1048576 65536 2 4
3 1000 1048576 65536 2 4
4 1000 1048576 65536 2 4
5 1000 1048576 65536 2 4
6 1000 1048576 65536 3 4
7 1000 1048576 65536 3 4
8 1000 1048576 65536 3 4
9 1000 1048576 65536 3 4
10 1000 1048576 65536 3 4
11 1000 1048576 65536 3 4
12 1000 1048576 65536 3 4
13 1000 1048576 65536 3 4
14 1000 1048576 65536 3 4
15 1000 1048576 65536 3 4
16 1000 1048576 65536 4
17 1000 1048576 65536 4
18 1000 1048576 65536 4
19 1000 1048576 65536 4
20 1000 1048576 65536 4
21 1000 1048576 65536 4
22 1000 1048576 65536 4
23 1000 1048576 65536 4
24 1000 1048576 65536 4
25 1000 1048576 65536 4
26 1000 1048576 65536 4
27 1000 1048576 65536 4
28 1000 1048576 65536 4
29 1000 1048576 65536 4
30 1000 1048576 65536 4
31 1000 1048576 65536 4
32 1000 1048576 65536 4
33 1000 1048576 65536 4
34 1000 1048576 65536 4
35 1000 1048576 65536 4