HDU 1095 JAVA
2017-03-03 15:39
176 查看
Problem Description
Your task is to Calculate a + b.
Input
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.
Sample Input
1 5
10 20
Sample Output
6
30
Your task is to Calculate a + b.
Input
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.
Sample Input
1 5
10 20
Sample Output
6
30
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(a+b); System.out.println( ); if(a==0){ break; } } } }
相关文章推荐
- HDU1095 A+B for Input-Output Practice (VII)(入门水题,C,Java两个版本)
- http://acm.hdu.edu.cn/showproblem.php?pid=1108 java BIgInteger gcd
- hdu 1095
- HDU-1063 Exponentiation Java
- HDU高精度总结(java大数类)
- hdu 1063 java 高精度
- HDU-1212 Big Number JAVA又出毛病了
- HDU-1573 大明A+B Java
- HDU 4002【高精度+欧拉函数+java】
- poj 1001 && hdu 1063 (java版本)
- HDU 菲波数 JAVA大数。。。第一个!!~~~
- hdu 1002 大数之java小试牛刀
- hdu 1313 (Java)
- HDU-1047 Integer Inquiry Java
- hdu java 大数 转载
- hdu 1175 连连看 java (BFS + 一搜到底)
- HDU 1063 / PKU 1001 (小数高精度乘法,JAVA写的)
- HDOJ 1063 HDU 1063 Exponentiation JAVA 编写 ACM 1063 IN HDU
- HDU-1715 大菲波数 Java
- hdu 1002 java 大数相加