CT24534

Shimmering stamps Positive Count

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the ivy courts of Vineward close for winter, Farhan must finish the stamps ledger - one figure at a time. Task: Read n integers and print how many are strictly positive. Input format: First line: n. Second line: n space-separated integers. Output format: Print the count of positive values. Constraints: 1 <= n <= 855; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 495 557359337 550213932 559075657 694634599 838175544 433379368 306554331 514851720 6728524 808190750 983444458 599065803 20562580 608582815 79531411 573616635 949963503 103437207 798277486 953290682 441267574 31671920 354593602 620886217 122885353 3936264 342063987 644329500 371336017 182418747 222412759 43282516 268805267 221215835 71147804 114113470 67786243 962426941 181702194 732545547 189529207 996336179 846730699 943470711 369894555 922353399 831291656 228032800 881276395 902811902 481734562 595044516 816827470 73750726 910939987 93319888 90185059 112431145 23404209 394706699 101822806 79982208 202569605 791867785 271197641 52101866 926034625 482594900 783255296 518202126 450390922 233788959 153496215 775483711 681506627 28317585 934174647 473886759 712272360 823759667 227262645 592…
Output: 495

Example 2:

Input: 104 482384389 244094669 595425697 198360943 496891130 21920677 757698262 8920556 473859260 241746269 371636520 383183898 812791767 284346614 163878583 705529109 988995900 644032701 226343391 163260921 490475852 294597032 631161865 165438737 682139819 972609217 30903314 187908017 217196605 327666458 21981775 353801015 135730975 419313797 524284044 522029680 780349545 359376201 368601114 65762516 942303767 282712849 514190366 496847388 293391901 367743116 559597790 730282863 25613388 600886142 402727015 824794894 572851949 614626755 218368150 357104343 387458128 483678240 586642409 18402471 135672549 708770928 286883930 216177218 77302283 162592657 777463945 539419925 670072562 828673476 931135471 399474759 375488883 347077005 538149409 659824535 271272675 608383646 740777635 1055935 1127012…
Output: 104

Example 3:

Input: 19 381957563 51645304 517059819 33775228 966129675 632560537 283537010 610914377 490448905 455663017 920114132 995932687 417114086 274393136 736701455 942177187 458215142 971396603 771516958
Output: 19

Constraints:

1 <= n <= 855; -100 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

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