题目描述:原题链接
解法:求因子个数
思路:模板题。
#include <iostream>
#include <cmath>
using namespace std;
typedef long long ll;
ll zyz(ll x)
{
ll ans=0;
ll i;
for(i=1;i<sqrt(x);i++)
{
if(x%i==0)
{
ans+=2;
}
}
if(i==sqrt(x))
{
ans+=1;
}
return ans;
}
int main()
{
ll n;
cin>>n;
ll ans=0;
while(n!=2)
{
n=zyz(n);
ans++;
}
cout<<ans<<endl;
return 0;
}