Lucky Lottery
Anuradha has a lucky charm when it comes to lottery. Given a lottery with a N digit number, he considers it lucky if and only if the lottery number contains T number of '1's.
Given N and T, he is at a dilemma to how to find the number of lucky lotteries that are there.
Help him find the number of lucky lotteries and help him maximize his winning chance.
Example:
Let N=3 and T=2. Then the possible lottery numbers are of form
X11 - X could be anything other than 0 or 1. - 8 numbers
11X - X could be anything other than 1. - 9 numbers
1X1 - X could be anything other than 1. - 9 numbers
So there are altogether 26(8+9+9) lucky lotteries with 3 digit number with lucky T being 2.
Input Format
A single line with N and T seperated by a space.
2 < N <= 20
1 < T <= N
Output Format
The number of possible lucky lotteries as a single number.
Sample Input
5 3
Sample Output
774
Explanation
At the when we consider the forms of the number, it could be of form
1XX11 or
1X1X1 or
1X11X or
11XX1 or
11X1X or
111XX or
X111X or
X1X11 or
X11X1 or
XX111 where X is some number
The possible set of answers leads to 774 when we consider these seperately.
xxxxxxxxxx
with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada;
procedure Solution is
-- Enter your code here. Read input from STDIN. Print output to STDOUT
end Solution