Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99522 | 刘国平 | 14经过路口 | C++ | Accepted | 1 MS | 260 KB | 263 | 2024-11-30 09:38:18 |
#include<bits/stdc++.h> using namespace std; int main(){ int n=100000; for(int i=1;;i++){ if(n>50000){ n=n-(0.05*n);//缴纳5%的过路费 }else{ n=n-5000;//缴纳5000的过路费 } if(n<5000){ cout<<i; break; } } return 0; }