CT26396

Sage and the Pale readings

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Morning light hits the thorn maze of Bramblecourt as Sage unrolls the day's manifest of readings. The tally will decide the next shipment. Task: Read n integers and print how many are even. Input format: First line: n. Second line: n space-separated integers. Output format: Print the count of even values. Constraints: 1 <= n <= 423; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 66 987 772 333 491 574 377 554 338 193 376 578 98 732 944 214 28 747 641 837 554 523 738 503 566 362 303 437 352 860 0 268 235 588 139 800 930 188 232 443 828 15 720 897 383 849 891 238 491 929 673 611 240 134 527 255 701 55 213 826 42 392 220 401 441 231 10
Output: 34

Example 2:

Input: 123 403 938 81 969 646 280 618 95 33 38 907 317 456 878 251 558 242 832 601 78 738 739 740 456 286 22 251 829 186 453 771 614 832 331 542 26 803 762 769 669 573 351 810 685 758 452 561 945 673 374 433 728 939 540 346 976 322 634 298 771 187 687 651 46 538 976 776 509 449 332 598 430 496 106 0 655 959 987 784 935 27 177 424 196 642 938 155 805 791 817 958 224 135 357 217 924 480 219 241 71 589 929 868 243 989 440 218 493 841 792 51 179 725 406 761 963 205 207 852 24 124 803 33
Output: 60

Example 3:

Input: 368 635 88 642 390 130 204 675 743 255 431 247 186 936 716 357 667 737 891 850 153 700 911 881 561 712 606 770 168 59 526 623 89 534 13 767 30 990 834 338 717 523 866 718 502 207 81 186 750 100 499 660 367 215 798 926 575 896 776 579 755 180 688 852 713 356 323 494 553 497 985 869 753 661 419 174 313 237 398 1000 827 355 299 565 288 921 414 675 241 735 882 280 182 88 366 334 436 690 703 281 898 596 713 872 326 992 473 597 510 234 765 514 959 436 262 401 771 832 278 567 316 75 245 941 307 428 482 868 226 508 462 677 261 308 15 38 905 107 437 195 95 262 78 722 71 891 522 486 861 746 215 524 542 893 915 948 945 591 734 709 218 121 358 36 146 517 368 746 946 785 220 394 520 131 454 884 864 235 221 854 390 929 362 192 181 92 228 849 373 324 810 390 440 352 421 699 47 716 715 534 138 295 0 129 9…
Output: 182

Constraints:

1 <= n <= 423; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
Sage and the Pale readings - EASY Coding Problem | CodeTikki