hdu 2058 The sum problem
2011-09-19 10:54
405 查看
http://acm.hdu.edu.cn/showproblem.php?pid=2058
/* 2011-9-19 author:BearFly1990 */ package acm.hdu.tests; import java.io.BufferedInputStream; import java.util.Scanner; public class HDU_2058 { public static void main(String[] args) { Scanner in = new Scanner(new BufferedInputStream(System.in)); while(in.hasNext()){ int n = in.nextInt(); int m = in.nextInt(); int len = (int) Math.sqrt(2.0*m); for(int i=len; i>=1; --i) { int temp = m-(i*i+i)/2; if(temp%i == 0) System.out.printf("[%d,%d]\r\n", temp/i+1, temp/i+i); } System.out.printf("\r\n"); } } }
相关文章推荐
- The sum problem(hdu 2058)解题报告
- HDU 2058 The sum problem
- hdu 2058 The sum problem
- HDU 2058 The sum problem
- HDU——2058 The sum problem
- HDU 2058 The sum problem
- hdu 2058 The sum problem 枚举区间长度 + 等差公式
- HDU 2058 The sum problem
- hdu 2058 The sum problem
- hdu 2058:The sum problem
- 【hdu - 2058 The sum problem】
- hdu 2058 The sum problem (数学问题)
- HDU 2058 The sum problem
- HDU 2058 The sum problem (等差数列求和变形)
- hdu 2058 The sum problem(数学题)
- hdu - 2058 The sum problem (数学题)
- HDU 2058 The sum problem(枚举)
- hdu 2058 The sum problem(数学题)
- HDU 2058 The sum problem 数学题
- hdu 2058 The sum problem