提交时间:2025-10-17 14:48:51
运行 ID: 70103
#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; }