Your task is to Calculate a + b.

Input

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.

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

1 5
10 20
0 0

Sample Output

6
30 // 先上代码对比
 #include<stdio.h>
int main()
{
int a, b, t, i;
while(scanf("%d %d", &a, &b), a!=&&b!=)
printf("%d\n", a+b);
return ;
}

WA

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

AC

//
  a!=0 && b!=0 !(a==0 && b==0)
a真b真
a真b假
a假b真
a假b假
// !(a==0&&b==0) <=> a||b
// 插入补充:命名文件时不要用空格!!!
  例如:一开始我把WA的文件命名为“F”,把AC的文件命名为“F test”. 结果运行“F test”的结果和“F”的一样.
  后来我运行了如下代码
 #include<stdio.h>
int main()
{
int a=, b=;
while(a!=&&b!=)
{
printf("%d\n", a+b);
}
return ;
}

F test2

  结果还是和“F”一样!!!大概执行程序的时候读程序名读到空格就结束吧

1F - A+B for Input-Output Practice (III)的更多相关文章

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

    A+B for Input-Output Practice (III) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 ...

  2. java hdu A+B for Input-Output Practice (III)

    A+B for Input-Output Practice (III) Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32 ...

  3. PHP-FPM-failed to ptrace(PEEKDATA) pid 123: Input/output error

    If you're running PHP-FPM you can see these kind of errors in your PHP-FPM logs. $ tail -f php-fpm.l ...

  4. NFS挂载异常 mount.nfs: Input/output error

    [root@localhost ~]# vi /etc/exports #增加/nfs 192.168.10.132(rw,no_root_squash,no_all_squash,async) [r ...

  5. BIOS(Basic Input/Output System)是基本输入输出系统的简称

    BIOS(Basic Input/Output System)是基本输入输出系统的简称 介绍 操作系统老师说,平时面试学生或者毕业答辩的时候他都会问这个问题,可见这个问题对于计算机专业的学生来说是如此 ...

  6. read()、write()返回 Input/output error, Device or resource busy解决

    遇到的问题,通过I2C总线读.写(read.write)fs8816加密芯片,报错如下: read str failed,error= Input/output error! write str fa ...

  7. Angular 个人深究(三)【由Input&Output引起的】

    Angular 个人深究(三)[由Input&Output引起的] 注:最近项目在做别的事情,angular学习停滞了 1.Angular 中 @Input与@Output的使用 //test ...

  8. Docker 在转发端口时的这个错误Error starting userland proxy: mkdir /port/tcp:0.0.0.0:3306:tcp:172.17.0.2:3306: input/output error.

    from:https://www.v2ex.com/amp/t/463719 系统环境是 Windows 10 Pro,Docker 版本 18.03.1-ce,电脑开机之后第一次运行 docker ...

  9. dpdk EAL: Error reading from file descriptor 23: Input/output error

    执行test程序时输出: EAL: Error reading from file descriptor 23: Input/output error 原因: 在虚拟机添加的网卡,dpdk不支持导致的 ...

  10. html5 填表 表单 input output 与表单验证

    1.<output>     Js计算结果 <form oninput="res.value = num1.valueAsNumber*num2.valueAsNumber ...

随机推荐

  1. 3.Java的基本数据类型.md

    Java支持的类型分为两类: •基本类型(Primitive Type):boolean和数值类型 ◦整型:byte.short.int.long.char ◦浮点:float.double •nul ...

  2. JAVAWEB 一一框架整合(SSI : Spring+SpringMVC+ ibtis)

    web.xml applicationContext.xml springmvc-servlet.xml UserController package com.ssi.controller; impo ...

  3. DNS泛解析配置

    多个域名走同一个nginx代理服务器,多个域名如果有相同的后缀,就可以使用泛解析了,配置如下 编辑文件:/etc/dnsmasq.conf address=/aa.com/172.16.10.10 a ...

  4. hive 解jason字符串

    json 字符串为: 字段名为: json {"appId":36222,"deviceId":"12536521-7b3d-41f6-9c09-fd ...

  5. python基础学习Day12 生成器、列表推导式、字典的表达式、字典键值对的互换、集合推导式

    一.生成器 1.1 生成器:就是(python)自己用代码写的迭代器,生成器的本质就是迭代器. 1.2 生成器函数 def func1(x): x += print() yield x print() ...

  6. ARM9/ARM11/Cortex A8处理器(转载) .

    //toppic:推荐几个值得中小企业使用的ARM9/ARM11/Cortex A8处理器 // 作者:gooogleman //原文地址:http://blog.csdn.net/goooglema ...

  7. 2018面向对象程序设计(Java)第4周学习指导及要求

    2018面向对象程序设计(Java) 第4周学习指导及要求(2017.9.19-2017.9. 26)   学习目标 掌握类与对象的基础概念,理解类与对象的关系: 掌握对象与对象变量的关系: 掌握预定 ...

  8. APP支付-》支付宝RSA2->支付与验签

    第一次配置支付宝,按照官网示例搞了一天,走不通.经过两天的踩坑,百度了大神的代码,支付宝终于可以了. 1:下载这是官网的最新SDK 2:配置SDK,添加命名空间 AopClient.php文件: Si ...

  9. Fixation index

    :或者1.简单介绍 固定指数(FST)是一种由遗传结构决定的种群分化指标.它通常是由遗传多态性数据,如单核苷酸多态性(SNP)或微卫星估计.作为莱特f统计的一个特例,它是种群遗传学中最常用的统计方法之 ...

  10. Shared Preferences

    [Shared Preferences] 1.SharedPreferences  class. Interface for accessing and modifying preference da ...