Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
40100 | wuxinyue | 人口增长 | C++ | Accepted | 0 MS | 244 KB | 236 | 2024-02-07 15:40:38 |
#include <bits/stdc++.h> using namespace std; int main(){ double x ; cin>>x; int n; cin>>n; int i=1; while(i<=n){ x=x+x*0.001; i++; } cout << fixed << setprecision(4)<< x; return 0; }