HDU 2601 An easy problem
(i+1)*(j+1)=n+1
转换成上面这个式子,也就是问n+1的因子有几个
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; int main()
{
int T;
scanf("%d",&T);
while(T--)
{
long long n,y,i;
scanf("%lld",&n);
n++;
int anss=;
y=sqrt(1.0*n);
for(i=;i<=y;i++)
if(n%i==)
anss++;
printf("%d\n",anss);
}
return ;
}
HDU 2601 An easy problem的更多相关文章
- 数学--数论-- HDU 2601 An easy problem(约束和)
Problem Description When Teddy was a child , he was always thinking about some simple math problems ...
- hdu 5475 An easy problem(暴力 || 线段树区间单点更新)
http://acm.hdu.edu.cn/showproblem.php?pid=5475 An easy problem Time Limit: 8000/5000 MS (Java/Others ...
- HDU 5475 An easy problem 线段树
An easy problem Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pi ...
- 数据结构(主席树):HDU 4729 An Easy Problem for Elfness
An Easy Problem for Elfness Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 65535/65535 K (J ...
- HDU 2132 An easy problem
http://acm.hdu.edu.cn/showproblem.php?pid=2132 Problem Description We once did a lot of recursional ...
- JHDU 2601 An easy problem (数学 )
title: An easy problem 数学 杭电2601 tags: [数学] 题目链接 Problem Description When Teddy was a child , he was ...
- HDOJ(HDU) 2132 An easy problem
Problem Description We once did a lot of recursional problem . I think some of them is easy for you ...
- hdu 2055 An easy problem (java)
问题: 開始尝试用字符做数组元素.可是并没实用. 在推断语句时把a z排出了. An easy problem Time Limit: 1000/1000 MS (Java/Others) Me ...
- HDU 2123 An easy problem
http://acm.hdu.edu.cn/showproblem.php?pid=2123 Problem Description In this problem you need to make ...
随机推荐
- Oracle 列操作(增加列,修改列,删除列)
1.增加一列: Alter table 表名 add 列名 varchar2(10); 2.修改一列: Alter table 表名 modify 列名 varchar2(20); 3.删除一列: A ...
- 斯坦福机器学习视频笔记 Week1 Linear Regression and Gradient Descent
最近开始学习Coursera上的斯坦福机器学习视频,我是刚刚接触机器学习,对此比较感兴趣:准备将我的学习笔记写下来, 作为我每天学习的签到吧,也希望和各位朋友交流学习. 这一系列的博客,我会不定期的更 ...
- hdu1043
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#inclu ...
- Meterpreter
监听 AutoRunScrip:自动执行脚本 如:自动执行post/windows/manage/migrate set AutoRunScript post/windows/manage/migra ...
- arm指令集
http://blog.chinaunix.net/uid-20769502-id-112445.html
- C语言指针、地址、赋值三者含义
先来一个观点.大家先看看对不对 按:在CSDN论坛上,有位坛友提到这个问题: ==================================== 先看一段代码: #include<stdi ...
- MySql 如何实现不同数据库同步【2个】
环境要求: Windows 操作系统 需要Mysql 3.23.15以后的版本. 假设数据库A为主机,数据库B为从机(A向B提供同步服务,即B中的数据来自A) A机器:IP=10.10.151.166 ...
- Ajax中参数带有html格式的 传入后台保存【二】
KindEditor.ready(function (K) { //编辑器插件 window.editor1 = K.create('#ctjs', { uploadJson: '/Hotelgl/U ...
- [河南省ACM省赛-第三届] BUYING FEED (nyoj 248)
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> us ...
- [转]8 Regular Expressions You Should Know
Regular expressions are a language of their own. When you learn a new programming language, they're ...