质数因子
来源:互联网 发布:模拟退火算法伪代码 编辑:程序博客网 时间:2024/05/31 19:53
功能:输入一个正整数,按照从小到大的顺序输出它的所有质数的因子(如180的质数因子为2 2 3 3 5 )
最后一个数后面也要有空格
详细描述:
函数接口说明:
public String getResult(long ulDataInput)
输入参数:
long ulDataInput:输入的正整数
返回值:
String
#include<iostream>
using namespace std;
int
main(){
long
input;
while
(cin>>input)
{
while
(input!=
1
)
{
for
(
int
i=
2
;i<=input;i++)
{
if
(input%i==
0
)
{
input/=i;
cout<<i<<
' '
;
break
;
}
}
}
}
return
0
;
}
0 0
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- 质数因子
- atom修改字体大小
- TensorFlow安装入门图文教程
- 取近似值
- 数据的准确性对模型效果的重要性
- org.springframework.beans.factory.BeanDefinitionStoreException:
- 质数因子
- 源码解析之 HashMap与HashTable的区别
- docker学习之常用Dockerfile指令
- 【UnityVR】多设备适配思路
- 深入浅出RxJava2.0_02[新特性]
- Hdu 1711 Number Sequence (kmp模板题)
- 2SAT总结
- applet控件IE无法显示设置
- 进制转换