当前位置: > 英语翻译...
题目
英语翻译
Description« acmnew » is a system which allows to create programming tasks in a simple and professional way.When you add a test to the problem,the corresponding form asks you for the test index.As in most cases it is clear which index the next test will have,the system suggests the default value of the index.It is calculated as the smallest positive integer which is not used as an index for some previously added test.You are to implement this feature.Create a program which determines the default index of the next test,given the indexes of the previously added tests.
Input
The first line contains one integer n (1 ≤ n ≤ 100000) — the amount of previously added tests.The second line contains n distinct integers a1, a2, ..., an (1 ≤ ai ≤ 100000) — indexes of these tests.
Output
Output the required default value for the next test index.
Sample Input
31 7 2
Sample Output
3HINT

提问时间:2021-04-01

答案
描述acmnew»是一个系统的«允许创建编程任务在一个简单的和专业的方式.当你添加一个测试的问题,相应的形式问你的试验指标.在大多数情况下,它是明确的,指数下一个测试将有,系统显示默认值的指数.它通过计算最小的正整数而不是作为一个索引对于一些先前添加的测试.你是来实现这个功能.创建一个计划,决定默认索引的下一次测试,考虑到先前添加的测试指标.InputThe第一行包含一个整数n(1≤n≤100000)——先前添加的测试的数量.第二行包含n个不同的整数a1,a2,……,一个(1≤≤100000 ai)——这些测试的指标.OutputOutput所需的默认值为下一个试验指标.示例输入
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.