1 条题解
-
1
十年OI一场空,不开
long long
见祖宗。#include <bits/stdc++.h> #define endl '\n' using namespace std; typedef long long ll; long long n, maxx; long long sum(long long n) { long long sum = 0; while (n != 0) { sum = sum + n % 10; n /= 10; } return sum; } int main() { cin >> n; while (n--) { long long tmp; cin >> tmp; maxx = max(sum(tmp), maxx); } cout << maxx << endl; return 0; }
信息
- ID
- 35257
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 1
- 标签
- 递交数
- 60
- 已通过
- 5
- 上传者