結果
問題 | No.1754 T-block Tiling |
ユーザー | mesame3993 |
提出日時 | 2021-11-20 14:20:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 147 ms / 2,000 ms |
コード長 | 395 bytes |
コンパイル時間 | 1,475 ms |
コンパイル使用メモリ | 87,240 KB |
実行使用メモリ | 77,376 KB |
最終ジャッジ日時 | 2023-09-02 08:29:23 |
合計ジャッジ時間 | 2,319 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 87 ms
75,144 KB |
testcase_01 | AC | 147 ms
77,376 KB |
ソースコード
from math import factorial def com(n,r): return factorial(n)//factorial(r)//factorial(n-r) def main(): from sys import stdin readline=stdin.readline t = int(readline()) mod = 998244353 for i in range(t): n = int(readline()) if n == 1: print(2) continue ans = 0 for r in range(n): ans += 2**r * com(n-1,r) ans %= mod print(ans*2%mod) main()