#fish8. 小鱼会有危险吗
小鱼会有危险吗
P1426 Will the Little Fish Be in Danger?
题目描述
Once, a little fish started swimming to the right along a straight line from point . In the first second, it can swim meters. Starting from the second second, the distance it swims each second is only of the distance swum in the previous second. An extremely evil hunter has installed a concealed detector at a point meters to the right of . The detector’s detection range extends meters to both the left and right. Once the little fish enters the detector’s range, the detector will transmit a signal to the hunter at the end of that second. One second later, the hunter will conduct a capture within the detector’s range. If the little fish is still within this range at that time, it will be in danger. In other words, once the little fish enters the detector’s range, it is still safe if it can swim out of the detector’s range within the next second. Now, given and , please determine whether the little fish will be in danger. Output y if it is in danger, and n if it is not.
输入格式
A single line containing two real numbers separated by a space, representing and .
输出格式
Output a single line containing y or n to indicate whether the little fish will be in danger.
输入输出样例 #1
输入 #1
14 1
输出 #1
n
说明/提示
Constraints
For of the testdata, it is guaranteed that , with at most digits after the decimal point.
Translated by ChatGPT 5
相关
在下列比赛中: