CT22390

The Missing Mark of Tuskmore

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Morning light hits the boar woods of Tuskmore as Gail unrolls the day's manifest of lanterns. The tally will decide the next shipment. 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 <= 249; values are distinct in [1,n].

Example 1:

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

Example 2:

Input: 242 10 120 130 183 105 199 170 179 80 235 36 207 69 149 218 94 29 125 89 154 27 23 222 70 167 21 50 216 38 182 112 13 180 139 131 163 141 73 102 45 77 44 178 31 156 205 49 211 234 147 176 151 126 11 118 196 108 97 158 186 201 5 113 159 129 47 194 103 146 177 213 62 18 35 68 166 1 48 172 6 26 67 161 93 175 24 56 116 220 117 52 192 160 242 191 114 223 173 37 91 229 124 87 71 226 202 238 32 231 164 232 20 128 197 106 54 169 152 4 237 206 221 230 28 55 39 12 110 61 227 85 132 84 188 133 127 189 25 168 17 104 90 41 204 53 16 59 8 153 193 40 212 181 219 74 150 145 174 195 22 228 148 82 2 138 137 78 83 109 241 42 98 88 101 135 66 9 51 15 162 214 134 96 58 119 209 142 240 122 143 3 203 217 100 136 63 30 79 65 14 210 75 7 46 76 123 99 187 19 57 215 155 171 157 33 60 92 165 225 200 184 43 208 95 121…
Output: 140

Example 3:

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

Constraints:

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

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