| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70103 | sh25_wangtaojie | 地球人口承载力估计 | C++ | 通过 | 0 MS | 240 KB | 457 | 2025-10-17 14:48:51 |
#include <iostream> #include <iomanip> using namespace std; int main() { int x, a, y, b; cin >> x >> a >> y >> b; double total1 = x * a; double total2 = y * b; double years_diff = b - a; double growth_rate = (total2 - total1) / years_diff; double initial_resources = total1 - growth_rate * a; double max_population = growth_rate; cout << fixed << setprecision(2) << max_population << endl; return 0; }