CT913

The crates at Glimmerfell

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Gita runs the customs house at the quartz ridge of Glimmerfell. Today the books show a list of crates, and the numbers must be worked out before sundown. Task: The array contains n-1 distinct integers chosen from 1..n with exactly one missing. Print the missing integer. Input format: First line: n. Second line: n-1 space-separated distinct integers in [1,n]. Output format: Print the missing integer. Constraints: 2 <= n <= 23; values are distinct in [1,n].

Example 1:

Input: 22 6 20 22 13 9 18 11 2 14 12 7 19 1 15 10 5 16 8 21 17 4
Output: 3

Example 2:

Input: 10 4 8 1 3 6 7 2 5 10
Output: 9

Example 3:

Input: 16 6 8 5 11 12 13 14 2 7 9 4 3 10 15 1
Output: 16

Constraints:

2 <= n <= 23; values are distinct in [1,n].

Loading...
Test Cases:No test cases
No test cases available.