Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1761 | 孙浚轩 | 13投资金额II | C++ | Wrong Answer | 0 MS | 264 KB | 462 | 2023-11-05 00:16:45 |
#include <iostream> int main() { int year, amount; std::cin >> year >> amount; int total = amount; for (int i = 1; i <= 10; i++) { if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) { total += total * 0.3; // 闰年收益率为30% } else { total += total * 0.2; // 平年收益率为20% } year++; } std::cout << total << std::endl; return 0; }
------Input------
94 48
------Answer-----
405
------Your output-----
312