真的不想努力了题解

admin 2025-11-02 18:53:31 2025-11-02 18:53:51

题解

设第 年的金额为,则有

化简一下:

其中。 根据状态转移方程可以得到:

为了使 ,只需要

代码

#include <bits/stdc++.h>
using namespace std;

using db = double;
void solve()
{
    db r, b, c;
    cin >> r >> b >> c;
    r /= 100;
    cout << (r + 1) * b / r / r + c / r << '\n';
}
signed main()
{
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int t;
    cin >> t;
    while (t--)
        solve();
    return 0;
}