Problem:
 Score : 200 points    Problem Statement Snuke loves working out. He is now exercising N times.  Before he starts exercising, his power is 1 . After he exercises for the i -th time, his power gets multiplied by i .  Find Snuke's power after he exercises N times. Since the answer can be extremely large, print the answer modulo 10^{9}+7 .      Constraints  1 ≤ N ≤ 10^{5}         Input The input is given from Standard Input in the following format:  N       Output Print the answer modulo 10^{9}+7 .        Sample Input 1 3      Sample Output 1 6   After Snuke exercises for the first time, his power gets multiplied by 1 and becomes 1 .  After Snuke exercises for the second time, his power gets multiplied by 2 and becomes 2 .  After Snuke exercises for the third time, his power gets multiplied by 3 and becomes 6 .        Sample Input 2 10      Sample Output 2 3628800       Sample Input 3 100000      Sample Output 3 457992974  Print the answer modulo 10^{9}+7 .

Solution (Python):
n = int(input())
train = 1
for i in range(1,n+1):
    train = train*i%(10**9+7)
print(train)

Solution (Python):
N = int(input())
power = 1
for i in range(1,N+1):
    power *= i
    power %= 10**9 + 7
print(power)

Solution (Python):
import math
n = int(input())
i = 1
j = math.factorial(n)
x = 10**9
print(j%(x+7))

Solution (Python):
N = int(input())
power = 1
A = 10**9 + 7

  
  
  
  

for i in range(1, N+1):
  power = power * i % A

print(power)

Solution (Python):

"""
N=int(input())

print(800*N-int(N/15)*200)
"""
"""
N=int(input())
S=input()

max_n=0
temp=0
for strng in S:
	if strng=="I":
		temp+=1
		if max_n<temp:
			max_n=temp
	else:
		temp-=1
print(max_n)
"""
N=int(input())

Q=1000000007
p=1
for i in range(1,N+1):
	p*=i
	p=p%Q
print(p%Q)

Solution (Python):
import sys

M = 10**9 + 7
N = int(sys.stdin.readline().strip())

x = 1

for i in range(1, N+1):
    x = (x * i) % M

print(x)

Solution (Python):
a=int(input())
Sum=1
b=10**9+7

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

print(Sum)

Solution (Python):
N = int(input())
mod = 10**9+7
power = 1
for i in range(1, N+1):
    power *= i
    power %= mod
print(power)

Solution (Python):
N = int(raw_input())
x = 1
M = 10**9+7
for i in range(1,N+1):
  x = (x*i)%M
print x

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % (10**9 + 7))

Solution (Python):
n = int(input())
power = 1
for i in range(1, n+1):
	power = (i * power) % 1000000007
	
print(power)

Solution (Python):
N = int(input())

ans = 1
for i in range(N):
    ans *= i+1
    ans %= 10**9 + 7

print(ans)

Solution (Python):

ans = 1
n_mod = pow(10,9) + 7
for i in range(1, int(input())+1):
    ans = (ans * i) % n_mod
print(ans)

Solution (Python):

ans = 1
n_mod = 10**9 + 7
for i in range(1, int(input())+1):
    ans = (ans * i) % n_mod
print(ans)

Solution (Python):

ans = 1
for i in range(1, int(input())+1):
    ans *= i
    ans %= (10**9 + 7)
print(ans)

Solution (Python):
m = 10 ** 9 + 7
n = int(input())
x = 1

for i in range(2, n + 1):
  x = (x * i) % m

print(x)

Solution (Python):
N=int(input())
power=1
for i in range(1,N+1):
    power=(power*i)%(10**9+7)
print(str(power))

Solution (Python):
N = int(input())
p = 1

for i in range(1,N+1):
  p *= i
  if p > 10**9+7: p = p%(10**9+7)

print(p)

Solution (Python):
import math
times = int(input())
print(math.factorial(times) % (10**9 + 7))

Solution (Python):
N = int(input())
p = 1
for i in range(1,N+1):
    p *= i
    if p > 2 * (10 ** 9):
        p %= 10 ** 9 + 7
print(p)

Solution (Python):
n = int(input())
p = 1

for i in range(n):
    p *= (i + 1)
    p %= 10**9 + 7
print(p)

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % (10 ** 9 + 7))

Solution (Python):
N = int(input().rstrip())
n = 1
for i in range(1, N + 1):
    n = n * i % 1000000007

print(n)

Solution (Python):
a = int(input())
pow = 1

for i in range(1,a+1):
  pow *= i
  pow %= (10**9)+7
  
print(pow)

Solution (Python):
N=int(input())
x=1
for i in range(1,N+1):
    m=x%(10**9+7)
    x=m*i
print(x%(10**9+7))

Solution (Python):
n = int(input())
MOD = int(1e9)+7
power = 1

for i in range(1, n+1):
    power *= i
    power %= MOD 
print(power)

Solution (Python):
from math import factorial
N = int(input())
ans = 1
for i in range(1,N+1):
    ans *= i % (10**9 + 7)
    ans %= 10**9 + 7
print(ans)

Solution (Python):
from math import factorial
N = int(input())
print(factorial(N) % (10**9 + 7))

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    N = int(input())

    p = 1
    for i in range(1, N+1):
        p = (p * i) % (10 ** 9 + 7)

    print(p)

main()

Solution (Python):
ans = 1
for i in range(1,int(input())+1):
    ans = (ans*i) % (10**9+7)
print(ans)

Solution (Python):
import math;print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
power = 1

for i in range(1, N+1):
  power *= i
  power %= 10**9 + 7

print(power)

Solution (Python):
m = 10 ** 9 + 7
n = int(input())
x = 1

for i in range(2, n + 1):
  x = (x * i) % m

print(x)

Solution (Python):
n = int(input())
p, d =1, 10**9+7
for i in range(1,n+1):
  p = (p*i) % d
print(p)

Solution (Python):
n=int(input())
power=1
div=10**9 + 7
for i in range(1,n+1):
  power=(power*i)%div
print(power)

Solution (Python):
from math import factorial
n = int(input())
print(factorial(n)%1000000007)

Solution (Python):
from math import factorial
n = int(input())
print(factorial(n)%1000000007)

Solution (Python):


d = 1000000007
n = int(input())
ans = 1
for i in range(1,n+1):
    ans = (ans*i)%d

print(ans)

Solution (Python):
fact = [1]*(10**5+1)
for i in range(10**5):
    fact[i+1]=fact[i]*(i+1)
    fact[i+1]%=10**9+7
print(fact[int(input())])

Solution (Python):


n=int(input())

res=1
bn=10**9+7

for i in range(1,n+1):
  res=int((res*i)%bn)
print(res)

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

Solution (Python):
N = int(input().rstrip())
DIV = 10**9 + 7
ans = 1
for n in range(1, N+1):
    ans = (ans * n) % DIV
print(ans)

Solution (Python):
import math
N = int(input().rstrip())
power = math.factorial(N)
print(power % (pow(10, 9) + 7))

Solution (Python):
n=int(input())
a=1
for i in range(1,n+1):
    a*=i
    a=a%1000000007
        
print(a)

Solution (Python):
n = int(input())
p = 1
for i in range(1, n+1):
    p = (p%1000000007) * (i%100000007)

print(p%1000000007)

Solution (Python):
a = int(input())
b = 1
for i in range(1,a+1):
    b = b * i % (10 ** 9 + 7)
print(b)

Solution (Python):
n=1
for i in range(1,int(input())+1):
    n*=i
    n=n%1000000007
print(n)

Solution (Python):
n=int(input())
a=1
for i in range(1,n+1):
	a=a%(1000000000+7)*i%(1000000000+7)
print(a%(1000000000+7))

Solution (Python):
import math

N = int(input())

power = math.factorial(N)%(10**9 + 7) 
print(power)

Solution (Python):
N = int(input())
a = 1
for i in range(1,N+1):
    a=a*i
    a=a%1000000007
print(a)

Solution (Python):
MOD = 10**9+7

def power_up(n):
    result = 1
    for i in range(2,n+1):
        result = result*i%MOD
    return result

n = int(input())
print(power_up(n)%MOD)

Solution (Python):
n = int(input())
ans = 1
for x in range(1, n + 1):
    ans = x * ans % (10**9 + 7)
print(ans)

Solution (Python):
N = int(input())
ans = 1
Q = 10**9+7
for i in range(1, N+1):
    ans = ans * i%Q
print(ans)

Solution (Python):
N = int( input())
ans = 1
Q = 10**9+7
for i in range(1, N+1):
    ans = ans * i%Q
print(ans)

Solution (Python):
from sys import stdin


def main() -> int:
    n = next_int()
    m = 10 ** 9 + 7

    ans = 1

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

    print(ans)
    return 0


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
a = 1
m = 10**9+7

for n in range(1,N+1):
    a *= n
    if a/m >= 1:
        a -= int(a/m)*m

print(a)

Solution (Python):
n = int(input())
sunuke = 1
for i in range(1, n+1):
  sunuke = sunuke * i % 1000000007

print(sunuke)

Solution (Python):
N = int(input())
p= 1

for i in range(1, N+1):
    p = (p*i) % (10**9 + 7)

print(p)

Solution (Python):
n=int(input())
c=1
for i in range(n):
    c*=(i+1)
    c%=(10**9+7)
print(c)

Solution (Python):
from math import factorial
n = int(input())
print(factorial(n) % (10**9 + 7))

Solution (Python):
N = int( input())
ans = 1
Q = 10**9+7
for i in range(1,N+1):
    ans = ans*i%Q
print(ans)

Solution (Python):
N = int(input())
power = 1

for i in range(1, N+1):
    power = (power*i)%(10**9+7)
print(power)

Solution (Python):
n = int(input())
ass = 1
for i in range(1,n+1):
    ass *= i
    ass = ass% (10**9+7)
print(ass)

Solution (Python):
MOD =10**9 + 7

def factorial(n):
    result = 1

    for i in range(1,n+1):
        result = i*result % MOD 
    return result

a = int(input())
print(factorial(a))

Solution (Python):
N = int(input())
pow, mod = 1, 7+10**9
for i in range(1, N+1):
    pow *= i
    pow %= mod
print(pow)

Solution (Python):
mod = 1000000007

n = int(input())
factorial_previous = 1

for i in range(1,n+1):
    factorial = (i*factorial_previous)%mod
    factorial_previous = factorial
print(factorial)

Solution (Python):
n = int(input())
x, i = 1, 1
while i <= n:
  x = (x * i) % (10 ** 9 + 7)
  i += 1
print(x)

Solution (Python):
n = int(input())

if n < 5000:
    power=1
    index=2
    while index < n+1:
        power*=index
        index+=1
elif n == 5000:
    power = 541108809 + (10**9 + 7)*2
elif n > 5000 and n < 40000:
    power = 541108809
    index = 5001
    while index < n+1:
        power*=index
        index+=1
elif n == 40000:
    power = 422550956 + (10**9 + 7)*2
elif n > 40000 and n < 70000:
    power = 422550956
    index = 40001
    while index < n+1:
        power *= index
        index += 1
elif n == 70000:
    power = 296716438 + (10**9 + 7)*2
else:
    power = 296716438
    index= 70001
    while index < n+1:
        power *= index
        index += 1

if power > 10**9 + 7:
    print(power%(10**9 + 7))
else:
    print(power)

Solution (Python):
n = int(input())
ans = 1
i = 1
while i<=n:
  ans = ans*i%(1000000007)
  i += 1
print(ans)

Solution (Python):
n = int(input())
power = 1
for i in range(0,n):
    power = power*(i+1) % int(10 ** 9 + 7)
print(power)

Solution (Python):
n = int(input())

power = 1

p = 1000000000 + 7

for i in range(n):
    power = power * (i + 1) % p

print(power)

Solution (Python):
N = int(input())
power = 1
log = 10**9 + 7
for i in range(1, N+1):
    power = power*i % log
print(power)

Solution (Python):

n = int(input())
p = 1
for i in range(n):
    p *=  (i + 1)
    p %= (10**9 + 7)
print(int(p))

Solution (Python):
N = int(input())
p = 1
for i in range(1,N+1):
    p *= i
    p %= 1000000007
print(p)

Solution (Python):
n=int(input())
m=10**9+7
ans=1
for i in range(1,n+1):
    ans=ans*i%m
print(ans)

Solution (Python):
from math import factorial
print(factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
answer = 1
for i in range(N) :
    answer = (answer*(i+1))%(10**9+7)
print(answer)

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    N = int(input())
    now = 1
    for i in range(1, N + 1):
        now *= i
        now %= (10 ** 9 + 7)
    print(now)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
x = 1
Y = 10**9+7
for z in range(1,n+1):
    x = x*z
    if x >= Y:
        x = x % Y
print(x)

Solution (Python):


n = int(input());
x = 1 
for i in range(1, n + 1):
	x = (x * i) % (1000000000 + 7)
print (x)

Solution (Python):
N = int(input())
tmp = 1000000007
ans = 1
for i in range(1,N+1):
    ans = ans * i % tmp
print(ans)

Solution (Python):
import math;print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
k = 1
for i in range(1,N+1):
  k = (k*i % ((10**9)+7))
print(k)

Solution (Python):
N = int(input())

ans = 1

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

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
n,a = int(input()),1
for i in range(n):
    a = a*(i+1)%(10**9+7)
print(a)

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
N=int(input())
def fact(n):
     table=[1]*n
     for i in range(1,n):
         table[i]=table[i-1]*(i+1) % (10**9+7)
     return table
print(fact(N)[N-1]% (10**9+7))

Solution (Python):
n = int(input())

ans = 1
for i in range(1, n + 1):
    ans = (ans * i) % (10 ** 9 + 7)

print(ans)

Solution (Python):
n = int(input())
num = 1
for i in range(1, n+1):
    num = (num * i) % (10**9 + 7)

print(num)

Solution (Python):
import sys
stdin = sys.stdin

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

n = ni()
MOD = 10**9+7

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

Solution (Python):
N = int(input())
ans = 1
MOD = 10**9+7
for i in range(1,N+1):
    ans *= i
    ans %= MOD
print(ans)

Solution (Python):
n = int(input())
val = 1
m = 10**9+7
for i in range(1,n+1):
  val = (val*i)%m
print(val)

Solution (Python):
n=int(input())
a=1
mod=10**9+7
for i in range(1,n+1):
    a*=i
    a %= mod
print(a%mod)

Solution (Python):
mod = 10**9 + 7
ans = 1
n = int(input())
for i in range(1, n+1):
    ans *= i
    ans %= mod
print(ans%mod)

Solution (Python):
n=int(input())
s=1
m=1000000007
for i in range(1,n+1):s=s*i%m
print(s)

Solution (Python):
N = int(input())

power = 1
for i in range(1,N+1):
    power *= i
    power %= 10**9 + 7

print(power)

Solution (Python):
import math
N=int(input())

power=math.factorial(N)

ans=power%(1000000000+7)
print(ans)

Solution (Python):
n = int(input())
power = 1

for i in range(n):
    power = power*(i+1)%(10**9+7)

print(power)

Solution (Python):
import math

N = int(input())

power = math.factorial(N)

print(power % 1000000007)

Solution (Python):
N=int(input())
power=1
for i in range (N):
    power=(power*(i+1))%(10**9+7)
print(power%(10**9+7))

Solution (Python):
n = int(input())
MOD = int(1e9 + 7)

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

print(ans)

Solution (Python):
n=int(input())

mul=1
mod=1000000007
for i in range(2,n+1):
  mul=i*mul
  mul=mul%mod
print(mul)

Solution (Python):
N = int(input())
p = 1
for i in range(2, N+1):
    p = p * i % (10**9+7)
print(p)

Solution (Python):

n = int(input())
p=1

for i in range(1,n+1):
    p = i*p%(10**9+7)

print(p)

Solution (Python):
n = int(input())

i = 1
power = 1
while i <= n:
    if power >= 10**9 + 7:
        power %= (10**9 + 7)
    power *= i
    i += 1
print(power % (10**9 + 7))

Solution (Python):
N = int(input())

k = 1000000007

p = 1
for i in range(1,N+1):
    p *= i
    p %= k
print(p)

Solution (Python):

import math

def main():
    n = int(input())
    print(math.factorial(n) % (10 ** 9 + 7))


if __name__ == '__main__':
    main()

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

Solution (Python):
n=int(input())
s=1
t=int(1e9+7)
for i in range(1,n+1):
  s*=i
  s%=t
print(s)

Solution (Python):
MOD = 10**9+7
n = int(input())

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

print(ans)

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
N = int(input())
p = 1
for i in range(1,N+1):
    p = (p * i)%(10**9+7)
print(p)

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+7))

Solution (Python):
import math

n = int(input())

print(math.factorial(n)%1000000007)

Solution (Python):
mod = 10**9+7
N=int(input())
ans = 1
for i in range(1,N+1):
  ans *= i
  ans %= mod
  
print(ans)

Solution (Python):
N = int(input())
ans = 1
for i in range(1,N+1):
  ans *= i
  ans %= (10**9 + 7)
print(ans)

Solution (Python):
n=int(input())
ans=1
for n in range(1,n+1):
    ans = (ans * n) % (10**9 + 7)
    
print(ans)

Solution (Python):
mod=1000000007

def P(x):
    ans=1
    for i in range(x):
        ans=ans*(i+1)%mod
    
    return(ans)

n=int(input())

print(P(n))

Solution (Python):
N=int(input())
power=1
const=pow(10,9)+7
for i in range(1,N+1):
    power=(power*i)%const
print(power)

Solution (Python):
import math

n = int(input())
print(math.factorial(n) % (10 ** 9 + 7))

Solution (Python):
import math
N = int(input())
ans = math.factorial(N)
print(ans % (pow(10, 9) + 7))

Solution (Python):
import math

n = int(input())

power = math.factorial(n)

mod = 10**9+7

print(power % mod)

Solution (Python):
N = int(input())
p = 10 ** 9 + 7
power = 1
for i in range(N):
  power *= i + 1
  if power > p:
    power %= p
print(power)

Solution (Python):
n = int(input())
m = 10**9+7
v = 1
for i in range(1,n+1):
    v = (v * i) % m
print(v)

Solution (Python):
import math

N = int(input())

mod = 10 ** 9 + 7
print(math.factorial(N) % mod)

Solution (Python):

def main():
    n = int(input())
    ans = 1

    for i in range(1,n+1):
        ans *= i
        if ans >= 1000000007:
            ans = ans %1000000007

    print(ans)

if __name__ == "__main__":
        main()

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % (10 ** 9 + 7))

Solution (Python):
from math import factorial
N = int(input())
print(factorial(N) % (10**9+7))

Solution (Python):
import math

N = int(input())

ans = math.factorial(N) % (10 ** 9 + 7)

print(ans)

Solution (Python):
MOD = 10**9+7
n = int(input())
ans = 1
for i in range(1, n+1):
  ans = ans*i%MOD
print(ans)

Solution (Python):
def main():
    N = int(input())
    x = 1
    for i in range(1,N + 1):
        x = x * i
        x = x % (10**9 + 7)
    print(x)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    N = int(input())
    result = 1
    for i in range(1, N + 1):
        result = (result * i) % (10 ** 9 + 7)
    print(result)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
v = 1
for i in range(1, N + 1):
    v *= i
    v = v % (pow(10,9) + 7)
print(v)

Solution (Python):
N = int(input())
x = 1
for i in range(N):
	x = x * (i + 1)
	if x >= 1000000007:
		x = x % 1000000007

print(x)

Solution (Python):


ans = 1
for i in range(1, int(input())+1):
    ans = int((ans*i) % (1e9+7))
print(ans)

Solution (Python):
N = int(input())
x = 1
i = 1
while i <= N:
  x = (x*i)%(10**9+7)
  i += 1
print(x)

Solution (Python):
N = int(input())
ans = 1

for i in range(1,N + 1):
    ans *=  i 
    ans %= 10 ** 9 + 7
print(ans)

Solution (Python):
N = int(input())

ans = 1
mod = 10**9 + 7

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

print(ans)

Solution (Python):
n=int(input())

import math
print(math.factorial(n)%(10**9+7))

Solution (Python):
N = int(input())

result = 1
mod = 10**9+7

for i in range(1, N+1):
    result *= i
    result %= mod

print(result)

Solution (Python):


N = int(input())

ans = 1
for i in range(N):
    
    ans = (ans * (i + 1)) % (10 ** 9 + 7) 




print(ans)

Solution (Python):
number = int(input())

power = 1

for i in range(1, number + 1):
  power = (power * i) % (10 ** 9 + 7)

print(power)

Solution (Python):
import math
i = int(input())
print(math.factorial(i) % (10**9 + 7))

Solution (Python):
n = int(input())
power = 1
for i in range(n):
	power = (power*(i+1))%1000000007
print(power)

Solution (Python):
import math
N = int(input())
print(math.factorial(N)%(10**9+7))

Solution (Python):
import sys

if __name__ == '__main__':
    n = int(sys.stdin.readline())

    power = 1
    for i in range(1, n+1):
        power *= i
        power = power % 1000000007
    print(power)

Solution (Python):
N=int(raw_input())
x = 1
for i in range(1,N+1):
  x = (x * i) % 1000000007
print x

Solution (Python):
n=int(input())
a=1
for i in range(1,n+1):
    a=(a*i)%(10**9+7)
print(a)

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
    ans *= i%(10**9+7)
    ans = ans%(10**9+7)
print(ans)

Solution (Python):
n = int(input())

a = [1]
for i in range(1, n+1):
    a.append(i*a[i-1] % (10**9+7))

print(a[n])

Solution (Python):
n=int(input())
m = 10**9 + 7

def mul(a, b):
  return ((a % m) * (b % m)) % m

a=1
for i in range(1,n+1):
  a=mul(a,i)
print(a)

Solution (Python):
n = int(input())
powar = 1

for i in range(n):
    powar = (powar * (i + 1))  % (pow(10, 9) + 7)

print(powar)

Solution (Python):
import math
n = int(input())
print(math.factorial(n)%(10**9+7))

Solution (Python):
N = int(input())
a = 1
for i in range(1, N+1):
    a = (a * i) % (10 ** 9 + 7)
print(a)

Solution (Python):
N = int(input())
n = 1

for i in range(1, N+1):
    n = (n * i)%(10**9+7)

print(n)

Solution (Python):
import numpy
import re
import math

def main():
	"""
	テストコード実行
	:return:
	"""
	print(math.factorial(int(input())) % (10**9 + 7))

if __name__ == '__main__':
	main()

Solution (Python):
ans = 1
for i in range(2, int(input())+1):
    ans = (ans * i) % (10 ** 9 + 7)
print(ans)

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
    ans *= i
    ans %= 1000000007

print(int(ans))

Solution (Python):
m = 1
for i in range(1,int(input())+1):
    m = m * i % 1000000007
print(m)

Solution (Python):
from math import factorial
n = int(input())
print(factorial(n)%int(1e9+7))

Solution (Python):
N = int(input())
MOD = 10**9+7
ans = 1
for i in range(1,N+1):
    ans = (ans * i)%MOD
print(ans)

Solution (Python):
N = int(input())

power = 1
for i in range(N):
    power = power*(i+1)
    if power >= 10**5:
        power = power%(10**9+7)

print(power%(10**9+7))

Solution (Python):
import math
def getinputdata():

    array_result = []

    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            if (data != ""):

                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:

        return array_result

arr_data = getinputdata()

n = int(arr_data[0][0])

power = 1

print(math.factorial(n) % (10 ** 9 + 7))

Solution (Python):
N=int(input())
P=1
ans=1
for i in range(1,N+1):
    P=P*i
    P=P%(10**9+7)
print(P)

Solution (Python):
import math

print(math.factorial(int(input())) % ((10 ** 9) + 7))

Solution (Python):


n = int(input())

power = 1
for i in range(n):
    power = power * (i + 1) % (10**9 + 7)

print(power)

Solution (Python):


MOD = 10 ** 9 + 7
a = 1
for i in range(1, int(input()) + 1):
    a *= i
    a %= MOD
print(a % MOD)

Solution (Python):
n = int(input())
num = 1
for i in range(1, n + 1):
    num = num * i % (10 ** 9 + 7)
print(num)

Solution (Python):
N = int(input())
MOD = 10**9+7
Ans = 1
for i in range(1,N+1):
    Ans = Ans*i % MOD
print(Ans)

Solution (Python):
MOD = 10**9+7
N = int(input())
ans = 1
for i in range(1,N+1):
    ans = (ans*i)%MOD
print(ans)

Solution (Python):
n = int(input())
p = 1

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

    if p > 10 ** 9 + 7:
        p %= 10 ** 9 + 7

print(p)

Solution (Python):
n = int(input())
mod = 10**9+7
res = 1
for i in range(n):
    res = res*(i+1)%mod
print(res)

Solution (Python):
import math
N = int(input())
print(math.factorial(N) % 1000000007)

Solution (Python):
N = int(input())
ans = 1
for k in range(1,N+1):
    ans *= k
    ans %= 10**9+7
print(ans)

Solution (Python):
import math
print(math.factorial(int(input())) % int(1e9+7))

Solution (Python):
n = int(input())
ans = 1
for i in range(1, n + 1):
    ans = (ans * i) % (10 ** 9 + 7)
print(ans)

Solution (Python):
N = int(input())
p = 1
for i in range(1, N+1):
    p = (i * p) % 1000000007
print(p)

Solution (Python):
n = int(input())
ans = 1
for i in range(1, n + 1):
  ans = (ans * i) % (10 ** 9 + 7)
print(ans)

Solution (Python):
N = int(input())
C = 10**9+7
ans = 1
for i in range(1, N + 1):
    ans *= i
    ans %= C
print(ans)

Solution (Python):
N = int(input())
divisor = int(1e9) + 7

power = 1
for i in range(1, N + 1):
    power *= i
    power %= divisor

print(power)

Solution (Python):
n = int(input())
x=1
for i in range(1,n+1):
    x*=i
    x%=10**9+7
print(x)

Solution (Python):
N = int(raw_input())

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

print ans

Solution (Python):
n = int(input())

a = 1
for i in range(1,n+1):
    a *= i
    a = a % (10**9 +7)
print(a)

Solution (Python):
mod = 1000000007

N = int(input())

sunuke = 1
for i in range(1,N+1):
    sunuke = (sunuke * i) % mod
    
print(sunuke)

Solution (Python):
N = -1

def _input():
    global N
    N = int(input())

def solve():
    _input()
    snuke_power = 1
    for i in range(1, N+1):
        snuke_power *= i
        snuke_power %= (10 ** 9 + 7)
    print(snuke_power)


if __name__ == '__main__':
    solve()

Solution (Python):
n=int(input())
a=1
for i in range(1,n+1):
  a=a*i%1000000007
print(a)

Solution (Python):
N = int(input())
m = 10 ** 9 + 7
power = 1
for i in range(1, N + 1):
    power *= i
    power %= m
print(power)

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

Solution (Python):
N=int(input())
ans=1
mod=10**9+7
for i in range(1,N+1):
  ans*=i
  ans%=mod
print(ans)

Solution (Python):
n = int(input())
ans = 1
for i in range(1,n+1):
    ans = ans*i % (10**9+7)
print(ans)

Solution (Python):
n = int(input())
ans = 1
for i in range(1, n + 1):
    ans *= i
    ans %= 10**9 + 7
print(ans)

Solution (Python):






if __name__ == '__main__':
    from math import factorial

    training_count = int(input())
    print(factorial(training_count) % (10 ** 9 + 7))

Solution (Python):
N = int(input())
power = 1
for x in range(1, N+1):
    power = (power * x) % (10**9+7)
print(power)

Solution (Python):
num = int(input())
ans=1
for i in range(num):
    ans*=(i+1)
    ans = ans%1000000007
print(ans)

Solution (Python):
n = int(input())
k = 1
for i in range(1, n + 1):
    k = k * i % (10**9+7)
print(k)

Solution (Python):
def factorial(n):
    fact = 1
    for i in range(2, n+1):
        fact = (fact * i) % (10 ** 9 + 7)
    return fact


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

Solution (Python):


N = int(input())
p = 1
for i in range(1, N+1):
    p = p * i % 1000000007
print(p)

Solution (Python):
n = int(input())
answer = 1
for i in range(1,n+1):
	answer = (answer*i)%(10**9+7)
print(answer)

Solution (Python):


N = int(input())

result = 1
th = int(1e9 + 7)
for n in range(N, 0, -1):
    result = result * n
    if result >= th:
        result = result % th

print(result % th)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
if n == 1:
    print(1)
else:
    f = 1
    for i in range(1,n+1):
        f *= i
        f = f%1000000007
    print(f)

Solution (Python):
n=int(input())
mod=10**9+7
cost=1
for i in range(1,n+1):
    cost*=i
    cost%=mod
print(cost)

Solution (Python):
N = int(input())
P = 10**9+7
S = 1
for i in range(1,N+1):
    S = (S*i)%P
print(S)

Solution (Python):
n = int(input())
ans = 1
for i in range(1,n+1):ans=(ans*i)%(10**9 + 7)
print(ans)

Solution (Python):
sum_num = 1
for i in range(1, int(input()) + 1):
    sum_num = (sum_num * i) % (10**9 + 7)
print(sum_num)

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

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % (10**9+7))

Solution (Python):
n=int(input())
sum=1
for i in range(n):
    sum*=(i+1)
    if sum>10**9+7:
        sum%=10**9+7
print(sum)

Solution (Python):
import sys
N=int(input())
power=1
for i in range(N):
    power*=(i+1)
    power%=10**9+7
print(power)

Solution (Python):
n = int(input())

power = 1
mod = 1000000007
for i in range(1, n + 1):
    power *= i
    power %= mod
print (power)

Solution (Python):
import math
N = int(input())
print(math.factorial(N) % (10**9+7))

Solution (Python):
import math
N=int(input())

print(int(math.factorial(N)%(10**9+7)))

Solution (Python):
N=input()
ans=1
for i in range(1,N+1):
	ans=ans*i%(10**9+7)
print ans

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

Solution (Python):
n = int(input())
p = 1
for i in range(1, n+1):
   p = p * i
   p = p % (10**9+7)
print(p)

Solution (Python):
n = int(input())
p = 1
for i in range(n):
    p *= i + 1
    p = p % (10**9 +7)
print(p)