解题思路:
注意事项:
参考代码:
#include <deque>
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <iterator>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <string>
#include <cmath>
#include <string.h>
using namespace std;
int main()
{
int n;
int count=0;
cin>>n;
for(int i=2;i<n;i++)
{
if(n%i==0)
{
cout<<i<<" ";
n=n/i;
i=1;
count++;
}
}
cout<<n<<endl;
cout<<count+1<<endl;
return 0;
}
0.0分
0 人评分
【偶数求和】 (C++代码)浏览:702 |
哥德巴赫曾猜测 (C语言代码)浏览:995 |
蛇行矩阵 (C语言代码)浏览:744 |
2006年春浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:640 |
WU-输出正反三角形 (C++代码)浏览:1018 |
C语言程序设计教程(第三版)课后习题7.2 (C语言代码)浏览:798 |
C语言程序设计教程(第三版)课后习题8.7 (C语言代码)浏览:594 |
C语言程序设计教程(第三版)课后习题4.9 (C语言代码)浏览:685 |
大家好,我是验题君浏览:576 |
C语言程序设计教程(第三版)课后习题1.6 (C语言代码)浏览:662 |