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

Разделы > Арифметика > задача:


50407 - Missing Number

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

Задачи раздела

• 50651 - Largest power of two
• 50297 - Divisible By Five
• 50332 - Variance of a series
• 50398 - Sum of kth Anti-diagonal
• 50400 - nth Row rth Element of a Table
• 50330 - Find the average of n numbers
• 50401 - Sum of Odd Numbers
• 50369 - Base Conversion
• 50407 - Missing Number
• 50336 - Buying Carpets
• 50338 - Convert Into Decimal
• 50404 - Sum of Self Powers
• 50295 - Weighted Average
• 50343 - The number of Ending Zero...
• 50296 - Total Discount Rate
• 50289 - Monthly Allowance
• 50403 - Number of Chairs

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

Если у вас есть предложения или пожелания по работе 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