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

15036번 - Just A Minim 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB64346542473.611%

문제

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:

Code Name Length
0 breve 2 notes
1 semibreve 1 notes
2 minim 1/2 notes
4 crotchet 1/4 notes
8 quaver 1/8 notes
16 semiquaver 1/16 notes

Given such a list of numbers, calculate the length of the tune in notes.

입력

  • One line containing the integer N (1 ≤ N ≤ 2000), the number of values in the tune.
  • one line containing N integers each representing the length of a value using the codes above.

출력

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.

제한

예제 입력 1

4
1 1 1 0

예제 출력 1

5

예제 입력 2

10
1 2 2 2 1 4 4 8 8 16

예제 출력 2

4.3125

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2017 J번

  • 문제를 만든 사람: Jim Grimmett
(追記) (追記ここまで)

출처

대학교 대회

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

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