No.1686 Geschenkt
問題文最終更新日: 2021-10-02 01:34:08
English (AI translation)
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.
Back to the original
yukicoder contest 315
(順位表)
の他の問題:
Problem Statement
You have $N$ cards, and the $i$-th $(1 \le i \le N)$ card has the integer $A_i$ written on it.
The score of the cards you hold is defined as follows. What is the score?
Input
$N$ $A_1$ $A_2$ $\dots$ $A_N$
Output
Print the score. End the output with a newline.
Sample
Sample 1
Input
4 5 6 7 31
Output
36
The cards that contribute to the score are the ones with $5$ and $31$ written on them.
Sample 2
Input
5 8 15 7 16 14
Output
21
$A$ is not necessarily sorted in ascending order.
Sample 3
Input
17 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35
Output
323
Incidentally, in the game called Geschenkt, a higher score is worse.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
ansain
noya2