CT682

The crates Missing Mark Puzzle

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The harbor bell rings at the beacon hill of Lantern Tor; Cora weighs the day's crates manifests and starts the calculations. 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 <= 92; values are distinct in [1,n].

Example 1:

Input: 58 51 46 45 19 56 50 14 9 28 27 35 37 18 52 44 40 25 21 57 33 24 34 4 47 13 49 15 22 8 58 20 31 3 16 2 39 1 36 53 30 5 26 32 17 10 42 6 11 23 54 12 7 38 29 41 43 48
Output: 55

Example 2:

Input: 44 2 44 12 42 28 18 9 17 32 39 41 4 29 1 22 43 36 21 38 6 35 31 27 11 15 16 14 24 33 34 40 30 25 8 26 37 10 19 3 23 13 20 7
Output: 5

Example 3:

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

Constraints:

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

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