TopCoder

Adrien Wu
$ \begin{align} AC \times 2^9 \\ \text{New TIOJ ?} \end{align} $

User's AC Ratio

26.4% (32/121)

Submission's AC Ratio

11.1% (198/1782)

Tags

Description

請計算$a\times b$。

Input Format

兩行各一個正整數,第一行代表$a$、第二行代表$b$。

子任務(測資) 額外限制 分數
1 (0~4) $a,b\leq 4\times 10^ 4$ 8
2 (0~9) $a,b\leq 4\times 10^ 9$ 13
3 (0~14) $a,b\leq 10^ {10^ 5}$ 26
4 (0~19) $a,b\leq 10^ {5\times 10^ 5}$ 26
5 (0~24) $a,b\leq 10^ {3\times 10^ 6}$ 27

Output Format

輸出一行包含一個數字,代表$a\times b$的結果。

Sample Input 1

135372
88762

Sample Output 1

12015889464

Hints

Subtask 3: Elementary
Subtask 4: Karatsuba
Subtask 5: NTT
不要懷疑,你絕對沒有看錯。

你可以試著把很多位數壓在同一個數字喔(?

Problem Source

Problem Set by Yihda Yol

Subtasks

No. Testdata Range Score
1 0~4 8
2 0~9 13
3 0~14 26
4 0~19 26
5 0~24 27

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 900 262144 262144 1 2 3 4 5
1 900 262144 262144 1 2 3 4 5
2 900 262144 262144 1 2 3 4 5
3 900 262144 262144 1 2 3 4 5
4 900 262144 262144 1 2 3 4 5
5 900 262144 262144 2 3 4 5
6 900 262144 262144 2 3 4 5
7 900 262144 262144 2 3 4 5
8 900 262144 262144 2 3 4 5
9 900 262144 262144 2 3 4 5
10 900 262144 262144 3 4 5
11 900 262144 262144 3 4 5
12 900 262144 262144 3 4 5
13 900 262144 262144 3 4 5
14 900 262144 262144 3 4 5
15 900 262144 262144 4 5
16 900 262144 262144 4 5
17 900 262144 262144 4 5
18 900 262144 262144 4 5
19 900 262144 262144 4 5
20 2500 262144 262144 5
21 2500 262144 262144 5
22 2500 262144 262144 5
23 2500 262144 262144 5
24 2500 262144 262144 5