hiho week 144 register

Ended

Participants:1096

Verdict:Accepted
Score:100 / 100
Submitted:2017-04-03 22:17:35

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
LL n,m;
LL gcd(LL a, LL b)
{
    return b?gcd(b,a%b):a;
}
LL f(LL n)
{
    LL cnt = 1;
    int p = 1;
    for (LL i = 2; i * i <= n; i++)
    {
        while(n % i ==0)
        {
            p++;
            n/=i;
        }
        cnt*=p;
        p=1;
    }
    if (n != 1) cnt *= 2;
    return cnt;
}
int main()
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX