FUCT_FOR_FACFOR - Factorial formula

Enter the positive integer n. Calculate and print out n! step by step.

Input

The first line of the input consist of a single integer number t which determines the number of tests.

In each of next t lines will contain only one positive integer n.

Constraints

  • 0 < t ≤ 1 000

Output

For each test case print out n! step by step.

Example

Input:
5
0
5
9
-3
1

Output:
0!=1
5!=1*2*3*4*5=120
9!=1*2*3*4*5*6*7*8*9=362880
accept positive integer only!
1!=1

Added by:khanhvh
Date:2018-07-10
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:FPTU Can Tho

hide comments
2023-05-29 19:05:42
nice but should be "integers" instead of integer
2023-02-12 17:48:39 Simes
in the example, the output for 0 and 1 are in a different format from the others. Is that intentional or a mistake in the example?

edit: intentional for some reason.

Last edit: 2023-02-12 18:13:05
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.