我的代码:
#include <iostream>
using namespace std;
int main()
{
double s, f, x = 0, v = 7;
cin >> s, f;
double y = s + f;
s -= f;
while (x < s)
{
x += v;
v *= 0.98;
if (x > y)
{
cout << "n";
return 0;
}
}
x += v;
if (x > y) cout << "n";
else cout << "y";
return