|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
输入一个正整数N,如果N是偶数,则拆分N的各个数字相加求和;如果N是奇数,则拆分N的各个数字相乘求积。(n<30000000) |
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
一个不大于30000000的整数,表示要拆分的数。
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
一个数,即对应各数位上数的和或积。 |
|
|
|
|
|
|
|
时间限制 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 |
|
题号 |
P1061 |
|
其它 |
通过 |
51人 |
提交 |
247次 |
通过率 |
21% |
难度 |
0 |
|
|
|
|
|
|