結果

問題 No.727 仲介人moko
ユーザー simamumusimamumu
提出日時 2018-08-24 22:00:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 453 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,976 KB
最終ジャッジ日時 2024-06-23 07:22:07
合計ジャッジ時間 3,484 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10 TLE * 1 -- * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N = int(input())
aite = math.factorial(N)%mod
dp = [0]*(N+1)
dp[1] = 1

tmp = 1
for i in range(2,N+1):
	tmp += 4*i-3
	tmp %= mod
	dp[i] = (dp[i-1]*tmp) %mod

print(dp[N]*aite%mod)
0