码迷,mamicode.com
首页 > 其他好文 > 详细

hdu 2601 An easy problem

时间:2017-07-22 21:13:05      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:print   roc   markdown   data-   span   repr   while   script   out   

#include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <time.h>
using namespace std;

int main()
{
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    int _;
    __int64 n,i,t;
    scanf("%d\n",&_);
    while(_--)
    {
        scanf("%I64d",&n);
        n+=1;
        int cnt=0;
        for(i=2;i*i<=n;i++)
        {
            if(n%i==0) cnt++;
        }
        printf("%d\n",cnt);
    }
    return 0;
}

hdu 2601 An easy problem

标签:print   roc   markdown   data-   span   repr   while   script   out   

原文地址:http://www.cnblogs.com/liguangsunls/p/7222304.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!