結果

問題 No.53 悪の漸化式
ユーザー 👑 colognecologne
提出日時 2022-01-24 20:05:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 675 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-05-08 16:34:47
合計ジャッジ時間 1,689 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,352 KB
testcase_01 AC 37 ms
52,096 KB
testcase_02 AC 37 ms
51,968 KB
testcase_03 AC 37 ms
51,840 KB
testcase_04 AC 37 ms
51,456 KB
testcase_05 AC 37 ms
51,840 KB
testcase_06 AC 37 ms
52,352 KB
testcase_07 AC 38 ms
51,968 KB
testcase_08 AC 36 ms
51,712 KB
testcase_09 AC 35 ms
51,712 KB
testcase_10 AC 42 ms
51,968 KB
testcase_11 AC 38 ms
51,968 KB
testcase_12 AC 38 ms
51,840 KB
testcase_13 AC 38 ms
51,840 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