山东理工 ACM [1011] A+B for Input-Output Practice (II)

AI权益加码!Claude Code、Cursor等20+工具免费用! 购周边限时加赠Coding Plan Lite,畅享主流AI工具!学习进阶更高效! 阅读详情

题目描述

Your task is to Calculate a + b.

输入

Your task is to Calculate a + b.

输出

For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.

示例输入

2

1 5

10 20

示例输出

6

30


解题源代码

#include<stdio.h>
int main(){
	int a,b,n;
	while(scanf("%d",&n),n){
		while(n--){
			scanf("%d %d",&a,&b);
			printf("%d\n",a+b);
		}
	}
}


A+B for Input-Output Practice Java语言实验 SDUT OJ1017 A+B for Input-Output Practice Time Limit:1000 msMemory Limit:65536 KiB SubmitStatisticDiscuss Problem Description Your task is to calculate the sum of some integers Input Input contains an ... 阅读详情

相关推荐

杭电oj(java版)——1092 A+B for Input-Output Practice (IV)

A+B for Input-Output Practice (IV) Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 104190    Accepted Submission(s): 54923 Problem Descr

椰子真的是只猫 821

C A+B for Input-Output Practice (II) SDUT

描述 您的任务是计算a + b。 输入项 您的任务是计算a + b。 输出量 对于每对输入整数a和b,您应该在一行中输出a和b的和,并在输入中为每一行输出一行输出。 样品 输入项 2 1 5 10 20 输出量 6 30 暗示 #include <stdio.h> #include <stdlib.h> int main() { int n,a,b,...

zhangzhaolin12的博客 1123

A+B for Input-Output Practice (I)

A+B for Input-Output Practice (I) Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 85 Accepted Submission(s) : 38 Problem Description Your task ...

Aaaaajq的博客 207

acm 1089 java答案_HDU 1089----1096 A+B for Input-Output Practice(简单题)(JAVA版)

1089 A+B for Input-Output Practice (I)Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 43745Accepted Submission(s): 24698Problem DescriptionY...

weixin_30219823的博客 434

C语言程序设计基础OJ练习题(实验四for循环结构)

一、A+B for Input-Output Practice (II) Time Limit:1000 ms Memory Limit:65536 KiB Submit Statistic Problem Description Your task is to Calculate a + b. Input Your task is to Calculate a + b. Out...

Gyp郭小帅的博客 1万+

A+B for Input-Output Practice (II)

#include<stdio.h> int main() { int i,a,b; scanf("%d",&i); while(i--) { scanf("%d %d",&a,&b); printf("%d\n",a+b); } return 0; }

qq_62846665的博客 302

java基础入门-A+B for Input-Output Practice (II) (10分)

你的任务是计算 a + b. 输入格式: 首先为待计算加和的个数N。每行有2个整数a和b,中间用空格分隔。7-8 sdut-入门-2 A+B for Input-Output Practice (II) (10分)输出格式: 对于每一对输入整数a和b,在一行内它们的加和。输出样例: 在这里给出相应的输出。输入样例: 在这里给出一组输入。

针盒 377

C语言题目:A+B for Input-Output Practice (II)

The first line integer means the number of input integer a and b. Your task is to Calculate a + b.Your task is to Calculate a + b. The first line integer means the numbers of pairs of input integers.For each pair of input integers a and b you should output

汽车电子搬砖人|ZXD 相关(项目管理助理),AI 辅助摸鱼编程 434

HDOJ_acm steps_1.1.2

Problem Description Your task is to Calculate a + b. Input Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and ...

weixin_30633507的博客 222

杭电OJ A+B for Input-Output Practice (II)

A+B for Input-Output Practice (II)   Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 26809 Accepted Submission(s): 17599  

RengarLee的博客 705

模拟例题讲解

顾名思义,就是根据题意模拟出结果,一般是通过找到规律,运用之前学过的算法进行辅助模拟。难点一般就在于找不到模拟方法,或不会用代码写出模拟方法。

qhy850716的博客 561

题目 1086: A+B for Input-Output Practice (II)

题目 1086: A+B for Input-Output Practice (II) 题目描述: The first line integer means the number of input integer a and b. Your task is to Calculate a + b. 输入: Your task is to Calculate a + b. The first line integer means the numbers of pairs of input integers. 输

weixin_51500664的博客 563

1002: A+B for Input-Output Practice (II)

Description 计算 a + b. Input 多组测试数据。 第一行给出整数n,表示共有n组测试数据。 接下来n行,每行2个整数。 Output 每组测试数据输出两个整数的和。 Sample Input 2 1 5 10 20 Sample Output 6 30 Code #include<iostream> using namespace std; int main() { int n; ...

Zichel77的博客 223

1. A+B for Input-Output Practice (II)

Description Your task is to Calculate a + b. Input Your task is to Calculate a + b. Output For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input. Sample Input .

m0_56703229的博客 215
上一篇: 关于一道微软面试题(据称)“飞机问题”详细解答
下一篇: 杭州电子科技大学 ACM 1001 Sum Problem
markching
博客等级 码龄15年 1粉丝 4原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值