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. svn的上传冲突问题

    上传报错实际是 1 . 之前上传的代码与现代码不一样 2. 上传的代码中有错误 需要先拉下来,对比删除不要的,再上传 eclipse加入svn :  1.import  ---从svn检出项目---创 ...

  2. hexo发表博文的方式

    本图片转自:简书:https://www.jianshu.com/p/a52b68794a6b 转自github:https://blog.minhow.com

  3. 初级JS

    唐太宗  李世民  杀了大哥 和弟弟  登上的皇位    一个人当皇帝 排他性是指一种物品具有可以阻止其他人使用该物品的特性. 排他性思想: 在程序中但凡是遇到只让自己怎么样,不让别人怎么样的效果,都 ...

  4. Swift中的的注释

    1. Swift支持与OC中相同的     /**/  ./***/  不同点Swift支持 /*/**/ 这样的注释  ,多行注释 2. 直接双杠注释 // 单行注释 3. 利用 //MARK: 返 ...

  5. js 表单序列化为json对象

    $.fn.serializeJson = function () { var o = {}; var a = this.serializeArray(); $.each(a, function () ...

  6. MySQL 数据 导入到 SQL Service

    1.下载安装ODBC驱动程序 地址:http://dev.mysql.com/downloads/connector/odbc/ 注意:系统的版本问题( 我的是64位的win7系统,但是SQL Ser ...

  7. python3编译安装

    linux下配置安装python3一.首先,官网下载python3的所需版本.wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz ...

  8. centos7升级内核

    载入elrepo源,搜索内核更新资源,并进行更新操作. 具体实验步骤: # 载入公钥rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org ...

  9. hbase 调试各种报错

    1.master is initializing 怎么都不知道怎么回事,直接从hbase 2.0 换到了 hbase 2.1 2.java.lang.ClassNotFoundException: o ...

  10. 开启Centos系统的SSH服务

    1.登录Centos6.4系统. ◆示例:使用root用户登录. 注:若为非root用户登录,输入执行某些命权限不够时需加sudo. 查看SSH是否安装. 2.◆输入命令:rpm -qa | grep ...