CF440A.Forgotten Episode

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Polycarpus adores TV series. Right now he is ready to finish watching a season of a popular sitcom "Graph Theory". In total, the season has nn episodes, numbered with integers from 11 to nn .

Polycarpus watches episodes not one by one but in a random order. He has already watched all the episodes except for one. Which episode has Polycaprus forgotten to watch?

输入格式

The first line of the input contains integer nn (2<=n<=100000)(2<=n<=100000) — the number of episodes in a season. Assume that the episodes are numbered by integers from 11 to nn .

The second line contains n1n-1 integer a1,a2,...,ana_{1},a_{2},...,a_{n} (1<=ai<=n)(1<=a_{i}<=n) — the numbers of episodes that Polycarpus has watched. All values of aia_{i} are distinct.

输出格式

Print the number of the episode that Polycarpus hasn't watched.

输入输出样例

  • 输入#1

    10
    3 8 10 1 7 9 6 5 2
    

    输出#1

    4
    
首页