Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7665 | luchenyuan | 津津的储蓄计划 | C++ | 解答错误 | 0 MS | 248 KB | 487 | 2023-02-06 08:39:59 |
#include<iostream> using namespace std; int main() { int k; int money=0; int money2=0; bool isPoor=false; for (int i=1; i<=12; i++) { cin >> k; money+=300; money-=k; money-=money%100; money2+=money%100; if (money<0) { cout << -i; isPoor=true; break; } } if (!isPoor) { money2*=1.2; money+=money2; cout << money; } }