A+B Problem
Time Limit: 1000MS | Memory Limit: 10000K | |
Total Submissions: 362336 | Accepted: 202051 |
Description
Calculate a+b
Input
Two integer a,b (0<=a,b<=10)
Output
Output a+b
Sample Input
1 2
Sample Output
3
近来一直在看《算法》这本书,书中要求的数据结构和算法自己也会自己动手实现一遍,但是感觉还不够,于是找到POJ,希望做几道ACM的题巩固自己的学习。这是第一个ACM的题,象征着我开始学习算法的开始吧。
import java.util.Scanner;
/**
* Created by 小粤 on 2015/8/3.
*/
public class Main
{
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int b = s.nextInt();
System.out.println(a + b);
}
}