poj-2756-Autumn is a Genius
来源:互联网 发布:英制锥螺纹编程实例 编辑:程序博客网 时间:2024/05/17 23:10
Description
Jiajia and Wind have a very cute daughter called Autumn. She is so clever that she can do integer additions when she was just 2 years old! Since a lot of people suspect that Autumn may make mistakes, please write a program to prove that Autumn is a real genius.
Input
The first line contains a single integer T, the number of test cases. The following lines contain 2 integers A, B(A, B < 32768) each. The size of input will not exceed 50K.
Output
The output should contain T lines, each with a single integer, representing the corresponding sum.
Sample Input
1
1 2
Sample Output
3
Hint
There may be ‘+’ before the non-negative number!
大数相加,直接java
import java.util.Scanner; import java.math.BigDecimal; public class Main{ public static void main(String[] args){ Scanner in=new Scanner(System.in); int n=in.nextInt(); for(int i=1;i<=n;i++){ BigDecimal a=in.nextBigDecimal(); BigDecimal b=in.nextBigDecimal(); System.out.println(a.add(b)); } } }
0 0
- poj 2756 Autumn is a Genius
- Poj 2756 Autumn is a Genius
- poj-2756-Autumn is a Genius
- poj 2756 Autumn is a Genius java解决!!!
- poj 2756 Autumn is a Genius(高精度加法)
- poj 2756 Autumn is a Genius(JAVA:浮点大数)
- POJ 2756 Autumn is a Genius 大数加减法
- POJ 2756 : Autumn is a Genius - java大数
- poj 2756 Autumn is a Genius 高精度加减
- POJ 2756 Autumn is a Genius 使用string的大数加减
- Autumn is coming
- Thinking like a Genius
- Thinking like a Genius
- Thinking like a genius
- This autumn is so particular
- Genius
- Groupthink is no match for individual genius
- POJ-Is It A Tree?
- django框架从零开始_005_管理界面
- C# 中的 ConfigurationManager类引用方法
- Java反射
- 反射
- 推荐系统面临的挑战及发展趋势
- poj-2756-Autumn is a Genius
- 87_retrofit的使用
- hdu-3981-字符串替换
- 常用类
- iOS中https的网络请求的配置
- Activity四种启动模式
- Matlab应用于BP神经网络与GUI,以及一点自己的看法
- properties
- 88_View绘制流程