結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 21:14:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 325 bytes |
| 記録 | |
| コンパイル時間 | 257 ms |
| コンパイル使用メモリ | 82,788 KB |
| 実行使用メモリ | 53,404 KB |
| 最終ジャッジ日時 | 2025-03-20 21:14:54 |
| 合計ジャッジ時間 | 1,840 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 2 |
ソースコード
n = int(input())
def count_factor_5(n):
count = 0
temp = 5
while temp <= n:
count += n // temp
temp *= 5
return count
c5 = count_factor_5(n)
if c5 >= 12:
print("000000000000")
else:
mod = 10 ** 12
res = 1
for i in range(1, n + 1):
res = (res * i) % mod
print(res)
lam6er