結果

問題 No.2600 Avator Height
ユーザー ゼットゼット
提出日時 2024-01-12 21:40:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 543 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 588 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 80,604 KB
最終ジャッジ日時 2024-01-12 21:40:49
合計ジャッジ時間 16,115 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
64,276 KB
testcase_01 AC 526 ms
80,600 KB
testcase_02 AC 530 ms
80,600 KB
testcase_03 AC 521 ms
80,600 KB
testcase_04 AC 514 ms
80,600 KB
testcase_05 AC 511 ms
80,600 KB
testcase_06 AC 543 ms
80,600 KB
testcase_07 AC 509 ms
80,600 KB
testcase_08 AC 530 ms
80,600 KB
testcase_09 AC 507 ms
80,600 KB
testcase_10 AC 531 ms
80,600 KB
testcase_11 AC 512 ms
80,600 KB
testcase_12 AC 535 ms
80,600 KB
testcase_13 AC 508 ms
80,600 KB
testcase_14 AC 522 ms
80,600 KB
testcase_15 AC 505 ms
80,600 KB
testcase_16 AC 513 ms
80,600 KB
testcase_17 AC 532 ms
80,600 KB
testcase_18 AC 525 ms
80,600 KB
testcase_19 AC 531 ms
80,600 KB
testcase_20 AC 500 ms
80,600 KB
testcase_21 AC 533 ms
80,600 KB
testcase_22 AC 503 ms
80,600 KB
testcase_23 AC 540 ms
80,600 KB
testcase_24 AC 448 ms
80,476 KB
testcase_25 AC 483 ms
80,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

R=[0]*(3*10**5)
E=[0]*(3*10**5)
mod=998244353
R[1]=1
R[2]=1
E[1]=1
E[2]=3
for i in range(3,3*10**5):
  R[i]=R[i-1]+R[i-2]
  E[i]=E[i-1]+E[i-2]
  R[i]%=mod
  E[i]%=mod
Q=int(input())
for i in range(Q):
  x=int(input())
  ans=5*R[x]**2-E[x]**2
  ans%=mod
  print(ans)
0