CT1220

Wade's Ancient Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The council of the temple city of Sunspire pays by the answer, and Wade intends to earn it. First: the full register of parcels. 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 <= 65; 0 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 54 711113368 856186961 481475101 79274431 657112283 430754552 567439012 268934124 837007520 771780310 774655747 68814404 882034211 513670959 642828623 776494576 543504701 882099819 857859769 505938822 465398265 558182880 4459373 903420370 163108692 859176015 216806156 822729782 291507181 297753080 867448341 782741940 850267495 587918723 826683466 361002670 394628767 617391851 522852646 359329761 110199136 55955128 190078102 40439844 567801226 811326676 925417785 957010709 995539564 232241278 95647512 664509316 786394725 151839261
Output: 54

Example 2:

Input: 24 917135103 97143846 449175112 344167034 471087032 203633506 39447593 325779540 542556906 44772763 478006440 376756213 441300791 900289563 455723892 651238447 84085864 881748431 167668676 32582276 360521620 673965529 902874123 414563810
Output: 24

Example 3:

Input: 49 879085212 997949172 412047766 727415610 496343306 442366189 423115106 917369478 172035878 459378242 789656115 289504991 351676124 517252654 457585560 597872117 911826401 81014145 884684968 585230099 875542203 690009149 205614129 185377696 468932477 317142420 754903422 31907024 181228246 681700549 494554187 480915176 257780934 647541682 843303705 485577918 895800316 612700196 148659219 12200510 533049525 443608572 272411712 95162246 542735854 557004739 324974077 775474387 804686231
Output: 49

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Wade's Ancient Ledger - EASY Coding Problem | CodeTikki