ACM水题求解Input contains multiple test cases.Each test case con
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/10/04 17:43:07
ACM水题求解
Input contains multiple test cases.Each test case contains a pair of integers a and b,one pair of integers per line.A test case containing 0 0 terminates the input and this test case is not to be processed.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.
我的代码
#include
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
if(a!=0&&b!=0)
coutb&&(a||b))
coutb&&(a||b))
cout
Input contains multiple test cases.Each test case contains a pair of integers a and b,one pair of integers per line.A test case containing 0 0 terminates the input and this test case is not to be processed.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.
我的代码
#include
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
if(a!=0&&b!=0)
coutb&&(a||b))
coutb&&(a||b))
cout
题目要求是a跟b都是0的时候输入结束而且这组数据不用处理,你那个是当全不等于0时才输出答案,但是漏掉了其中一个为0的情况.亲.while没有大括号,你那个else之后的continue是要到哪里去.你把那里换成break还可以吧.现在的百度都不愿意有人帮别人回答问题还是怎么的,我问的就没有人来答.
ACM水题求解Input contains multiple test cases.Each test case con
English Test Case
test
英语翻译For each test case,you should output two lines.The first
c++ acm水题求解
This test ______ a number of multiple choice questions.
请问multiple-choice test一定是多项的吗?
英语语法分析11.This multiple-choice test ________40 incomplete sta
I.单项选择(Multiple-choice test)
英语翻译In most cases the speed test imposes centrifugal forces
multiple input-multiple output是什么意思
acm中wrong answer at test 1与at test 4或者at test 10有区别吗?