結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-05-24 12:47:54 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 81 ms / 2,000 ms |
| コード長 | 220 bytes |
| 記録 | |
| コンパイル時間 | 258 ms |
| コンパイル使用メモリ | 77,224 KB |
| 最終ジャッジ日時 | 2025-12-03 23:50:21 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
n = int(raw_input())
a = 1
b = 1
of = False
while b <= n and a != 0:
a *= b
if a >= 10**12:
of = True
a %= 10**12
b += 1
if of:
s = 12 - len(str(a))
print '0'*s + str(a)
else:
print a
JunOnuma