D. 双硬币组合

    Type: Default 1000ms 256MiB

双硬币组合

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

有n种硬币,每种有2枚。求能组成的不同金额数目。

Input

第一行输入n,接下来一行输入n个正整数表示每种硬币的面值。(n不超过30,硬币面值不超过50)

Output

输出可能的金额数目。(没有选择硬币也算1种方案)

Samples

2
1 2
7

Limitation

1s, 1024KiB for each test case.

2.22课后作业

Not Claimed
Status
Done
Problem
4
Open Since
2025-2-23 0:00
Deadline
2025-3-16 23:59
Extension
24 hour(s)