結果

問題 No.53 悪の漸化式
ユーザー kokoa1046kokoa1046
提出日時 2017-10-17 21:57:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 202 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-04-29 06:24:06
合計ジャッジ時間 1,808 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
11,264 KB
testcase_01 AC 34 ms
11,392 KB
testcase_02 AC 33 ms
11,392 KB
testcase_03 AC 35 ms
11,392 KB
testcase_04 AC 34 ms
11,392 KB
testcase_05 AC 33 ms
11,392 KB
testcase_06 AC 33 ms
11,392 KB
testcase_07 AC 32 ms
11,392 KB
testcase_08 AC 32 ms
11,264 KB
testcase_09 AC 34 ms
11,392 KB
testcase_10 AC 34 ms
11,392 KB
testcase_11 AC 35 ms
11,392 KB
testcase_12 AC 33 ms
11,392 KB
testcase_13 AC 34 ms
11,392 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import fractions
n = int(input())
a = [None] * max(2, n + 1)
a[0] = 4
a[1] = 3
for i in range(2,len(a)):
    a[i] = (19 * a[i-1] -  12 * a[i-2]) / 4
print('{0:.10f}'.format(a[n]))
0