結果

問題 No.2752 文字列の数え上げ mod 998244353
ユーザー 👑 rin204rin204
提出日時 2024-05-10 21:49:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 455 ms / 2,000 ms
コード長 158 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 82,472 KB
実行使用メモリ 76,264 KB
最終ジャッジ日時 2024-05-10 21:50:02
合計ジャッジ時間 4,490 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,156 KB
testcase_01 AC 36 ms
52,180 KB
testcase_02 AC 37 ms
53,356 KB
testcase_03 AC 39 ms
52,008 KB
testcase_04 AC 35 ms
51,848 KB
testcase_05 AC 35 ms
51,700 KB
testcase_06 AC 37 ms
53,084 KB
testcase_07 AC 35 ms
52,304 KB
testcase_08 AC 35 ms
53,560 KB
testcase_09 AC 36 ms
52,024 KB
testcase_10 AC 36 ms
51,556 KB
testcase_11 AC 36 ms
52,472 KB
testcase_12 AC 36 ms
52,800 KB
testcase_13 AC 38 ms
52,740 KB
testcase_14 AC 36 ms
52,476 KB
testcase_15 AC 40 ms
51,756 KB
testcase_16 AC 36 ms
53,232 KB
testcase_17 AC 36 ms
52,484 KB
testcase_18 AC 35 ms
53,072 KB
testcase_19 AC 43 ms
52,420 KB
testcase_20 AC 305 ms
76,052 KB
testcase_21 AC 440 ms
75,800 KB
testcase_22 AC 419 ms
76,208 KB
testcase_23 AC 425 ms
76,264 KB
testcase_24 AC 455 ms
75,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

inv = pow(25, -1, MOD)
for _ in range(int(input())):
    n = int(input())
    ans = (pow(26, n + 1, MOD) - 1) * inv % MOD
    print(ans - 1)
0