Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
76472 sh25_wanghy 人口增长 C++ 通过 0 MS 264 KB 373 2025-12-19 15:09:02

Tests(1/1):


#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { int x, n; cin >> x >> n; // 计算n年后的人口:x * (1 + 0.1%)^n double result = x * pow(1 + 0.001, n); // 设置输出格式,保留小数点后四位 cout << fixed << setprecision(4) << result << endl; return 0; }


测评信息: