結果

問題 No.53 悪の漸化式
ユーザー parukiparuki
提出日時 2016-10-07 14:46:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 193 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-05-01 14:47:39
合計ジャッジ時間 1,448 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

from decimal import *
getcontext().prec = 100
N = int(input())
A = [Decimal(0)]*(N+1)
A[0] = Decimal(4)
A[1] = Decimal(3)
for i in range(2, N+1):
    A[i] = (19*A[i-1]-12*A[i-2])/4
print(A[N])
0