1.1.1

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a,b,N;
  7. cin >> N;
  8. while ( cin >>a >>b)
  9. {
  10. cout << a+b <<endl;
  11. }
  12. return ;
  13. }

1.1.2

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a,b,N;
  7. cin >> N;
  8. for (int i = N; i > ; i--)
  9. {
  10. cin >>a >>b;
  11. cout << a+b <<endl;
  12. }
  13.  
  14. return ;
  15. }

1.1.3

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a,b;
  7. while ((cin >>a >>b) && (a||b))
  8. {
  9. cout << a+b <<endl;
  10. }
  11. return ;
  12. }

1.1.4

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define MAXN 1000 + 10 //不能加分号
  5. int main()
  6. {
  7. int N;
  8. int arr[MAXN] = {};
  9. // arr[MAXN] ;
  10. while ((cin >>N) && N)
  11. {
  12. int sum = ;
  13. for (int i=N; i>; i--)
  14. {
  15. cin >> arr[i];
  16. sum += arr[i];
  17. }
  18. cout << sum << endl;
  19. }
  20. return ;
  21. }

1.1.5

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define MAXN 1000 + 10 //不能加分号
  5. int main()
  6. {
  7. int N;
  8. int arr[MAXN] = {};
  9. // arr[MAXN] ;
  10. int M;
  11. cin >> M;
  12. while ((cin >>N) && (M>))
  13. {
  14. M--;
  15. int sum = ;
  16. for (int i=N; i>; i--)
  17. {
  18. cin >> arr[i];
  19. sum += arr[i];
  20. }
  21. cout << sum << endl;
  22. }
  23. return ;
  24. }

1.1.6

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define MAXN 1000 + 10 //不能加分号
  5. int main()
  6. {
  7. int N;
  8. int arr[MAXN] = {};
  9. while ((cin >>N) )
  10. {
  11. int sum = ;
  12. for (int i=N; i>; i--)
  13. {
  14. cin >> arr[i];
  15. sum += arr[i];
  16. }
  17. cout << sum << endl;
  18. }
  19. return ;
  20. }

1.1.7

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a,b;
  7. while (cin >> a >> b)
  8. {
  9. cout << a+b << endl << endl;
  10. }
  11. return ;
  12. }

1.1.8

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. #define MAXN 1000 + 10 //不能加分号
  5. int main()
  6. {
  7. int N;
  8. int arr[MAXN] = {};
  9. int M;
  10. cin >> M;
  11. while ((cin >>N) && (M>))
  12. {
  13. M--;
  14. int sum = ;
  15. for (int i=N; i>; i--)
  16. {
  17. cin >> arr[i];
  18. sum += arr[i];
  19. }
  20. (M!=)?(cout << sum << endl << endl):(cout << sum <<endl);
  21. }
  22. return ;
  23. }

Section One的更多相关文章

  1. keil MDK error: L6236E: No section matches selector - no section 错误

    今天板子刚到,新建的第一个工程就报错了. .\Objects\cse.sct(7): error: L6236E: No section matches selector - no section t ...

  2. 【代码笔记】iOS-一个tableView,两个section

    一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController ...

  3. gcc/linux内核中likely、unlikely和__attribute__(section(""))属性

    查看linux内核源码,你会发现有很多if (likely(""))...及if (unlikely(""))...语句,这些语句其实是编译器的一种优化方式,具 ...

  4. <section> 标签

    最近正在学习html5,刚接触html5,感觉有点不适应,因为有一些标签改变了,特别是div, section article这三个标签,查了一些资料,也试着用html5和css3布局网页,稍微有点头 ...

  5. [ASP.NET MVC 小牛之路]12 - Section、Partial View 和 Child Action

    概括的讲,View中的内容可以分为静态和动态两部分.静态内容一般是html元素,而动态内容指的是在应用程序运行的时候动态创建的内容.给View添加动态内容的方式可归纳为下面几种: Inline cod ...

  6. $\LaTeX$笔记:Section 编号方式(数字、字母、罗马)&计数器计数形式修改

    $\LaTeX$系列根目录: Latex学习笔记-序 IEEE模板中Section的编号是罗马数字,要是改投其他刊物的话可能得用阿拉伯数字,所以可以在导言部分做如下修改(放在导言区宏包调用之后): \ ...

  7. [DOM Event Learning] Section 4 事件分发和DOM事件流

    [DOM Event Learning] Section 4 事件分发和DOM事件流 事件分发机制: event dispatch mechanism. 事件流(event flow)描述了事件对象在 ...

  8. [DOM Event Learning] Section 3 jQuery事件处理基础 on(), off()和one()方法使用

    [DOM Event Learning] Section 3 jQuery事件处理基础 on(),off()和one()方法使用   jQuery提供了简单的方法来向选择器(对应页面上的元素)绑定事件 ...

  9. [DOM Event Learning] Section 2 概念梳理 什么是事件 DOM Event

    [DOM Event Learning] Section 2 概念梳理 什么是事件 DOM Event   事件 事件(Event)是用来通知代码,一些有趣的事情发生了. 每一个Event都会被一个E ...

  10. [DOM Event Learning] Section 1 DOM Event 处理器绑定的几种方法

    [DOM Event Learning] Section 1 DOM Event处理器绑定的几种方法   网页中经常需要处理各种事件,通常的做法是绑定listener对事件进行监听,当事件发生后进行一 ...

随机推荐

  1. java中各种循环

    简单介绍一下java中的一些循环 package test; import org.apache.log4j.Logger; import org.junit.Test; public class F ...

  2. HDU 1159 Common Subsequence (dp)

    题目链接 Problem Description A subsequence of a given sequence is the given sequence with some elements ...

  3. ASP.NET AjaxControlToolkit-Framework4.0 配置实用(简单介绍CalendarExtender日期控件)

    1:下载:AjaxControlToolkit Ajax Control Toolkit .NET 4 Ajax Control Toolkit .NET 4.5 Ajax Control Toolk ...

  4. ImageView设置边框 以及内部图片居中显示 在AndroidStudio中添加shape.xml文件

    效果如图 边框设置:shape文件 <shape xmlns:android="http://schemas.android.com/apk/res/android"> ...

  5. Python3 生成器

    生成器(genetor): 1>生成器只有在调用的时候才会生成相应的数据: 2>生成器只记录当前位置,有一个__next__()方法 3>yield可以实现单线程先的并发运算 1.列 ...

  6. Python【模块】importlib,requests

    内容概要:      模仿django中间件的加载方式      importlib模块      requests模块  rsplit()   用实际使用的理解来解释两个模块 importlib模块 ...

  7. C语言将字符串转换成对应的数字(十进制、十六进制)【转】

    转自:http://wawlian.iteye.com/blog/1315133 问题1:讲一个十进制数字的字符串表示转换成对应的整数.举例:将“”转换成整数1234. C代码 收藏代码 /*将字符串 ...

  8. sicily 1020. Big Integer

    Description Long long ago, there was a super computer that could deal with VeryLongIntegers(no VeryL ...

  9. sql server 学习笔记

    1. 修改student表中sdept字段改为varchar类型,长度为30,并且不为空 ) not null 2. 删除student表中的address列 alter table student ...

  10. C# 网络编程小计 20150202

    在学习网络Socket编程之前必须得学会多线程编程,这个是经常会用的到 可参考:http://www.cnblogs.com/GIS_zhou/articles/1839248.html System ...