CT637

The Obsidian Shore Missing Mark

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Legend says the vault under the basalt cliffs of Obsidian Shore opens only for a perfect tally of stamps. Viktor means to find out. 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 <= 63; values are distinct in [1,n].

Example 1:

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

Example 2:

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

Example 3:

Input: 6 4 3 5 6 1
Output: 2

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Obsidian Shore Missing Mark - EASY Coding Problem | CodeTikki