九度 oj 题目1087:约数的个数
来源:互联网 发布:朱敏希28分钟 知乎 编辑:程序博客网 时间:2024/05/16 11:07
http://ac.jobdu.com/problem.php?pid=1087
照抄了 http://blog.csdn.net/jdplus/article/details/18353667
#include <stdio.h>#include <cmath>int main(){ //freopen("in/1087.in","r",stdin); int n; int a[1001]; while(scanf("%d",&n)!=EOF && n ){ for (int i = 0; i < n; ++i) { scanf("%d", &a[i]); } for (int i = 0; i < n; ++i) { int cnt = 0; int root =(int) sqrt(a[i]*1.0); for (int j = 1; j <=root; j++) { if(a[i]%j == 0){ cnt +=2; } } if(root * root == a[i]) cnt--; printf("%d\n",cnt); } } }
0 0
- 九度OJ—题目1087:约数的个数
- 九度oj 题目1087:约数的个数
- 九度OJ 题目1087:约数的个数
- 九度 oj 题目1087:约数的个数
- 【九度OJ】题目1087:约数的个数 解题报告
- 九度OJ题目1087:约数的个数
- 题目1087:约数的个数 九度OJ
- 九度OJ 1087 约数的个数
- 九度OJ 1087 约数的个数
- 九度OJ 1087:约数的个数
- 九度OJ-1087:约数的个数
- 九度OJ-1087-约数的个数
- 九度OJ 1087:约数的个数
- 九度题目1087:约数的个数
- 九度题目1087约数的个数
- 九度题目1087:约数的个数
- 九度 题目1087:约数的个数
- 九度OJ 1087 约数的个数 JAVA
- 菜鸟程序员的第一个半年总结
- Go-Time
- androidstudio小知识记录-那些年遇到的坑儿
- Dom4j的使用(全而好的文章)
- LINUX-Opencv3.2SSDdemo&&TensorFlowdemo运行配置
- 九度 oj 题目1087:约数的个数
- Spring Boot应用连接数据库MySQL
- VC资源编辑器里对话框的大小和实际的像素尺寸显示问题 .
- js的数组知识
- Kali2.0 2016.2下VMtools的安装
- Yii setFlash getFlash用法
- [LeetCode]416. Partition Equal Subset Sum
- 设计模式之组合模式
- 轮廓描边效果