Mobile numeric keypad
Submissions: 4398   Accuracy:

25.64%

  Difficulty: Medium   Marks: 4

Given the mobile numeric keypad. You can only press buttons that are up, left, right or down to the current button. You are not allowed to press bottom row corner buttons (i.e. * and # ).
Given a number N, find out the number of possible numbers of given length.

Input:
First line consists of T test case. Only line of the test case consists of N.

Output:
Print the possible numbers of given length.

Constraints:
1<=T<=30
1<=N<=30

Example:
Input:

2
1
2
Output:
10
36

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth
Author: saksham seth


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.