Puzzleria

3.3

14 votes
Problem

Rohan bought new book Puzzleria in which he has to solve the puzzle. So,now he need your help to solve one of the puzzle were he is given X consonant and Y vowels to make a word from it whose length is equals to X + Y.


So now your are given the number of consonant and vowels and has to tell how many words can be formed out of it.

INPUT

First line will be T Testcase (T<50) followed by T lines with two number in each line ,first number is for consonant(consonants<=7)and second is for vowels(vowels<=5).

OUTPUT

It should contain number of words which can be made with given combination.

Repetition of alphabets is not allowed

Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

Here we have 1 testcase with 5 consonant and 2 vowels and when we made words for these combination we get 1058400

Editor Image

?