题解
2026-02-02 18:33:50
发布于:辽宁
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, a, cnt, max = 0;
cin >> n >> a;
for(int i=1; i<=n; i++){
cnt = 0;
cin >> a;
while(a != 0){
cnt += a % 10;
a /= 10;
}
if(cnt > max)
max = cnt;
}
cout << max;
return 0;
}
这里空空如也



有帮助,赞一个