CT1716

The Missing Mark of Tangledeep

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Tracker the paymaster watches over the kelp forests of Tangledeep's stores of ingots. A careful computation stands between order and chaos. 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 <= 27; values are distinct in [1,n].

Example 1:

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

Example 2:

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

Example 3:

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

Constraints:

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

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