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

27614번 - It's About Time 스페셜 저지다국어

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

문제

Greg Orian works for the Temporal Innovations for Multiple Earths (TIME) program. One of his main jobs is determining yearly calendars for the numerous human colonies on various planets (did we mention this problem takes place in 2123ドル$?). One issue when creating calendars is the schedule for leap days. On GoE (Good ol' Earth) the rules for leap years are the following:

  1. Any year divisible by 4ドル$ is a leap year, unless
  2. the year is divisible by 100ドル$ in which case the year is not a leap year, unless
  3. the year is divisible by 400ドル$ in which case the year is a leap year.

Leap days are needed since the 365ドル$ days in the calendar year is not exactly equal to the time for GoE to orbit the sun, which is more like 365ドル.24219$ days (known as the tropical\/ year). This system does a good job in closely approximating the tropical year while also being fairly simple to remember.

While this works fine for GoE, it obviously won't work for planets with different tropical years. The colonists have enough to adjust to already (lower oxygen levels, colonial in-fighting, people-eating plants, etc.) so Greg wants to come up with rules that are similar to the ones for GoE. He's hit on the following scheme for finding three values $n_1,ドル $n_2$ and $n_3$ for determining when a year is a leap year:

  1. The number of days $d$ in a non-leap year is the number of days in a tropical year, rounded to the nearest integer. If the fractional number of days is exactly 0ドル.5,ドル round the number of days up.
  2. If you rounded the tropical year down then
    1. every year divisible by $n_1 > 1$ is a leap year (i.e., you add 1ドル$ day that year), unless
    2. the year is divisible by $n_2$ (where $n_1 < n_2$ and $n_2$ is a multiple of $n_1$) in which case the year is not a leap year, unless
    3. the year is divisible by $n_3$ (where $n_2 < n_3 \leq 1,000円$ and $n_3$ is a multiple of $n_2$) in which case the year is a leap year.
  3. If you rounded the tropical year up then the same rules apply except that you subtract 1ドル$ day from leap years instead of adding 1ドル$ (would these be leak years?).

For GoE these numbers would be $d = 365, n_1=4, n_2=100$ and $n_3=400$. Given the distance a planet is from its sun (we'll assume a circular orbit), the speed the planet travels around its sun and the number of hours in the planet's day determine the $n_i$ values above to best approximate that planet's year. Note that the best approximation may overestimate or underestimate the actual tropical year length, regardless of the direction of rounding.

입력

Input contains a single line with three positive integers $r$ $s$ $h$ where $r \leq 1,000円,000円,000円$ is the distance in miles of the planet from the sun, $s \leq 1,000円,000円$ is the speed the planet travels in miles/hour, and $h \leq 1,000円$ is the number of hours in the planet's day. The length of a tropical year is guaranteed to be at least one day ($h$ hours) in length.

출력

Output the values $n_1$ $n_2$ $n_3$ as described above. It there are multiple values that give the same best approximation, then output any of them.

제한

예제 입력 1

92998938 66660 24

예제 출력 1

4 100 400

예제 입력 2

92998938 66660 25

예제 출력 2

2 6 30

힌트

출처

ICPC > Regionals > North America > East Central North America Regional > 2022-2023 East Central Regional Contest F번

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

출처

대학교 대회

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

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