Problem:


Factorial

Write a program which reads an integer n and prints the factorial of n. You can assume that n ≤ 20.

Input

An integer n (1 ≤ n ≤ 20) in a line.

Output

Print the factorial of n in a line.

Sample Input

5

Output for the Sample Input

120



Sample input:
5


Sample output:
120

Submission status: Wrong Answer

Solution code:
tmp = 1
n = int(raw_input())
for i in range(1, n+1):
    n*=i
print n

Submission status: Wrong Answer

Solution code:
tmp = 1
n = int(raw_input())
for i in range(1, n+1):
    n*=i
print i

Submission status: Wrong Answer

Solution code:
ret = 1
for i in range(2, int(input())):
    ret *= i
print(ret)

Submission status: Wrong Answer

Solution code:
factorial= 1
number= int(input("Enter a number:"))

for r in range (1,number+1):
    factorial*=r

print(factorial)

Submission status: Wrong Answer

Solution code:
(lambda n:__import__("functools").reduce(lambda a,b:a*b,range(1,n+1)))(int(input()))

Submission status: Wrong Answer

Solution code:
n = input()
self = 1
for i in range(1, n + 1):
 self = self * i
print n

Submission status: Wrong Answer

Solution code:
from math import factorial
n = int(input())
print(factorial(5))

Submission status: Wrong Answer

Solution code:
# coding=utf-8
import math


if __name__ == '__main__':
    # n = int(input())
    print('120')

Submission status: Wrong Answer

Solution code:
a=1
for i in range(1,int(input())+1):a*i
print(a)

Submission status: Wrong Answer

Solution code:


import sys

lineNumber = 0

#for line in ["3 6 9 7 5"]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # get data
    List = map(int, line.strip().split(" "))

    n = List[0]
    ans = 1
    for i in xrange(2, n): ans *= i
    print ans

Submission status: Wrong Answer

Solution code:
print reduce(lambda x,y:x*y,range(1,input()))

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
ans = 1
for i in xrange(1,n):
    ans *= i
print ans

Submission status: Time Limit Exceeded

Solution code:
import math
print math.factorial(math.factorial(int(raw_input())))

Submission status: Accepted

Solution code:
n = int(input())

base = 1
for i in range(n):
    base *= i + 1

print(base)

Submission status: Accepted

Solution code:
import math
n = int(input())
print(math.factorial(n))

Submission status: Accepted

Solution code:
tmp = 1
n = int(raw_input())
for i in range(1, n+1):
    tmp*=i
print tmp

Submission status: Accepted

Solution code:
n=int(input())
F=1
for i in range(1,n+1):
    F*=i
print(F)

Submission status: Accepted

Solution code:
def Factorial(n):
    if n <= 1: return 1
    return n*Factorial(n-1)
print(Factorial(int(input())))

Submission status: Accepted

Solution code:
n = input()
ans = 1
for i in xrange(0,n):
  ans *= i+1
print ans

Submission status: Accepted

Solution code:
n = input()
ans = 1
for i in range(1, n + 1):
    ans *= i
print(ans)

Submission status: Accepted

Solution code:
def fac(x):
    if x<=1: return 1
    return fac(x-1)*x

while True:
    try:
        n=input()
        print fac(n)
    except EOFError: break

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import math

for s in sys.stdin:
  d = int(s)
  print math.factorial(d)

Submission status: Accepted

Solution code:
def fact(n):
    if(n==0):
        return 1
    return n * fact(n-1)

if __name__ == '__main__':
    n = int(input())
    print(fact(n))

Submission status: Accepted

Solution code:
print(["1","1","2","6","24","120","720","5040","40320","362880","3628800","39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000","51090942171709440000"][int(input())])

Submission status: Accepted

Solution code:
def f(x): return 1 if x<2 else x*f(x-1)
print(f(int(input())))

Submission status: Accepted

Solution code:
def func(num):
    if num<=1:
        return 1

    return num*func(num-1)

n=int(input())
print(func(n))

Submission status: Accepted

Solution code:
__author__ = 'hayato.osanai'
import sys
import math
for line in sys.stdin:
    n = int(line)
    print(math.factorial(n))
    break

Submission status: Accepted

Solution code:
ret = 1
for i in range(2, int(input()) + 1):
    ret *= i
print(ret)

Submission status: Accepted

Solution code:
def factorial(n):
    if n==1:
        return 1
    else:
        return n * factorial(n-1)   
    
n = int(raw_input())
print factorial(n)

Submission status: Accepted

Solution code:
fact=1
for i in range(2,input()+1):
    fact*=i
print fact

Submission status: Accepted

Solution code:
s=int(input())
ans=1
for i in range(1,s+1):
    ans *= i

print(ans)

Submission status: Accepted

Solution code:
from math import factorial
print factorial(int(raw_input()))

Submission status: Accepted

Solution code:
# -*- coding:shift-jis -*-
x=input()
def f(n):
 if n==0:return 1
 return f(n-1)*n
print(f(int(x)))

Submission status: Accepted

Solution code:
def fact(a):
	if a == 0:
		return 1
	return fact(a-1) * a

print fact(input())

Submission status: Accepted

Solution code:
res = 1
for i in range(int(raw_input())):
    res *= i+1
print res

Submission status: Accepted

Solution code:
import math
print math.factorial(input())

Submission status: Accepted

Solution code:
n = int(raw_input())
answer = 1
for i in range(n):
    answer *= i+1
print answer

Submission status: Accepted

Solution code:
from functools import reduce
print(reduce(lambda x, y: x*y, [x for x in range(1, int(input())+1)]))

Submission status: Accepted

Solution code:
import math
print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
n = input()
ans = 1
for x in range(n):
	ans *= x + 1
print ans

Submission status: Accepted

Solution code:
def f(n):
    return f(n - 1) * n if n > 0 else 1

print(f(int(input())))

Submission status: Accepted

Solution code:
ans=1
for i in range(1,int(raw_input())+1):
    ans*=i
print ans

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

def main():
    n=int(input())
    count=n
    a=1

    while count!=1:
        a*=count
        count-=1

    print(a)
        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math

n = (int)(input())
res = 1
for i in range(1,n+1):
    res *= i

print(res)

Submission status: Accepted

Solution code:
def f(x):
  if x == 0:
    return 1
  else:
    return x * f(x-1)
n = int(input())
print(f(n))

Submission status: Accepted

Solution code:
from math import *
PI = 3.1415926535898
while True:
	try:
		n = input()
		ans = 1
		for i in range(1, n+1):
			ans *= i
		print ans
	except EOFError:
		break

Submission status: Accepted

Solution code:
import math as m
print(m.factorial(int(input())))

Submission status: Accepted

Solution code:
number = int(input())
i = 1
product = 1
for i in range(1,number+1):
   product = product * i
print(product)

Submission status: Accepted

Solution code:
import sys

def fact(n):
    ret = 1
    if n<1:
        return -1
    elif n==1:
        return 1
    else:
        return n*fact(n-1)

line = sys.stdin.readline()
inp = int(line)
print (fact(inp))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
n = int(raw_input())
ans = 1
for i in range(1, n + 1):
    ans *= i
print ans

Submission status: Accepted

Solution code:
n = input()
ans = 1
for x in xrange(2,n+1):
    ans *= x
print ans

Submission status: Accepted

Solution code:
from math import factorial

print(factorial(int(input())))

Submission status: Accepted

Solution code:
n=input()
a=n
while n>1:
	n-=1
	a*=n
print a

Submission status: Accepted

Solution code:
n=int(input())
s=1
for i in range(n):
	s*=n
	n-=1
print(s)

Submission status: Accepted

Solution code:
from math import factorial
print(factorial(int(input())))

Submission status: Accepted

Solution code:
#coding:utf-8

import math
n = input()
print(math.factorial(n))

Submission status: Accepted

Solution code:
n = 1
for i in range(2,int(input()) + 1): n *= i
print(n)

Submission status: Accepted

Solution code:
a,i=input(),1
while a!=0:a,i=a-1,a*i
print(str(i))

Submission status: Accepted

Solution code:
def f(n):
    if n==1:
        return 1
    else:
        return n * f(n-1)
print(f(int(input())))

Submission status: Accepted

Solution code:
import math

n = int(input())
print(math.factorial(n))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def factorial(n):
    if n == 1:
        return 1
    else:
        return n*factorial(n-1)

print factorial(int(raw_input()))

Submission status: Accepted

Solution code:
n = int(input())
f = 1
for x in range(1, n+1):
    f *= x
print(f)

Submission status: Accepted

Solution code:
def factorial(n):
	if n==1:
		return 1
	return n*factorial(n-1)
	
n=input()
ans=factorial(n)
print(ans)

Submission status: Accepted

Solution code:
import operator
import functools

print(functools.reduce(operator.mul, range(1, int(input())+1)))

Submission status: Accepted

Solution code:
import math
print math.factorial(int(raw_input()))

Submission status: Accepted

Solution code:
v = (1,
     1,
     2,
     6,
     24,
     120,
     720,
     5040,
     40320,
     362880,
     3628800,
     39916800,
     479001600,
     6227020800,
     87178291200,
     1307674368000,
     20922789888000,
     355687428096000,
     6402373705728000,
     121645100408832000,
     2432902008176640000)

print(v[int(input())])

Submission status: Accepted

Solution code:
from math import factorial

n=int(input())
print(factorial(n))

Submission status: Accepted

Solution code:
n = int(input())
ans = 1
for i in range(1, n+1):
	ans *= i
print(ans)

Submission status: Accepted

Solution code:
def Factorial(n):
	fac = 1
	for i in range(1, n + 1):
		fac *= i
	return fac

print(Factorial(eval(input())))

Submission status: Accepted

Solution code:
def fac(n):
    if n == 0:
        return 1
    return n * fac(n - 1)


def main():
    n = int(input())
    print(fac(n))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math;print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
N = int(input())

ans = 1
for i in range(1,N + 1):
    ans *= i
print(ans)

Submission status: Accepted

Solution code:
print reduce(lambda a,b:a*b, range(1, input()+1))

Submission status: Accepted

Solution code:
import math
line = int(input())
print(math.factorial(line))

Submission status: Accepted

Solution code:
print(__import__("functools").reduce(lambda a,b:a*b,range(1,int(input())+1)))

Submission status: Accepted

Solution code:
print((lambda n:__import__("functools").reduce(lambda a,b:a*b,range(1,n+1)))(int(input())))

Submission status: Accepted

Solution code:
n = int(input())
S = 1
for i in range(n):
    S = S*(n-i)
print(S)

Submission status: Accepted

Solution code:
n = raw_input()
a = 1
for i in range(int(n)):
    a *= i+1
print a

Submission status: Accepted

Solution code:
from math import factorial

if __name__ == '__main__':
    # ??????????????\???
    num = int(input())

    # ??????????¨????
    result = factorial(num)

    # ???????????¨???
    print(result)

Submission status: Accepted

Solution code:
def main():
    n = int(input())

    print(fact(n))

def fact(i):
    if i == 0:
        return 1

    return i * fact(i - 1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#import sys
#import math
ans= int(1)
for i in range(2,int(input())+1):
    ans*=i
print(ans)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
n = int(input())
m = 1
for i in range(1,n+1):
    m = m*i

print(m)

Submission status: Accepted

Solution code:
from math import factorial as f
print(f(int(input())))

Submission status: Accepted

Solution code:
n = int(raw_input())

sum=1
for i in range(n):
  sum *= (i+1)

print sum

Submission status: Accepted

Solution code:
n = input()
self = 1
for i in range(1, n + 1):
 self = self * i
print self

Submission status: Accepted

Solution code:
array = [1]
for i in range(int(input())):
    array.append(array[i] * (i+1))
print(array.pop())

Submission status: Accepted

Solution code:
def factorial(x):
    y = 1
    for i in range(1, x + 1):
        y *= i
    return y

n = int(input())
print(factorial(n))

Submission status: Accepted

Solution code:
s = int(input())
k = 1
for i in range(2,s+1):
    k *= i
print(k)

Submission status: Accepted

Solution code:
import sys
import math as mas

n=int(input())
a=1
for i in range(n):a*=i+1
print(a)

#for i in sys.stdin:
#	a,b=map(int,i.split())
#	print(gcd(a,b),lcm(a,b))

Submission status: Accepted

Solution code:
from functools import reduce
from operator import mul
print(reduce(mul, range(1, int(input()) + 1), 1))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import os

def factorial(n):
    if n == 1:
        return 1
    else:
        return factorial(n-1) * n

n = int(input())
print(factorial(n))

Submission status: Accepted

Solution code:
n = int(input())
result = n
for _ in range(n)[:1:-1] : result *= _
print(result)

Submission status: Accepted

Solution code:

import math

num = int(input())
print(math.factorial(num))

Submission status: Accepted

Solution code:
import sys
from functools import reduce
n = int(sys.stdin.readline().rstrip())
print(reduce(lambda a,b:a*b,range(1,n+1)))

Submission status: Accepted

Solution code:
from math import factorial
n = int(input())
print(factorial(n))

Submission status: Accepted

Solution code:
from math import factorial
n = int(input())
print (factorial(n))

Submission status: Accepted

Solution code:
def factorial(n):
    if n==1:
        return 1
    else:
        return n*factorial(n-1)
N=int(input())
print(factorial(N))

Submission status: Accepted

Solution code:
n = int(input())
ans = 1

while n > 1:
	ans *= n
	n -= 1

print(ans)

Submission status: Accepted

Solution code:
from functools import reduce as R
print(R(lambda x, y: x*y, range(1, int(input())+1)))

Submission status: Accepted

Solution code:
import math

print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
def fact(n):
    if n == 0:
        return 1
    return n * fact(n - 1)

n = int(input())
print(fact(n))

Submission status: Accepted

Solution code:
import math
result = math.factorial(int(input()))
print(result)

Submission status: Accepted

Solution code:
def fact(n):
    if n == 0:
        return 1
    return n * fact(n - 1)
n = int(input())
print(fact(n))

Submission status: Accepted

Solution code:
user = input()
n = int(user)
kai = 1
for i in range(1, n+1):
    kai *= i
print(kai)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    for x in range(1, n):
        n *= x
    print(n)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# Aizu Problem 0019: Factorial
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
n = int(input())
factorial = 1
for i in range(2, n + 1):
    factorial *= i
print(factorial)

Submission status: Accepted

Solution code:
def factorial(n):
    if n == 1:
        return 1
    else:
        return n * factorial(n-1)
n=input()
print(factorial(int(n)))

Submission status: Accepted

Solution code:
from math import factorial

if __name__ == '__main__':
    n = (int)(input())
    print(factorial(n))

Submission status: Accepted

Solution code:
# coding=utf-8


if __name__ == '__main__':
    factorial = 1
    n = int(input())
    for i in range(1, n+1):
        factorial *= i
    print(factorial)

Submission status: Accepted

Solution code:
import math
x=int(input())
print(math.factorial(x))

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

a=1
b=input()

for i in range(1,b+1):
	a*=i
print a,

Submission status: Accepted

Solution code:
def factorial(n):
    if n == 1:
        return 1
    return n * factorial(n - 1)

n = int(input())
print(factorial(n))

Submission status: Accepted

Solution code:
def fact(n):
  if n == 0 or n == 1:
    return 1
  else:
    return n * fact(n - 1)


print(fact(int(input())))

Submission status: Accepted

Solution code:
def Factorial(N):
    if N == 0 :
        return 1
    else :
       return Factorial(N-1)*N

def main():
    n = int(input())
    print(Factorial(n))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
def main():
    n = int(input())
    print(math.factorial(n))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
n = int(input())
print(math.factorial(n))

Submission status: Accepted

Solution code:
import math
print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
n = int(raw_input())
sum= 1
for num in range(1,n+1):
    sum = sum * num
print sum

Submission status: Accepted

Solution code:
import math
x=int(input())
x=math.factorial(x)
print(x)

Submission status: Accepted

Solution code:
def f(x):
    if x == 1:
        return x
    else:
        return x*f(x-1)

n = int(input())
print(f(n))

Submission status: Accepted

Solution code:
a=1
for i in range(2,int(input())+1):a*=i
print(a)

Submission status: Accepted

Solution code:
def f(n):
 if n==1:return 1
 return f(n-1)*n
print(f(int(input())))

Submission status: Accepted

Solution code:
n = int(input())
key = 1
while n:
    key *= n
    n -= 1
print(key)

Submission status: Accepted

Solution code:
kazu=int(input());
ans=kazu
for h in range(kazu-1):
    ans=ans*(h+1)
print(ans)

Submission status: Accepted

Solution code:
def fact(n):
  if n == 0:
    return 1
  else:
    return n * fact(n - 1)
print(fact(int(input())))

Submission status: Accepted

Solution code:
def kj(n):
    if n==0 or n==1:return 1
    return n*kj(n-1)
print(kj(int(input())))

Submission status: Accepted

Solution code:
# AOJ 0019 Factorial
# Python3 2018.6.14 bal4u

import math
print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
n = input()
a = 1
for i in range(1,n+1):
    a *= i
print a

Submission status: Accepted

Solution code:
a  = int(input())
b = 1
for i in  range(1,a):
 b*= i
print b*a

Submission status: Accepted

Solution code:
a=int(input()) ; b=1
for i in range(1,a+1): b*=i
print b

Submission status: Accepted

Solution code:
def factorial(n):
    if n<=0:
        return 1
    else:
        return n*factorial(n-1)

print factorial(int(raw_input()))

Submission status: Accepted

Solution code:
a = input()

ans = 1
for x in range(2,a+1):
    ans = ans*x
print ans

Submission status: Accepted

Solution code:
def f(s, n):
        s *= n
        if n <= 2:
                return s
        else:
                return f(s, n-1)

n = int(raw_input())
s = 1
print f(s, n)

Submission status: Accepted

Solution code:
from math import factorial
print factorial(input())

Submission status: Accepted

Solution code:
#!/usr/bin/python


def datasets():
    s = raw_input().strip()
    yield int(s)
    
def main():
    for n in datasets():
        print reduce(lambda a, b: a*b, range(1, n+1))
        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
print reduce(lambda x,y:x*y,map(lambda x:x+1,range(int(raw_input()))))

Submission status: Accepted

Solution code:
i=input()
a=1
while i:
	a*=i;i-=1;
print a

Submission status: Accepted

Solution code:
i=input()
a=1
while i:
	a*=i
	i-=1
print a

Submission status: Accepted

Solution code:
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from sys import stdin
from math import factorial
print(factorial(int(stdin.readline())))

Submission status: Accepted

Solution code:
n = input()
answer = 1
while n != 1:
	answer *= n
	n -= 1
print answer

Submission status: Accepted

Solution code:
'''
Created on Mar 22, 2013

@author: wukc
'''
from sys import stdin

n=int(stdin.readline())
ans=1
for i in range(1,n+1):
    ans*=i
print(ans)

Submission status: Accepted

Solution code:
n = input()

ans = 1;
for i in range(1, n + 1):
  ans *= i;

print ans

Submission status: Accepted

Solution code:
n=int(raw_input())
a=1
for i in range(1,n+1):
  a*=i
print a

Submission status: Accepted

Solution code:
def f(n): return n*f(n-1) if n!=0 else 1
print f(input())

Submission status: Accepted

Solution code:

import sys


def fact(n):
    if n == 1:
        return 1
    else:
        return n * fact(n-1)


#input_file = open(sys.argv[1], "r")

#for line in input_file:
for line in sys.stdin:
    n = int(line)
    print fact(n)

Submission status: Accepted

Solution code:
def cal(x):
    sum = 1

    for i in range(x):
        sum *= i+1

    return sum

if __name__ == "__main__":
    a = int(raw_input())
    print cal(a)

Submission status: Accepted

Solution code:
def fact(n):
    if n==1:
        return 1
    return n*fact(n-1)

n = input()
print fact(n)

Submission status: Accepted

Solution code:
n=input()

x = reduce(lambda a,b: a*b, range(1,n+1))
print x

Submission status: Accepted

Solution code:
import math

print math.factorial(int(raw_input()))

Submission status: Accepted

Solution code:
#!/usr/bin/python

def main():
	input = raw_input()

	n = int(input)
	print int(factorial(n))

def factorial(n):
	if (n <= 1):
		return 1

	return n * factorial(n - 1)

main()

Submission status: Accepted

Solution code:


import sys

lineNumber = 0

#for line in ["3", "6", "9", "7", "5"]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # get data
    List = map(int, line.strip().split(" "))

    n = List[0]
    ans = 1
    for i in xrange(2, n+1): ans *= i
    print ans

Submission status: Accepted

Solution code:
n = int(raw_input())

def fact(n):
    if n == 1 or n == 0:
        return 1
    else:
        return n*fact(n-1)

print fact(n)

Submission status: Accepted

Solution code:
res, n = 1,int(raw_input())
while n > 0: res, n = res*n, n-1
print res

Submission status: Accepted

Solution code:
n=input()
x=1
while n: x,n=x*n,n-1
print x

Submission status: Accepted

Solution code:
def f(n):
    return 1 if n == 1 else f(n - 1) * n
print f(int(raw_input()))

Submission status: Accepted

Solution code:
print reduce(lambda x,y:x*y,range(1,input()+1))

Submission status: Accepted

Solution code:
import sys

def kai(n):
  if(n <= 1):
    return 1
  else:
    return n*kai(n-1)

for n in sys.stdin:
  print kai(int(n))

Submission status: Accepted

Solution code:
print [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000][input()]

Submission status: Accepted

Solution code:
from functools import reduce
from operator import mul

n = int(input())
print(reduce(mul, range(1, n + 1), 1))

Submission status: Accepted

Solution code:
n = int(raw_input())
ans = 1
for i in xrange(1,n+1):
    ans *= i
print ans

Submission status: Accepted

Solution code:
def fac(n):
    f = 1
    for i in range(2, n + 1):
        f *= i

    return f

n = int(input())
print(fac(n))

Submission status: Accepted

Solution code:
from math import factorial as f
print(f(int(input())))

Submission status: Accepted

Solution code:
n = int(input())
num = 1
for i in range(n):
    num = num*(i+1)
print(num)

Submission status: Accepted

Solution code:
num = int(input())
ans = num
for i in range(1, num):
    ans = ans *i

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = 1
for i in range(1, n+1) :
    ans *= i
print(ans)

Submission status: Accepted

Solution code:
#mathモジュールを使い、階乗を計算する
import math
print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
n = int(input())

fac = 1

for i in range(1, n + 1):
    fac *= i

print(fac)

Submission status: Accepted

Solution code:
n = int(input())
s = 1
for i in range(1,n+1):
    s=s*i
print(s)

Submission status: Accepted

Solution code:
num = int(input())
ans = 1
for i in range(num,1,-1):
    ans *= i
print(ans)

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for python program
###

import sys
import math

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

    ### Prime Number
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    def pnum_check(self, n):
        if (n==1):
            return False
        elif (n==2):
            return True
        else:
            for x in range(2,n):
                if(n % x==0):
                    return False
            return True

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    ### Mat Multiplication
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans
    
    ### intチェック
    def is_integer(self, n):
        try:
            float(n)
        except ValueError:
            return False
        else:
            return float(n).is_integer()

    ### 幾何学問題用
    def dist(self, A, B):
        d = 0
        for i in range(len(A)):
            d += (A[i]-B[i])**2            
        d = d**(1/2)
        return d

    ### 絶対値
    def abs(self, n):
        if n >= 0:
            return n
        else:
            return -n   

mymath = mymath()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        #print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]

#R = float(input())
#A.append(list(map(int,input().split())))

#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

#abc list
#abc = [chr(ord('a') + i) for i in range(26)]

### output sample
# print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
# print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
# print(" {}".format(i), end="")

def printA(A):
    N = len(A)
    for i, n in enumerate(A):
        print(n, end='')
        if i != N-1:
            print(' ', end='')
    print()

# リスト内包表記 ifあり
# [x-k if x != 0 else x for x in C]

# ソート（代入する必要なし）
# N.sort()

# 10000個の素数リスト
# P = mymath.pnum_eratosthenes(105000)

def get_input():
    N = []
    while True:
        try:
            #N.append(input())
            #N.append(int(input()))
            #N.append(float(input()))
            N.append([int(x) for x in input().split()])
        except EOFError:
            break
    return N

#D = get_input()

n = int(input())

ans = 1

for i in range(1,n+1):
    ans *= i

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = 1

for i in range(1, n + 1) :
    ans *= i
    
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

c = 1
for i in range(1,n+1):
    c *= i
print(c)

Submission status: Accepted

Solution code:
n = int(input())
sum = 1
for i in range(1, n + 1):
    sum *= i
print(sum)

Submission status: Accepted

Solution code:
a = int(input())
res = 1

for i in range(a, 1, -1):
    res *= i

print(res)

Submission status: Accepted

Solution code:
n=int(input())
A=1
for i in range(1,n+1):
    A*=i
print(A)

Submission status: Accepted

Solution code:
n=int(input())
import math

print(math.factorial(n))

Submission status: Accepted

Solution code:
def fac(n):
    ans=1
    for i in range(n+1):
        if i is not 0:
            ans*=i
    return ans
n = eval(input())
print(fac(n))

Submission status: Accepted

Solution code:
import math
 
n = int(input())
print(math.factorial(n))

Submission status: Accepted

Solution code:
n=int(input())
ans=1 
for i in range(1,n+1):
  ans *=i
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = 1
for i in range(2, n+1) :
    ans *= i
print(ans)

Submission status: Accepted

Solution code:
import math
if __name__ == '__main__':

	n = int(input())

	print(math.factorial(n))

Submission status: Accepted

Solution code:
def fact(n):
  if n == 1:
    return 1
  else:
    return n * fact(n - 1)

n = int(input())
print(fact(n))

Submission status: Accepted

Solution code:
def factorial(n):
  if n == 1:
    return 1
  else:
    return n*factorial(n-1)

n = int(input())
print(factorial(n))

Submission status: Accepted

Solution code:
N=int(input())
ans=1
for i in range(1,N+1):
    ans=ans*i
print(ans)

Submission status: Accepted

Solution code:
n = int(raw_input())
ans = 1
for i in range(1, n+1):
	ans = ans * i
print ans

Submission status: Accepted

Solution code:
n = int(input())
ans = 1
for i in range(1, n + 1):
    ans *= i
print(ans)

Submission status: Accepted

Solution code:
def fact(n):
    return 1 if n == 1 else n*fact(n-1)
print(fact(int(input())))

Submission status: Accepted

Solution code:
n = int(input())
f = 1
for i in range(n):
    f = f*(i+1)
print(f)

Submission status: Accepted

Solution code:
import math;print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
n = int(input())
def f(n):
    if n == 0 : return 1
    else : return f(n - 1) * n
print(f(n))

Submission status: Accepted

Solution code:
import math
a=int(input())
print(math.factorial(a))

Submission status: Accepted

Solution code:
# coding: utf-8
# coding: Shift_JIS
# coding: EUC-JP
# coding: cp932
import math

n = int(input())
print(math.factorial(n))

Submission status: Accepted

Solution code:
n = int(input())
k = 1
for j in range(1,n+1):
    k *= j
print(k)

Submission status: Accepted

Solution code:
print reduce(lambda a, b: a*b, range(1, input()+1))

Submission status: Accepted

Solution code:
n = int(input())

ans = 1

for i in range(1, n+1):
    ans *= i

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

def fact(n):
   ans = 1
   for n in range(n,1,-1):
      ans *= n
   return ans

print(fact(n))

Submission status: Accepted

Solution code:
import math

print(math.factorial(int(input())))

Submission status: Accepted

Solution code:
# import math
# print(math.factorial(int(input())))


def f(a):
    if a == 1:
        return a
    return a * f(a - 1)


print(f(int(input())))

Submission status: Accepted

Solution code:
from functools import reduce
n = int(input())
factional = reduce(lambda x,y:y*x, [i for i in range(1, n+1)])
print(factional)

Submission status: Accepted

Solution code:
print([0,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368000,20922789888000,355687428096000,6402373705728000,121645100408832000,2432902008176640000][int(input())])

Submission status: Accepted

Solution code:
import math

def run():
    n = int(input())
    print(math.factorial(n))

if __name__ == '__main__':
    run()

Submission status: Accepted

Solution code:
# Factorial
def f(n):
    if n == 1: return 1
    return f(n-1) * n
n = int(input())
print(f(n))

Submission status: Runtime Error

Solution code:
def f(x):return 1if x<2else x*f(x-1)
print(f(int(input())))

Submission status: Runtime Error

Solution code:
s=int(input())
ans=1
for i in range(1,s+1)
    ans*=i

print(ans)

Submission status: Runtime Error

Solution code:
x=input()
def f(n):
 if n==0:return 1
 return f(n-1)*n
print(f(int(n)))