CT2194

Jessa's barrels Missing Mark

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The council of the pine barrens of Needlepoint pays by the answer, and Jessa intends to earn it. First: the full register of barrels. 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: 6 6 4 3 1 5
Output: 2

Example 2:

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

Example 3:

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

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Jessa's barrels Missing Mark - EASY Coding Problem | CodeTikki