結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
Gmorning084
|
| 提出日時 | 2017-06-10 13:17:50 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 306 ms |
| コンパイル使用メモリ | 21,596 KB |
| 実行使用メモリ | 15,660 KB |
| 最終ジャッジ日時 | 2026-09-03 07:34:25 |
| 合計ジャッジ時間 | 4,111 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 2 |
ソースコード
n = int(input())
ans = n
if n == 1:print(1)
if n == 2:print(2)
while True:
ans = (ans * (n-1))%(10**13)
n -= 1
if n == 2:
s = str(ans)
print(s[-12:])
break
elif ans == 0:
print("000000000000")
break
Gmorning084