#3266. Nuts
0
Nuts
Nuts
题目描述
There are trees. The -th tree bears nuts. Chipmunk will harvest nuts from the trees in the following manner:
From a tree with or fewer nuts, she does not take nuts. From a tree with more than nuts, she takes all but nuts.
Find the total number of nuts Chipmunk will take from the trees.
输入格式
Input is given from Standard Input in the following format:
输出格式
Print the answer.
3
6 17 28
25
4
8 9 10 11
1
提示
All values in input are integers.From the three trees, Chipmunk will take , , and nuts, for a total of nuts.
标签: AtCoder|abc204B
来源
AtCoder|abc204B