提交时间:2025-07-21 21:48:47

运行 ID: 335134

#include<bits/stdc++.h> using namespace std; int main(){ // n是当月花,w是 int n,w=0,c=0,s=0; for(int i=1; i<=12; i++){ cin>>n; w=w+500-n; if(w<0){ cout<<'-'<<i; return 0; } c=w/100*100; //存 s=s+c; w=w-c; } cout<<w+s*1.2; return 0; }