結果
| 問題 |
No.2752 文字列の数え上げ mod 998244353
|
| コンテスト | |
| ユーザー |
cled0328
|
| 提出日時 | 2024-05-10 22:02:26 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 258 ms / 2,000 ms |
| コード長 | 286 bytes |
| コンパイル時間 | 1,739 ms |
| コンパイル使用メモリ | 194,692 KB |
| 最終ジャッジ日時 | 2025-02-21 12:46:59 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/modint>
using namespace std;
using mint=atcoder::modint998244353;
int main(){
int t;cin>>t;
mint tf=25,ts=26;
tf=tf.inv();
while(t--){
long long l;cin>>l;
cout<<((tf)*(ts.pow(l+1)-ts)).val()<<"\n";
}
}
cled0328