提交时间:2025-10-18 13:57:32

运行 ID: 70554

#include<bits/stdc++.h> using namespace std; int main(){ int a[12],m=0,store=0; bool n=true; for(int i=0;i<12;i++){ cin>>a[i]; m+=300; if(m<a[i]){ cout<<-1-i; n=false; return 0; }else{ store+=(m-a[i])/100; m=(m-a[i])%100; } } cout<<m+store*120; return 0; }