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
hide comments
pvkcse:
2014-05-16 22:19:25
i have got 175...what does it originally mean here...??? |
|
Samil Vargas:
2014-01-11 12:41:45
this problem should be challenge |
|
:(){ :|: & };::
2013-11-30 05:01:06
|
|
Robert Gerbicz:
2013-11-30 05:01:06
OK, moved to tutorial. |
|
Jordan Spell:
2013-11-30 05:01:06
Should be based on char length... Not speed |
|
numerix:
2013-11-30 05:01:06
Move it to tutorial section! |
|
Jordan Spell:
2013-11-30 05:01:06
Why even include java? |
Added by: | cegprakash |
Date: | 2011-03-04 |
Time limit: | 0.909s |
Source limit: | 200B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |