|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
学生人数
问题描述:
向阳小学五年级共有N个班,每个班的人数已知,现在请你统计五年级共有多少人。全年级的人数等于各班人数的和。
数据输入:
从文件student.in,读入数据,共有N+1行,第一行为班数N(n<=20),接下来有N行,每行一个正整数,表示各班的人数(小于等于60)。
数据输出:
结果输出到student.out中,只有一个数,表示全年级的人数。
输入输出样例:
Student.in
3
36
40
38
Student.out
114
|
|
|
|
|
|
|
|
时间限制 Time Limitation |
|
|
各个测试点1s
|
|
|
|
|
|
|
|
注释 Hint |
|
|
Free Pascal Code:
-------------------
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C++ Code:
-------------------
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
|
|
|
|
|
|
|
|
|
Flag |
|
题号 |
P1573 |
|
其它 |
通过 |
62人 |
提交 |
95次 |
通过率 |
65% |
难度 |
0 |
|
|
|
|
|
|