输出结果与下载数据一致,我对拍也一样,但是就是过不去
#include<bits/stdc++.h>
using namespace std;
int a[15],b=0;
int res=0;
double ans=0;
bool c[15];
int main(){
for(int i=1;i<=12;i++){
scanf("%d",&a[i]);
}
for(int i=1;i<=12;i++){
if(300+b-a[i]>=0){
res+=(300+b-a[i])/100;
b=(300+b-a[i])%100;
if(b>=0)c[i]=true;
}
if(!c[i]){
printf("-%d",i);
return 0;
}
}
ans=res*1.2*100+b;
printf("%d",(int)ans);
return 0;
}