对OJ题目一个总结(一)
来源:互联网 发布:win域名是哪个国家的 编辑:程序博客网 时间:2024/06/16 08:20
(1)计算A+B
输入:输入是两个int型整数,用空格隔开,每两个是一对
输出:每一对输出一个结果,一个结果处于一行
Input
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
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 2
3 4
5 6
Sample Output
3
7
11
#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>int main(){ int a, b, answer; while (scanf("%d%d",&a,&b) == 2) { answer = a + b; printf("%d\n", answer); } return 0;}
阅读全文
0 0
- 对OJ题目一个总结(一)
- 华为OJ一个题目
- oj平台题目一
- 学校oj题目一(dfs)
- 取石子(一) (南阳理工oj 题目23)
- 南阳oj 题目56 阶乘因式分解(一)
- 南阳oj NYoj 数据结构 士兵杀敌(一) 题目108
- 南阳 oj 贪心 题目6 喷水装置(一)
- 南阳oj 题目6 喷水装置(一)
- 南阳oj 题目127 星际之门(一)
- 南阳OJ 题目56-阶乘因式分解(一)
- 【南阳oj 题目23】 取石子(一)
- Swust Oj 数据结构题目输出格式总结(持续更新)
- C#笔试题目总结(一)
- 树状数组题目总结(一)
- 面试题目总结一
- 面试题目总结(一)
- NewCoder-- 华为OJ题目详解(一)
- PHP-fastCGI------PHP-fmp
- 树莓派安装rtl8192eu无线网卡驱动
- ORACLE 常用函数
- 利用C#实现图片的垂直镜像
- JSF后台取不到值
- 对OJ题目一个总结(一)
- Mybatis环境配置
- Android 控件 ListView 的性能优化
- 联机重定义(Online Redefinition)浅析
- 如何用insert into values插入多条数据
- evaluate-reverse-polish-notation
- JDK环境变量配置
- 函数声明与形参问题
- Kernel Methods for Relation Extracion