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())
mod=10**9+7

factorial=[1 for i in range(N+1)]
for i in range(1,N+1):
    if i==1:factorial[i]=1
    else:factorial[i] = factorial[i-1]*i % mod
      
print(factorial[N])

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

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

Solution (Python):
import sys
a = sys.stdin.readline()
A = int(a)
P = 1
I = 1 
W = 10 ** 9 + 7
while I <= A:
    P *= I
    I += 1
    P %= W
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(2,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 = (power * i)%(10**9+7)

print(power)

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

def mod(num):
    return num % (10 ** 9 + 7)
    
ans = 1

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

print(ans)

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

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

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

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

print(pro)

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

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

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

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

print(p)

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

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

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

print(ans)

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

N = int(input())

ans = 1

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

print(ans)

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

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

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

Solution (Python):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


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


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

Solution (Python):
import math


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


if __name__ == "__main__":
    main()

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

print(ans)

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

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

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

print(power)

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

N = int(input())
a = 1
for n in range(N):
    a = a*(n+1)%mod
print(a)

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

mod = 10 ** 9 + 7

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

Solution (Python):


import math

def main():

    N = int(input())

    ans = math.factorial(N)

    ans %= (10 ** 9 + 7)

    print(ans)


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

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

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    mod = int(1e9 + 7)
    n = I()
    p = 1
    for i in range(1, n+1):
        p = (p*i)%mod
    print(p)

if __name__ == '__main__':
    main()

Solution (Python):
class Factorial():
    def __init__(self, mod=10**9 + 7):
        self.mod = mod
        self._factorial = [1]
        self._size = 1
        self._factorial_inv = [1]
        self._size_inv = 1
    
    def __call__(self, n):
        return self.fact(n)
    
    def fact(self, n):
        ''' n! % mod '''
        if n >= self.mod:
            return 0
        self._make(n)
        return self._factorial[n]
    
    def fact_inv(self, n):
        ''' n!^-1 % mod '''
        if n >= self.mod:
            raise ValueError('Modinv is not exist! arg={}'.format(n))
        self._make_inv(n)
        return self._factorial_inv[n]
    
    def comb(self, n, r):
        ''' nCr % mod '''
        if r > n:
            return 0
        t = self.fact_inv(n-r)*self.fact_inv(r) % self.mod
        return self(n)*t % self.mod
    
    def comb_with_repetition(self, n, r):
        ''' nHr % mod '''
        t = self.fact_inv(n-1)*self.fact_inv(r) % self.mod
        return self(n+r-1)*t % self.mod
    
    def perm(self, n, r):
        ''' nPr % mod '''
        if r > n:
            return 0
        return self(n)*self.fact_inv(n-r) % self.mod
    
    @staticmethod
    def xgcd(a, b):
        '''
        Return (gcd(a, b), x, y) such that a*x + b*y = gcd(a, b)
        '''
        x0, x1, y0, y1 = 0, 1, 1, 0
        while a != 0:
            (q, a), b = divmod(b, a), a
            y0, y1 = y1, y0 - q * y1
            x0, x1 = x1, x0 - q * x1
        return b, x0, y0
    
    def modinv(self, n):
        g, x, _ = self.xgcd(n, self.mod)
        if g != 1:
            raise ValueError('Modinv is not exist! arg={}'.format(n))
        return x % self.mod
    
    def _make(self, n):
        if n >= self.mod:
            n = self.mod
        if self._size < n+1:
            for i in range(self._size, n+1):
                self._factorial.append(self._factorial[i-1]*i % self.mod)
            self._size = n+1
    
    def _make_inv(self, n):
        if n >= self.mod:
            n = self.mod
        self.make(n)
        if self._size_inv < n+1:
            for i in range(self._size_inv, n+1):
                self._factorial_inv.append(self.modinv(self._factorial[i]))
            self._size_inv = n+1

print(Factorial()(int(input())))

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

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

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

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    print(ans)
    return


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
def main():
    mod = 10**9+7

    N = int(input())

    ans = 1

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

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

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

print(pow)

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    large_p = 10 ** 9 + 7
    n = int(input())
    r = 1
    for i1 in range(1, n + 1):
        r = (r * i1) % large_p

    print(r)

if __name__ == '__main__':
    main()

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

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

print(power)

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

mod = 10 ** 9 + 7

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

Solution (Python):
import math

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

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

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

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

Solution (Python):

n = int(input())

ans = 1

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

print(ans)

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

Solution (Python):
n = int(input())
mod = 1000000007
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*=i
    power%=10**9+7
print(power)

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

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

Solution (Python):
s = input()

n = int(s)

x = 1

for num in range(n):
    x *= num + 1
    x = x % ((1000000000) + 7)



print(x)

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

print(power)

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

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

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

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

print(int(ans))

Solution (Python):
import sys
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N = ii()
    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(n):
  ans *= i+1
  ans %= 10**9+7
print(ans)

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

print(cnt)

Solution (Python):
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

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

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

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

print(power % 1000000007)

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

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

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

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

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

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

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

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

N = int(input())

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

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

def fact(n,mod):
    f = 1
    for m in range(1,n + 1):
        f *= m
        f %= mod
    return f

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

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

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

if __name__ == "__main__":
  resolve()

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

Solution (Python):
import math
import collections
import fractions
import itertools
import functools
import  operator

def solve():
    n = int(input())
    p = 1
    mod = 10**9+7
    for i in range(1,n+1):
        p *= i
        p %= mod
    print(p)
    return 0

if __name__ == "__main__":
    solve()

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

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

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

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

Solution (Python):
N=int(input())
M=10**9+7
K=1

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

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

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

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

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

print(res)

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

Solution (Python):
import math

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

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

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

print(k)

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

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

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

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

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

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

print(power)

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

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

MOD = 1000000000 + 7

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

print(ans)

Solution (Python):
import math

n = int(input())

power = math.factorial(n)
div = (10 ** 9) + 7

print(power % div)

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

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

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

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

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

print(ans)

Solution (Python):
from collections import defaultdict
def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

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

Solution (Python):






N = int(input())





power = 1
for i in range(N):
    power *= (i+1)
    if power > 1000000007:
        power %= 1000000007
print(power)

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

power = 1

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

print(power)

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

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

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

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

pow = 1

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

print(pow)

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

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

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

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

mod=1000000007

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

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

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

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

print(p)

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

print(prod)

Solution (Python):
import sys
N = int(input())
if N < 0 or N > 100000:
    sys.exit()
power = 1
for I in range(1,N+1):
    
    
    power = power * I % (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):
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())

m = 1000000007

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

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

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

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

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
import math
import itertools
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
def fact(n,mod):
    f = 1
    for m in range(1,n + 1):
        f *= m
        f %= mod
    return f

mod = 10**9+7
N = i()
print(fact(N,mod))

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

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

Solution (Python):



import os
import sys







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

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

    print(power)
    return


if __name__ == '__main__':
    main()

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

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

    return power

print(main())

Solution (Python):
import math

N = int(input())
x = 10**9 + 7

ans = math.factorial(N)

print(ans % x)

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

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

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

FACTOR = 10 ** 9 + 7

num = 1
for i in range(1, N+1):
    num *= i
    k, r = divmod(num, FACTOR)
    num = r

print(r)

Solution (Python):
import math

N = int(input())

num = math.factorial(N)

k, r = divmod(num, 10**9 + 7)
print(r)

Solution (Python):
N = int(input())
p = 1
for i in range(2, 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):
import math

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

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue
from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal



sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)


MOD = 10 ** 9 + 7
MAX = float('inf')


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

    N = ii()
    print(math.factorial(N)%MOD)


if __name__ == '__main__':
    main()

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue
from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal



sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)


MOD = 10 ** 9 + 7
MAX = float('inf')


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

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


if __name__ == '__main__':
    main()

Solution (Python):



N = int(input())

MOD = 10 ** 9 + 7


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


if __name__ == "__main__":
    main()

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

print(p)

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

print(power)

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

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

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

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

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 *= i
	a %= 10**9 + 7

print(a)

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

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

N = int(input())

print(training(N))

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

Solution (Python):
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n = int(input())

print(math.factorial(n)%mod)

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