結果

問題 No.8045 怪文書
ユーザー roiti46
提出日時 2019-04-02 00:20:23
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 1,956 ms
コンパイル使用メモリ 76,312 KB
実行使用メモリ 76,356 KB
最終ジャッジ日時 2024-11-27 06:59:13
合計ジャッジ時間 4,733 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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