結果

問題 No.2752 文字列の数え上げ mod 998244353
ユーザー だれだれ
提出日時 2024-05-10 21:42:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 411 ms / 2,000 ms
コード長 164 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 82,416 KB
実行使用メモリ 76,284 KB
最終ジャッジ日時 2024-05-10 21:42:07
合計ジャッジ時間 3,716 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,828 KB
testcase_01 AC 31 ms
51,880 KB
testcase_02 AC 31 ms
52,764 KB
testcase_03 AC 31 ms
52,676 KB
testcase_04 AC 31 ms
53,024 KB
testcase_05 AC 31 ms
51,952 KB
testcase_06 AC 31 ms
52,096 KB
testcase_07 AC 31 ms
53,252 KB
testcase_08 AC 32 ms
52,676 KB
testcase_09 AC 35 ms
52,120 KB
testcase_10 AC 31 ms
52,728 KB
testcase_11 AC 33 ms
51,940 KB
testcase_12 AC 33 ms
52,932 KB
testcase_13 AC 33 ms
53,064 KB
testcase_14 AC 33 ms
51,936 KB
testcase_15 AC 32 ms
53,356 KB
testcase_16 AC 32 ms
52,920 KB
testcase_17 AC 32 ms
52,272 KB
testcase_18 AC 38 ms
52,056 KB
testcase_19 AC 33 ms
51,992 KB
testcase_20 AC 255 ms
76,040 KB
testcase_21 AC 385 ms
76,284 KB
testcase_22 AC 389 ms
76,140 KB
testcase_23 AC 411 ms
76,060 KB
testcase_24 AC 376 ms
75,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
inv25 = pow(25, 998244351, 998244353)
while t:
    t -= 1
    n = int(input())
    print(((pow(26, n + 1, 998244353) - 1) * inv25 - 1) % 998244353)
0