Problem F: 零起点学算法42——多组测试数据输出II
#include<stdio.h>
int main()
{
int a,b,c,s,t=;
while(scanf("%d%d%d",&a,&b,&c)!=EOF)
{
s=a+b+c;
if(t>)
printf("\n");
printf("%d\n",s);
t++;
}
return ;
}
对于每一组数据输入后先处理然后输出结果,再输入第2组数据, 输出数据之间要求有一个空行
int main()
{
int a,b,c,t=0;
while(scanf("%d%d",&a,&b)!=EOF)
{
c=a+b;
if( t>0) printf("\n");
printf("%d\n",c);//注意后面的\n
t++; }
}
Problem F: 零起点学算法42——多组测试数据输出II的更多相关文章
- 1137: 零起点学算法44——多组测试数据输出II
1137: 零起点学算法44--多组测试数据输出II Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: ...
- 1135: 零起点学算法42——多组测试数据(求和)IV
1135: 零起点学算法42--多组测试数据(求和)IV Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted ...
- 1136: 零起点学算法43——多组测试数据输出I
1136: 零起点学算法43--多组测试数据输出I Time Limit: 1 Sec Memory Limit: 128 MB 64bit IO Format: %lldSubmitted: ...
- Problem D: 零起点学算法40——多组测试数据(求和)IV
#include<stdio.h> int main() { int n,i,sum,a; ) { sum=; ;i<=n;i++) { scanf("%d",& ...
- 1134: 零起点学算法41——多组测试数据(a+b)III
1134: 零起点学算法41--多组测试数据(a+b)III Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitt ...
- 1133: 零起点学算法40——多组测试数据(a+b)II
1133: 零起点学算法40--多组测试数据(a+b)II Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitte ...
- 1132: 零起点学算法39——多组测试数据(a+b)
1132: 零起点学算法39--多组测试数据(a+b) Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: ...
- Problem F: 零起点学算法101——统计字母数字等个数
#include<stdio.h> #include<string.h> int main(){ ]; while(gets(str)!=NULL){ ,b=,c=,d=; ; ...
- Problem F: 零起点学算法85——数组中插入一个数
#include<stdio.h> int main() { ],b[]; while(scanf("%d",&n)!=EOF) { ;i<n;i++) ...
随机推荐
- 随机森林(Random Forest)详解(转)
来源: Poll的笔记 cnblogs.com/maybe2030/p/4585705.html 1 什么是随机森林? 作为新兴起的.高度灵活的一种机器学习算法,随机森林(Random Fores ...
- perl HTML::LinkExtor模块(2)
use LWP::Simple; use HTML::LinkExtor; $html_code = get("https://tieba.baidu.com/p/4929234512&qu ...
- Redis 分片实现 Redis Shard [www]
Redis 分片实现 Redis Shard https://www.oschina.net/p/redis-s ...
- pxe+kickstart自动化安装
什么是PXE? PXE(Pre-boot Execution Environment,预启动执行环境)是Intel公司开发的最新技术,工作于Client/Server模式.PXE是一种远程引导方式,要 ...
- leetcode 之Single Number(14)
这题并不难,但需要注意细节. ListNode* addTwo(ListNode *l1, ListNode *l2) { ListNode dummy(-); ; ListNode *prev = ...
- Myeclipse实用快捷键总结
alt+shift+J 为选中的类/方法添加注释 ctrl+T 显示选中类的继承树 ctrl+shift+X/Y 将选中的字符转换为大写/小写 ctrl+shift+R 打开资源 ctrl+shift ...
- mysql大法
mysql大法 MySQL 安装方式 1.rpm(yum) 2.源码包 3.通用二进制 企业中版本选择 5.6 5.7 选择 GA 6个月到1年之间的------------------------- ...
- Codeforces 877C Slava and tanks(思维)
题目链接:http://codeforces.com/problemset 题目大意:有n个格子,某些格子里可能有一个或多个坦克,但不知道具体位置,每个坦克被轰炸一次就会移动到相邻的格子里(第1个格子 ...
- Disruptor 线程间共享数据无需竞争
队列的作用是缓冲 缓冲到 队列的空间里.. 线程间共享数据无需竞争 原文 地址 作者 Trisha 译者:李同杰 LMAX Disruptor 是一个开源的并发框架,并获得2011 Duke’ ...
- hdu 1114(完全背包)
Piggy-Bank Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...