Solution Guide
You can see the practice problems list and select a problem from there. Then, you need to
select the langauge from tabs and write your code in the editor. You can compile and test
your code on sample testcases by clicking on 'Compile & Test'. You can submit your code
for judge by clicking on 'Submit'. You can refer to Judge Environment for further details.
We will describe solutions for Small Factorials in different languages for successful
submission.
Small Factorials
You are asked to calculate factorials of some small positive integers.
Input
An integer T, denoting the number of testcases, followed by T lines, each containing a
single integer N.
Output
For each integer N given at input, output a single line the value of N!
Input Constraint
1 <= T <= 100
1 <= N <= 100
Solutions in different languages for Small Factorials are written below.
C++
Clojure
C#
Haskell
Java
Javascript
Objective-C
Perl
PHP
Python
Ruby