結果

問題 No.727 仲介人moko
ユーザー hedwig100hedwig100
提出日時 2020-05-01 15:46:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 315 ms / 1,000 ms
コード長 311 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 10,788 KB
実行使用メモリ 47,016 KB
最終ジャッジ日時 2023-08-25 20:17:52
合計ジャッジ時間 4,831 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,908 KB
testcase_01 AC 16 ms
7,964 KB
testcase_02 AC 17 ms
7,876 KB
testcase_03 AC 24 ms
8,936 KB
testcase_04 AC 16 ms
7,824 KB
testcase_05 AC 16 ms
7,912 KB
testcase_06 AC 16 ms
7,732 KB
testcase_07 AC 15 ms
7,828 KB
testcase_08 AC 15 ms
7,732 KB
testcase_09 AC 15 ms
7,964 KB
testcase_10 AC 16 ms
7,816 KB
testcase_11 AC 15 ms
7,812 KB
testcase_12 AC 16 ms
7,820 KB
testcase_13 AC 15 ms
7,816 KB
testcase_14 AC 150 ms
25,120 KB
testcase_15 AC 238 ms
36,860 KB
testcase_16 AC 126 ms
22,144 KB
testcase_17 AC 155 ms
25,948 KB
testcase_18 AC 108 ms
19,912 KB
testcase_19 AC 266 ms
40,616 KB
testcase_20 AC 152 ms
25,572 KB
testcase_21 AC 89 ms
17,260 KB
testcase_22 AC 77 ms
15,880 KB
testcase_23 AC 299 ms
44,716 KB
testcase_24 AC 315 ms
47,016 KB
testcase_25 AC 208 ms
33,072 KB
testcase_26 AC 251 ms
38,456 KB
testcase_27 AC 205 ms
32,900 KB
testcase_28 AC 22 ms
8,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7
INF = 10 ** 13
import sys
sys.setrecursionlimit(100000000)
dy = (-1,0,1,0)
dx = (0,1,0,-1)

def main():
    N = int(input())
    dp = [0] * (N + 1)
    dp[1] = 1
    for i in range(2,N + 1):
        dp[i] = i*i*(2*i - 1)*dp[i - 1] % MOD
    print(dp[-1])
if __name__ == '__main__':
    main()
0