Run ID:1761
提交时间: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; }