hdoj1164简单题
2013-02-22 00:44
274 查看
#include<iostream> #include<string> using namespace std; int main(){ int m; while(cin>>m){ int count = 0; int i; for(i = 2; i < m; i++){ if(m % i == 0){ /*if(m / i == 1){ cout<<"*"<<i; break; }*/ m /= i; count++; if(count == 1){ cout<<i; }else{ cout<<"*"<<i; } i--; } } if(count == 0){ cout<<m; }else{ cout<<"*"<<i; } cout<<endl; } }
相关文章推荐
- hdoj1008简单题
- 【hdoj 1164】Eddy's research I
- hdoj-1164-Eddy's research I【分解质因数】
- hdoj1017简单题
- hdoj 1164 Eddy's research I
- hdoj-1164-Eddy's research I【分解质因数】
- hdoj1064简单题
- hdoj1013简单题
- HDOJ HDU 1164 Eddy's research I ACM 1164 IN HDU
- hdoj1056简单题
- hdoj1012简单题
- hdoj 1164 Eddy's research I
- HDOJ 1164 Eddy's research I
- HDOJ 1164 Eddy's research I
- hdoj1040简单题
- HDOJ-1164-Eddy's research I 解题报告
- hdoj1000简单题
- HDOJ1164 Eddy's research I
- hdoj1037简单题
- hdoj1004简单题