Submit | All submissions | Best solutions | Back to list |
PROBLEM6 - AVERYEASYPROBLEM |
Given two numbers a and b find the value of a!/b!, and do it in under 201 bytes of code.
Input
The first line consists of an integer t, the number of test cases. Then the next t lines consists of two integers a and b.
Output
For each test case print the value of factorial(a) / factorial(b).
Constraints
1 <= t <= 100
0 <= b <= a <= 15
Example
Input: 3 15 0 13 2 1 0 Output: 1307674368000 3113510400 1
Added by: | cegprakash |
Date: | 2011-03-04 |
Time limit: | 0.909s |
Source limit: | 200B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
hide comments
2014-05-16 22:19:25 pvkcse
i have got 175...what does it originally mean here...??? |
|
2014-01-11 12:41:45 Samil Vargas
this problem should be challenge |
|
2013-11-30 05:01:06 :(){ :|: & };:
130 bytes is too much if you don't want me to brute-force ;-) Else add more test-cases. |
|
2013-11-30 05:01:06 Robert Gerbicz
OK, moved to tutorial. |
|
2013-11-30 05:01:06 Jordan Spell
Should be based on char length... Not speed |
|
2013-11-30 05:01:06 numerix
Move it to tutorial section! |
|
2013-11-30 05:01:06 Jordan Spell
Why even include java? |