AlgoUniversity
  • Go Back
Playboy :

Author

admin

Difficulty Level : Easy

Submissions : 17675

Asked In :

Marks :5

: 128 | : 36

Akash is naughty playboy. But today, he got selected for ATF Camp and he is a super happy soul.

There are exactly N days left before he will join ATF camp. Coincidently, he also has exactly N girlfriends. So, Akash plans to spend exactly one day with each of his girlfriends. You are jealous knowing about his plans, so to divert yourself, you focus on finding the number of ways Akash can plan his visits to his N girlfriends.

Example: Let's say Akash has to visit 3 girlfriends: A, B, C on 3 days. There are exactly 6 ways he can plan his trip:

 

Day 1Day 2Day 3
ABC
ACB
BAC
BCA
CAB
CBA

 

 

Input

 

First Line: Integer T denoting number of test cases.

Each of Next T lines have one integer N, which denotes the number of days and the number of girlfriends Akash is planning to visit.

Constraints

1≤T≤10

1≤N≤10

 

 

Output

 

For each test case, print the number of ways Akash can plan his trip as described in the problem statement.

The answer to each test case must be printed in a new line.

 

 

Example

 

 

Input
5
1
2
3
4
5
Output
1
2
6
24
120

 

 

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.