|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
求数列第n项值:1,2,3,6,11,20,37,68,125,230,.....例如:第7项为37,第9项为125。 |
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
1个自然数n (0<n<10 )表示求第n项。
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
一个整数,表示第n项的值。 |
|
|
|
|
|
|
|
时间限制 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 |
|
题号 |
P1050 |
|
其它 |
通过 |
60人 |
提交 |
97次 |
通过率 |
62% |
难度 |
0 |
|
|
|
|
|
|