結果
| 問題 |
No.53 悪の漸化式
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 15:54:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 416 bytes |
| コンパイル時間 | 197 ms |
| コンパイル使用メモリ | 82,728 KB |
| 実行使用メモリ | 80,736 KB |
| 最終ジャッジ日時 | 2025-06-12 15:54:50 |
| 合計ジャッジ時間 | 3,047 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 10 |
ソースコード
from decimal import Decimal, getcontext
getcontext().prec = 1000 # Set high precision to handle very small numbers accurately
n = int(input())
if n == 0:
value = Decimal('4.00000000')
else:
numerator = 3 ** n
denominator = 4 ** (n - 1)
value = Decimal(numerator) / Decimal(denominator)
# Format the output to exactly 8 decimal places
formatted_value = format(value, '.8f')
print(formatted_value)
gew1fw