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

n = int(input())
print(math.factorial(n)%1000000009)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
N = int(input())

for i in range(1, N + 1):
    if pow(2,i) > N:
        print(pow(2, i - 1))
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

p = 1

li = [i for i in range(1, n+1)]

for i in li:
  p += p*i % (10**9+7)
  
print(p % (10**9+7))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding: utf-8

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

Submission status: Wrong Answer

Solution code:
#coding: utf-8

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

# 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: Wrong Answer

Solution code:
def kaijo(N):
    if N == 1:
        return 1
    else:
        return N * kaijo(N-1)

if __name__ == '__main__':
    print(kaijo(4) % (10**9 + 7))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(p)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 0:
    print(0)
ans = 1
for i in range(1,N+1):
    if N == 0:
        print(0)
        break
    
    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:
INF = 10**9 + 7
n = int(input())
if n >= 10**4:
    ans = 815915283247897734345611269596115894272000000000 # 10**4
else:
    ans = 1
for i in range(ans, n+1):
    ans = ans * i
print(ans % INF)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    MOD = 10**9 + 7

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

    return ans


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

ans=1

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())

ans=1

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
print(math.factorial(5))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc055/tasks/abc055_b
# 入力: 3
# 出力: 6
N = int(input())
# Mod = 10**9 + 7
ans = 1  # パワー

for i in range(1, N + 1):
    ans *= i % (10**9 + 7)  # 途中計算ごとに%をとってよい
print(ans)

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc055/tasks/abc055_b
# 入力: 3
# 出力: 6
N = int(input())
Mod = 10**9 + 7
ans = 1  # パワー

for i in range(1, N + 1):
    ans *= i % Mod  # 途中計算ごとに%をとってよい
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
P=(math.factorial(N))//(10**9+7)
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:
# -*- coding: utf-8 -*-


p = 1

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
print(int((n+1)*n/2%(10**9+7)))

Submission status: Wrong Answer

Solution code:

INF=1e18
MOD=1e9+7

N=int(input())

ans=1

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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,c):
  ans*=s*(c-s)
  if s==b:
    break
print(ans%(10**9+7))

Submission status: Wrong Answer

Solution code:
n = int(input())
t = 1
for i in range(1, n+1):
    t *= i
if t > 10000007:
    t %= 1000007
print(t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
A = 1
for i in range(N):
  A = A*i+1 % (10 ** 9 + 7)
print(A)

Submission status: Wrong Answer

Solution code:
import sys

M = 10**9 + 7
N = int(sys.stdin.readline().strip())

x = 1

for i in range(N):
    x = (x * i) % M

print(x)

Submission status: Wrong Answer

Solution code:
import sys

M = 10**9 + 1
N = int(sys.stdin.readline().strip())

x = 1

for i in range(N):
    x = (x * i) % M

print(x)

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(int(p))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(int(p))

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main() -> int:
    n = next_int()
    m = 10 ** 9 + 7

    ans = 1
    for i in range(n):
        j = i % m
        ans = (ans * j) % m

    print(ans)
    return 0


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#n = list(map(int, input().split()))
n = int(input())
p = 1
for i in range(n):
    p *=  (i + 1)
    p %= (10e9 + 7)
print(int(p))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

n *= 6

print(n%1000000007)

Submission status: Wrong Answer

Solution code:
mod=1000000007

def P(x):
    ans=1
    for i in range(x):
        ans=ans*(i+1)%mod
    
    return(ans)

n=int(input())

print(n)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
# ABC 055 B

N = int(input())
print(2 ** (N-1) % 1000000007)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(int(input())  % 1000000007)

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 1
for i in range(1,N+1):
  ans = 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
 ans%=100000007
print (ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def imp_kai(n):
    ac = 1
    for i in range(n):
        ac *= i + 1
        ac = ac % (1e9 + 7)
    return ac % (1e9 + 7)

n = int(input())
print(imp_kai(n))

Submission status: Wrong Answer

Solution code:
def imp_kai(n):
    ac = 1
    for i in range(n):
        ac *= i + 1
    return ac

n = int(input())
print(imp_kai(n))

Submission status: Wrong Answer

Solution code:
n = int(input())

import functools
print(functools.reduce(lambda a, b: a * b, range(1, n + 1)))

Submission status: Wrong Answer

Solution code:
MOD = int(1e9)+7
N = int(input())
ans = 1
for i in range(1, N+1):
  ans *= i
  ans &= MOD
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())
ans = 1
for i in range(1, N+1):
  ans * i
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

result = 1

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

print(result)

Submission status: Wrong Answer

Solution code:
#すぬけくんはトレーニングが好きなので N 回だけトレーニングすることにしました。
#すぬけくんのトレーニング開始前のパワーは 1 です。すぬけくんが i 回目のトレーニングを終えるとパワーが i 倍されます。
#すぬけくんが N 回トレーニングをしたあとのパワーを求めなさい。ただし、答えの値は非常に大きな値になることがあるので 109+7 で割ったあまりを出力してください。
N = int(input())
pow = 1
n1 = [x for x in range(1,N+1)]


for i in n1:
  pow = pow * i

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

Submission status: Wrong Answer

Solution code:
#すぬけくんはトレーニングが好きなので N 回だけトレーニングすることにしました。
#すぬけくんのトレーニング開始前のパワーは 1 です。すぬけくんが i 回目のトレーニングを終えるとパワーが i 倍されます。
#すぬけくんが N 回トレーニングをしたあとのパワーを求めなさい。ただし、答えの値は非常に大きな値になることがあるので 109+7 で割ったあまりを出力してください。
N = int(input())
pow = 1
n1 = [x for x in range(1,N+1)]


for i in n1:
  pow = pow * i
  print(pow)

pow1 = pow % (10**9 + 7)
print(pow1)

Submission status: Wrong Answer

Solution code:
#すぬけくんはトレーニングが好きなので N 回だけトレーニングすることにしました。
#すぬけくんのトレーニング開始前のパワーは 1 です。すぬけくんが i 回目のトレーニングを終えるとパワーが i 倍されます。
#すぬけくんが N 回トレーニングをしたあとのパワーを求めなさい。ただし、答えの値は非常に大きな値になることがあるので 109+7 で割ったあまりを出力してください。
N = int(input())
pow = 1

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

pow2 = pow1 % (10**9 + 7)
print(pow2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

P=2**N - 1

print(P%1000000007)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

n=int(raw_input().strip())

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

print power

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
i = int(input())
#x, y = map(int, input().split())
power = 1
for i in range(1, i+1):
    power = power * i
power%(10**9+7)

print("{0}".format(str(power)))

Submission status: Wrong Answer

Solution code:
print(2^int(raw_input())%1000000000*+7)

Submission status: Wrong Answer

Solution code:
print(1^int(raw_input())%1000000000*+7)

Submission status: Wrong Answer

Solution code:
print(int(raw_input())%1000000000*+7)

Submission status: Wrong Answer

Solution code:
n = int(raw_input())


N = []
for i in range(1,n+1):
	N.append(i)

N2 = 1
for N1 in N:
	N2 = N2 * N1

a = 10**9+7
N2 = N2%a

print a
print N2

Submission status: Wrong Answer

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


import math

N = input()
power = 1
for i in range(N):
    power = math.fmod(power*(i+1),1000000007)

print(power)

Submission status: Wrong Answer

Solution code:
import math

n = int(raw_input())

def comb(n,r):
  up = 1
  bottom = 1
  for i in xrange(1,r+1):
    bottom *= i
  for i in xrange(n-r+1, n+1):
    up *= i
  return up/bottom

def pow(num,n):
  ans = 1
  for i in xrange(1, n+1):
    ans += num
  return ans


if n%2 == 0:
  ans = pow(math.factorial(n/2),2) * comb(n, n/2) % (pow(10,9) + 7)
else:
  ans = pow(math.factorial(n/2),2) * comb(n, n/2) * (n+1)/2 % (pow(10,9) + 7)

print '{:d}'.format(ans)

Submission status: Wrong Answer

Solution code:
import math

n = int(raw_input())

print math.factorial(n)

Submission status: Wrong Answer

Solution code:
n = int(input())


mod_num = pow(10, 9) + 7


def main(n):
    ret = 1
    for i in range(1, n + 1):
        ret = ret * i // mod_num
    return ret


answer = main(n)
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python

import math
import sys

def main(argv):
    for line in sys.stdin:
        n = int(line)

        answer = 737935835
        if n < 50000:
            answer = math.factorial(n)
        elif n > 50000:
            for i in xrange(n + 1, 100000):
                answer *= (i % (10**9 + 7))
        print answer % (10**9 + 7)

if __name__ == "__main__":
    main(sys.argv)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

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

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

if __name__=="__main__":
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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:
a=int(input())
ans=1
for i in range(a):
  ans*=(i+1)
  

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

pw = 1

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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


    result = functools.reduce(operator.mul, list(range(1, n + 1)))
    print(result % 1000000007)



if __name__ == "__main__":
    resolve()

Submission status: Time Limit Exceeded

Solution code:
import functools
import operator

N = int(input())

L = list(range(1, N+1, 1))
prod = functools.partial(functools.reduce, operator.mul)

print(prod(L)%(10**9+7))

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
import sys

MOD = 1000000007  # type: int


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

    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

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

Submission status: Time Limit Exceeded

Solution code:
import functools
import operator

N = int(input())
power_list = [x+1 for x in range(N)]
result = functools.reduce(operator.mul, power_list)
print(result % (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:
a=int(input())
b=1
for i in range(1,a+1):
  b=b*i
  if b>1000000007:
    b=b-1000000007
if b<1000000000:
  print(b)
else:
  print(b%1000000007)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
res=0
ans=1
while res<n:
  res+=1
  ans*=res
  
print(ans%(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%(10**9+7))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import math
import itertools
import sys

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

Submission status: Time Limit Exceeded

Solution code:

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

mod = 10**9+7
ans = 1

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



print(ans%mod)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# B - Training Camp
def main():
    n = int(input())
    ans = 1

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

  
        
if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import math
import numpy as np
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

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

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

N = I()

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

ans %= MOD
print(ans)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#
# abc055 b
#

import sys
from io import StringIO
import unittest


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

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

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

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


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

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

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


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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):
    power *= i

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
r = 1
for i in range(1, N+1):
    r *= i
print(r%((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:
import sys
a = sys.stdin.readline()
A = int(a)
P = 1
I = 1 
W = 10 ** 9 + 7
while I <= A:
    P *= I
    I += 1
P %= W
print(P)

Submission status: Time Limit Exceeded

Solution code:
import sys
a = sys.stdin.readline()
A = int(a)
P = 1
W = 10 ** 9 + 7
for i in range(A):
    P *= (i+1)
P %= W
print(P)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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)

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