CT23110

The Wistful crates of Wheelwright

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Caravans arrive at the mushroom groves of Fungaldeep with crates of crates, and Wheelwright the store warden must account for every last one. 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 <= 891; values are distinct in [1,n].

Example 1:

Input: 766 684 215 144 321 73 434 263 751 542 364 290 611 52 653 445 563 37 212 135 10 442 103 766 646 479 51 615 408 750 488 456 487 688 622 512 264 734 57 730 716 13 594 421 139 560 649 675 533 174 336 634 77 141 629 56 571 573 671 19 2 376 728 5 543 509 385 592 659 331 166 616 473 570 539 736 604 691 295 297 706 525 70 733 160 402 266 504 353 16 701 249 101 698 317 502 550 83 468 760 173 723 714 339 709 87 554 510 213 476 401 682 677 632 695 262 133 282 619 12 345 382 138 158 80 582 451 322 738 747 199 109 307 75 335 531 55 414 557 431 390 591 457 461 517 48 110 458 654 217 23 705 466 22 268 115 226 193 196 113 159 500 530 324 394 765 235 448 396 74 495 176 568 753 84 231 42 120 338 254 383 426 7 381 511 242 519 683 720 190 460 256 694 586 425 372 663 574 218 167 175 129 379 400 749 703 346 37…
Output: 423

Example 2:

Input: 555 95 43 309 438 346 414 550 238 518 407 540 358 165 193 135 194 366 523 461 146 275 552 74 353 246 26 479 218 151 11 507 245 227 22 237 211 46 234 469 62 526 466 59 411 127 48 457 118 109 317 30 169 351 248 321 483 65 465 15 219 55 482 37 119 323 305 555 44 94 489 271 182 4 84 536 364 331 542 58 1 528 172 259 178 441 226 371 187 90 60 356 159 490 493 435 519 268 451 209 401 88 333 242 525 404 514 205 320 100 252 462 464 196 115 449 339 98 492 338 502 354 334 352 344 476 436 208 376 289 225 162 81 7 277 319 185 66 534 222 97 228 422 260 432 299 157 269 175 114 459 167 301 308 283 443 448 446 439 517 287 486 335 288 359 326 233 290 153 399 27 231 254 120 132 154 445 3 341 112 78 415 453 296 264 418 72 200 213 232 440 546 73 477 126 329 201 533 549 41 286 378 9 298 520 375 251 475 137 397 5…
Output: 285

Example 3:

Input: 799 35 348 179 74 715 248 1 147 19 255 544 118 238 592 299 614 649 668 71 533 8 523 732 480 465 775 729 466 371 289 677 730 161 742 456 89 596 375 275 502 125 591 619 558 91 72 116 550 126 188 640 187 25 615 11 770 479 584 284 400 581 318 774 222 700 583 543 403 5 144 760 84 435 644 314 799 13 110 578 386 551 702 686 24 574 376 713 339 353 462 557 473 354 733 693 331 38 184 795 549 384 252 662 671 177 690 315 419 415 706 56 463 287 391 467 290 763 759 185 573 119 716 787 186 233 225 262 750 666 577 249 752 254 351 796 503 96 731 624 604 735 10 230 102 599 189 656 595 16 603 722 697 231 740 163 310 150 627 610 631 196 565 423 256 223 720 450 667 361 606 27 561 545 217 131 267 528 382 153 743 547 258 399 271 751 772 209 488 313 103 705 438 538 302 360 444 754 494 414 374 755 341 224 498 155 …
Output: 380

Constraints:

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

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