Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5895 詹梓涵 13投资金额II C++ Accepted 0 MS 264 KB 315 2024-12-21 09:13:36

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl using namespace std; int main(){ int n,z; cin>>n>>z; for(int i=n;i<=n+10;i++){ if(i%400==0||(i%100!=0&&i%4==0)){ z=z*1.3; } else z=z*1.2; //cout<<i<<":"<<z<<endl; } cout<<z<<endl; return 0; }