[GESP202412 二级] 2. 数位和
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 个正整数,小杨想知道这些正整数的数位和中最大值是多少。
“数位和”指的是一个数字中所有数位的和。
例如: 对于数字 12345,它的各个数位分别是1,2,3,4,5。将这些数位相加,得到:
1+2+3+4=5=15
输入格式
第一行包含一个正整数 n,代表正整数个数。 之后 n 行,每行包含一个正整数。
输出格式
输出这些正整数的数位和的最大值。
样例
3
16
81
10
9
提示
对于全部数据,保证有 ,每个正整数不超过 。
C++ GESP 2024年12月 二级
- Status
- Done
- Rule
- OI
- Problem
- 3
- Start at
- 2025-1-4 15:30
- End at
- 2025-1-12 23:30
- Duration
- 200 hour(s)
- Host
- Partic.
- 25