CT976

The Missing Mark of Selene

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Legend says the vault under the moonlit lagoon of Selene opens only for a perfect tally of tickets. Nico 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 <= 23; values are distinct in [1,n].

Example 1:

Input: 2 1
Output: 2

Example 2:

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

Example 3:

Input: 2 2
Output: 1

Constraints:

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

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