結果

問題 No.3108 徐々におかしくなる数学クイズ
ユーザー 👑 p-adicp-adic
提出日時 2024-03-05 09:50:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 493 bytes
コンパイル時間 468 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 53,460 KB
最終ジャッジ日時 2024-03-05 10:00:16
合計ジャッジ時間 1,441 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,460 KB
testcase_01 AC 33 ms
53,460 KB
testcase_02 AC 33 ms
53,460 KB
testcase_03 AC 34 ms
53,460 KB
testcase_04 AC 34 ms
53,460 KB
testcase_05 AC 34 ms
53,460 KB
testcase_06 AC 34 ms
53,460 KB
testcase_07 AC 34 ms
53,460 KB
testcase_08 AC 34 ms
53,460 KB
testcase_09 AC 36 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#A=3
#B=23
#C=180
#D=-360
#E=0
#F=360
#G=1
#H=19
#I=4
#J=?->2
#K=6
#L=4

#try:
#	while 1:print(*["".join([chr(ord(c)-3)for c in S])for S in input().split()])
#except:
#	print("Done")

#f(n)=1/sqrt(5)*(((6+sqrt(3*(6*J)**J//(19+J)))/4)**(J*n/4)-((-log(6,4+16*J))/(1+(6**J/180)**(-1/2)))**n)

#J=2->
#=1/sqrt(5)*(((3+sqrt(5))/2)**(n/2)-((-2)/(1+sqrt(5)))**n)
#=1/sqrt(5)*(((sqrt(5)+1)/2)**n-(-(sqrt(5)-1)/2)**n)
#=F_n

n=int(input())
F=[0,1]
while len(F)<=n:F+=[F[-2]+F[-1]]
print(F[n]%998244353)
0