結果

問題 No.53 悪の漸化式
ユーザー titiatitia
提出日時 2021-12-11 00:28:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 22 ms / 5,000 ms
コード長 165 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 9,076 KB
最終ジャッジ日時 2023-09-26 01:49:20
合計ジャッジ時間 1,723 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
8,984 KB
testcase_01 AC 21 ms
8,936 KB
testcase_02 AC 21 ms
8,928 KB
testcase_03 AC 21 ms
8,860 KB
testcase_04 AC 21 ms
8,916 KB
testcase_05 AC 22 ms
9,048 KB
testcase_06 AC 21 ms
8,888 KB
testcase_07 AC 22 ms
9,004 KB
testcase_08 AC 22 ms
8,936 KB
testcase_09 AC 22 ms
9,048 KB
testcase_10 AC 21 ms
9,008 KB
testcase_11 AC 21 ms
9,048 KB
testcase_12 AC 21 ms
8,956 KB
testcase_13 AC 22 ms
8,948 KB
testcase_14 AC 21 ms
8,920 KB
testcase_15 AC 21 ms
8,976 KB
testcase_16 AC 21 ms
8,920 KB
testcase_17 AC 22 ms
8,956 KB
testcase_18 AC 22 ms
8,896 KB
testcase_19 AC 21 ms
9,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import *
getcontext().prec = 5000

A=[Decimal(4),Decimal(3)]

for i in range(100):
    A.append((19*A[-1]-12*A[-2])/4)
    

N=int(input())
print(A[N])
0