#t25. 乌龟兔子赛跑问题
乌龟兔子赛跑问题
The Tortoise and the Hare
Problem Description
A tortoise and a hare start a race at the same starting point of a rectangular track at the same moment. The tortoise advances metres per minute and never rests; the hare advances metres per minute, but every minutes it turns back to check on the tortoise — if it finds that it is currently ahead of the tortoise, it rests by the roadside for minutes, otherwise it keeps running for the next minutes. After the race has run for minutes, decide who is faster between the tortoise and the hare, and output the result as required.
Input Format
The input gives the total race time (in minutes) on one line.
Output Format
Output the result of the race on one line: if the tortoise wins output @_@, if the hare wins output ^_^, and if it is a tie output -_-; followed by a space, then the distance covered by the winner (if it is a tie, either the tortoise's or the hare's distance is acceptable).
Sample Input
242
Sample Output
@_@ 726
Constraints