hdu2058 The sum problem
来源:互联网 发布:如何查看淘宝店铺粉丝 编辑:程序博客网 时间:2024/06/06 00:40
思路:随便搞搞...
#include <string.h>#include <stdio.h>#include <math.h>int main(){ int i,j,n,m,t; while(scanf("%d%d",&n,&m), m && n) { m*=2; for(i=(int)sqrt((double)m);i>=2;i--) { if(m%i==0) { t=m/i+1-i; if (t>=2 && t%2==0) { t>>=1; if(t+i-1<=n) printf("[%d,%d]\n",t,t+i-1); } } } m>>=1; if(n>=m) printf("[%d,%d]\n",m,m); printf("\n"); } return 0;}
0 0
- HDU2058:The sum problem
- hdu2058 The sum problem
- HDU2058 The Sum Problem
- hdu2058 The sum problem
- HDU2058 The sum problem
- hdu2058 The sum problem
- hdu2058 The sum problem
- HDU2058 The sum problem【数学计算+枚举】
- hdu2058 The sum problem(C语言)
- HDOJ2058 The sum problem
- The sum problem
- The sum problem
- 2058 The sum problem
- hdoj2058 The sum problem
- The sum problem 2058
- The sum problem
- The partial sum problem
- The partial sum problem
- BZOJ 1012([JSOI2008]最大数maxnumber-单调队列)
- 【LeetCode】7.Reverse Integer
- 《模仿游戏》(The Imitation Game)观看感受
- Maven打包jar
- 安装完win10后Eclipse好看多了
- hdu2058 The sum problem
- Yii获取当前域名
- Design Pattern Summary
- devstack centos7.2安装笔记
- python,针对所有邮件的自由收发。(例子,QQ发给任何邮箱)
- MTK6.0 spi驱动使用
- hdu2059 龟兔赛跑(DP)
- Android中签名机制详细解释
- 课程练习一 Problem Q id 1016