結果

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
int main () {
	int Q;
	cin >> Q;
	using ll = long long;
	mint x = 26;
	while (Q--) {
		ll n;
		cin >> n;
		mint ans = x.pow(n + 1) - 26;
		ans /= 25;
		cout << ans.val() << endl;
	}
}
0