問題一覧 > 通常問題

No.339 How Many People Answered?

レベル : / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 296
作問者 : matsu7874
お気に入りにしたユーザー ProblemId : 776 / 自分の提出
問題文最終更新日: 2026-06-25 20:44:06
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 130 (順位表) の他の問題:

Problem Statement

You are given a pie chart with an unknown number of responses.
From the chart, it is clear that the percentage of people who chose option $i$ is $A_i$% ($A_i$ is an integer).
Find the minimum possible number of responses.
Each $Ai$ has not been processed by rounding, error correction, or the like, and is the proportion of the responses choosing option $i$ among all responses.

Input

$N$
$A_{1}$
$A_{2}$
$⋮$
$A_{N}$

Line 1 contains an integer $1 \le N \le 100$, the number of options.
Lines 2 through $N+1$ contain integers $1 \le A_{i} \le 100$, the percentage of responses for option $i$.
The input satisfies the following constraints.
$\sum_{k=1}^N A_k = 100$
$A_{k} \ge A_{k+1}$ for $1 \le k \le N-1$

Output

Output the minimum possible number of responses as an integer.

Sample

Sample 1
Input
2
50
50
Output
2

It can be considered that 1 person chose option 1 and 1 person chose option 2.

Sample 2
Input
1
100
Output
1

It can be considered that 1 person chose option 1.

Sample 3
Input
3
60
30
10
Output
10

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。