1059. Prime Factors (25)
来源:互联网 发布:php sha1加密 编辑:程序博客网 时间:2024/05/16 13:58
1059. Prime Factors (25)
#include <istream>using namespace std;class CA{public:void run();long int n;};void CA::run(){scanf("%d",&n);if(n<=1){printf("%d=%d",n,n);return;}printf("%d=",n);int k=2,cr;while(n>1){cr=0;while(n%k==0){n/=k;cr++;}if(cr>1){printf("%d^%d",k,cr);if(n>1) printf("*");}else if(cr==1){printf("%d",k);if(n>1) printf("*");}k++;}}int main(){//freopen("test.in","r",stdin);CA *a=new CA;a->run();return 0;}
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 1059. Prime Factors (25)
- 实现ListView上拉/下拉刷新的例子
- 中国余数定理:HDU1370
- hdu-2100-Lovekey
- 线段树:HDU4217
- 度量相似度方法总结
- 1059. Prime Factors (25)
- 5、面向接口_业务模型分析实例3
- hdu 4771 Stealing Harry Potter's Precious
- 源码分析必备:用vld查看opcode信息
- 应用Yii1.1和PHP5进行敏捷Web开发02
- 进制转换 PKU1131
- Terminal Shortcuts
- Think in Java学习 菜鸟一枚
- 应用Yii1.1和PHP5进行敏捷Web开发03