提交时间:2022-10-05 08:50:51

运行 ID: 11476

#include"bits/stdc++.h" using namespace std; int main(){ int j=0,x=0,y; for(int i=1;i<=12;i++){ cin>>y; x+=300; if(x<y){ cout<<"-"<<i; return 0; } else{ x-=y; if(x>=100)j+=x/100*100; x-=x/100*100; } } cout<<j*1.2+x; }