結果
| 問題 |
No.500 階乗電卓
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-08 00:00:58 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 277 bytes |
| コンパイル時間 | 331 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-16 03:27:14 |
| 合計ジャッジ時間 | 1,230 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 2 RE * 1 |
ソースコード
# python
import math
l =input()
l = int(l)
ans = 1
if l >50:
ans = '000000000000'
else:
for num in range(l):
ans *= l - num
if int(math.log10(ans) + 1 > 12):
ans = str(ans)
ans = ans[-12:]
ans = int(ans)
print(ans)