結果
| 問題 |
No.2752 文字列の数え上げ mod 998244353
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-13 12:25:24 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
AC
|
| 実行時間 | 1,853 ms / 2,000 ms |
| コード長 | 544 bytes |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 6,812 KB |
| 実行使用メモリ | 35,056 KB |
| 最終ジャッジ日時 | 2024-09-13 12:25:38 |
| 合計ジャッジ時間 | 13,178 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
(import
(scheme base)
(scheme read)
(scheme write)
(gauche base)
(srfi 94)
)
(define yuki2752
(let*
(
(alpha 26)
(ratio 26)
(mod998-const 998244353)
(mod998 (lambda (x) (modulo x mod998-const)))
(solver (lambda (x) (mod998 (* (mod998 (* alpha (- (expt-mod ratio x mod998-const) 1))) (expt-mod (- alpha 1) (- mod998-const 2) mod998-const))))))
(let*
((n (read)))
(do ((i 1 (+ i 1)))
((> i n) )
(begin
(write (solver (read)))
(display "\n"))))))