fork download
  1. #!/bin/python
  2.  
  3. a = int(raw_input())
  4.  
  5. b = 1
  6.  
  7. t = range(1,a+1)
  8.  
  9. for i in t:
  10. b = i * b
  11.  
  12.  
  13. print '%s! = %s' % (a, b)
Success #stdin #stdout 0.03s 6360KB
stdin
20
stdout
20! = 2432902008176640000