結果

問題 No.1754 T-block Tiling
ユーザー vwxyz
提出日時 2022-09-06 16:16:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 14,592 KB
最終ジャッジ日時 2024-11-21 17:24:01
合計ジャッジ時間 910 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict, deque
from pickletools import read_decimalnl_long
import sys
readline=sys.stdin.readline
write=sys.stdout.write

T=int(readline())
mod=998244353
for t in range(T):
    N=int(readline())
    dp=[0]*N
    dp[0]=2
    for i in range(1,N):
        dp[i]=2*(sum(dp)+1)%mod
    ans=dp[N-1]
    print(ans)
0