No.339 How Many People Answered?
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もしくは右上の雲マークをクリックしてアカウントを作成してください。
matsu7874