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 -*-
import sys

import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入力が早いが使える時に使っていこう
from operator import mul
from functools import reduce
from collections import Counter
#from collections import deque

#input = stdin.readline


j=0
k=0
n=3
r=1
a=[0]
#n=int(input())
#r=int(input())
#print(M)
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"


#number_list=list(map(int, input().split(" ")))#数字の時
#print(number_list)
"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#メモ
for i in number_list:#こっちの方がrage使うより早いらしい
    print(number_list[i-1])#

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''
#array=[input().split()for i in range(N)]
#print(type(array[0][0]))
#print(array)
"正方行列にstr型の値を入力"
'''

#brray=[list(map(int, input().split(" ")))for i in range(N)]
#print(type(brray[0][0]))
#print(brray)
'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"
#以下に別解を記載
#N, M = [int(i) for i in input().split()]
'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()
#a=[int(i) for i in s]
#print(a[0])
#print([a])
#単数値．桁ごとに分割したい．入力と出力は以下の通り
#イメージとして1桁ごとにリストに値を入れているかんじ
#intを取ると文字列分解に使える
'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()#str style 何個でもいけることが多い
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''


#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"


#a,b=map(int, input().split())  #int style 複数数値入力　「A B」みたいなスペース空いた入力のとき

#なんかうまく入力されるけど
#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)
#複数行の数値を入力して正方行列を作成


##############################################################################################
##############################################################################################
#under this line explains example calculation



'''
コンビネーションの組み合わせの中身を出力する形式
for i in itertools.combinations(brray, 2)
combinationsをpermutationsにすれば順列になる
今回なら(abc133B)
入力
1 2
5 5
-2 8
出力
[[1, 2], [5, 5], [-2, 8]]
もちろん一次元リストでも使えるし
何よりiもリストのように使えるので便利
'''

#nCr combination
'''
def cmb(n,r):
    #When n < r , this function isn't valid
    r= min(n-r,r)
    #print(n,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    #flochart mul(n,n-1)=x
    #next     mul(x,n-2)........(n-r+1,n-r)
    #mul read a,b and returns a*b

    under = reduce(mul, range(1, r+1))
    #print(over, under)
    #reduce is applied mul(1,2)=2
    #next   mul(2,3)=6
    #next   mul(6,4)=4.........last(r!,r+1)=r+1!

    return over // under
    #// is integer divide
    #calc example 5C2
    #over=5*4*3
    #under=3*2*1
a = cmb(n, r)
#print(a)
'''

'''
import itertools
from itertools import combinations_with_replacement

combinationについて
以下の違いを意識しよう
combinations() p, r 長さrのタプル列、ソートされた順で重複なし

combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複あり


使用例 　　　　　　　　　　　                  出力　　
combinations('ABCD', 2)　　　　　　　　　　　　AB AC AD BC BD CD

combinations_with_replacement('ABCD', 2)　　 AA AB AC AD BB BC BD CC CD DD
'''



'''
#集計
#example
#a=[2,2,2,3,4,3,1,2,1,3,1,2,1,2,2,1,2,1]
#a=Counter(a)
for i in a.most_common(n):print(i)
#most_common()メソッドは、出現回数が多い要素順にCounterオブジェクトを並び替えます。
#引数にint型の数字nを設定した場合は、出現回数が高い上位ｎ個の要素を返します。
#何も設定しなければ、コンテナ型にあるすべての要素を出現回数の順番に並び替えたタプル型オブジェクトを返します。
#out put
#(2, 8)
 #(1, 6)
#(3, 3)
#(4, 1)
'''


#二部探索(binary search)
#A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6]
#print(A)
#index = bisect.bisect_left(A, 5) # 7 最も左(前)の挿入箇所が返ってきている
#A.insert(index, 5)
#print(index)
#print(A)
'''
bisect.bisect_left(a, x, lo=0, h=len(a))
引数
a: ソート済みリスト
x: 挿入したい値
lo: 探索範囲の下限
hi: 探索範囲の上限
(lo, hiはスライスと同様の指定方法)
bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。
'''

'''
素数の判定
'''


def is_prime(n):
    if n == 1: return False

    for k in range(2, int(np.sqrt(n)) + 1):
        #sqrt(n)+1以上は考えて約数はないので却下
        if n % k == 0:
            return False
            #割り切れたらFalse
    return True


'''
npのmaxとmaximumの違い
xs = np.array([1, -2, 3])
np.max(xs, 0)
この出力は3となります．[1, -2, 3]と0の4つの数字のうち，最も大きい値を出力します．

一方で，[max(1, 0), max(-2, 0), max(3, 0)]を出力したい時があります．
その時は，numpyのmaximum関数を用います．

xs = np.array([1, -2, 3])
np.maximum(xs, 0)  # [1, 0, 3]

'''



########################################################################
########################################################################
#b2=a[:]  #1次元のときはコピーはこれで良い
#print(b2)

#a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
#b3=copy.deepcopy(a)  #2次元配列はこうコピーする
#print(b3)

def main():

    w=1
    j=0
    k=0
    dl=[]
    po=1
    n=int(input())
    for i in range(n):
        po=po*(1+i)
    print(po%(10**9+7))
    #r=int(input())
    #dp= [[0]*3 for i in range(5)]#列　行
    #dp用の0の入ったやつ
    #dp= [[0]*(w+1) for i in range(n+1)]#0からwまでのw+1回計算するから
    #print(dp)＃初期条件が入る分計算回数+1列分必要(この場合は判断すべきものの数)
    DP = np.zeros(w+1, dtype=int)#これでも一次元リストが作れる
    exdp=np.zeros((3,4)) # ３×４の２次元配列を生成。2次元ならこう
    #dtypeは指定しないとfloatになる
    #for i in range(n):#ちょっとした入力に便利
    #    a, b = map(int, input().split())
        #dp[i][0] += [a]
        #これだとintとlistをつなぐことになって不適
    #    dp[i] += [a]
    #    dp[i] += [b]
        #これはうまくいく
        #やり方はいろいろあるということ
    #print(dp)


    "1行1つの整数を入力を取得し、整数と取得する"
    #number_list=list(map(int, input().split(" ")))#数字の時
    #print(number_list)
    "12 21 332 とか入力する時に使う"
    "1行に複数の整数の入力を取得し、整数として扱う"
    #brray=[list(map(int, input().split(" ")))for i in range(N)
    #print(brray)


    #s=input()
    #a=[int(i) for i in s]#int取るとstrでも行ける
    #print(a)
    '''
    入力
    1234
    出力
    [1, 2, 3, 4]
    '''
    pin_l=["x" for i in range(10)]#内包表記に慣れろ
    #print(pin_l)

    ls = ["a", "b", "c", "d", "e"]


    #print(ls[2:5])
    #スライスでの取得

    #print(ls[:-3])
    #一番左端から右から3番目より左まで取得

    #print(ls[:4:2])
    #スライスで1個飛ばしで取得
    #ないときは左端スタート
    #始点のインデックス番号 : 終点のインデックス番号 : スキップする数+1
    #print(ls[::2])
    '''
    lsというリストの場合に、1つ飛びの値を取得したい場合には
    ls[::2]
    のようにします。こうすると、
    ["a", "c", "d"]と出力される
    '''

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:
INF = 1000000000 + 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:
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())
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())
def fract(n):
    fact = 1
    for integer in range(1, n+1):
        fact *= integer
    return fact

res = fract(N) % 1000000007
print(res)

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=input()
N=int(N)

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
i=1
j=1
while j!=n+1:
    i=i*j
    j+=1
print(i%(10**9+7))

Submission status: Time Limit Exceeded

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

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


if '__main__' == __name__:
    resolve()

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
# https://atcoder.jp/contests/abc055/tasks/abc055_b
n = int(input())
x = 1
for i in range(n):
    x = x * (i + 1)

y = x % (10 ** 9 + 7)

print(y)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

def modelAnswer():
   tmp=1
def main():
   N = int(input())
   print(myAnswer(N))


if __name__ == '__main__':
   main()

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
mod = pow(10, 9) + 7
import functools
import operator
prod = functools.partial(functools.reduce, operator.mul)
l = [i for i in range(1, n+1)]
print(prod(l)%mod)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
_input = int(input())

power = 1

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

power %= 1000000007

print(power)

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

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

Submission status: Time Limit Exceeded

Solution code:

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

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

print(ans % mod)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def cal(n):
	ans = 1
	for i in range(1,n+1):
		ans *= i
	rm = ans%(10**9 + 7)
	return rm

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

Submission status: Time Limit Exceeded

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

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

print(res % M)

Submission status: Time Limit Exceeded

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

MOD = 10 ** 9 + 7

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

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

answer = power % MOD
print(answer)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(N % mod)

Submission status: Time Limit Exceeded

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

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

print(N % mod)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

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

Submission status: Time Limit Exceeded

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

a,b = divmod(n , 10**9 + 7)
print(b)

Submission status: Time Limit Exceeded

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

divisor = (10 ** 9) + 7

N = int(input())

print(factorial_power(N) % divisor)

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

Submission status: Time Limit Exceeded

Solution code:

x = int(input())
power = 1
for i in range(1, x+1):
    power *= i
   # print(power)

print(power%(pow(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())
sump=1

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

big = 10 ** 9 + 7
print(ans[N - 1] % big)

Submission status: Time Limit Exceeded

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

big = 10 ** 9 + 7
print(ans[N - 1] % big)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
#ABC055.B
N = int(input())
cnt = 1

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

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

Submission status: Time Limit Exceeded

Solution code:
mod = 10**9 + 7

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

print(ans%mod)

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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 *= (i + 1)

print(p % 1000000007)

Submission status: Time Limit Exceeded

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

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

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

if __name__ == '__main__':
    resolve()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# Problem B - Training Camp

# input process
N = int(input())

# initialization
frac_num = 1
INF = 10**9 + 7

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

print(frac_num%INF)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n  = int(input())

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

s = 10**9 + 7

print(ans % s)

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


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

  
  
if k <(10**9 + 7):
  print(k)
else:
  print(k % (10**9 + 7))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

  
  
if k <x:
  print(k)
else:
  print(k % x)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

  
  

print(k % x)

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

Submission status: Time Limit Exceeded

Solution code:
def factorial(n):
    fact = 1
    for i in range(2, n+1):
        fact = (fact * i)
    return fact

print(factorial(int(input()))% (10 ** 9 + 7))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
p = [None]*(n+1)
p[0] = 1

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

print(p[i]%1000000007)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#ABC055

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

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())
ans=1
while N>0:
    ans*=N%(10**9+7)
    N=N-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 % 1000000007)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

p = 1

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
num = int(input())

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


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

Submission status: Time Limit Exceeded

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

print(x%X)

Submission status: Time Limit Exceeded

Solution code:

a=int(input())
x=1
for i in range(1,a+1):
    x=x*i

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

Submission status: Time Limit Exceeded

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

double = 1

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

Submission status: Time Limit Exceeded

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

for n in range(N):
    multiple = n + 1
    currentPower = currentPower * multiple

print(currentPower % 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())
'''
import sys
sys.setrecursionlimit(1000000)
def kaijo(n):
    if n==0:
        return(1)
    else:
        n=n%(10**9+7)
        return(n*kaijo(n-1))
print(kaijo(n)%(10**9+7))
'''
ans=1
for i in range(1,n+1):
    ans*=i%(10**9+7)
print(ans%(10**9+7))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
import sys
sys.setrecursionlimit(1000000)
def kaijo(n):
    if n==0:
        return(1)
    else:
        n=n%(10**9+7)
        return(n*kaijo(n-1))
print(kaijo(n)%(10**9+7))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
import sys
sys.setrecursionlimit(1000000)
def kaijo(n):
    if n==0:
        return(1)
    else:
        return(n*kaijo(n-1))
print(kaijo(n)%(10**9+7))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
def kaijo(N) :
    ans = 1
    for i in range(1,N+1) :
        ans *=i
    return ans
mod = 1000000007
A = kaijo(N)
print(A%mod)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

p = 1

for i in range(1,n):
	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:
n=100000
n=long(raw_input(""))
fact=1
for i in range(1,n+1):
    fact*=i
print (fact%((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)
ans=ans%1000000007
print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# AtCoder Beginner Contest 055 - B
# -*- encoding: UTF-8 -*-
n = int(input())

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

result = k % (10 ** 9 +7)

print(result)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

a=1

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

a%=1000000007

print(a)

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

print(ans%mod)

Submission status: Time Limit Exceeded

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

TrainingCamp()

Submission status: Time Limit Exceeded

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

for i in range(N + 1):
  if i == 0:
    continue

  p *= i

print(p % (1000000000 + 7))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

ans = 1

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

Submission status: Time Limit Exceeded

Solution code:
x = 1
y = []
for i in range(1, int(input())+1):
    x = x * i
    y.append(x)
print(max(y)%((10**9)+7))