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: Time Limit Exceeded

Solution code:
#coding: utf-8

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

total = 1

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())+1
num = 10**9+7
power = 1

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

ans = power % num
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding utf-8 -*-
n=int(input())
x=1

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input().split()[0])
warukazu = 10 ** 9 + 7
x = 1
for i in range(1, n+1):
    x = x * i

print(x % warukazu)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding utf-8 -*-
import functools
import operator
 
n=int(input())
lst=list(range(1,n+1,1))
 
result = functools.reduce(operator.mul, lst)%(10**9+7)
 
print(result)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding utf-8 -*-
n=int(input())
ans=1

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

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding utf-8 -*-
import functools
import operator

n=int(input())
lst=list(range(1,n+1,1))

result = functools.reduce(operator.mul, lst)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())

ans=1

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

print(power%(1000000007))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

print(power%(1000000007))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

b = 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

power_level = 1

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


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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

power = 1
mod = 10 ** 9 + 7

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#055 B
import functools
import operator
prod = functools.partial(functools.reduce, operator.mul)

N = int(input())
lists = []
for i in range(1,N+1):
    lists.append(i)
ans = prod(lists)
print(ans%((10**9)+7))

Submission status: Time Limit Exceeded

Solution code:
#055 B
N = int(input())
ans =1
for i in range(1,N+1):
    if N ==1:
        print(1%((10**9)+7))
        exit()
    else:
        ans =ans * i
print(ans%((10**9)+7))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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


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

    p = 1

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
p = 1

n = int(input())

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

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

Submission status: Time Limit Exceeded

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


def main():
    p = 1

    n = int(input())

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

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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


def main():
    p = 1
    
    n = int(input())
    
    for i in range(1, n + 1):
        p *= i

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

Submission status: Time Limit Exceeded

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

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

print(amari)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

while N!=0:
  a = N*a
  N =N-1
print(a%(10**9+7))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

def main():
	n = int(input())
	
	p = 1
	for i in range(1, n+1):
		p = p * i
		
	print(p % 1000000007)
	
if __name__ == "__main__":
	main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
j=1
for i in range(n,0,-1):
  j*=i
print(j if j <= 10**5 else j%((10**9)+7))

Submission status: Time Limit Exceeded

Solution code:
def f(n):
  ans=1
  if n%2==1:
    a=2
    b=n//2+1
    c=n+2
  else:
    a=1
    b=n//2
    c=n+1
  for s in range(a,b+1):
    ans*=s*(c-s)
  ans=ans%(10**9+7)
  return ans
print(f(int(input())))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
if n%2==1:
  a=2
  b=n//2+1
  c=n+2
else:
  a=1
  b=n//2
  c=n+1
ans=1
for s in range(a,b+1):
  ans*=s*(c-s)
print(ans%(10**9+7))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
int_n = int(input())

power = 1

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

ans = 1
while(n>0):
    ans*=n
    n -= 1

print(ans%(1000000000+7))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

print(power % 1000000007)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
power = 1
A = 10**9 + 7

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

ans = power % A

print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
p = 1
i = 1
while i < n or i == n:
  p = p*i
  i +=1
x = 10**9
print(p%(x+7))

Submission status: Time Limit Exceeded

Solution code:
a=int(input())
Sum=1

for i in range(1,a+1):
    Sum*=i

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

Submission status: Time Limit Exceeded

Solution code:
def memorize(f):
    table = {}

    def func(*args):
        if not args in table:
            table[args] = f(*args)
        return table[args]
    return func


@memorize
def abc055_b():
    n = int(input())
    ans = 1

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

    return ans % ((10 ** 9) + 7)


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

Submission status: Time Limit Exceeded

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

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

    return ans % ((10 ** 9) + 7)


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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(p%1000000007)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(sunuke % 1000000007)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

power=1
index=2
while index < n+1:
    power*=index
    index+=1

if power > 10**9 + 7:
    print(power%(10**9 + 7))
else:
    print(power)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
ans = 1
i = 1
while i<=n:
  ans = ans*i%(1000000007)
  i=+1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

power = 1

p = 1000000000 + 7

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

print(power % p)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

ans = power % (10**9 + 7)

print(ans)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

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


ans=power%(1000000000+7)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

power=1
i=1
while i<=N: 
    power=power*i
    i+=1

ans=power%(1000000000+7)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

power=1

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

ans=power%(1000000000+7)
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

i = 1
power = 1
while i <= n:
    power *= i
    i += 1
print(power % (10**9 + 7))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

i =1
j =0
while j <N:
    i=i*(j+1)
    j+=1
print(i%(10**9+7))

Submission status: Time Limit Exceeded

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

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

print(res%1000000007)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

N = int(input())

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

# 大き過ぎる値を調整する
ans = ans % (10 ** 9 + 7) 

print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

Submission status: Time Limit Exceeded

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

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

print(res)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

Submission status: Time Limit Exceeded

Solution code:
def getinputdata():

    array_result = []

    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            if (data != ""):

                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:

        return array_result

arr_data = getinputdata()

n = int(arr_data[0][0])

power = 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter


def getinputdata():
    # 配列初期化
    array_result = []

    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            array_temp = []

            if (data != ""):

                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:

        return array_result


arr_data = getinputdata()

n = int(arr_data[0][0])

power = 1

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

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

Submission status: Time Limit Exceeded

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

import math

N = int(input())

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

Submission status: Time Limit Exceeded

Solution code:
N = -1

def _input():
    global N
    N = int(input())

def solve():
    _input()
    snuke_power = 1
    for i in range(1, N+1):
        snuke_power *= i
    print(snuke_power % (10 ** 9 + 7))


if __name__ == '__main__':
    solve()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

# AtCoder Beginner Contest
# Problem B


def get_power(training_count):
    power = 1

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

    return power % (10 ** 9 + 7)


if __name__ == '__main__':
    training_count = int(input())

    print(get_power(training_count))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# ABC 055 B

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

print(int(t%(10**9+7)))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

    ans = p % (10 ** 9 + 7)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
INF = float('inf')
MOD = 1000000000 + 7

def solve():
    power = 1
    for i in range(1, int(input()) + 1):
        power *= i

    print(power % MOD)


solve()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

power = 1

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

power = 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

P=1

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

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

print(A)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

power = power%(1000000000+7)

print(power)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

power = 1
#power = float(power)

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

power = power % (1000000000+7)
print(power)

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8

if __name__ == '__main__':
    n = int(input())
    p = 1
    for i in range(n):  #range(10) は [0,1,2,3,4,5,6,7,8,9] を表す
        p = p * (i+1)
    print(p % int(1e9 + 7))

Submission status: Time Limit Exceeded

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

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

print (p % (1000000000+7))