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 color can be represented as a 3-tuple (R, G, B). He defines pink as a color with R, G, and B values where 240 \le R \le 255, 0 \le G \le 200, 95 \le B \le 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 \le N \le 1000).

The next N lines will each contain 3 space separated integers, R, G, and B (0 \le R, G, B \le 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 colors (240, 200, 220) and (243, 12, 120) are pink.


Comments

There are no comments at the moment.