第三种多项输入 解题思路:与前两种不同,题目说的是直到输入两个0才停止,那么在正常的循环输入中,单独讨论ab为0的情况注意事项:参考代码:#includeintmain(){inta,b;while(scanf("%d%d",&a,&b)==2){if(a==0&&b==0)break;elsepr 题解列表 2026年07月18日 0 点赞 0 评论 81 浏览 评分:0.0
应该大概是这样写的 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; while(scanf(&qu…… 题解列表 2025年12月07日 0 点赞 0 评论 301 浏览 评分:0.0
C++简单解法 摘要:#includeusing namespace std;int main(void){ long long a,b; while(cin>>a>>b)//之所以不用whi…… 题解列表 2025年02月28日 0 点赞 0 评论 481 浏览 评分:10.0
无聊的星期五 摘要:while True: x, y = list(map(int, input().split())) if x == 0 and y == 0: break print…… 题解列表 2024年12月06日 0 点赞 0 评论 806 浏览 评分:0.0
A+B for Input-Output Practice (III) C语言代码 摘要:#include<stdio.h>int main(void){ int i, a, b, j; scanf("%d %d", &a, &b); while (!(…… 题解列表 2024年07月31日 0 点赞 0 评论 575 浏览 评分:9.9
运用C语言解1087: A+B for Input-Output Practice (III) 摘要:解题方法很多运用C语言的同学可以参考这边感谢评论区提供其他方法以下是参考代码:#include <stdio.h>int main (){ int a,b;while (~scanf("%d %d",…… 题解列表 2024年06月21日 0 点赞 0 评论 635 浏览 评分:9.9
1087A+B(3)(while循环输出) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ long long a,b; while(scanf("%lld%lld",&a,&b)) { if(a==0…… 题解列表 2024年05月29日 0 点赞 0 评论 551 浏览 评分:0.0
A+B for Input-Output Practice (III) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a, b; while(cin>>a>>b) { if (a…… 题解列表 2024年03月07日 0 点赞 0 评论 468 浏览 评分:0.0
输入截止易错点判断 摘要:原题链接:[题目 1087: A+B for Input-Output Practice (III)](https://www.dotcpp.com/oj/problem1087.html "题目 1…… 题解列表 2024年01月21日 0 点赞 0 评论 564 浏览 评分:9.9
使用判断语句提前终止000000000000444444444 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[…… 题解列表 2024年01月19日 0 点赞 0 评论 431 浏览 评分:0.0