結果

問題 No.8045 怪文書
ユーザー trineutron
提出日時 2021-01-01 01:47:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 139 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 82,008 KB
実行使用メモリ 59,660 KB
最終ジャッジ日時 2024-10-10 03:22:04
合計ジャッジ時間 2,211 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
if n >= m:
    print(0)
    exit()
ans = 1
for i in range(1, n + 1):
    ans *= i
    ans %= m
print(ans)
0