Valentine's Day '19 J2 - Pink!

View as PDF

Submit solution

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

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

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

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

Sample Output


Explanation For Sample

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


There are no comments at the moment.