是否含有5
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
说明
请从键盘读入一个五位整数n,判断其是否含有数字5,如果含有数字5,请输出这个5位数各个位的和;如果不含数字5,请直接输出这个5位数。
比如:输入:12345,就是含有数字5,因此输出12(1+2+3+4+5=15)。
再比如:输入:12188,就不含数字5,那么直接输出12188。
输入格式
一个五位正整数n。
输出格式
输出一个整数,代表按要求计算的结果。
样例
12345
15
非常好看
- Status
- Done
- Rule
- Ledo
- Problem
- 40
- Start at
- 2025-1-24 16:45
- End at
- 2025-4-18 0:45
- Duration
- 2000 hour(s)
- Host
- Partic.
- 17