I think it

2020年1月17日 1304点热度 0人点赞 0条评论

I think it

时间: 1ms        内存:32M

描述:

Xiao Ming is only seven years old, Now I give him some numbers, and ask him what is the second largest sum if he can choose a part of them. For example, if I give him 1 、 2 、 3 , then he should tell me 5 as 6 is the largest and 5 is the second. I think it is too hard for him, isn ’ t it?

输入:

Standard input will contain multiple test cases. The first line of the input is a single integer T (1 <= T <=10) which is the number of test cases. And it will be followed by T consecutive test cases.
Each test case starts with a line containing an integer N (1<N<10) , the number I give Xiao Ming . The second line contains N Integer numbers ai (-10<ai<10),

输出:

For each test case, output the answer.

示例输入:

2
3
1 2 3
4
0 1 2 3

示例输出:

5
5

提示:

参考答案:

解锁文章

没有看到答案?微信扫描二维码可免费解锁文章

微信扫描二维码解锁

使用微信扫描二维码打开广告页面后可以立即关闭,再刷新此页面即可正常浏览此文章

所跳转广告均由第三方提供,并不代表本站观点!

已经扫描此二维码?点此立即跳转

code

这个人很懒,什么都没留下

文章评论