#abc204b. B - Nuts

B - Nuts

Score : 200200 points

问题描述

NN 棵树。第 ii 棵树结了 AiA_i 颗坚果。

花栗鼠将以以下方式采集坚果:

  • 对于结有 1010 颗或更少坚果的树,她不取走坚果。
  • 对于结有多于 1010 颗坚果的树,她会取走除了 1010 颗以外的所有坚果。

请计算花栗鼠将从这些树上总共取走多少颗坚果。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

There are NN trees. The ii-th tree bears AiA_i nuts.

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

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

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

Constraints

  • 1N10001 \leq N \leq 1000
  • 0Ai10000 \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.

Sample Input 1

3
6 17 28

Sample Output 1

25

From the three trees, Chipmunk will take 00, 77, and 1818 nuts, for a total of 2525 nuts.

Sample Input 2

4
8 9 10 11

Sample Output 2

1

update @ 2024/3/10 09:17:00