|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
有如下数列:1,1,3,1,3,5,1,3,5,7,1...例如第4项是1,第6项是5,求第n项的值。80%数据:0<n<=10000,100%数据: 0<n<=10000000000 |
|
|
|
|
|
|
|
输出格式 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 |
|
题号 |
P1029 |
|
其它 |
通过 |
112人 |
提交 |
705次 |
通过率 |
16% |
难度 |
0 |
|
|
|
|
|
|