首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >杭电oj: 1002 A + B Problem II java实现

杭电oj: 1002 A + B Problem II java实现

作者头像
静谧星空TEL
发布2021-04-27 09:39:40
发布2021-04-27 09:39:40
57200
代码可运行
举报
运行总次数:0
代码可运行

杭电oj:A + B Problem II java实现

A + B Problem II

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 474597    Accepted Submission(s): 91595

Problem Description

I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.

Input

The first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line consists of two positive integers, A and B. Notice that the integers are very large, that means you should not process them by using 32-bit integer. You may assume the length of each integer will not exceed 1000.

Output

For each test case, you should output two lines. The first line is "Case #:", # means the number of the test case. The second line is the an equation "A + B = Sum", Sum means the result of A + B. Note there are some spaces int the equation. Output a blank line between two test cases.

Sample Input

2 1 2 112233445566778899 998877665544332211

Sample Output

Case 1: 1 + 2 = 3 Case 2: 112233445566778899 + 998877665544332211 = 1111111111111111110

Author

Ignatius.L

Recommend

We have carefully selected several similar problems for you:  1004 1003 1008 1005 1089

代码语言:javascript
代码运行次数:0
运行
复制
import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	
	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int m = 0;
		int n = sc.nextInt();
		BigInteger a,b,c;
		for(int i=0;i 
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019/04/21 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 杭电oj:A + B Problem II java实现
  • A + B Problem II
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档