CT28545

The Missing Mark of Keelwind

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Legend says the vault under the shipyard of Keelwind opens only for a perfect tally of crates. Gardener 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 <= 743; values are distinct in [1,n].

Example 1:

Input: 627 259 257 161 190 132 30 258 55 99 329 80 114 564 303 103 542 239 112 362 492 133 531 313 122 377 272 152 575 307 40 77 305 284 255 379 51 246 169 310 464 309 516 449 203 432 445 245 4 505 323 363 508 198 226 340 172 145 12 547 396 248 407 322 580 269 413 556 548 504 468 515 399 523 238 552 590 167 561 71 135 105 88 227 170 113 183 294 268 175 116 393 418 583 299 338 577 408 395 524 137 529 306 388 400 527 250 459 472 500 588 612 196 453 447 231 94 118 488 277 100 385 415 27 497 489 536 278 431 236 414 374 220 260 21 541 394 401 173 526 490 518 402 285 626 592 538 38 50 328 361 117 131 98 397 343 180 195 593 204 32 502 317 486 308 462 605 283 623 141 321 521 276 389 420 503 565 68 42 242 187 467 146 534 606 506 311 461 150 566 567 72 327 102 495 222 487 282 351 573 23 493 331 367 182 315…
Output: 380

Example 2:

Input: 718 534 327 699 185 419 597 133 209 238 62 255 569 153 187 374 372 487 145 97 537 232 91 660 346 700 24 482 379 595 271 199 102 403 439 650 469 167 682 159 687 593 244 146 675 561 60 564 123 457 618 708 640 404 201 690 31 417 179 188 552 657 514 151 259 308 108 373 422 303 429 394 354 363 664 262 551 350 398 22 229 54 175 627 666 431 444 78 449 619 536 549 368 343 26 147 483 625 106 217 366 615 345 668 56 256 580 93 572 375 576 596 23 74 149 409 207 273 659 519 35 245 661 714 631 649 585 623 176 200 298 705 685 94 27 320 194 474 388 82 461 405 76 154 456 212 505 96 41 688 235 1 136 301 411 573 581 282 629 315 555 305 293 184 565 171 566 7 471 234 467 331 182 260 127 440 309 446 214 340 603 421 531 79 620 302 541 203 533 168 605 109 638 381 542 205 484 380 684 672 671 630 158 357 61 575 169…
Output: 114

Example 3:

Input: 645 383 539 33 15 642 359 72 612 60 236 306 448 234 56 225 613 266 500 119 331 578 43 224 481 641 540 293 102 586 148 591 64 149 312 278 321 172 466 157 420 308 2 363 249 324 375 630 478 300 31 330 474 339 562 118 238 161 71 221 343 608 76 167 269 605 123 404 637 398 17 424 187 569 370 6 589 87 3 636 228 644 114 178 205 342 151 183 446 79 298 133 186 174 348 391 55 272 629 496 204 241 57 428 395 354 411 622 24 357 634 182 282 109 160 640 606 535 197 623 489 527 550 270 297 456 62 590 379 546 509 200 584 464 165 317 450 311 49 566 508 254 417 394 485 457 9 441 403 113 142 472 401 374 573 380 69 384 220 340 511 377 471 362 143 256 21 480 247 252 99 51 289 601 557 462 421 529 131 614 554 82 52 574 503 510 277 1 440 627 406 638 296 83 427 80 520 168 645 22 198 579 48 559 227 604 434 304 507 61…
Output: 316

Constraints:

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

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