HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50321 - Missing Number

Guest
• Review clarifications (1)

Volume problems

• 185. 50784 - Top Growing Company
• 220. 50754 - Team Standings
• 230. 50286 - Remove Duplicates
• 250. 50448 - Paint Buckets
• 280. 50477 - Character Pyramids
• 50304 - Number Pattern
• 50492 - Contest Scoreboard
• 50322 - Snake Pattern
• 50321 - Missing Number
• 50445 - Cryptography
• 50410 - Zero Padding
• 50380 - Sum of the Numbers in the ...
• 50400 - nth Row rth Element of a Table
• 50457 - The Number of Winners
• 50585 - Inner Product
• 50587 - Modular Conversion
• 030. 50737 - Sum of the k-largest n...

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Halil Karimis.

Missing Number

Shqip

Mr John is a maths professor. He writes the exercises the students have to solve on the blackboard.

He writes a sequence of N different positive integers(0 < N < 1000) on the board but the students are lazy and don’t want to study, so, they usually erase one number for fun.

As this happens so often he wants you to write a program to help him with it.

Input specification
-In the first line you will get N(the number of positive integers).
-After that in the next line you will get N positive integers
-In the third line you will read N-1 positive integers. There is no number greater than 1000.

Output specification
The number that got erased.

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


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

www.contester.ru