CT365

Tara's Jasper Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Deep in the orchid house of Bloomglass, Tara studies rows of crates entries. One clean number will settle the guild's oldest argument. 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 <= 85; values are distinct in [1,n].

Example 1:

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

Example 2:

Input: 4 2 1 3
Output: 4

Example 3:

Input: 78 28 2 52 64 60 73 35 42 27 71 45 77 69 18 39 65 1 34 30 46 7 63 17 41 33 53 72 51 78 31 32 54 40 6 56 11 22 3 38 59 66 36 57 49 68 48 13 14 12 37 16 61 67 24 26 10 19 25 21 74 76 55 29 47 50 5 75 4 15 9 44 58 43 23 20 62 8
Output: 70

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Tara's Jasper Ledger - EASY Coding Problem | CodeTikki