CT26801

Zia's parcels Missing Mark

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Zia the accountant watches over the cliffside roost of Stormrest's stores of parcels. A careful computation stands between order and chaos. 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 <= 990; values are distinct in [1,n].

Example 1:

Input: 747 14 655 497 375 347 252 129 233 555 21 649 709 603 320 36 225 445 15 582 209 282 438 494 50 222 581 348 662 339 386 419 572 151 463 336 277 396 295 460 355 345 296 124 483 442 274 637 656 715 361 414 97 123 359 329 659 568 357 134 563 645 214 380 112 198 46 239 389 292 677 420 372 164 579 733 234 379 706 144 45 194 474 259 671 180 721 350 727 596 5 738 413 746 241 578 293 244 418 178 499 486 9 191 290 730 694 206 435 666 523 34 152 143 467 701 358 615 113 520 285 340 64 53 631 138 356 736 221 262 174 195 142 294 276 369 540 609 692 186 673 411 41 79 315 81 559 176 710 511 626 237 89 482 741 377 216 504 643 115 702 190 506 342 707 248 106 67 682 161 99 550 131 566 459 410 551 148 525 141 193 335 537 737 683 155 650 255 519 458 665 54 638 257 434 30 613 454 118 608 533 714 68 633 16 510 4…
Output: 125

Example 2:

Input: 944 501 901 684 272 325 785 700 572 909 525 662 218 736 562 552 898 722 487 527 74 416 567 123 13 268 179 849 388 419 427 645 813 921 900 575 447 368 383 509 23 577 597 449 294 84 51 59 526 246 784 941 777 665 476 599 744 828 269 412 534 7 485 503 177 874 877 625 823 67 332 513 1 24 576 748 303 619 693 696 403 627 205 917 848 770 17 209 474 64 80 273 87 532 101 26 648 70 290 915 97 365 175 178 717 479 259 636 258 192 305 157 553 863 307 105 304 600 130 6 390 117 152 452 344 679 706 196 573 371 559 164 41 499 846 355 882 571 656 408 811 512 199 520 682 381 391 934 437 618 495 423 301 814 639 473 547 90 769 540 432 873 323 498 37 182 345 866 615 443 249 869 198 750 933 783 819 319 692 640 287 797 79 795 808 229 482 62 716 150 651 363 541 53 737 184 644 943 267 75 197 829 893 217 360 523 411 …
Output: 395

Example 3:

Input: 600 78 82 379 300 569 383 173 154 267 102 385 313 243 284 405 551 545 319 362 533 518 564 219 174 395 429 72 356 504 145 437 255 314 370 5 271 131 587 523 37 38 229 105 207 414 24 290 183 428 589 27 33 454 554 230 244 409 392 592 515 572 156 169 309 426 394 50 411 200 127 248 208 203 537 563 372 553 516 543 56 386 457 591 195 12 491 245 225 60 381 114 76 176 16 509 44 25 466 590 51 600 417 396 315 369 485 430 161 144 217 410 335 333 473 398 11 354 124 35 327 380 351 439 549 312 565 524 272 93 448 42 390 57 463 578 460 2 84 49 256 596 95 550 280 502 403 497 377 531 262 359 238 547 235 334 222 221 479 487 4 382 43 80 348 30 139 46 339 536 425 115 239 212 308 250 366 282 265 441 358 23 70 220 275 486 489 329 234 54 143 530 580 397 433 541 167 310 227 431 17 492 172 118 116 342 445 496 434 254…
Output: 3

Constraints:

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

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