結果

問題 No.2600 Avator Height
ユーザー 66
提出日時 2024-01-27 02:44:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 631 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 573 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 30,848 KB
最終ジャッジ日時 2024-01-27 02:44:59
合計ジャッジ時間 19,749 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 190 ms
30,576 KB
testcase_01 AC 611 ms
30,720 KB
testcase_02 AC 614 ms
30,720 KB
testcase_03 AC 609 ms
30,720 KB
testcase_04 AC 603 ms
30,720 KB
testcase_05 AC 611 ms
30,720 KB
testcase_06 AC 602 ms
30,720 KB
testcase_07 AC 617 ms
30,720 KB
testcase_08 AC 611 ms
30,720 KB
testcase_09 AC 601 ms
30,720 KB
testcase_10 AC 595 ms
30,720 KB
testcase_11 AC 625 ms
30,720 KB
testcase_12 AC 606 ms
30,720 KB
testcase_13 AC 613 ms
30,720 KB
testcase_14 AC 595 ms
30,720 KB
testcase_15 AC 613 ms
30,720 KB
testcase_16 AC 624 ms
30,720 KB
testcase_17 AC 619 ms
30,720 KB
testcase_18 AC 626 ms
30,720 KB
testcase_19 AC 631 ms
30,720 KB
testcase_20 AC 609 ms
30,720 KB
testcase_21 AC 629 ms
30,720 KB
testcase_22 AC 616 ms
30,720 KB
testcase_23 AC 603 ms
30,720 KB
testcase_24 AC 466 ms
30,848 KB
testcase_25 AC 537 ms
30,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
ms = lambda: map(str, input().split())
mf = lambda: map(float, input().split())
li = lambda: list(mi())

Q = ii()
R = [1, 1]
E = [1, 3]
for i in range(1<<18):
    R.append((R[-1] + R[-2])%998244353)
    E.append((E[-1] + E[-2])%998244353)

for i in range(Q):
    N = ii()
    print((5 * R[N-1] * R[N-1] - E[N-1] * E[N-1])%998244353)

0