zoukankan      html  css  js  c++  java
  • ACM

    PS: 开始ACM的受虐!
    site:http://acm.acmcoder.com/listproblem.php

    【如果觉得我的笔记写的好,您可以小额赞助我:支付宝 15202166392】


    一、1000
    import java.util.Scanner;

    public class Main {
        public static void main(String args[]) {
            Scanner cin = new Scanner(System.in);
            int a, b;
            while (cin.hasNextInt()) {
                a = cin.nextInt();
                b = cin.nextInt();
                System.out.println(a + b);
            }
        }
    }

    二、1001
    import java.util.Scanner;

    public class Main {
        public static void main(String args[]) {
            Scanner cin = new Scanner(System.in);
            int n;
            long sum;
            while (cin.hasNext()) {
                n = cin.nextInt();
                sum = n + 1;
                sum = sum * n / 2;
                System.out.println(sum);
                System.out.println();
            }
        }
    }

    三、1002
    import java.math.BigInteger;
    import java.util.Scanner;

    public class Main {
        public static void main(String args[]) {
            Scanner sc = new Scanner(System.in);
            int i = sc.nextInt();
            for (int j = 1; j <= i; j++) {
                BigInteger a = new BigInteger(sc.next());
                BigInteger b = new BigInteger(sc.next());
                System.out.println("Case " + j + ":");
                System.out.println(a.toString() + " + " + b.toString() + " = "
                        + a.add(b));
                if (j != i)
                    System.out.println();
            }
        }
    }

  • 相关阅读:
    MySQL 82 张图带你飞
    Docker一个优秀的应用容器
    大数据架构基础知识
    浏览器复杂吗
    5 分钟学懂 SSH 隧道技术
    图解数据分析如何驱动决策
    3D可视化管理推进能源革命
    一文全面解读B端产品和C端产品的差异
    智慧农业解决方案
    Win10删除右键多余选项菜单
  • 原文地址:https://www.cnblogs.com/xavierjzhang/p/4501433.html
Copyright © 2011-2022 走看看