1066 -- A+B(3)
来源:互联网 发布:施乐s2110设置网络打印 编辑:程序博客网 时间:2024/06/10 07:38
A+B(3)
Time Limit:1000MS Memory Limit:65536K
Total Submit:528 Accepted:283
Description
Your task is to Calculate the sum of some integers.
Input
Input contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A test case starting with 0 terminates the input and this test case is not to be processed.
Output
For each group of input integers you should output their sum in one line, and with one line of output for each line in input.
Sample Input
4 1 2 3 45 1 2 3 4 50
Sample Output
1015
Source
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AK1066 { /// <summary> /// 表示这条道题我很郁闷,又是一直RE /// what's a fuck /// </summary> class Program { static void Main(string[] args) { string sb; while ((sb = Console.ReadLine()) != null) { string[] s = sb.Split(); int n = int.Parse(s[0]); if (n == 0) break; int sum = 0; for (int i = 1; i <= n; i++) sum += int.Parse(s[i]); Console.WriteLine(sum); } } } }
0 0
- 1066 -- A+B(3)
- a+b(3)
- a+b(3)
- a+b 3
- 5-3 A-B
- int a,b; a=077; b=a|3;
- a>b?a:b
- BestCoder Round #3 A,B
- hdoj1093 a+b(3)
- 5-3 A-B
- 逗号表达式 result = (a+4,b+3,a+b) ...result = a+b;
- a+b
- a+++b
- A + B
- A+B
- A+B
- {A} + {B}
- a+++b
- 浅析支持向量机SVM
- java 中添加图片的两种方法
- Linux学习笔记------Linux启动流程
- django开发博客(1) 入门
- 1065 -- A+B(2)
- 1066 -- A+B(3)
- 选择使用 Sugar.js 还是 Underscore.js ?
- 1067 -- A+B(4)
- 数据库笔记2015-8-29
- ThinkPHP多个分页的实现
- HDU1584-A strange lift-最短路(Dijkstra模板题)
- windows下安装mongoDB扩展
- 1068 -- A+B(5)
- 远控木马的事情