Time Limit: 2000/1000 MS (Java/Others)

Memory Limit: 65536/65536 K (Java/Others)

In number theory, for a positive number N, two properties are often mentioned, one is Euler's function, short for E(N), another is factor number, short for F(N).

To be more precise for newbie, here we recall the definition of E(N) and F(N) again.

E(N) = |{i | gcd(N, i) = 1, 1 <= i <= N}|

F(N) = |{i | N % i = 0, 1 <= i <= N}|

Here |Set| indicates the different elements in the Set.

As a number fanaticism, iSea want to solve a simple problem now. Given a integer N, try to find the number of intervals [l, r], l is no bigger than r obviously, strictly fit in the interval [1, N]. It's a piece of cake for clever you, of course. But here he also has another troublesome restrict:

To be more precise for newbie, here we recall the definition of E(N) and F(N) again.

E(N) = |{i | gcd(N, i) = 1, 1 <= i <= N}|

F(N) = |{i | N % i = 0, 1 <= i <= N}|

Here |Set| indicates the different elements in the Set.

As a number fanaticism, iSea want to solve a simple problem now. Given a integer N, try to find the number of intervals [l, r], l is no bigger than r obviously, strictly fit in the interval [1, N]. It's a piece of cake for clever you, of course. But here he also has another troublesome restrict:

提交代码