Cod sursa(job #1597126)
| Utilizator | Data | 11 februarie 2016 18:15:03 | |
|---|---|---|---|
| Problema | Descompuneri | Scor | 12 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.55 kb |
#include <bits/stdc++.h>
using namespace std;
long long n , w , k;
void bkt(long long stp , long long x)
{
if (x < stp)
{
if (x == 1) w++;
return ;
}
for (int j = stp ; j * j <= x ; ++j)
if (x % j == 0)
{
bkt(j , x / j);
if (j * j < x) bkt(x / j , j);
}
bkt(x , x / x);
}
int nrd(long long x)
{
bkt(2 , x);
return w;
}
int main()
{
freopen("desc.in" , "r" , stdin);
freopen("desc.out" , "w" , stdout);
scanf("%lld" , &n);
scanf("%d" , &k);
printf("%lld\n" , nrd(n));
return 0;
}
