Pagini recente » Cod sursa (job #1948699) | Cod sursa (job #1918125) | Cod sursa (job #2466201) | Cod sursa (job #977860) | Cod sursa (job #1597126)
#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;
}