首页 > 其他 > 详细

hdu 2601 An easy problem

时间:2017-07-22 20:54:40      阅读:276      评论:0      收藏:0      [点我收藏+]
#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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!