ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Kovrov IT > задача:


50407 - Missing Number

Гость
• Вопросы к жюри (1)

Задачи сборника

• 50380 - Sum of the Numbers in the ...
• 50395 - Page "Like" Averages
• 50332 - Variance of a series
• 50398 - Sum of kth Anti-diagonal
• 50323 - Filtering Contact List
• 50400 - nth Row rth Element of a Table
• 50364 - Student averages
• 50410 - Zero Padding
• 50407 - Missing Number
• 50337 - Exam Averages
• 50413 - Valid Permutations
• 50861 - The largest Student Group
• 50406 - Draw Pattern 178
• 50419 - The longest bitonic sequence
• 50492 - Contest Scoreboard
• 50418 - Student averages
• 50420 - Teachers Sightseeing

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Find the missing number of a permutational series.

Missing Number

For some calculations, your math professor frequently uses permutations. He needs a checker for his operations. He will give you a series of numbers. And, he wants the missing number in the permutational form of this series.

Question: Write a program that will find the missing number of a permutational series.

Input specification
First, you will be given an integer n where n is between 0 and 5000. Then, in the following n lines, you will be given n-1 integers where the integers are unique and between 1 and n

Output specification
Show one integer: the missing number.

Sample Input I
5
3
2
5
1
Sample Input II
7
3
5
7
1
4
6
Sample Output I
4
Sample Output II
2



Для отправки решений необходимо выполнить вход.

www.contester.ru