結果
| 問題 |
No.1184 Hà Nội
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-29 04:44:14 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 221 bytes |
| コンパイル時間 | 134 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-07-03 07:22:25 |
| 合計ジャッジ時間 | 3,792 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 WA * 4 |
コンパイルメッセージ
Syntax OK
ソースコード
n, l = gets.split.map(&:to_i) D = 998244353 def pow2mod(n) raise 'must not happen' if n < 0 return 1 if 0 == n p = pow2mod(n/2) ** 2 p *= 2 if 1 == n%2 p % D end n = (n.to_f / l).ceil puts (pow2mod(n) - 1) % D