C. [R3C]公因数求和

    Type: Default 1000ms 512MiB

[R3C]公因数求和

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

时空限制

1S/512M

题目描述

给定正整数 aabb,求所有 aabb 公因数的和。

格式

输入格式

第一行包含 22 个正整数 aabb

输出格式

输出一个整数,表示所有 aabb 公因数的和。

样例

样例输入 #1

36 90

样例输出 #1

39

样例解释 #1

36369090 共有 66 个公因数:11223366991818

所以答案为 1+2+3+6+9+18=391+2+3+6+9+18=39

数据规模

对于 50%50\% 的数据, 1a,b1061\leq a,b\leq 10^{6}

另有 10%10\% 的数据, a=ba=b

对于 100%100\% 的数据, 1a,b10121\leq a,b\leq 10^{12}

代码源挑战赛 Round 3

Not Attended
Status
Done
Rule
DMY
Problem
6
Start at
2025-3-14 20:00
End at
2025-3-14 21:30
Duration
1.5 hour(s)
Host
Partic.
502