求助
查看原帖
求助
1135416
yaoge2012楼主2024/4/4 12:26

本地没问题,评测90分,错一点

#include<iostream>
#include<cstring>
#include<string>
using namespace std;
int main(){
int a,b,c,zb[90],maxs=-1;
cin>>a>>b>>c;
for(int i = 3; i <= 90;i++){
zb[i] = 0;
}
for(int i = 1; i <= a;i++){
for(int j = 1; j <= b;j++){
for(int s = 1; s <= c;s++){
zb[i+j+s]++;
}
}
}
for(int i = 3; i <= 90;i++){
if(zb[i] > zb[maxs]){
maxs = i;
}
}
cout<<maxs<<endl;
return 0;
}


2024/4/4 12:26
加载中...