英语翻译
题目
英语翻译
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
答案
描述acmnew»是一个系统的«允许创建编程任务在一个简单的和专业的方式.当你添加一个测试的问题,相应的形式问你的试验指标.在大多数情况下,它是明确的,指数下一个测试将有,系统显示默认值的指数.它通过计算最小的正整数而不是作为一个索引对于一些先前添加的测试.你是来实现这个功能.创建一个计划,决定默认索引的下一次测试,考虑到先前添加的测试指标.InputThe第一行包含一个整数n(1≤n≤100000)——先前添加的测试的数量.第二行包含n个不同的整数a1,a2,……,一个(1≤≤100000 ai)——这些测试的指标.OutputOutput所需的默认值为下一个试验指标.示例输入
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
- .== lim 1/(x^2-3x+2) 求极限值.当x趋向于 1的时候,
- 食堂运来一批大米,第一周吃了450千克,第二周吃了350千克,还剩七分之三
- 1.(-7)+(+11)+3+(-2)= 2.(-1/2)+(-2/3)+(-5/6)= 3.1/4+(-2/3)+(+5/6)+(-1/4)+(-1/3)=
- 四分之三除以x等于十二分之七 解方程
- 根据句意及首字母提示完成单词:He is s__ with his life,but he never stops working for higher aim.
- After________ by the police for several days,the robber had to give in.
- 锚索挡墙的锚索灌浆,砂浆试件是如何留置?
- 水果店有苹果80千克,比梨总数的4/5还多20千克,梨有多少千克?
- 小吴买了两种笔记本共用去44元,一种笔记本单价8元,另一种单价5元.这两种笔记本各买了几本?
- 在动物细胞中与细胞分裂有关的细胞器是什么
热门考点