|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||1024 MB||3||2||2||66.667%|
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:
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:
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.
92998938 66660 24
4 100 400
92998938 66660 25
2 6 30