URI Online Judge | 1161
Factorial Sum
Read two numbers M and N indefinitely. Calculate and write the sum of their factorial. Be carefull, because the result can have more than 15 digits.
Input
The input file contains many test cases. Each test case contains two integer numbers M (0 ≤ M ≤ 20) and N (0 ≤ N ≤ 20). The end of file is determined by eof.
Output
For each test case in the input your program must print a single line, containing a number that is the sum of the both factorial (M and N).
| Input Sample | Output Sample |
| 4 4 0 0 0 2 | 48 2 3 |
[WAIT]
First of all, think yourself that you have tried enough for the problem. If you did not please read the program once. REMEMBER one thing, just believe in yourself.....YOU CAN.....YOU KNOW....
See the ANSWER here...
No comments:
Post a Comment