60分邱救

P1089 [NOIP2004 提高组] 津津的储蓄计划

@[GGbbbc](/user/620782) ```cpp #include<bits/stdc++.h> using namespace std; int mo[13]; int money,mum,l,v,ll; int main() { for(int i=1;i<=12;i++) { cin>>mo[i]; if(ll==0) { money+=300; if(mo[i]>money) { v=i;ll=1; } else money-=mo[i]; if(money/100!=0) { l=money/100; mum+=l*100; money-=l*100; } if(i==12&&v==0) {cout<<mum*1.2+money;return 0;} } } cout<<"-"<<v; return 0; ```
by _xyz_ @ 2023-03-03 12:19:36


|