题目描述:

给定两个正整数a、b(0 < a,b < =10000),求出a+b的和

输入描述:

多组输入,每组输入为一行,里面有2个数a,b(0 < a,b < =10000)

输出描述:

对于每一组输入,输出一个值为该组a+b的和

样例输入:1 22 3

样例输出:35

解答

#include<stdio.h>
int main(){
int a,b;
while(scanf("%d%d",&a,&b)!=EOF){
if(a>0||a<=10000||b>0||b<=10000){ printf("%d\n",a+b);}
else return 0;
}
return 0;
}

  

OJ#1002 又是a+b的更多相关文章

  1. PKU OJ 1002 487-3279

    PKU OJ 1002 487-3279 487-3279 Description Businesses like to have memorable telephone numbers. One w ...

  2. 九度OJ 1002:Grading

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:18410 解决:4753 题目描述: Grading hundreds of thousands of Graduate Entrance ...

  3. Light oj 1002 Country Roads (Dijkstra)

    题目连接: http://www.lightoj.com/volume_showproblem.php?problem=1002 题目描述: 有n个城市,从0到n-1开始编号,n个城市之间有m条边,中 ...

  4. oj 1002题 (大数题)

    #include <stdio.h> #include <string.h> int main(void) { int q,j,h,k,l; int d; ],s2[];//题 ...

  5. 九度oj 1002 Grading 2011年浙江大学计算机及软件工程研究生机试真题

    #include<iostream> #include<queue> #include<cstdio> #include<cstring> #inclu ...

  6. 杭电oj 1002

    #include <iostream> #include <algorithm> using namespace std; int nCases; ], n[]; ], b[] ...

  7. 百炼OJ - 1002 - 方便记忆的电话号码

    题目链接 思路 开个一千万的数组计数,最后遍历即可. #include<stdio.h> #include<string.h> #include<algorithm> ...

  8. [z]START WITH CONNECT BY PRIOR子句实现递归查询

    [z]http://jingyan.baidu.com/article/5d368d1e182bb93f60c05784.html START WITH CONNECT BY PRIOR这个语法主要用 ...

  9. POJ 1038 Bugs Integrated, Inc.

    AC通道 神坑的一道题,写了三遍. 两点半开始写的, 第一遍是直接维护两行的二进制.理论上是没问题的,看POJ discuss 上也有人实现了,但是我敲完后准备开始调了.然后就莫名其妙的以为会超时,就 ...

随机推荐

  1. git stash命令详解

    git stash命令用于将更改储藏在脏工作目录中. 使用语法 git stash list [<options>] git stash show [<stash>] git ...

  2. [Python设计模式] 第12章 基金理财更省事——外观模式

    github地址:https://github.com/cheesezh/python_design_patterns 题目1 用程序模拟股民直接炒股的代码,比如股民投资了股票1,股票2,股票3,国债 ...

  3. 去哪儿数据VS美团数据

    介绍 之前在去哪儿做数据RD,今年来到美团做数据RD,碰巧都是门票方向(现在去哪儿叫度假,美团叫境内),下面都是基于这两个部门的对比 相同点 都有独立的数据团队,老大都重视数据,主要开发语言都是SQL ...

  4. ionic生成全尺寸icon和splash

    http://www.jianshu.com/p/eda363eb28d3 重新添加platform --no-resources可以禁止重新生成icon和splash ionic cordova p ...

  5. 14.翻译系列:从已经存在的数据库中生成上下文类和实体类【EF 6 Code-First系列】

    原文链接:https://www.entityframeworktutorial.net/code-first/code-first-from-existing-database.aspx EF 6 ...

  6. FILESTREAM feature can't be enabled if you use cluster shared volumes

    Create a SQL Cluster instance. Create Cluster Shared Volume Please note. No Share storage is added i ...

  7. springmvc(二) ssm框架整合的各种配置

    ssm:springmvc.spring.mybatis这三个框架的整合,有耐心一步步走. --WH 一.SSM框架整合 1.1.整合思路 从底层整合起,也就是先整合mybatis与spring,然后 ...

  8. eclipse is missing required source folder src/test/java

    原因:maven的bug,不兼容eclipse 解决方法:右击工程,选择run-->maven-->build重新构建工程,就解决了.

  9. Spring-boot之 swagger2

    Swagger是一个简单但功能强大的API表达工具. 结合springboot 配置起来很简单,附上教程 :https://www.xncoding.com/2017/07/08/spring/sb- ...

  10. Git:git diff 命令详解

    工作目录 vs 暂存区 $ git diff <filename> 意义:查看文件在工作目录与暂存区的差别.如果还没 add 进暂存区,则查看文件自身修改前后的差别.也可查看和另一分支的区 ...