#189. copyEndy

copyEndy

Background

Description

We'll say that a positive int n is "endy" if it is in the range 0..10 or 90..100 (inclusive). Given an array of positive ints, return a new array of length "count" containing the first endy numbers from the original array. Decompose out a separate isEndy(int n) method to test if a number is endy. The original array will contain at least "count" endy numbers.

Format

Input

Output

Samples

Sample Input 1

[9 11 90 22 6] 2

Sample Output 1

[9, 90]

Sample Input 2

[9 11 90 22 6] 3

Sample Output 2

[9, 90, 6]

Sample Input 3

[12 1 1 13 0 20] 2

Sample Output 3

[1, 1]

Limitation

1s, 1024KiB for each test case.