#711. 双硬币组合
双硬币组合
Description
有n种硬币,每种有2枚。求能组成的不同金额数目。
Input
第一行输入n,接下来一行输入n个正整数表示每种硬币的面值。(n不超过30,硬币面值不超过50)
Output
输出可能的金额数目。(没有选择硬币也算1种方案)
Samples
2
1 2
7
Limitation
1s, 1024KiB for each test case.
Related
In following homework:
有n种硬币,每种有2枚。求能组成的不同金额数目。
第一行输入n,接下来一行输入n个正整数表示每种硬币的面值。(n不超过30,硬币面值不超过50)
输出可能的金额数目。(没有选择硬币也算1种方案)
2
1 2
7
1s, 1024KiB for each test case.
In following homework:
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.