|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||7||6||5||83.333%|
Listening to music is a good way to take one’s mind off the monotony of typing out solution after correct solution.
However, it can be very annoying to start listening to a tune and then for time to run out early, cutting the listening short. How much more satisfying it would be if you could choose tunes to fit the time available!
With this in mind, you have found a way to code musical scores into simple lists of numbers representing the length of the notes in each tune as follows:
Given such a list of numbers, calculate the length of the tune in notes.
Output the length of the tune, as a real number of notes. The output must be accurate to an absolute or relative error of at most 10−6.
4 1 1 1 0
10 1 2 2 2 1 4 4 8 8 16