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;
}

 

分类:

技术点:

相关文章:

  • 2021-12-25
  • 2022-01-01
  • 2021-12-19
  • 2021-08-15
  • 2022-01-01
  • 2021-05-15
  • 2021-03-31
  • 2022-01-01
猜你喜欢
  • 2022-01-01
  • 2021-12-04
  • 2021-11-20
  • 2022-01-01
  • 2021-07-27
  • 2022-01-01
  • 2022-01-01
相关资源
相似解决方案