#include<bits/stdc++.h>
using namespace std;
int main()
{
long int n, m, i, l, j, d, c;
vector<int>p;
cin >> n;
l = sqrt(n);
int a[l];
for(i=0; i<l; i++)
a[i] = 0;
a[1] = 1;
p.push_back(2);
for(i=4; i<=l; i+=2)
a[i] = 1;
for(i=3; i<=l; i++)
{
if(a[i] != 1)
{
p.push_back(i);
for(j=i*i; j<=l; j+=i*2)
{
a[j] = 1;
}
}
}
d = c = 1;
for(i=0; i<p.size(); i++)
{
if(n%p[i] == 0)
{
c = 1;
while(n%p[i] == 0)
{
n = n/p[i];
c++;
}
d = d*c;
}
}
cout << d << endl;
return 0;
}
using namespace std;
int main()
{
long int n, m, i, l, j, d, c;
vector<int>p;
cin >> n;
l = sqrt(n);
int a[l];
for(i=0; i<l; i++)
a[i] = 0;
a[1] = 1;
p.push_back(2);
for(i=4; i<=l; i+=2)
a[i] = 1;
for(i=3; i<=l; i++)
{
if(a[i] != 1)
{
p.push_back(i);
for(j=i*i; j<=l; j+=i*2)
{
a[j] = 1;
}
}
}
d = c = 1;
for(i=0; i<p.size(); i++)
{
if(n%p[i] == 0)
{
c = 1;
while(n%p[i] == 0)
{
n = n/p[i];
c++;
}
d = d*c;
}
}
cout << d << endl;
return 0;
}
Comments
Post a Comment