結果

問題 No.3045 怪文書
ユーザー taki_gtaki_g
提出日時 2019-04-01 21:59:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 204 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 19,156 KB
最終ジャッジ日時 2023-08-18 01:02:00
合計ジャッジ時間 5,073 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
15,296 KB
testcase_01 AC 16 ms
8,180 KB
testcase_02 AC 16 ms
8,044 KB
testcase_03 AC 16 ms
8,224 KB
testcase_04 AC 16 ms
8,220 KB
testcase_05 AC 16 ms
8,188 KB
testcase_06 AC 16 ms
8,188 KB
testcase_07 AC 205 ms
9,320 KB
testcase_08 AC 19 ms
8,296 KB
testcase_09 AC 26 ms
8,352 KB
testcase_10 AC 18 ms
8,092 KB
testcase_11 AC 266 ms
9,516 KB
testcase_12 AC 325 ms
9,696 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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