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

Sample input:
4
1
2
5
3

Sample output:

1
2
120
6

hide comments
smas: 2012-11-25 17:10:45

Source limit is so stupid, especially in Java you have to add a lot of lines of code

Last edit: 2012-11-25 17:11:02
:D: 2012-11-11 09:24:32

It's not a work simulator. Restrictions are there to make the system lighter, simpler and safer. 50kb of code is more that enough. Maybe a few times I wrote something around 20-something kb and they had many unused functions file head. Sometimes limit is lower to enforce a particular, harder solution.

As for multiple files, it's a great idea but hard to implement and again it would be mostly unused, since solutions here aren't that big. In the end it would be a wasted effort on system development part.

You can't submit compiled or half compiled code because, again, it's redundant, would be complicated and would cause safety issues. Also problems can be better compared when compiled with the same compiler (for a given language).

reggaeguitar: 2012-11-10 23:43:53

I don't understand why we can't use libraries, and why there is a source file byte limit. At work one doesn't have these restrictions, seems kind of artificial to me

Một Bạn Trai Giấu Tên: 2012-11-03 08:35:40

the result is so "small" !!!

Erik Lonèarek: 2012-10-28 19:47:36

Use an array to hold the numbers.

Last edit: 2012-10-28 19:47:56
Abhash Singh: 2012-10-21 17:12:32

@Luke hahaha..

ahmed: 2012-10-21 11:50:17

why got WA

saurabh: 2012-09-20 22:12:36

there is tutorial of this question on codechef in easy section .........try it

Luke Johnston: 2012-08-31 08:28:09

I'm assuming that we can't added libraries. I tried submit with "using System.Numerics" using c# and it said Compilation error. Took it out and it went up a level to Wrong answer.

Last edit: 2012-08-31 10:34:07
Chris Nastovski: 2012-08-24 23:21:57

Fun fun..

Last edit: 2012-08-27 20:37:44

Added by:adrian
Date:2004-05-28
Time limit:1s
Source limit:2000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All