問題一覧 > 通常問題

No.1406 Test

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 355
作問者 : PCTprobability / テスター : akakimidori kyoprouno
お気に入りにしたユーザー ProblemId : 5595 / 自分の提出
問題文最終更新日: 2021-02-20 01:36:34
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. Show the original
yukicoder contest 284 (順位表) の他の問題:

Problem Statement

You are given a positive integer $N$ and a sequence of non-negative integers $A_1,A_2,...,A_{N-1}$. There are $N$ students, numbered from $1$ to $N$. All of the students took an exam with a maximum score of $100$ points. Each score is a non-negative integer between $0$ and $100$, inclusive. For each positive integer $K$ between $1$ and $N-1$, inclusive, the score of the $K$-th student is known to be $A_K$. Output the number of possible scores of the $N$-th student for which the average score is an integer.

Also, when $N=1$, the sequence $A$ has $0$ elements.

Input

$N$
$A_1$ $A_2$ $...$ $A_{N-1}$

  • All inputs are integers.
  • $1 \le N \le 10$
  • $0 \le A_i \le 100$

Output

Output the number of possible scores of the $N$-th person for which the average score is an integer.

Sample

Sample 1
Input
4
1 2 3
Output
25

One possible score of the $4$-th student is, for example, $6$ points.

Sample 2
Input
5
87 34 2 46
Output
20

Poor student $3$.

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