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. Structs复习 OGNL

    Dominmodel只有传 User.age 类似的这种Structs才能帮创建对象 Dominmodel User里必须有空的构造方法 OGNL:OBJECT GRAPHIC NAVAGATION ...

  2. Hibernate学习笔记2.2(Hibernate基础Annotation配置)

    如果数据库表名与类名不一致 可以用使用 @Table(name="_teacher") 来指定表名,没有就会自己创建 也可以在配置文件上修改 为class添加table属性 如果什 ...

  3. windows 下 redis安装

    在D盘新建文件夹[redis],右键解压Redis ZIP包,把所有文件解压到redis文件夹中.(其他盘符也可以滴^_^) 文件介绍: redis-benchmark.exe         #基准 ...

  4. 微信小程序--页面传参

    场景: A页面字段---传递到-->B页面 A页面wxml: wx:for----习惯用<block> 设置所点击的值----data-xxx 获取所点击的值---e.current ...

  5. df、du、fdisk

    [df.du.fdisk] 参考:http://os.51cto.com/art/201012/240726.htm

  6. Web前端js下载流文件

    前端下载文件大概有以下种: 1)a标签链接下载 <a href="url">点击链接下载</a> 2)表单form提交下载 var form = $(&qu ...

  7. 解题5(StringMerge1)

    题目描述 按照指定规则对输入的字符串进行处理. 详细描述: 将输入的两个字符串合并. 对合并后的字符串进行排序,要求为:下标为奇数的字符和下标为偶数的字符分别从小到大排序.这里的下标意思是字符在字符串 ...

  8. PHPWAMP集成环境配置ssl证书

    和apache配置ssl证书流程一样, LoadModule socache_shmcb_module modules/mod_socache_shmcb.so LoadModule ssl_modu ...

  9. 虚拟机安装的ubutun全屏

    虚拟机下面安装了ubuntu系统,显示的屏幕只有那么一小块儿,不知道如何才能全屏,那么如何全屏呢?且看下面经验.   方法/步骤     打开虚拟机,并点击要更改成全屏的那个ubuntu系统的电源 我 ...

  10. 基础DP(初级版)

    本文主要内容为基础DP,内容来源为<算法导论>,总结不易,转载请注明出处. 后续会更新出kuanbin关于基础DP的题目...... 动态规划: 动态规划用于子问题重叠的情况,即不同的子问 ...