Update appNew update is available. Click here to update.

Arrangement

Last Updated: 13 Mar, 2021
Difficulty: Moderate

PROBLEM STATEMENT

Try Problem

You are given a number 'N'. Your goal is to find the number of permutations of the list 'A' = [1, 2, ......, N], satisfying either of the following conditions:

A[i] is divisible by i or i is divisible by A[i], for every 'i' from 1 to 'N'.

Input Format:
The first line of the input contains ‘T’ denoting the number of test cases.

The first line of each test case contains an integer N.
Output Format:
For each test case return the number of satisfying permutations in a new line.

Note:

You do not need to print anything or take input. This already has been taken care of. Just implement the function.
Constraints:
1 <= T <= 10
0 <= N <= 15

Time Limit: 1 sec