85pts,WA在13 17,18
查看原帖
85pts,WA在13 17,18
1282570
zxChicken4088楼主2025/1/5 19:40
#include <iostream>
using namespace std;

int s, x;
double l, sp = 7;

int main()
{
	cin >> s >> x;
	while (true)
	{
		if (l >= s-x)
		{
			if (l+sp*.98 <= s+x) cout << "y" << endl;
			else cout << "n" << endl;
			break;
		}
		l += sp;
		sp *= .98;
	}
 	return 0;
}

2025/1/5 19:40
加载中...