結果
問題 |
No.53 悪の漸化式
|
ユーザー |
|
提出日時 | 2021-04-19 04:34:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 140 ms / 5,000 ms |
コード長 | 329 bytes |
コンパイル時間 | 240 ms |
コンパイル使用メモリ | 82,144 KB |
実行使用メモリ | 82,048 KB |
最終ジャッジ日時 | 2024-07-04 04:57:17 |
合計ジャッジ時間 | 3,870 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
from decimal import * def main(): getcontext().prec = 100 n = int(input()) a = [0 for _ in range(101)] a[0] = Decimal(4) a[1] = Decimal(3) for i in range(2, 101): a[i] = (Decimal(19) * a[i-1] - Decimal(12) * a[i-2]) / Decimal(4) print("{:.20f}".format(a[n])) if __name__ == '__main__': main()