TopCoder

FHVirus
想像不出自己 AC 的題目是實作不出來的!

User's AC Ratio

95.1% (77/81)

Submission's AC Ratio

48.4% (109/225)

Tags

Description

有寫過 A + B problem ?
是否總覺得 A + B 太過於單調?
沒關係, 現在 A! + B! problem 來了!!!
然而, 有鑒於 A! + B! 實在太大了,
和善的乃牛決定, 你只需要輸出 A! + B! 有幾種質因數便可!!

Input Format

測試檔中包含了許多行,
每行包含兩個數字 A, B.
測試檔以 EOF 為結尾.
(1 <= 行數 <= 20)
(1 <= A, B <= 1000000)
(max(A!, B!) / min(A!, B!) <= 1000000000000)

Output Format

對於每組 A, B 請輸出一行.
該行包含一個數字表示 A! + B! 有幾種質因數.

Sample Input 1

2 3
3 4
1 13

Sample Output 1

1
3
2

Hints

Problem Source

原TIOJ1615 / Problem Setter:worm

Subtasks

No. Testdata Range Score
1 0 20
2 1 20
3 2 20
4 3 20
5 4 20

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 262144 1
1 1000 65536 262144 2
2 1000 65536 262144 3
3 1000 65536 262144 4
4 1000 65536 262144 5