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

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

Solution (Python):
icase=0
if icase==0:
    n=int(input())
    mod=10**9+7
    p=1
    for ni in range(n):
        p=p*(ni+1)%mod
    print(p)

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

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

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

Solution (Python):
import math

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

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

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

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

t = 10 ** 9 + 7

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

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

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

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

Solution (Python):
import math
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())
mod = 1000000007
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())
mod = 10**9+7
p = 1

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

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

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

print(power)

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

Solution (Python):
def main():
    from functools import reduce

    MOD = 10 ** 9 + 7

    def mod_mul(a, b):
        return a * b % MOD

    N = int(input())
    ans = reduce(mod_mul, range(1, N + 1))
    print(ans)


if __name__ == '__main__':
    main()

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

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):
d,mod=[1]+[0]*100100,10**9+7
for i in range(1,10**5+1):d[i]=d[i-1]*i%mod
print(d[int(input())])

Solution (Python):
import numpy as np
mod=10**9+7
d=np.zeros(100100,dtype=np.int64)
d[0]=1
for i in range(1,10**5+1):
  d[i]=d[i-1]*i%mod
print(d[int(input())])

Solution (Python):
from collections import defaultdict
dp=defaultdict(int)
mod=10**9+7
dp[0]=1
for i in range(1,10**5+10):
  dp[i]=dp[i-1]*i%mod
  
print(dp[int(input())])

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

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

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

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

print(power)

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

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


if __name__ == '__main__':
    main()

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

j = 1

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

print(j)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

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


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


if __name__ == '__main__':
    main()

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = True

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

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

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

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

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

Solution (Python):
def cal(n):
	ans = 1
	for i in range(n):
		ans = ((i+1) * ans) % (1000000007)
	return ans

N = int(input())
print(cal(N))

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

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

print(ans)

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

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

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())
ans = 0

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

print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n=ii()

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

ans=1

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

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

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

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Solution (Python):
import sys

input = sys.stdin.readline

P = 10 ** 9 + 7


def main():
    N = int(input())
    ans = 1
    for i in range(1, N + 1):
        ans *= i
        ans %= P

    print(ans)


if __name__ == "__main__":
    main()

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

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

print(res % M)

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

MOD = 10 ** 9 + 7

N = int(readline().rstrip())

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

answer = answer % MOD
print(answer)

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

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

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

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

print(N % mod)

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

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

print(ans)

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

v = 1
for i in range(n):
  v = v*(i+1)
  if v >= 1e9+7:
    v = v%(int(1e9)+7)
  
print(v)

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

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

Solution (Python):

n = int(input())

m = 10 ** 9 + 7
power = 1

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

print(power)

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

p=1

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

print(p)

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

pw = 1

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

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

MOD = 1000000000 + 7
ans = 1

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

print(ans)

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

pw = 1

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

Solution (Python):
import math

n = int(input())

ans = 1
if n > 1:
    ans = math.factorial(n) % (10**9 + 7)

print(int(ans))

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



print(a%mod)

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

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

Solution (Python):
MOD = 1000000007
import math

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

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

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

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

Solution (Python):
MOD=1000000007
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):
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)%(pow(10, 9)+7))

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

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

l = 10**9 + 7
power = 1

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

print(power)

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

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

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

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 %= 1000000007
print(p)

Solution (Python):
def factorial_power(n):
    power = 1
    
    for i in range(1, n+1):
        power *= i
        power = power % divisor
    return power

divisor = (10 ** 9) + 7

N = int(input())

print(factorial_power(N))

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

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

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

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

power = math.factorial(N)
result = power % (pow(10, 9) + 7)
print(result)

Solution (Python):
import numpy as np
N = int(input())
MOD = 10**9 + 7
tmp = 1
for i in range(1, N+1):
    tmp *= i
    if tmp>=MOD:
        tmp %= MOD
print(tmp)

Solution (Python):
mod = 1000000007

n=int(input())

ans = 1

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

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


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

Solution (Python):




"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""




mod = 10**9+7



def main():
  n = int(input())
  ans = 1
  for _ in range(2,n+1):
    ans *= _
    ans %= mod
  print(ans%mod)
  
  
if __name__ == '__main__':
  main()

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

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

Solution (Python):
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

n = ni()

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

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

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

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

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

Solution (Python):
import sys

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("{}".format(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):
N = int(input())
MOD = int(1e9 + 7)

pw = 1

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

print(pw)

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

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

amari = 1

for i in range(1,N+1):
    amari = amari * i%waru
    if amari > waru:
        amari = amari % waru
        
print(amari)

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

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

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

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

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

Solution (Python):
INF = 1000000007


def modmulti(a, b):
    
    res = 0
    mod = a % INF
    while b > 0:
        if b & 1 == 1:
            res += mod
            if res > INF:
                res -= INF
        mod <<= 1
        if mod > INF:
            mod -= INF
        b >>= 1
    return res


N = int(input())

ans = 1

for i in range(1, N + 1):
    ans = modmulti(ans, i)

print(ans)

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

ans = 1


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

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

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

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

Solution (Python):



import math


N = int(input())


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

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

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

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

print(power)

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

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

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

print(c)

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

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

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

print(ans)

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

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

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

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

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

power = 1

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

print(power)

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

power = math.factorial(n)

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

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

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

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

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

import math

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

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

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

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

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

print(ans)

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

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

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

print(power)

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

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

print(ans)

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

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

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

power = 1
tmp = 1  
prime = int(1e9 + 7)
for n in range(1, N + 1):
    tmp = tmp * n
    if tmp > prime:
        tmp = tmp % prime
print(tmp)

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

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


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

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


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

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

Solution (Python):
a=j=1
for i in'a'*int(input()):a*=j;a%=10**9+7;j+=1
print(a)

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

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

Solution (Python):
import math

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

print(math.factorial(N) % P)

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

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

INF = 10**9 + 7

ans = [0] * (10**5 + 1)
ans[0] = 1

for i in range(1,10**5 + 1):
    ans[i] = ans[i-1] * i % INF

print(ans[n])

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

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

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

print(ans)

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

print(ans)

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

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

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

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

Solution (Python):
import math
n=int(input())
pw=1
e=10**9+7
'''
for i in range(1,n+1):
    pw*=i
    print(i,pw)
'''
pw=math.factorial(n)
print(pw%e)

Solution (Python):
import math

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

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

Solution (Python):
import math

inf = 10 ** 9 + 7

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

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

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

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

Solution (Python):
N=int(input())
mod_lar = 10**9+7
ans =1

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

print(ans)

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

Solution (Python):

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

print(ans%mod)

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

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

print(power)

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

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 sys
input = sys.stdin.readline

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

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

main()

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

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

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

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

from math import factorial
div = int(1e9 + 7)
ans  = factorial(N) % div
print(ans)

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

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

Solution (Python):

s = int(input())

d = 1000000007
def multi_mod(a, x): 
    return (a * x) % d

n = 1
for i in range(1, s+1):
    n = multi_mod(n, i)
    
print(n)

Solution (Python):





import numpy as np



n = int(input())

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

print(ans)

Solution (Python):
inN = int(input())
 
D=1000000000+7
p=1
for i in range(inN):
  p*=(i+1)
  if (D < p): p=p%D
 
print(str(p))

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

Solution (Python):
import sys
import os
import math

MOD = 1000000007

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

    N = int(sys.stdin.readline().rstrip())
    print(math.factorial(N) % MOD)



if __name__ == '__main__':
    main()

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

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

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

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

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