随笔分类 -  ACM--java

摘要:import java.util.Scanner;public class HDU1004 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = 0, f = 0; String a = null; while (sc.hasNext()) { n = sc.nextInt(); int pre = 0; if (n > 0 && n <= 100... 阅读全文
posted @ 2012-07-12 14:42 A_阿飞 阅读(112) 评论(0) 推荐(0)
摘要:import java.util.Scanner;public class HDU1003 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a, b, c, d, e, t, n, i, j; if (sc.hasNextInt()) { t = sc.nextInt(); for (j = 1; j <= t; j++) { n = sc.nextInt... 阅读全文
posted @ 2012-07-12 14:41 A_阿飞 阅读(143) 评论(0) 推荐(0)
摘要:import java.math.BigInteger;import java.util.Scanner;public class HDU1002 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = 1; int T = 0; BigInteger a; BigInteger b; BigInteger sum; T = sc.nextInt(); if ... 阅读全文
posted @ 2012-07-08 11:11 A_阿飞 阅读(180) 评论(0) 推荐(0)
摘要:import java.util.Scanner;public class HDU1001 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = 0; while (sc.hasNext()) { int sum = 0; n = sc.nextInt(); for (int i = 1; i <= n; i++) { sum +=... 阅读全文
posted @ 2012-07-08 11:09 A_阿飞 阅读(138) 评论(0) 推荐(0)
摘要:View Code import java.util.Scanner;public class HDU1000 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = 0; int b = 0; int sum = 0; while (sc.hasNext()) { a = sc.nextInt(); b = sc.nextInt(); ... 阅读全文
posted @ 2012-07-06 10:14 A_阿飞 阅读(113) 评论(0) 推荐(0)