FCTRL2 - Small factorials
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
Input: 4 1 2 5 3 Output: 1 2 120 6
hide comments
Ganesh Hegde:
2013-03-27 19:45:09
meh. used python :p |
|
Robin Halder:
2013-03-16 07:19:24
http://pastebin.com/*******
|
|
Jay H. Bosamiya:
2013-03-14 13:53:51
source limit is in no way stupid... since, otherwise, people may just hardcode the answers (since n is less than 100) as strings and then just output using if's |
|
Sivaraman Nagarajan:
2013-02-20 12:00:23
Great ! Learnt a Technique ! Expecting problems like this
|
|
raunakrocks:
2013-01-23 17:25:57
easy1!!not for java programmer :P :P
|
|
rajat pachouri:
2013-01-12 14:49:12
the code is running on my machine m getting the input and output as:
|
|
Avinash Kumar:
2013-01-12 06:08:07
@NAVYA it may b the problem of inapropriate data type bcoz 99! is too large a no. |
|
Himanshu:
2012-12-21 12:44:09
use basic intelligence to solve it..................... |
|
strings:
2012-12-12 18:32:49
enjoyed doing it !! :) |
|
Sidney Milien:
2012-12-08 07:08:32
@Navya, does your code work for the case when n = 100.?
|
Added by: | adrian |
Date: | 2004-05-28 |
Time limit: | 1s |
Source limit: | 2000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |