Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5894 | 吴承熹 | 13投资金额II | C++ | Accepted | 0 MS | 252 KB | 402 | 2024-12-21 09:13:10 |
#include<iostream> using namespace std; int main(){//此题存在争议,10年后是有11年收益? int M; int Y; cin>>Y>>M; for(int i=Y+0;i<=Y+10;i++){ if(i%400==0||(i%100!=0&&i%4==0)){ M=M*1.3; } else M=M*1.2; //cout<<i<<":"<<M<<endl;//为了查看每一年的钱有多少 } cout<<M<<endl; return 0; }