結果

問題 No.2752 文字列の数え上げ mod 998244353
ユーザー Tatsu_mr
提出日時 2024-05-10 22:19:40
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 4,288 ms
コンパイル使用メモリ 250,460 KB
最終ジャッジ日時 2025-02-21 12:54:20
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;

using mint = modint998244353;

int main() {
    int t;
    cin >> t;
    while (t--) {
        long long l;
        cin >> l;
        mint ans = mint(26) * (mint(26).pow(l) - mint(1));
        ans /= mint(25);
        cout << ans.val() << endl;
    }
}
0