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

6776번 - Sample Size 다국어

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

문제

Someone whose name I don’t want to remember was reading an article in the newspaper that mentioned the results of a poll. Upon seeing that the percentages that appeared in the article were all 25%, 50% and 75%, they thought that maybe the poll only included 4 people, and was then not very good.

In this problem, your task is to come up with a program that would make a similar analysis. In particular, given the percentages that appear in a newspaper article, it is your task to determine the minimum number of people that must have been interviewed in order for those percentages to be possible, assuming that percentages are rounded to the closest integer, with .5 rounded up (so, 1 of 3 people corresponds to 33%, 2 of 3 people corresponds to 67%, and 155 of 1000 people corresponds to 16%).

입력

The first line of the input file will contain an integer M between 1 and 100000 (inclusive). This represents the number of percentages that appear in the newspaper article you are analyzing.

M lines will follow, each of them containing an integer percentage P, 0 ≤ P ≤ 100.

출력

An integer N ≥ 1, the minimum number of people that must be interviewed for all of the percentages in the input to correspond to a fraction of those people.

제한

예제 입력 1

3
25
50
75

예제 출력 1

4

예제 입력 2

2
33
67

예제 출력 2

3

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2012 > CCO 2012 5번

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

출처

대학교 대회

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

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