Micro and Even Numbers

1

1 votes
Combinatorics, Mathematics, Combinatorics basics, Very-Easy
Problem

Micro is having an array A, having N integers. He wants to find out number of ways of choosing exactly K even numbers from the array. Can you help Micro with this?

Input:
First line consists of two space separated integers denoting N and K.
Second line consists of N space separated integers denoting the array A.

Output:
Print number of different ways for Micro to select exactly K even numbers out of the given array.

Constraints:
1N10
1A[i]100

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

There are two even numbers in the array i.e., 4, 2, we can select either one of those, so answer is 2

Editor Image

?