1593: *分解数字
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:58
Solved:38
Description
输入一个正整数 n ,如果 n是偶数,则分解 n的各个数字相加求和;如果 n是奇数,则分解 n的各个数字相乘求积。
样例1:
输入: 246312
输出: 18
样例2:
输入: 243
输出: 24
Input
输入一个正整数 n (0=<n<=10^9)。
Output
输出一个数字。若n是偶数,输出分解 n的各个数字相加的和;若 n是奇数,输出分解 n的各个数字相乘的积。
Sample Input Copy
246312
Sample Output Copy
18
HINT
0=<n<=10^9