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 ...
随机推荐
- Java 集合:HashSet 与 ArrayList
Set 集合是无序不可以重复的的.List 集合是有序可以重复的. Java 集合:HashSet 与 hashCode.equals 博客里面已经说到这个问题,但是解释的还是不够清楚. 看一个小例子 ...
- JavaScript中SetInterval与setTimeout的用法详解
setTimeout 描述 setTimeout(code,millisec) setTimeout() 方法用于在指定的毫秒数后调用函数或计算表达式. 注:调用过程中,可以使用clearTimeou ...
- 驱动05.lcd设备驱动程序
参考s3c2410fb.c总结出框架 1.代码分析 1.1 入口函数 int __devinit s3c2410fb_init(void) { return platform_driver_regis ...
- Docker集群实验环境布署--swarm【1 架构说明】
在读完<Docker技术入门与实践>这本书后,基本上已对Docker了有一些入门的理解,以及我们为什么要使用Docker 答:我们发现在实际工作中,通过openstack一旦把一个VM创建 ...
- 在使用cognos时遇到的问题记录帖
在使用cognos时遇到的问题记录帖 1.开一个project 报无法访问位于 URL 的服务: http://localhost:80/ibmcognos/cgi-bin/cognos.cgi?b_ ...
- Lamada转化字符类型
//SN为字符串类型,将其转换成Int等数字类型 ---第一种 List<Testing_Report_Enclosureslist> enclosuresList = _db.Testi ...
- python自动化开发-2
1.python的数据类型之列表 列表是Python开发语言中最常见的数据类型之一,通过列表可以实现对数据的增删改等常用操作. 列表的定义:例子 names = ["Lucy",& ...
- Python map多线程
import os import PIL from multiprocessing import Pool from PIL import Image SIZE = (75,75) SAVE_DIRE ...
- Racket中使用Y组合子
关于Y组合子,网上已经介绍很多了,其作用主要是解决匿名lambda的递归调用自己. 首先我们来看直观的递归lambda定义, 假设要定义阶乘的lambda表达,C#中需要这么定义 Func<in ...
- 查增删改MySQL数据库固定模式
省略相关包的导入... public class Base { public static Connection connection = null; public static PreparedSt ...