85求助
查看原帖
85求助
1292414
LeonTexius楼主2024/11/22 14:41

6#,10#,12#WA 求助 yijingzoule意味已经走了

#include<bits/stdc++.h>
using namespace std;
double speed = 7.0,yijingzoule;
double s,x;

int main()
{
    cin >> s >> x;
    while(yijingzoule < (s - x))
    {
		yijingzoule += speed;
		speed *= 0.98;
	}
	if((yijingzoule + speed * 0.98) > (s + 2 * x))
	{
		cout << "n";
	}
	else
	{
		cout << "y";
	}
	return 0;
	
}

2024/11/22 14:41
加载中...