포럼
문제 ICPC00371

K. Knowing the Clock

설명

It is the 25th of November, 1625. You have put a lot of time into making a mechanical watch, but you are unsure if the hands are placed correctly. Even a watch that is not running is correct twice a day, but if the hands of the watch do not correspond to a real time, it is never correct at all. Without wasting any more time, you measure the angles of the hands and check whether they correspond to a real time.

For example, consider the first sample input, visualized in Figure : if the minute hand points to a quarter past (90 degrees from 12 o'clock), then the hour hand cannot point exactly to 2 o'clock (60 degrees from 12 o'clock).

You know that both hands of the watch are moving continuously.

제약
입력 형식

The input consists of:
- One line with two integers \(h\) and \(m\) (\(0 \leq h, m \leq 359\)), the exact clockwise angle that the hour hand is from 12 o'clock and the exact clockwise angle that the minute hand is from 12 o'clock. Both angles are given in degrees.

출력 형식

If the angles of the hands correspond to a real time, output "yes". Otherwise, output "no".

예제 1
입력
60 90
출력
no
예제 2
입력
30 0
출력
yes
예제 3
입력
30 1
출력
no
예제 4
입력
32 24
출력
yes
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC BAPC 2025

평가 및 의견

K. Knowing the Clock

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

K. Knowing the Clock

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8