問題一覧 > 通常問題

No.3406 Joya no Kane

レベル : / AI推定難易度 : 101 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 69
作問者 : kirameku / テスター : 👑 kencho
お気に入りにしたユーザー ProblemId : 12928 / 自分の提出
問題文最終更新日: 2025-12-13 09:15:48
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
Advent Calendar Contest 2025 (順位表) の他の問題:

Problem Statement

Taro is going to strike the Joya no Kane (New Year's Eve temple bell).
Each time Taro strikes the bell, his worldly desires decrease by 1, and he keeps striking until he has no worldly desires left.
Taro has $N$ worldly desires, and one strike of the bell takes $A$ seconds.
The current date and time is December 31, 2025, $H$ hours $M$ minutes $S$ seconds. If Taro starts striking the bell now, answer whether he can cross into the new year$\color{red}^{*1}$ while striking the bell or at the moment he finishes striking.

$\color{red}^{*1}$ What crossing into the new year means (click to open)

It means the year changes, but since the date here is December 31, 2025, it refers to the date changing.

Constraints

  • $1 \le N \le 500$
  • $1 \le A \le 300$
  • $0 \le H \le 23$
  • $0 \le M \le 59$
  • $0 \le S \le 59$
  • All inputs are integers.

Input

The input is given from standard input in the following format.

$N$ $A$ $H$ $M$ $S$

Output

Print Yes if Taro crosses into the new year while striking the bell or at the moment he finishes striking, and No if he does not, followed by a newline.

Sample

Sample 1
Input
108 100 23 0 0
Output
Yes

Taro finishes striking the bell in 3 hours, so he can cross into the new year while striking the bell.

Sample 2
Input
150 300 0 0 0
Output
No

Sample 3
Input
150 60 21 30 0
Output
Yes

It may also be that 0:00 arrives exactly when he finishes striking the bell.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。