Sphere Online Judge

SPOJ Problem Set (classical)

24. Small factorials

Problem code: FCTRL2

You are asked to calculate factorials of some small positive integers.

Input

An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100.

Output

For each integer n given at input, display a line with the value of n!

Example

Sample input:
4
1
2
5
3

Sample output:

1
2
120
6

Added by:Adrian Kosowski
Date:2004-05-28
Time limit:1s
Source limit:2000B
Languages:All except: TECS

hide comments
2009-06-06 02:13:23 Essam AlNaggar
the value will be a string
2009-05-30 18:32:22 Harshit dubey
How are we marked in this question?
2009-05-27 22:13:42 Drew Saltarelli
how can you do this in C++? python perhaps?

Last edit: 2009-05-27 22:20:42
2009-05-17 02:50:57 Jaspal
7 lines in python
2009-04-30 17:03:36 **
No the value is a number.
2009-04-30 07:52:01 Aditya
do we have to represent the whole no or just an exponential representation??
2009-03-02 15:37:24 Seckin Can Sahin
sure it is a number
2009-02-28 03:44:44 Yonggang Li
It's more easy when using oparator overload.
2009-02-25 19:46:25 Alexandru Chelariu
the value is a number or it has the format 9.234533e+15?

Last edit: 2009-02-25 19:46:25
SPOJ System © 2008-2010 Sphere Research Labs. All Rights Reserved.