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.



Sample input:
3


Sample output:
6

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

num=int(input())
pow=1

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

print(pow)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

num=int(input())
pow=1

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

Submission status: Wrong Answer

Solution code:
#90
N = int(input())
p = 1
for i in range(1, N+1):
  p = p * i
  p = p % ((10e+9)+7)
print(int(p))

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
n = list(range(1, N+1))
p = (np.prod(n) % (10**9+7))
print(p)

Submission status: Wrong Answer

Solution code:
mycode = '''
# distutils: language=c++
# cython: language_level=3, boundscheck=False, wraparound=False
# cython: cdivision=True

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' or os.getcwd() == '/imojudge/sandbox':  # コンパイル時 or コードテスト時
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 7 + 10**8
ans = 1

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

Submission status: Wrong Answer

Solution code:
import functools
import operator
import time

N = int(input())
start = time.time()
power_list = [x+1 for x in range(N)]
result = functools.reduce(operator.mul, power_list)
print(result % (10**9+7))
elapsed_time = time.time() - start
print(elapsed_time)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=int(input())
ans=1
for i in range(1,s):
  ans*=i
  
print(ans)

Submission status: Wrong Answer

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

print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
power = 1
for i in range(1,n+1):
    power *= i

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

def main():

    N = int(input())

    ans = 1

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

    ans % (10 ** 9 + 7)

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
number = int(input())
power = 1;

for i in range(number):
  power = power * i
  
print(power)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 1

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 1

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

Submission status: Wrong Answer

Solution code:
number = int(input())

result = 1
for index in range(1, number):
  result = result * index
  
  
dividor = 10 ** 9 + 7
print (result % dividor)

Submission status: Wrong Answer

Solution code:
n=int(input())
f=1
for i in range(1,n+1):
    if n==0:
        print("1")
    else:
        f*=i
print(f)

Submission status: Wrong Answer

Solution code:
n=int(input())
f=1
for i in range(1,n+1):
    f*=i
print(f)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
print(math.factorial(int(input())))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
num = 1
for i in range(1, N+1):
    num *= i
    num = num % 100000007
print(num)

Submission status: Wrong Answer

Solution code:
#整数の入力
N = int(input())

ans = 1


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

print(ans)

Submission status: Wrong Answer

Solution code:
#整数の入力
N = int(input())

ans = 1


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

print(ans)

Submission status: Wrong Answer

Solution code:
#整数の入力
N = int(input())

ans = 1


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

Submission status: Wrong Answer

Solution code:
#整数の入力
N = int(input())

ans = 1


for i in range(N):
  ans = ans * i
  
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

res = 1

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

print(res)

Submission status: Wrong Answer

Solution code:
a=int(input())
import math
x=math.factorial(a)
print(x//(10**9+7))

Submission status: Wrong Answer

Solution code:
n= int(input())
cnt = 1
for i in range(1,n+1):
  cnt *= i
print(cnt//(10**9+7))

Submission status: Wrong Answer

Solution code:
n= int(input())
cnt = 1
for i in range(1,n+1):
  cnt *= i
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
INF = 10**7 + 7

N = int(input())
power = 1

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

print(power)

Submission status: Wrong Answer

Solution code:
N = int(input())
print(N % (10**9+7))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

N = int(input())
val = 1
for i in range(N):
  val = val*(i+1)
  print(val)

print(val % 10^9+7)

Submission status: Wrong Answer

Solution code:

N = int(input())
val = 1
for i in range(N):
  val = val*(i+1)

print(val%(10^9+7))

Submission status: Wrong Answer

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

val = math.factorial(N)
print(val%(10^9+7))

Submission status: Wrong Answer

Solution code:
N = int(input())
sum=1

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

print(sum)

Submission status: Wrong Answer

Solution code:
sum = 1
n = int(input())

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

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

Submission status: Wrong Answer

Solution code:
INF = 1000000000 + 7
N = int(input())
ans = 1
for i in range(1, N + 1):
    ans = ans % INF * i

print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
print(math.factorial(N))

Submission status: Wrong Answer

Solution code:
n = int(input())

mod = 10**9 + 7

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

P = 1

for i in range(2,N+1):
    P = P*i
    P = P % (100000007)

print(P)

Submission status: Wrong Answer

Solution code:
N = int(input())

P = 1

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

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

Submission status: Wrong Answer

Solution code:
N=int(input())
P=1
for i in range(N):
    P = P*(i+1)
print(P)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
times = int(input())

power = 1
for i in range(1, times+1):
  power = power*i
print(power)

Submission status: Wrong Answer

Solution code:
N=int(input().rstrip())
a=1
mod=1e9+7
for i in range(1,N+1):
  a*=i
  a%=mod
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
d = math.factorial(N)

Submission status: Wrong Answer

Solution code:
import math
print(math.factorial(100000)%(10**9+7))

Submission status: Wrong Answer

Solution code:
def solve():
    n = int(input())
    p = 1
    for i in range(1,n+1):
        p *= i
    p = p % 1000000009
    print(p)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
def solve():
    n = int(input())
    p = 1
    for i in range(1,n+1):
        p *= i
        p = p % 1000000009
    print(p)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
import itertools

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

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(ans)

Submission status: Wrong Answer

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

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

print(N % mod)

Submission status: Wrong Answer

Solution code:
n = int(input())

v = 1
for _ in range(n):
  v = v*v
  
print(v%(1e9+7))

Submission status: Wrong Answer

Solution code:
n=int(input())

p=1

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

print(p)

Submission status: Wrong Answer

Solution code:
n = int(input())

powwer = 1
if n > 1:
    for i in range(1, n+1):
        powwer *= i
ans = powwer
print(int(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
import math
N = math.factorial(N)
print(N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
power = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)
print(ans)

Submission status: Wrong Answer

Solution code:
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 *= (dummy2+1)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(a)

Submission status: Wrong Answer

Solution code:
INF = 1000000007


def modmulti(a, b):
    # aとbを掛けた値をmodする(a * b mod p)
    res = 0
    mod = a % INF
    while b > 0:
        if b == 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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(power)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

power = math.factorial(n)

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

print(power)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
inN = int(input())

D=1000000000 + 7
p=0
for i in range(inN):
  p*=i
  if (D < p): p=p%D

print(str(p))

Submission status: Wrong Answer

Solution code:
N = int(input())
x = 1
for i in range(1,N+1):
  x = x*i
  if x >= 10**9+7:
    x = x-10**9-7
print(x%(10**+7))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

x = (10**9 + 7)

for i in range(1,n+1):
  n = n * i
  
  
if n < x:
  print(n)
  
elif n >=x :
  print(n % x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
MOD = 10*9 + 7

import math
print(math.factorial(int(input()))%MOD)

Submission status: Wrong Answer

Solution code:
#ABC055

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

double = 1

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

Submission status: Wrong Answer

Solution code:
def xy(A):
    ans = 1
    mod = 10**9+7
    for i in range(1,A+1):
        ans *= i % mod

    return ans

def main():
    A = int(input())
    print(xy(A))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def xy(A):
    ans = 1
    for i in range(1,A+1):
        ans *= i

    return ans

def main():
    A = int(input())
    print(xy(A))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
prod = 1
mod = int(1e9+7)
for j in range(1, N+1):
    prod = j * (prod%mod)
print(prod)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
r = 1
w = 10**9 + 7
for i in range(1, n+1):
  if r > w:
    r = (r % w) * i
  else:
    r *= i
  
  
print(r)

Submission status: Wrong Answer

Solution code:
N=int(input(),10)
V = 10**9 + 7


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#N = int(input())

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

# TLEとなってしまう
# modの世界を使う

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

print(power)

Submission status: Wrong Answer

Solution code:


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




if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
result = 1

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

Submission status: Wrong Answer

Solution code:


import numpy as np
import math
MOD=10**9+7

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input().strip())

ans = 1

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 1
for i in range(1, N+1):
  ans = ans * i
  ans = ans // 1000000007

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def fact(n):
    if n == 1:
        return n
    else:
        return n*fact(n-1)
    
n = int(input())
print(n%(10**9+7))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 1
for i in range(1,N+1):
    ans *= i
print(ans)

Submission status: Wrong Answer

Solution code:
ans = 1
for i in range(1, int(input())):
    ans *= i
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 1
for i in range(1, N+1):
  ans *= i
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))



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

print(ans)

Submission status: Wrong Answer

Solution code:
#B - Training Camp
N = int(input())
ans = 1
for i in range(N):
    ans *=(i+1)%(10**9+7)
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
p = 1
for i in range(1, n+1): 
  p = (p*i)%(10**9+1) #合同式より同じ数で割れば任意の数で乗算しても余りは等しい
print(p)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=list()
ans.append(1)
for i in range(1,n):
    ans.append(ans[i-1]*(i+1))
print(ans[n-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
x=0
for i in range(n):
    x=x*(n+1)%1000000007
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
MOD = 10**9+7

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(p)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(power%(100000000+7))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
power = 1
for i in range(1,N+1):
    power = power * i
print(power)

Submission status: Wrong Answer

Solution code:

#x=1
#for i in range(n):
#    x*=(i+1)

#print(x%(10**9+7))
import numpy as np
n=int(input())
print(np.prod([i+1 for i in range(n)])%(10**9+7))

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N  = int(input())
#N = 10**5
p = 1
#x = [p*i for i in range(1,N+1)]
for i in range(1,N+1):
  p =i*p%(10**9+7)
  print(p)
  
  
  
print(p)

Submission status: Wrong Answer

Solution code:
import math

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

print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())

max_num = 10 ** 9 + 7

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

Submission status: Wrong Answer

Solution code:
N = int(input())

import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ret = 1
for i in range(1, N+1):
    ret *= i
print(ret)

Submission status: Wrong Answer

Solution code:
import math

N=int(input())

A = math.factorial(N)
print(A)

Submission status: Wrong Answer

Solution code:
N=int(input())
N=1
for i in range(N):
  N *= (i+1)

# A = (1+N)/2 * N
 
A =N%(10**9+7)
print('%d' %(A))

Submission status: Wrong Answer

Solution code:
N=int(input())
A = (1+N)/2 * N
 
A %=(10**9+7)
print('%d' %(A))

Submission status: Wrong Answer

Solution code:
N=int(input())
A = (1+N)/2 * N

A %=(10**9+7)
print(A)

Submission status: Wrong Answer

Solution code:
N=int(input())
A = (1+N)/2 * N

print(A)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
res = 1
for num in (1, n+1):
  res = res * num
  res = res % (10**9 + 7)
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
temp = 1

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

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
print(math.factorial(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(p)

Submission status: Wrong Answer

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

ans = power
print(ans)