CT1720

Jaya's Silver Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Jaya runs the counting house at the observatory of Starfall. Today the books show a list of tickets, and the numbers must be worked out before sundown. 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 <= 70; -1000000 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 53 -463437 -686156 -262271 -383555 -170842 -269523 -153191 -122431 -146960 -650973 -140420 -984248 -511253 -40119 -906884 -606031 -419754 -814854 -28817 -376869 -71414 -2060 -615312 -105260 -184950 -590902 -848280 -214519 -303610 -539068 -106070 -852321 -586420 -769915 -394559 -202721 -417528 -733742 -569649 -798470 -425163 -667208 -988855 -234013 -951139 -662865 -619270 -632260 -502666 -466511 -739760 -907268 -432167
Output: 0

Example 2:

Input: 4 -442994 -860898 -230549 -738376
Output: 0

Example 3:

Input: 23 -9665 -120492 -350604 -696197 -581721 -672060 -42954 -667961 -309179 -511860 -711126 -934295 -474881 -921734 -975447 -580256 -952847 -260541 -3225 -922429 -185027 -212927 -195567
Output: 0

Constraints:

1 <= n <= 70; -1000000 <= a[i] <= 10; answers fit a signed 64-bit integer.

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