โ back to unit
Easy
# puzzle gauntlet easy
The Missing Party Guest
Guests 1 through n RSVP'd; the sign-in sheet is shuffled and one guest never showed. ๐
You get n and the shuffled sign-ins. Print the missing guest number. Elegant route: what SHOULD all the numbers add up to?
Example:
Input: n = 5, nums = [2, 5, 1, 4]
Output: 3
Guests 1 through 5 should sum to 15, but the sign-in sheet only sums to 12 โ the missing guest is 15 - 12 = 3.
๐ก need a hint?
pg-missing-party-guest.py๐ given lines are locked โ write your code in between
loading...