2039 津津的储蓄计划
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e3+10,inf = 0x3f3f3f3f; int main() { int money = 0,c = 0,s; for(int i = 1; i <= 12; i++) { int x; cin >> x; money += 300; money -= x; s = money / 100; c += s * 100; money -= s * 100; if(money < 0) { cout << -i;return 0; } } cout << c * 1.2 + money; return 0; }