CT456

The Solar Positive Count

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Before the gates of the lily shoals of Padmore close for winter, Lamplighter must finish the readings 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 <= 70; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 64 8 1 3 2 4 10 10 1 10 10 8 0 5 4 10 9 0 8 5 2 9 3 1 1 10 8 0 8 5 1 1 7 5 8 1 8 4 1 3 8 1 8 3 6 7 2 6 1 4 7 0 7 7 5 1 9 10 8 6 4 10 1 4 10
Output: 60

Example 2:

Input: 24 3 5 9 7 2 1 5 6 6 2 4 0 2 9 6 1 2 3 4 10 6 2 1 7
Output: 23

Example 3:

Input: 27 9 4 1 9 1 1 8 3 3 4 3 1 7 8 0 8 5 3 3 0 6 5 6 9 2 0 1
Output: 24

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Solar Positive Count - EASY Coding Problem | CodeTikki