結果

問題 No.3045 怪文書
ユーザー taki_gtaki_g
提出日時 2019-04-01 21:53:16
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 175 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 844,796 KB
最終ジャッジ日時 2023-08-17 21:49:29
合計ジャッジ時間 4,258 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,300 KB
testcase_01 AC 70 ms
71,180 KB
testcase_02 AC 70 ms
71,100 KB
testcase_03 AC 76 ms
71,460 KB
testcase_04 AC 73 ms
71,812 KB
testcase_05 AC 74 ms
71,880 KB
testcase_06 AC 71 ms
71,336 KB
testcase_07 AC 192 ms
163,904 KB
testcase_08 AC 87 ms
82,780 KB
testcase_09 AC 92 ms
88,824 KB
testcase_10 AC 84 ms
82,140 KB
testcase_11 AC 199 ms
174,100 KB
testcase_12 AC 207 ms
184,156 KB
testcase_13 MLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10**9+10)
N,M = map(int,input().split())

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