結果

問題 No.3045 怪文書
ユーザー roiti46roiti46
提出日時 2019-04-02 00:20:23
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 1,408 ms
コンパイル使用メモリ 77,560 KB
実行使用メモリ 77,592 KB
最終ジャッジ日時 2023-08-18 04:18:55
合計ジャッジ時間 4,039 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,144 KB
testcase_01 AC 78 ms
76,572 KB
testcase_02 AC 75 ms
76,140 KB
testcase_03 AC 77 ms
76,360 KB
testcase_04 AC 76 ms
76,344 KB
testcase_05 AC 75 ms
76,444 KB
testcase_06 AC 76 ms
76,292 KB
testcase_07 AC 86 ms
77,396 KB
testcase_08 AC 77 ms
77,592 KB
testcase_09 AC 76 ms
76,444 KB
testcase_10 AC 79 ms
77,376 KB
testcase_11 AC 76 ms
76,252 KB
testcase_12 AC 77 ms
76,484 KB
testcase_13 AC 78 ms
76,416 KB
testcase_14 AC 77 ms
76,152 KB
testcase_15 AC 76 ms
76,444 KB
testcase_16 AC 76 ms
76,356 KB
testcase_17 AC 77 ms
76,304 KB
testcase_18 AC 76 ms
76,392 KB
testcase_19 AC 77 ms
76,368 KB
testcase_20 AC 76 ms
76,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, raw_input().split())
if N >= M:
    print 0
else:
    ans = 1
    for i in xrange(2, N + 1):
        ans *= i
        ans %= M
    print(ans)
0