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):
if __name__ == '__main__':
  power = 1.0
  
  n = int(input())
  
  for i in range(n):
    power *= (i + 1)
    if power / (10**9 + 7) >= 1.0:
        power %= (10**9 + 7)

  result = power % (10**9 + 7)
  
  print(int(result))

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())


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


print(ans)

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
N=int(input())
MOD=10**9+7
def seki(x):
	if x<2:
		return 1
	else:
		return x*seki(x-1)%MOD
print(seki(N)%MOD)

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

print(P)

Solution (Python):
import numpy as np
N = int(input())
res = 1
for _ in range(1, N+1):
    res = (res * _) % (10**9 + 7)
print(res)

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):
a=int(input())
b=1
for i in range(a):
  b=b*(i+1)
  b=b%1000000007
  
print(b)

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

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


if __name__ == '__main__':
    main()

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

ret = 1
for i in range(2, N + 1) :
    ret *= i
    ret %= MOD
    
print(ret)

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

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

print(num)

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

Solution (Python):


import sys

sys.setrecursionlimit(10**7)


def read_h(typ=int):
    return list(map(typ, input().split()))


def read_v(n, m=1, typ=int):
    return [read_h(typ) if m > 1 else typ(input()) for _ in range(n)]


MOD = 10**9 + 7


def main():
    N, = read_h()

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

    print(ans)


if __name__ == '__main__':
    main()

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

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

Solution (Python):

import sys
sys.setrecursionlimit(300000)

MOD = 1000000007  

def solve(N: int):
    ret = 1
    for i in range(2, N + 1):
        ret *= i
        ret %= MOD
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

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

print(ans)

Solution (Python):
N = int(input())
ans = 1
for i in range(1, N+1):
    ans = (ans*i)%(1e+9 +7)
print(int(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):
import math


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

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

    
    
    
    

    


if __name__ == "__main__":

    main()

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

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


N = int(input())

print (math.factorial(N) % (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())
ans = 1
for i in range(1,N+1):
  ans = ans * i %(10**9+7)
print(ans)

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

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

print(pow)

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

Solution (Python):
import math

MOD = 10**9 + 7

N = int(input())

print(math.factorial(N) % MOD)

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 = (ans * i) % (10**9 + 7)

print(ans)

Solution (Python):
from math import factorial
print(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):
n = int(input())
ans = 1
mod = 10**9+7
for i in range(2,n+1):
	ans = i * ans % mod
print(ans)

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

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

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

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())
power = 1
for x in range(N):
  power = (power * (x+1))%(10**9+7)
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())
power = [1]

if n == 1:
    print(1)
    exit()

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

print(power[-1])

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

if n == 1:
    print(1)
    exit()

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

print(power[-1])

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

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

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
from math import factorial
ans = factorial(N)
print(ans % (10**9+7))

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

Solution (Python):
import math
num = int(input())
power = math.factorial(num)

print(power % (pow(10,9) + 7))

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

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

print(p)

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

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

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

Solution (Python):
from math import factorial

N = int(input())
ans = factorial(N)
print(pow(ans, 1, (10 ** 9 + 7)))

Solution (Python):
from math import factorial

N = int(input())
ans = factorial(N)
print(ans % (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):



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

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


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

Solution (Python):

import math

N = int(input())
print(math.factorial(N) % (pow(10,9) + 7))

Solution (Python):

import math

N = int(input())
print(math.factorial(N) % (pow(10,9) + 7))

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

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

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

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())
mod=10**9+7
ans=1
for i in range(1,n+1):
    ans=ans*i%mod
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline

n = int(input())

power = 1

for index in range(n):
    power *= (index + 1)
    power %= 1000000007

print(power)

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

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

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

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

print(res)

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())
sho = 10 ** 9 + 7
x = 1
for i in range(1, N+1):
    x = (x * i) % sho
print(x)

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=ans%(10**9+7)
print(ans)

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

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


abc()

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

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

print(ans)

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

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

print(int(ans))

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

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import string
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

N = int(sys.stdin.readline())

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

Solution (Python):
import math

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

Solution (Python):
n = int(input())
import math
p = math.factorial(n)
ap = p%1000000007
print(ap)

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

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

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

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

print(ans)

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

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

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

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

answer = 1
for n in range(1,N+1):
  answer *= n
  answer %= MOD

print(answer)

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

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

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

p = 1

li = [i for i in range(1, n+1)]

for i in li:
  p = p*i % (10**9+7)
  
print(p)

Solution (Python):
import math

n=int(input())

num=math.factorial(n)

print(num%(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):
N = int(input())
power = 1

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

print(power)

Solution (Python):
import math

def main(N):
    print(math.factorial(N) % (10**9+7))

if __name__ == "__main__":
    N = int(input())

    main(N)

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

print(power)

Solution (Python):
import math

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

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

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

print(ans)

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

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

print(ans)

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

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

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

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

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

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

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

ans = 1
for i in range(n):
    ans = ans * (i+1) % (10**9+7)
print("{}".format(ans))

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

Solution (Python):
import math


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    power = 1
    for i in range(1, N + 1):
        power = (i * power) % (10 ** 9 + 7)
    return power


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

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())
from functools import reduce
print(reduce(lambda x,y:x*y%1000000007,list(range(1,n+1))))

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

Solution (Python):
ans=1
n=int(input())
for i in range(1,n+1):
    ans*=i
    ans=ans%(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):
import math
n = math.factorial(int(input()))
print(n%(10**9+7))

Solution (Python):



N = int(input())


mod = 1
for n in range(N):
    
    mod = mod % (pow(10, 9) + 7)
    mod = mod * (n + 1)
else:
    
    mod = mod % (pow(10, 9) + 7)
    print(mod)

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 i in range(n):
    ans = (ans*(i+1))%(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())
a=1
for i in range(n):
    a*=(i+1)
    a%=(10**9+7)
print(a)

Solution (Python):

"""
B - Training Camp
https://atcoder.jp/contests/abc055/tasks/abc055_b

"""
import sys


def solve(N):
    MOD = 10**9 + 7
    ans = 1
    for i in range(1, N+1):
        ans = (ans * i) % MOD
    return ans


def main(args):
    N = int(input())
    ans = solve(N)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

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

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

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

Solution (Python):
from functools import reduce
N = int(input())
print(reduce(lambda acc, n: acc * n % (10**9 + 7), range(1, N + 1), 1))

Solution (Python):


def solve():
    N = int(input())
    MOD = 10**9+7

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

if __name__ == "__main__":
    solve()

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

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

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

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

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

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

power = 1
mod = 10**9+7

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
x=int(input())
def factorial(n):
  a=1
  if n==1:
    return a
  else:
    a= n*factorial(n-1)
    return a%(10**9+7)
print(factorial(x))

Solution (Python):
def fraction(N):
  w = N
  for x in range(1, N):
    w = (w * x) % (1e9 + 7)
  return w
print("{:.0f}".format(fraction(int(input()))))

Solution (Python):


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

Solution (Python):
def process(N):
    ans = 1
    while N > 1:
        ans = ans * N % (10**9 + 7)
        N -= 1
    return ans

if __name__ == '__main__':
    n = int(input().strip())
    print(process(n))

Solution (Python):
import math
print(math.factorial(int(input()))%(10**9+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())

result = 1
for i in range(1, n + 1):
    result = (result * i) % (1000000000 + 7)
    
print(result)

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

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

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())
ans = 1
for i in range(1,n+1):
    ans *= i
    ans = ans%(10**9+7)
print(ans%(10**9+7))

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

Solution (Python):
import math
from sys import stdin 
N = int(stdin.readline().rstrip())
print(math.factorial(N) % (10**9+7))

Solution (Python):
import math

n = int(input())

f = math.factorial(n)

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

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

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

Solution (Python):
import math

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    ans = 1
    mod = 1000*1000*1000 + 7
    for i in range(1, n+1):
        ans *= (i%mod)
        ans %= mod
    print(ans)

solve()

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=int(input())
for i in range(1,n+1):
    ans*=i
    ans=ans%(10**9+7)
print(ans)

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

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

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

print(power)

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())
p = 1
for i in range(1, n+1):
    p = p * i % 1000000007

print(p)

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) 

N = int(input())

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

Solution (Python):
n = int(input())
i = 1
while(n>0):
    i *= n
    n -= 1
    i = i%int(1e+9+7)
print(i)

Solution (Python):
from math import factorial

N = int(input())

print(factorial(N) % (10**9+7))

Solution (Python):
import math

n = int(input())

print(math.factorial(n) % (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):
maxTime = int(input())

n = 1
div = pow(10,9) + 7

for i in range(1, maxTime+1):
    n = (n * i) % div

print(n)

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

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

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

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

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

Solution (Python):


n = int(input())
ans = 1
C = pow(10, 9)+7

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

print(ans)

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

Solution (Python):
from itertools import accumulate
N=int(input())
n=[int(i) for i in range(1,N+1)]
a=1
for k in n:
    a*=k
    a%=10**9+7
print(a)

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

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

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

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

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

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

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

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

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

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

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())
ans = 1
for i in range(1,n+1):
  ans = (ans * i)%(10**9+7)
print(ans)

Solution (Python):
import math
n = int(input())
ans = math.factorial(n) % (10**9+7)
print(int(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 = ans*i % (1000000007)
print(ans)

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

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

print(ans)

Solution (Python):
n = int(input()) + 1
mod = 10**9 + 7
power = 1

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

print(power)

Solution (Python):
N = int(input())
p = 1
i = 0
mod = 10**9+7
while i < N:
    i += 1
    p *= i
    p %= mod
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) % (10**9+7) )

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

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

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

Solution (Python):
import math

print((math.factorial(int(input()))) % (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%(10**9+7))

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

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

Solution (Python):

N=int(input())


p=1

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

  
  p%=1000000007


print(p)

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

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

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

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())
power = 1
for _ in range(1, N + 1):
    power *= _
    if power > 10**9 + 7:
        power %= (10**9 + 7)

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

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

Solution (Python):

from math import factorial

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

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

Solution (Python):



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

Solution (Python):
import sys
from collections import Counter
import math

n = int(input())
pow = 1
m = 10 ** 9 + 7

print(math.factorial(n) % m)

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

Solution (Python):
import math
n = int(input())
print(math.factorial(n) % (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())
ans = 1
for i in range(1,N+1):
    ans = ans * i % (10 ** 9 + 7)
print(ans)

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

Solution (Python):
MAX = 10**9 + 7
def solve():
    N = int(raw_input())
    ret = 1
    for i in range(1,N+1):
        ret *= i
        if ret > MAX:
            ret %= MAX
    print str(ret)

if __name__ == '__main__':
    solve()

Solution (Python):

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

Solution (Python):


def read_input():
    n = int(input())
    return n

def submit():
    n = read_input()

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

        if acc > limit:
            acc %= limit

    print(acc)


if __name__ == '__main__':
    submit()

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

Solution (Python):

n=int(input())
x=1

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


print(x)

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

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

Solution (Python):
from math import factorial
print(factorial(int(input())) % (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())
ans = 1
x = 10**9 + 7
for i in range(1, N + 1):
    ans *= i
    if ans > x:
        ans = ans % x
print(ans)

Solution (Python):
n = int(input().split()[0])
warukazu = 10 ** 9 + 7
x = 1
for i in range(1, n+1):
    x = (x * i) % warukazu

print(x % warukazu)

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

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

print(power)

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

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

print(power)

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())
res = 1
for i in range(1, n+1):
    res *= i
    if res >= 10**9+7:
        res %= 10 ** 9+7

print(res)

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

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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
INF = 10**9 + 7
n = int(input())
ans =1
while n != 0:
    ans = n*ans % INF
    n -= 1
print(ans)

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

sum = 1

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


print(sum)

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

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

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())
ans=1
for i in range(1,n+1):ans=ans*i%1000000007
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):
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 sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    ans = 1
    mod = 1000*1000*1000 + 7
    for i in range(1, n+1):
        ans *= (i%mod)
        ans %= mod
    print(ans)

solve()

Solution (Python):
def main():
    input = sys.stdin.readline
    try:
        n = int(input())
        p = 1
        for i in range(1, n + 1):
            p = p * i % (10**9+7)
        print(p)
        
    finally:
        input = None

import sys; sys.setrecursionlimit(50000)
if __name__ == "__main__":
    main()

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    MOD = 10**9 + 7

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

    return ans


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

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

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    N = int(input().rstrip())
    f = math.factorial(N)
    print(f%(10**9+7))
    
if __name__ == '__main__':
    main()

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

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

Solution (Python):
N=int(input())
def fact(n):
    val=1
    for i in range(2,n+1):
        val*=i
        val%=1000000007
    return val
print(fact(N))