1258
来源:互联网 发布:sql server forceseek 编辑:程序博客网 时间:2024/05/16 05:29
题目描述
LZ is a lazy and tiresom man. One day, LZ was asked by his lovely niece, Amy, to find out all the divisors of number N. LZ wants to get rid of his niece's border so he wants to tell her the answer as soon as possible. And LZ is so lazy that he decides to turn to you for help.
As the smartest NEU coder, you recepts this question and solves it in only one minute... OMG~~
输入
The first line of the input file has a number T which indicates that there will be T test cases following. Each test case only contains a number N.
0<=T<=1000 1<=N<=10^8
输出
Each output case only contains an integer which is the number of divisors N has.
样例输入
310128
样例输出
464
提示
来源
2013东软杯
#include<stdio.h>#include<math.h>int main(){ int n,i,j,k,num=0; scanf("%d",&n); for(i=0;i<n;i++) {scanf("%d",&k); for(j=1;j<=sqrt(k);j++) {if(k%j==0) num++;} if(sqrt(k)==(int)sqrt(k)) printf("%d\n",2*num-1); else printf("%d\n",2*num); num=0; } return 0;}
0 0
- 1258
- 1258
- pku 1258
- Poj 1258
- poj 1258
- POJ 1258
- 1258 prim
- HDU 1258
- poj 1258
- POJ 1258
- POJ 1258
- poj 1258
- poj 1258
- poj 1258
- POJ 1258
- HDOJ 1258
- hdu 1258
- poj 1258
- 图形界面修改ubunut终端字体
- 设计模式-单例模式
- php composer安装和使用教程
- HDU5995 Kblack loves flag
- 排序算法-冒泡排序
- 1258
- linux输入子系统
- 装两个不同版本MySQL的方法
- Android 动画框架的基本原理
- HDU 5996 dingyeye loves stone
- linux起源
- 1260
- 【Leetcode】461. Hamming Distance
- 自定义view2--getMeasuredWidth和getWidth方法区分