Valentine's Day '19 J2 - Pink!

View as PDF

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 -tuple . He defines pink as a color with , and values where , , .

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

Input Specification

The first line will contain a single integer, .

The next lines will each contain 3 space separated integers, , and .

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 and are pink.