QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 1024 MB 總分: 100

#5578. 蓝莓华夫饼

统计

你正在使用一台华夫饼机制作美味的蓝莓华夫饼。华夫饼的一面覆盖着蓝莓,另一面则是平滑的。最初,华夫饼机的烤盘处于水平位置。一旦启动,烤盘将以恒定速度旋转一段固定的时间,然后停止。烹饪时间设定为当华夫饼机停止时,烤盘不会处于垂直位置。

如果此时烤盘不是水平的,华夫饼机将通过尽可能小的旋转角度回到水平位置。因此,烤盘会向前或向后旋转小于 90 度,直到烤盘再次水平。

烤盘的旋转速度为每 $r$ 秒旋转 180 度,并在 $f$ 秒后停止。你不希望取出蓝莓面朝下的华夫饼。因此,你需要计算出当烤盘回到水平位置后,华夫饼的蓝莓面是朝上还是朝下。

输入格式

输入包含一行,包含两个整数 $r$ 和 $f$ ($1 \le r, f \le 10^4$)。烤盘的旋转速度为每 $r$ 秒旋转 180 度,并在 $f$ 秒后停止。保证在 $f$ 秒后,烤盘不会处于垂直位置。

输出格式

输出一行,包含一个字符串。如果蓝莓面朝上,输出 up;否则输出 down

样例

样例输入 1

10 20

样例输出 1

up

样例输入 2

10 34

样例输出 2

down

样例输入 3

10 47

样例输出 3

down

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.