結果
問題 | No.2752 文字列の数え上げ mod 998244353 |
ユーザー | PNJ |
提出日時 | 2024-05-10 23:16:55 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 376 ms / 2,000 ms |
コード長 | 174 bytes |
コンパイル時間 | 270 ms |
コンパイル使用メモリ | 82,364 KB |
実行使用メモリ | 76,252 KB |
最終ジャッジ日時 | 2024-05-10 23:16:59 |
合計ジャッジ時間 | 3,953 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 38 ms
52,404 KB |
testcase_01 | AC | 38 ms
52,228 KB |
testcase_02 | AC | 37 ms
53,036 KB |
testcase_03 | AC | 37 ms
52,792 KB |
testcase_04 | AC | 37 ms
52,204 KB |
testcase_05 | AC | 38 ms
53,472 KB |
testcase_06 | AC | 37 ms
51,744 KB |
testcase_07 | AC | 38 ms
52,248 KB |
testcase_08 | AC | 38 ms
52,356 KB |
testcase_09 | AC | 38 ms
52,324 KB |
testcase_10 | AC | 38 ms
52,000 KB |
testcase_11 | AC | 38 ms
52,464 KB |
testcase_12 | AC | 40 ms
52,372 KB |
testcase_13 | AC | 38 ms
53,008 KB |
testcase_14 | AC | 38 ms
53,492 KB |
testcase_15 | AC | 38 ms
51,960 KB |
testcase_16 | AC | 37 ms
52,176 KB |
testcase_17 | AC | 38 ms
52,924 KB |
testcase_18 | AC | 37 ms
52,800 KB |
testcase_19 | AC | 38 ms
51,984 KB |
testcase_20 | AC | 243 ms
76,044 KB |
testcase_21 | AC | 360 ms
76,152 KB |
testcase_22 | AC | 376 ms
76,184 KB |
testcase_23 | AC | 376 ms
76,252 KB |
testcase_24 | AC | 363 ms
75,896 KB |
ソースコード
T = int(input()) mod = 998244353 P = pow(25,-1,mod) for _ in range(T): ans = (pow(26,(int(input()) + 1) % (mod - 1),mod) - 1) * P % mod ans = (ans - 1) % mod print(ans)