GESP 二级真题题解 2024 12
2026-02-09 10:27:58
发布于:江苏
1阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int n,maxn=0;
int main() {
cin>>n;
for (int i = 1; i <= n; i++) {
int t,x=0;
cin>>t;
while(t) {
x+=t%10;
t/=10;
}
maxn=max(maxn,x);
}
cout<<maxn;
return 0;
}
这里空空如也



有帮助,赞一个