Even Price Advertisement <PB>

0

0 votes
Grammar-Verified, Combinatorics, Combinatorics basics, Easy, Mathematics
Problem

Pitney Bowes the leading ecommerce solution provider has one of the company named XYZ as its client. Now the client has built a list A of N items that denotes the prices of the item sold in the previous day. For advertising purpose the client says that they will display only K items to the public but all the prices of those items should be even numbers. So they are asking in how many ways they can select K items for advertisement such that their prices are even numbers. Now all the technical people at PB are busy with their own work so you need to help them.

Input format

  • First line: Two space-separated integers N and K
  • Second line: N space-separated integers denoting the elements of price list A

Output format

Print the number of different ways in which the K items with even prices can be selected from the price list A.

Constraints

1N10
1A[i]100

Sample Input
4 1
1 2 3 4
Sample Output
2
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

?