2 条题解

  • 1
    @ 2024-10-29 11:27:55
    #include<bits/stdc++.h>
    using namespace std;
    
    int main() {
        int budget, money = 0, interest = 0;
        for (int i = 1; i <= 12; i++) {
            cin >> budget;
            money += 300 - budget;
            if (money < 0) {
                cout << '-' << i;
                return 0;
            }
            while (money >= 100) {
                interest += 100;
                money -= 100;
            }
        }
        cout << money + interest * 1.2;
        return 0;
    }
    

    信息

    ID
    5147
    时间
    1000ms
    内存
    125MiB
    难度
    1
    标签
    递交数
    536
    已通过
    241
    上传者