HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50342 - 100 Factorial

Guest
• Review clarifications (3)

Section problems

• 50518 - Histogram Equalization
• 50522 - Multiplication Table - 2
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients
• 51003 - Double Prime
• 50435 - City Electric Bills
• 50527 - Sum of LCMs
• 50440 - Call Center
• 50342 - 100 Factorial
• 50439 - Telephone Calls
• 50436 - Pocket Money
• 50379 - a^b modulus k
• 50353 - Cube of the Largest number
• 50359 - Mode of a Series
• 50539 - Number of Chairs - 2
• 50532 - Close City
• 50462 - Class Average (3 Grades)

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

100 Factorial

  In mathematics, n factorial is the multiplication of all the numbers from 1 to n. e.g.
     5!=1*2*3*4*5
  and that is equal to 120.

Question:
Write aprogram that calculates n factorial where n is between 1 and 100.
Note: 100 factorial is 158 digit long number. So, you cannot use standard data types to store such big numbers. For C, C++ you have to use arrays.

Input specification
You will be given just one number (n) where 1 ≤ n ≤ 100.

Output specification
Calculate and show the result of n!.

 Sample Input I   
  10
 Sample Input II   
  20
 Sample Output I   
  3628800
 Sample Output II   
  2432902008176640000   


Для отправки решений необходимо выполнить вход.

www.contester.ru