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

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

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

print(ans)

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())) % (1000000000+7) )

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    t = 1
    for i in range(1, n + 1):
        t *= i
        t %= (10 ** 9 + 7)
    print(t)


if __name__ == '__main__':
    slove()

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

print(p)

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

print(ans)

Solution (Python):
from math import factorial

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

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

Solution (Python):


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

print(Ans)

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

ans=1

BIG=1000000007

for n in range(1,N+1):
  ans=ans*n
  ans=ans%BIG

print(ans)

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

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

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

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

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


print(math.factorial(num)%(pow(10,9)+7))

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

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

ans = 1
for i in range(1,N+1):
  ans = ans * i
  if ans>(1e+9 + 7):
    ans = ans%(1e+9 + 7)
    
print(int(ans))

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

Solution (Python):

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

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

Solution (Python):
import math

N = int(input())
print(math.factorial(N) % 1000000007)

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

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

def main():
    ans = 1
    t = 0
    while t < N:
        t += 1
        ans *= t
        ans %= 1000000007
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
import math

N=int(input())

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

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

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

print(math.factorial(N) % MOD)

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

Solution (Python):
from math import factorial

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

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()
INF = 1000000000+7

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

Solution (Python):
import math

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

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

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

Solution (Python):
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        N = int(input())
        ans = 1
        mod = 10 ** 9 + 7
        for i in range(2, N + 1):
            ans = (ans * i) % mod
        print(ans % (10 ** 9 + 7))



if __name__ == '__main__':
    AtCoder().main()

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

Solution (Python):


n = int(input())
p = 1

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

print(p)

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
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    ans=1
    n=int(input())
    for i in range(2,n+1):
        ans=ans*i%MOD
    print(ans)
resolve()

Solution (Python):

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

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

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

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

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

print(power)

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 *= 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):
N = int(input())
ans = 1

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

print(ans)

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

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

    MOD = int(1e9) + 7

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

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):
n = int(input())

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

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

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

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

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

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

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

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

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

res = 1

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

print(res)

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

ans = 1

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

Solution (Python):
import math

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

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

from math import factorial

power = factorial(n)
mod = 10 ** 9 + 7
ans = power % mod
print(ans)

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

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

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

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

N = int(input())
print(frac(N))

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

a = pow(10, 9) + 7

power = math.factorial(N)

print(power% a)

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

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

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
import math
n=int(input())

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
n=int(input())
a=1
big=1000000007
for i in range(1,n+1):
	a=a*i%big
	
print(a)

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
n=int(input())
a=1
for i in range(1,n+1):
	a=a*i%1000000007
	
print(a)

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

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

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

Solution (Python):

import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

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

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

power = 1

mod = 10 ** 9
mod += 7

power = math.factorial(N)

print(power % mod)

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

Solution (Python):
import sys
import copy
import string
import  math
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

mod = 10 ** 9 + 7

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

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

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

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

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

Solution (Python):



import sys
from math import factorial

input = sys.stdin.readline

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

main()

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

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

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

Solution (Python):


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

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

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

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

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

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

print(P)

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

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

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

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

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())
base = 10**9 + 7
result = 1

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

print(result)

Solution (Python):
import math

n = int(input())

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

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

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

print(ans)

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

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

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

Solution (Python):
n = int(input())
mod = 10 ** 9 + 7
ret = 1
for i in range(1, n + 1):
    ret = (ret * i) % mod
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):
import sys
stdin = sys.stdin
sys.setrecursionlimit(100001)
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
fact = 1
for i in range(2, n+1):
        fact = (i * fact) % mod

print(fact)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
from math import factorial
n=int(input())
print(factorial(n)%(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):
import math

N=int(input())

factN=math.factorial(N)

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

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

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(n):
    x*=(i+1)
    if x>10**9+7:
        x=x%(10**9+7)

print(x)

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

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

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

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

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

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

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

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

Solution (Python):
import sys
input=sys.stdin.readline
import string

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys
input=sys.stdin.readline
import string

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

if __name__ == '__main__':
    main()

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

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

for i in range(N):
    result = (i + 1) * result % TEISU
print(result)

Solution (Python):
N = int(input())
T = 1
while N > 1:
    T = T * N % (10 ** 9 + 7)
    N = N-1
print(str(T))

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

Solution (Python):
import math

N = int(input())
power = math.factorial(N)
print(power % 1000000007)

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

p=1
mod=10**9+7

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

print(p)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
a = int(input())
import math
print(math.factorial(a) % (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):
import math

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

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

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

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

print(ret)

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

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

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

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

Solution (Python):
n=int(input())
def a(x):
  if x==1:
    return 1
  else:
    d=1
    for i in range(x+1)[1:]:
      d *= i
      d %= 10**9+7
    return d
print(a(n))

Solution (Python):

import sys
INF = float("inf")

MOD = 1000000007  


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

    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):
import math

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

print(a)

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

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

max_num = 10 ** 9 + 7

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

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

power=1
for i in range(N):
  if power>10**9+7:
    power=(power%(10**9+7))*(i+1)
  else:
    power=power*(i+1)
 
print(power%(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):
N = int(input())
num = 1
for i in range(1,N+1):
  num = (num * i) % (10**9+7)
print(num)

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

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

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

Solution (Python):
from math import factorial

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

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

Solution (Python):
n = int(input())
MOD = 10 ** 9 + 7
factrial = [0] * (n + 1)

factrial[1] = 1

for i in range(2, n + 1):
    factrial[i] = (factrial[i - 1] * i) % MOD
print(factrial[n])

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

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

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

N = int(input())

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

print(pow)

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

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

import math

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

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

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

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

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

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

sunuke = 1

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


print(sunuke)

Solution (Python):

n = int(input())

sunuke = 1

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


print(sunuke)

Solution (Python):
import math

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

Solution (Python):

import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

print(math.factorial(a) % (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*=i
  ans%=10**9+7
print(ans)

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

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 *= i
    ans = ans%1000000007 
print(ans)

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):
import math

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

Solution (Python):
""" abc055_b """

import sys
from functools import reduce

H = pow(10, 9) + 7

def _main():
    _n = int(sys.stdin.readline())

    
    
    
    
    
    
    
    
    _b = reduce(lambda b, n: (b * n) % H, range(1, _n + 1), 1)

    print(_b)

if __name__ == '__main__':
    _main()

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

Solution (Python):
""" abc055_b """

import sys
from functools import reduce

H = pow(10, 9) + 7

def _main():
    _n = int(sys.stdin.readline())

    
    
    
    result = reduce(lambda a, n: (a * n) % H, range(1, _n + 1), 1)

    print(result)

if __name__ == '__main__':
    _main()

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())
power = 1

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

print(power)

Solution (Python):
import math as m

N = int(input())
s = 10**9+7
print(m.factorial(N)%s)