纯粹水题,写这个文章只是凑数而已。原题地址:http://poj.org/problem?id=1000

POJ 1000 A+B 问题

描述

计算 a+b

输入

两个整数 a, b (0 ≤ a, b ≤ 10)

输出

输出 a+b 的结果

样例输入

1 2

样例输出

3

解题思路

这题还用说思路?把两个数输入了,输出它们的和就可以了。

源代码

1
2
3
4
5
6
7
8
9
10
import java.util.*;

public class Main {

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

原创文章,转载请注明来源:http://euyuil.com/2224/poj-1000-ab-problem/