結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
koheijkt
|
| 提出日時 | 2025-06-27 22:30:41 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 2,000 ms |
| + 461µs | |
| コード長 | 178 bytes |
| 記録 | |
| コンパイル時間 | 861 ms |
| コンパイル使用メモリ | 95,856 KB |
| 実行使用メモリ | 78,848 KB |
| 最終ジャッジ日時 | 2026-07-12 20:43:40 |
| 合計ジャッジ時間 | 3,853 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
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))
koheijkt