Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
33600 | yangyuezheng | 人口增长 | C++ | Compile Error | 0 MS | 0 KB | 264 | 2023-12-10 19:43:24 |
#include<iostream> #include<iomanip> using namespace std; int main(){ double x,n; int i=0; cin>>x>>n; while(i<=n){ i++//年份增加 x=x*(1+0.001);//人口每年增加 } cout<<fixed<<setprecision(4)<<x; return 0; }