calmwithdream
#include<iostream>
using namespace std;
int Prim( int n)
{
    int i=2,cnt=0;
    while(n>0&&n>=i)
    {
        if(n%i==0)
        {
            cnt++;
            while(n%i==0)
            {
                n=n/i;
            }
        }
        i++;
    }
    return cnt;
}
int main()
{
    int n;
    while(cin>>n)
    {
        cout<<Prim(n)<<endl;
    }
    return 0;
}

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-12-22
  • 2022-01-14
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2022-02-05
  • 2022-01-17
  • 2021-11-26
  • 2022-12-23
相关资源
相似解决方案