MWC '15 #8 P1: Push-up Contest

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

cheesecake is participating in a push-up contest with N of his friends.

Each participant does a unique number of push-ups between 1 and N. However, cheesecake was too busy organizing DMPG and unfortunately forgot how many push-ups he did!

As cheesecake is worried about whether or not bobhob314, with his wonderfully toned figure and boyish charm, won the contest, help him figure out how many push-ups he did, given the number of push-ups done by the other participants.

Input Specification

The first line of input will consist of 1 integer, N (1 \le N \le 10^5).
The next N-1 lines will consist of the number of push-ups that each of cheesecake's friends did.

Output Specification

The number of push-ups that cheesecake did.

Sample Input

5
1
2
3
5

Sample Output

4

Comments


  • 0
    lHarryl372  commented on Sept. 3, 2020, 8:16 p.m.

    wow that is a lot of push-ups, very nice