結果
| 問題 | No.53 悪の漸化式 |
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 20:47:58 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 465 bytes |
| 記録 | |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 95,980 KB |
| 実行使用メモリ | 91,008 KB |
| 最終ジャッジ日時 | 2026-07-12 01:30:36 |
| 合計ジャッジ時間 | 4,946 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 10 |
ソースコード
from decimal import Decimal, getcontext
# Set a high precision to handle all possible cases accurately.
getcontext().prec = 1000
N = int(input())
# Calculate (3/4) as a Decimal to ensure precision.
d = Decimal(3) / Decimal(4)
power = d ** N
result = Decimal(4) * power
# Round the result to 8 decimal places.
rounded_result = result.quantize(Decimal('1.00000000'))
# Format the output to ensure exactly 8 decimal places.
print("{0:.8f}".format(rounded_result))
gew1fw