Logo
(追記) (追記ここまで)

27566번 - Blueberry Waffle 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB41928124968.033%

문제

You are using a waffle maker machine to make a delicious blueberry waffle. One side of your waffle is covered in blueberries, while the other side is plain. Initially, the cooking pan of the waffle maker lies horizontally, and the blueberries are on the top side of the waffle. Once started, the cooking pan will rotate at a constant speed for a fixed duration, then stop. The cooking time is set so that when the waffle maker stops, the cooking pan will not be in a vertical position.

If the cooking pan is not horizontal after this time, the waffle maker will return to a horizontal position via the smallest rotation possible. Therefore, the waffle maker will rotate less than 90ドル$ degrees, either forward or backward, until the cooking pan is horizontal again.

The pan rotates at a rate of 180 degrees every $r$ seconds, and stops after $f$ seconds. You don't want to take out your waffle with its blueberry side down. Therefore you'd like to figure out whether the blueberry side of the waffle is up or down after the cooking pan returns to a horizontal position.

입력

The single line of input contains two integers $r$ and $f$ (1ドル \leq r, f \leq 10^4$). The pan rotates at a rate of 180ドル$ degrees every $r$ seconds, and stops after $f$ seconds. It is guaranteed that after $f$ seconds the cooking pan is not at a vertical position.

출력

Output a single line with a single string, which is up if the blueberry side of the waffle is up, or down otherwise.

제한

예제 입력 1

10 20

예제 출력 1

up

예제 입력 2

10 34

예제 출력 2

down

예제 입력 3

10 47

예제 출력 3

down

힌트

출처

ICPC > Regionals > North America > Mid-Atlantic Regional > 2022 Mid-Atlantic USA Regional Contest > Division 2 A번

ICPC > Regionals > North America > South Central USA Regional > 2022 South Central USA Regional Contest > Division 2 A번

ICPC > Regionals > North America > Southeast USA Regional > 2022 Southeast USA Regional Programming Contest > Division 2 A번

ICPC > Regionals > North America > Mid-Central Regional > 2022 Mid-Central USA Regional Contest A번

ICPC > Regionals > North America > Rocky Mountain Regional > 2022 Rocky Mountain Regional Contest A번

  • 문제를 만든 사람: Howard Cheng
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /