|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
求杨辉三角形的某行某列的值。
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
样例1:
输入:
4 3
输出:
6
样例2:
输入:
6 5
输出:
15
|
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
2个自然数x和y,(0<x<10 0<y<20),x表示第x行,y表示第y列。
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
一个整数,表示第x行第y列的值。 |
|
|
|
|
|
|
|
时间限制 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 |
|
题号 |
P1048 |
|
其它 |
通过 |
37人 |
提交 |
112次 |
通过率 |
33% |
难度 |
0 |
|
|
|
|
|
|