1422 问题 E: m and n

时间限制: 1s 内存限制: 128MB 提交: 62 解决: 8
题目描述

S(m,n) = { k1, k2, k3, ..., kx }, Each ki can meet n % ki + m % ki >= ki. Now output the sum of phi(ki) , (1<= i <=x) which stands for the number of ki's relatively prime which are smaller than ki .

输入

Input contains multiple test cases, no more than 100. Each has a line contains two integer m , n (1<=m,n<108).

输出

For each test cases, output the sum of phi(ki) (1<=i<=x).

样例输入
2 3
样例输出
6
提示
零基础同学可以先学习视频课程,包含C/C++、Python、百练、蓝桥杯辅导、算法数据结构等课程,提供视频讲解以及配套习题,还有老师答疑,点击这里了解课程详情

比赛公告

七月月赛  大家加油!

本次月赛奖品高级鼠标一个!