传统题 1000ms 256MiB

B - Nuts

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

B - Nuts

Score : $200$ points

Problem Statement

There are $N$ trees. The $i$-th tree bears $A_i$ nuts.

Chipmunk will harvest nuts from the trees in the following manner:

  • From a tree with $10$ or fewer nuts, she does not take nuts.
  • From a tree with more than $10$ nuts, she takes all but $10$ nuts.

Find the total number of nuts Chipmunk will take from the trees.

Constraints

  • $1 \leq N \leq 1000$
  • $0 \leq A_i \leq 1000$
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN

A1A_1 \ldots ANA_N

Output

Print the answer.


3
6 17 28
25

From the three trees, Chipmunk will take $0$, $7$, and $18$ nuts, for a total of $25$ nuts.


4
8 9 10 11
1

2025春季ATC码力训练基础营第十二次比赛

未参加
状态
已结束
规则
IOI
题目
6
开始于
2025-6-14 13:00
结束于
2025-6-14 14:30
持续时间
1.5 小时
主持人
参赛人数
4