結果

問題 No.727 仲介人moko
ユーザー simamumusimamumu
提出日時 2018-08-24 22:02:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 881 ms / 1,000 ms
コード長 482 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 11,116 KB
実行使用メモリ 49,180 KB
最終ジャッジ日時 2023-09-05 11:48:32
合計ジャッジ時間 9,683 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,452 KB
testcase_01 AC 32 ms
10,316 KB
testcase_02 AC 34 ms
10,440 KB
testcase_03 AC 58 ms
11,500 KB
testcase_04 AC 33 ms
10,408 KB
testcase_05 AC 33 ms
10,516 KB
testcase_06 AC 32 ms
10,328 KB
testcase_07 AC 33 ms
10,412 KB
testcase_08 AC 33 ms
10,400 KB
testcase_09 AC 33 ms
10,368 KB
testcase_10 AC 33 ms
10,312 KB
testcase_11 AC 33 ms
10,428 KB
testcase_12 AC 33 ms
10,492 KB
testcase_13 AC 33 ms
10,352 KB
testcase_14 AC 415 ms
27,400 KB
testcase_15 AC 664 ms
39,212 KB
testcase_16 AC 345 ms
24,576 KB
testcase_17 AC 424 ms
27,932 KB
testcase_18 AC 302 ms
22,244 KB
testcase_19 AC 776 ms
43,112 KB
testcase_20 AC 434 ms
28,004 KB
testcase_21 AC 241 ms
19,620 KB
testcase_22 AC 208 ms
18,192 KB
testcase_23 AC 870 ms
47,232 KB
testcase_24 AC 881 ms
49,180 KB
testcase_25 AC 578 ms
35,332 KB
testcase_26 AC 710 ms
40,804 KB
testcase_27 AC 592 ms
35,332 KB
testcase_28 AC 53 ms
11,292 KB
権限があれば一括ダウンロードができます

ソースコード

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