|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
打印三角形2
样例1:
输入:
4
输出:
1
2 5
3 6 8
4 7 9 10
样例2:
输入:
5
输出:
1
2 6
3 7 10
4 8 11 13
5 9 12 14 15
|
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
一个自然数n,(0<n<1000),表示打印n行。
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
n行数据。每行的每个数字之间间隔为1个空格。
|
|
|
|
|
|
|
|
时间限制 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 |
|
题号 |
P1047 |
|
其它 |
通过 |
97人 |
提交 |
281次 |
通过率 |
35% |
难度 |
0 |
|
|
|
|
|
|