結果

問題 No.500 階乗電卓
ユーザー 学ぶマン
提出日時 2025-06-27 22:30:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 54,080 KB
最終ジャッジ日時 2025-06-27 22:30:46
合計ジャッジ時間 2,039 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())
MOD = 10**12

if N >= 50:
    print('000000000000')
elif N >= 15:
    print(str(math.factorial(N)%MOD).zfill(12))
else:
    print(math.factorial(N))
0