PIB '20 P1 - Marcus and Head Bonks

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 0.5s
Memory limit: 128M

Author:
Problem type

Marcus loves giving out hugs. Each day, there are N people that Marcus can choose to hug or not. Person i will have a cuteness value of v_i. Marcus is a picky hugger, and only wishes to hug people with a positive cuteness value. Otherwise, if you have a non-positive cuteness value, he will only give you a head pat (which hurts). Can you determine how many people Marcus will hug by the end of the day?

Input Specification

The first line will contain the integer N (1 \le N \le 100).

The next line will contain N integers, v_i (-100 \le v_i \le 100), the cuteness value of person i.

Output Specification

Output the number of people Marcus will hug.

Sample Input

5
-1 -5 3 2 0

Sample Output

2

Explanation For Sample

Only person 3 and person 4 have a positive cuteness value, so Marcus will hug only them.


Comments


  • 26
    piddddgy  commented on March 18, 2020, 7:34 p.m.

    my headpats are great idk what ur talking about


    • 4
      p1geon  commented on March 19, 2020, 5:09 a.m.

      vouch