結果

問題 No.53 悪の漸化式
ユーザー 👑 colognecologne
提出日時 2022-01-24 20:05:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 86,852 KB
実行使用メモリ 71,628 KB
最終ジャッジ日時 2023-08-21 11:15:54
合計ジャッジ時間 2,737 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,280 KB
testcase_01 AC 70 ms
71,244 KB
testcase_02 AC 70 ms
71,448 KB
testcase_03 AC 69 ms
71,164 KB
testcase_04 AC 74 ms
71,164 KB
testcase_05 AC 71 ms
71,404 KB
testcase_06 AC 71 ms
71,160 KB
testcase_07 AC 70 ms
71,452 KB
testcase_08 AC 71 ms
71,272 KB
testcase_09 AC 71 ms
71,252 KB
testcase_10 AC 71 ms
71,420 KB
testcase_11 AC 71 ms
71,444 KB
testcase_12 AC 71 ms
71,428 KB
testcase_13 AC 71 ms
71,332 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys


def input(): return sys.stdin.readline().rstrip()


def main():
    A = [4, 3]
    N = int(input())
    for i in range(N-1):
        A.append((19*A[-1]-12*A[-2])/4)

    print(f'{A[N]:.12f}')


if __name__ == '__main__':
    main()
0