The Sum of Unitary Totient

TimeLimit: 2000ms  MemoryLimit:65536KB
64-bit integer IO format:%lld
未提交 | 登录后收藏
Problem Description

Let d is the divisor of n, then d is called unitary divisor of n if the greatest common divisor of d and n/d is 1.

Let Φ* is the unitary totient function defined as Φ*(n)=(p1a1-1)(p2a2-1)...(prar-1) for n=p1a1p2a2...prar where p1, p2, ..., pr are different prime numbers.

You can also find unitary totient function on this oeis page for more information.

Your task is to calculate the sum of Φ*(1), Φ*(2), ... Φ*(n), which n can be up to 109.

Input

There are about 200 cases. Each case is a positive integer number n in a line. (n≤ 109)

Output

For each case, output the sum of Φ*(1), Φ*(2), ... Φ*(n).

Sample Input

6
99
100

Sample Output

13
3475
3547
Output
ZHOU, Yuchen
SampleInput And SampleOutput
NULL
Submit
题目统计信息详细
总AC数0
通过人数0
尝试人数0
总提交量0
AC率0.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签
出处

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: