CT24375

The Missing Mark of the Secret scrolls

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the salt flats of Palemere pays by the answer, and Chandler intends to earn it. First: the full register of scrolls. 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 <= 388; values are distinct in [1,n].

Example 1:

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

Example 2:

Input: 133 92 20 30 77 76 53 35 15 128 98 44 111 94 95 60 13 80 39 78 83 125 108 61 3 32 1 17 124 40 89 84 110 123 68 99 112 69 131 85 113 73 132 71 72 121 47 126 31 64 115 90 56 70 26 52 114 48 2 25 12 67 50 8 38 5 102 120 22 93 86 54 96 51 34 75 59 29 45 41 109 117 33 36 19 65 116 100 63 74 18 127 24 62 6 55 133 10 119 101 9 66 130 91 46 122 21 97 103 11 23 81 7 28 57 27 105 14 4 82 118 129 104 107 16 88 49 87 58 37 79 43 42
Output: 106

Example 3:

Input: 342 318 94 293 202 85 225 135 271 95 30 140 16 93 177 79 332 70 14 192 309 123 44 229 245 62 280 316 102 41 341 186 172 87 336 106 168 317 146 1 57 165 74 22 170 4 252 149 15 109 209 303 184 125 268 265 72 238 284 255 20 8 158 166 218 32 219 223 68 215 89 52 51 227 197 339 137 193 289 163 290 221 53 126 244 315 323 300 55 248 120 196 311 277 286 173 187 264 200 40 291 86 308 76 59 285 270 180 156 2 175 328 24 117 110 56 26 65 78 257 145 179 210 222 199 99 103 301 214 314 91 256 5 150 50 188 157 111 243 159 54 226 283 116 250 237 80 266 107 27 10 69 162 104 220 310 201 295 63 294 274 66 121 329 320 33 258 249 242 132 269 119 327 45 190 11 154 6 136 171 112 262 194 114 288 338 207 205 25 305 276 340 275 260 282 208 97 48 42 155 330 49 34 335 141 3 239 113 178 84 191 105 139 326 35 147 124 259 160 319 143 267 302 169 312 43 7 246 254 325 19 206 18 90 273 253 281 203 148 167 133 189 73 81 118 224 115 331 195 28 77 64 31 100 287 144 138 233 306 29 333 39 161 88 321 231 234 334 164 261 204 183 142 298 182 211 127 240 235 122 130 134 108 174 61 37 299 216 21 342 292 272 129 251 296 17 181 128 83 151 96 101 23 176 322 307 232 213 247 82 230 131 75 185 212 297 228 36 12 71 236 337 47 279 92 38 278 313 241 152 304 324 198 98 153 58 263 9 46 217 60 67
Output: 13

Constraints:

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

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