Status Time Memory Lang. Submit Date

1112.Number

Time Limit:1000MS  Memory Limit:65535KB
Description

给定n(4 <= n <= 20)个不同数的数Ai ( 0 <=Ai <= 100) ,找一个最大的数,使其恰好等于另外三个不同的数之和。若不存在, 则输出”no solution”.

Input

输入的第一行是一个整数,接下来是n行,表示Ai。

Output

输出最大的一个数,使其恰好等于另外三个不同的数之和。若不存在, 则输出”no solution”.

Sample test
Sample input
5
2
3
5
7
12
Sample output
12
Note

<div>Sample Input</div>
<div><b>5</b></div>
<div><b>2 </b></div>
<div><b>16 </b></div>
<div><b>64 </b></div>
<div><b>256 </b></div>
<div><b>1024</b></div>
<div>Sample Output</div>
<div><b>no solution</b></div>

Tags
Post editorial
Editorials
Login before submit
Test Input
Test Output
Console
IDE Setting
  • 字体设置
    调整适合你的字体大小。
  • 主题设置
    切换不同的代码编辑器主题,选择适合你的语法高亮。
  • 行宽限制
    设置每一行代码的最大字符个数,设置为0则不限制。