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 240R255, 0G200, 95B220.

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

Input Specification

The first line will contain a single integer, N (1N1000).

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

Output Specification

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

Sample Input

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

Sample Output

Copy
2

Explanation For Sample

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


Comments

There are no comments at the moment.