Metronome
Time limit1sMemory limit1024 MB
Given a tick count n, the task is to compute how many key revolutions give n ticks, at four ticks per revolution, printed to two decimals.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
A Metronome is a mechanical device used by musicians for keeping time. It is based on a spring, an inverted pendulum, and an escapement gear. Milo is learning to play the glockenspiel and has bought a metronome to help him keep time. Milo has noticed that each complete turn (one revolution) of the key makes the metronome give four ticks. Milo wants the metronome to stop at the end of each song he tries to play.
For a given song, how many revolutions must he wind the key?
Input
The single line of input contains a single integer (), the length of the song in ticks.
Output
Output a single real number: the number of revolutions Milo must turn the key so that the metronome stops precisely at the end of the song. The number must be accurate to two decimal places.