結果

問題 No.727 仲介人moko
ユーザー simamumusimamumu
提出日時 2018-08-24 22:00:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 453 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 10,968 KB
実行使用メモリ 19,688 KB
最終ジャッジ日時 2023-09-05 11:44:29
合計ジャッジ時間 3,627 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
14,784 KB
testcase_01 AC 33 ms
10,352 KB
testcase_02 AC 34 ms
10,452 KB
testcase_03 AC 72 ms
11,604 KB
testcase_04 AC 33 ms
10,296 KB
testcase_05 AC 33 ms
10,360 KB
testcase_06 AC 32 ms
10,404 KB
testcase_07 AC 33 ms
10,252 KB
testcase_08 AC 32 ms
10,348 KB
testcase_09 AC 33 ms
10,404 KB
testcase_10 AC 34 ms
10,412 KB
testcase_11 AC 33 ms
10,236 KB
testcase_12 AC 32 ms
10,452 KB
testcase_13 AC 32 ms
10,400 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
権限があれば一括ダウンロードができます

ソースコード

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