Valentine's Day '19 J2 - Pink!

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Cupid is looking for pink lovebirds!

A colour can be represented as a 3-tuple (R, G, B). He defines pink as a color with R, G and B values where 240 \leq R \leq 255, 0 \leq G \leq 200, 95 \leq B \leq 220.

Given a list of N colors, can you determine how many are pink?

Input Specification

The first line will contain a single integer, N\ (1 \leq N \leq 1000).

The next N lines will each contain 3 space separated integers, R, G and B\ (0 \leq R, G, B \leq 255).

Output Specification

A single integer, containing the number of colors that are pink.

Sample Input

5
0 0 0
240 200 220
243 12 120
12 3 10
241 100 221

Sample Output

2

Explanation For Sample

The colours (240, 200, 220) and (243, 12, 120) are pink.


Comments

There are no comments at the moment.