题目描述
输入
输出
示例输入
21 5
10 20
示例输出
630
解题源代码
#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);
}
}
}
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
1.6k累计阅读
1.7k平均单平台
已同步平台
CSDN
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄15年
21 5
10 20
630
解题源代码
#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);
}
}
}杭电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
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,...
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 ...
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...
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...
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; }
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,在一行内它们的加和。输出样例: 在这里给出相应的输出。输入样例: 在这里给出一组输入。
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
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 ...
杭电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
模拟例题讲解
顾名思义,就是根据题意模拟出结果,一般是通过找到规律,运用之前学过的算法进行辅助模拟。难点一般就在于找不到模拟方法,或不会用代码写出模拟方法。
题目 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. 输
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; ...
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 .

被折叠的 条评论
为什么被折叠?



