HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50342 - 100 Factorial

Guest
• Review clarifications (3)

Volume problems

• 120. 50329 - Draw Matrix-1
• 120. 50331 - Number of Numbers o...
• 155. 50726 - Pascal Triangle - 1
• 180. 50755- Top N Donors - 1
• 190. 50734 - Product Info (In Srt)
• 200. 50290 - Minimax Sum
• 50332 - Variance of a series
• 50687 - Pascal Triangle - 2
• 50342 - 100 Factorial
• 50337 - Exam Averages
• 51149 - One Piece Arena
• 50558 - Biggest Barn
• 50567 - Input Data Normalization
• 50768 - Where is Waldorf?
• 151. 50557 - nth Power of m (Long...
• 160. 50301 - Fractions to Decimals
• 165. 50360 - National Elections

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