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

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

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

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

Solution (Python):

import sys
input=sys.stdin.readline

def main():
    n = int(input())
    mod = 10**9+7
    power=1

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

if __name__=="__main__":
    main()

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

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

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

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

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

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

Solution (Python):
n = int(input())
p = 10 ** 9 + 7
ans = [1]
for i in range(1,n+1):
  ans.append((ans[-1]*i) % p)
print(ans[n])

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

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

Solution (Python):
import math


def answer(n: int) -> int:
    return math.factorial(n) % (10 ** 9 + 7)


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

if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
import math

mod = 1000000007

def solve():
    N = int(input())
    ans = math.factorial(N) % mod
    print(ans)

if __name__ == "__main__":
    solve()

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

Solution (Python):
import math

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

Solution (Python):
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 *= i
    power %= mod

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

print(res)

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

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

print(ans)

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

print(answer)

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

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

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

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

import math
print(math.factorial(N)%mod)

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

power = 1

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

print(power)

Solution (Python):
import re
import copy

def accept_input():
    N = input()
    return int(N)

N = accept_input()

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

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

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

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

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



from fractions import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq














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


from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())
n = I()
ans = 1
for i in range(n):
    ans *= (i+1)
    ans %= mod
print(ans%mod)

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

Solution (Python):
from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from bisect import bisect_left,bisect_right
from math import sqrt,gcd,ceil,floor,factorial

from functools import reduce
from pprint import pprint
from statistics import mean,median,mode
import sys
sys.setrecursionlimit(10 ** 6)

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse=False):
    data.sort(key=lambda x:x[col],reverse=revese)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def mydictvaluesort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[1] )

def mydictkeysort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[0] )

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

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

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]







n = I()
mod = 10**9 + 7
ans = factorial(n)%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 % (10**9+7))

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

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

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

MOD = 10**9 + 7
class Mint:
    def __init__(self, value=0):
        self.value = value % MOD
        if self.value < 0: self.value += MOD

    @staticmethod
    def get_value(x): return x.value if isinstance(x, Mint) else x

    def inverse(self):
        a, b = self.value, MOD
        u, v = 1, 0
        while b:
            t = a // b
            b, a = a - t * b, b
            v, u = u - t * v, v
        if u < 0: u += MOD
        return u

    def __repr__(self): return str(self.value)
    def __eq__(self, other): return self.value == other.value
    def __neg__(self): return Mint(-self.value)
    def __hash__(self): return hash(self.value)
    def __bool__(self): return self.value != 0

    def __iadd__(self, other):
        self.value = (self.value + Mint.get_value(other)) % MOD
        return self

    def __add__(self, other):
        new_obj = Mint(self.value)
        new_obj += other
        return new_obj
    __radd__ = __add__

    def __isub__(self, other):
        self.value = (self.value - Mint.get_value(other)) % MOD
        if self.value < 0: self.value += MOD
        return self

    def __sub__(self, other):
        new_obj = Mint(self.value)
        new_obj -= other
        return new_obj

    def __rsub__(self, other):
        new_obj = Mint(Mint.get_value(other))
        new_obj -= self
        return new_obj

    def __imul__(self, other):
        self.value = self.value * Mint.get_value(other) % MOD
        return self

    def __mul__(self, other):
        new_obj = Mint(self.value)
        new_obj *= other
        return new_obj
    __rmul__ = __mul__

    def __ifloordiv__(self, other):
        other = other if isinstance(other, Mint) else Mint(other)
        self *= other.inverse()
        return self

    def __floordiv__(self, other):
        new_obj = Mint(self.value)
        new_obj //= other
        return new_obj

    def __rfloordiv__(self, other):
        new_obj = Mint(Mint.get_value(other))
        new_obj //= self
        return new_obj

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

Solution (Python):
p = 10**9+7
N = int(input())
A = [1 for _ in range(N+1)]
for i in range(2,N+1):
    A[i] = (A[i-1]*i)%p
print(A[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):





def resolve():
    import sys
    input = sys.stdin.readline
    import functools
    import operator

    n = int(input().rstrip())

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

    print(ans)



if __name__ == "__main__":
    resolve()

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

Solution (Python):
import math

N = int(input())

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

Solution (Python):
import math

N = int(input())

print(math.factorial(N) % (1000000000 + 7))

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

a =1
div = 10**9 +7

for n in range(1,N+1):
  a *= n
  if a>div :
    a = a%div

print(a)

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 ) % 1000000007

print(ans)

Solution (Python):
MOD=1000000007

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

print(calc)

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

Solution (Python):

import sys

MOD = 1000000007  


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

    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):
from functools import reduce
MOD = 1_000_000_007
print(reduce(lambda a,b: a*b%MOD, range(1, int(input())+1)))

Solution (Python):
from functools import reduce
MOD = 1_000_000_007
print(reduce(lambda a,b: a*b%MOD, range(1, int(input())+1), 1))

Solution (Python):
mycode = '''




ctypedef long long LL
cdef LL MOD = 10**9 + 7
cdef LL N = int(input())
cdef LL ans = 1

cdef i
for i in range(2, N + 1):
    ans *= i
    ans %= MOD
print(ans)
'''
import sys
import os
if sys.argv[-1] == 'ONLINE_JUDGE':  
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode

Solution (Python):
mycode = '''




ctypedef long long LL
cdef LL MOD = 10**9 + 7
cdef LL N = int(input())
cdef LL ans = 1

cdef i
for i in range(2, N + 1):
    ans *= i
    ans %= MOD
print(ans)
'''
import sys
if sys.argv[-1] == 'ONLINE_JUDGE':  
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    import os
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode

Solution (Python):
mycode = '''





from libcpp.vector cimport vector


ctypedef long long LL
cdef LL MOD = 10**9 + 7
cdef LL N = int(input())
cdef LL ans = 1
cdef vector[LL] ansls

cdef i
for i in range(2, N + 1):
    ans *= i
    ans %= MOD
    ansls.push_back(ans)
print(ans)


'''
import sys
if sys.argv[-1] == 'ONLINE_JUDGE':  
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    import os
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode

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

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

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

Solution (Python):
import math

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

Solution (Python):
a=int(input())
b=1
for i in range(1,a+1):
  b=b*i
  if b>1000000007:
    b=b%1000000007
if b<1000000000:
  print(b)
else:
  print(b%1000000007)

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

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




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

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

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

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):
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())
x=1
for i in range(n):
  x*=(n-i)
  if x>10**9+7:
    y=x//(10**9+7)
    x-=y*(10**9+7)

print(x)

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

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

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

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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    cur = 1
    for i in range(1, N + 1):
        cur *= i
        cur %= MOD

    print(cur)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush
import collections
import bisect

def main():
    n = int(input())
    mod = 10**9+7

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

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

print(total)

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

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

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(n):
    ans *= (i+1)
    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):
import sys
input = sys.stdin.readline

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

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

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

Solution (Python):

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

  
        
if __name__ == '__main__':
    main()

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

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

x=1

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

Solution (Python):
import math

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

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

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

Solution (Python):
n = int(input())
p = 1
c = 10**9 + 7

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

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

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

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

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

print(ans)

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

Solution (Python):
import math

n = int(input())

a = math.factorial(n)
b = 10**9 + 7

print(a%b)

Solution (Python):
import math

n = int(input())

a = math.factorial(n)
b = 10**9 + 7

print(a%b)

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

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

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

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

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

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,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

mod = 10**9+7 
N = 10**5+1
def cmb(n, r):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
def p(n,r):
    if ( r<0 or r>n ):
        return 0
    return g1[n] * g2[n-r] % mod

g1 = [1, 1] 
g2 = [1, 1] 
inverse = [0, 1] 

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )


n = onem()
print(p(n,n))

Solution (Python):
from math import factorial

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

Solution (Python):
import math
import numpy as np
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


N = I()

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

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

print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
mod = 10**9+7

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

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


if __name__ == "__main__":
    main()

Solution (Python):
import math


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


if __name__ == "__main__":
    main()

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

q = 1
mod = 10 ** 9 + 7
for u in range(2, n+1):
	q *= u
	q %= mod
print q

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

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

Solution (Python):
def FactorialMod(N,Mod):
    if N>=Mod:
        return 0
    else:
        FactM = 1
        for TF in range(1,N+1):
            FactM = (FactM*TF)%Mod
        return FactM
print(FactorialMod(int(input()),10**9+7))

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

Solution (Python):




import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3"""
        output = """6"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """10"""
        output = """3628800"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """100000"""
        output = """457992974"""
        self.assertIO(input, output)


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

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

    print(ans)


if __name__ == "__main__":
    
    resolve()

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

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

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

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

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

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

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

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

ans = 1

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

Solution (Python):
N = int(input())
P = 1
D = 10**9 + 7

for n in range(1, N+1):
    P = (P * n) % D

print(P%D)

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

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

print(res)

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

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

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

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