結果

問題 No.1754 T-block Tiling
ユーザー chacoder1
提出日時 2021-12-29 11:38:10
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 1,920 ms
コンパイル使用メモリ 193,524 KB
最終ジャッジ日時 2025-01-27 07:28:10
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
#define int long long
static const int mod=998244353;

signed main(){   
  int t;
  cin>>t;
  while(t--){
    int n;cin>>n;
    if(n==1){
      cout<<2<<endl;
      continue;
    }
    int ans=2;
    rep(i,n-1){
      ans*=3;
      ans%=mod;
    }
    cout<<ans<<endl;
  }
  return 0;
}


     
0