結果

問題 No.3045 怪文書
ユーザー taki_gtaki_g
提出日時 2019-04-01 21:50:07
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 175 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 842,124 KB
最終ジャッジ日時 2023-08-17 21:44:10
合計ジャッジ時間 5,469 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,128 KB
testcase_01 AC 73 ms
71,148 KB
testcase_02 AC 78 ms
71,220 KB
testcase_03 AC 73 ms
71,064 KB
testcase_04 AC 75 ms
71,672 KB
testcase_05 AC 74 ms
71,588 KB
testcase_06 AC 71 ms
71,188 KB
testcase_07 AC 192 ms
163,020 KB
testcase_08 AC 85 ms
82,948 KB
testcase_09 AC 92 ms
89,036 KB
testcase_10 AC 84 ms
81,608 KB
testcase_11 AC 205 ms
175,392 KB
testcase_12 AC 215 ms
184,636 KB
testcase_13 MLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10000000)
N,M = map(int,input().split())

def factorial(a):
    if a==0:
        return 1
    return (a*factorial(a-1))%M
print(factorial(N))
0