MWC '15 #8 P1: Push-up Contest

View as PDF

Submit solution

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

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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 with 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


Sample Output




  • 1
    lHarryl372  commented on Sept. 3, 2020, 4:16 p.m.

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