結果
問題 |
No.1184 Hà Nội
|
ユーザー |
![]() |
提出日時 | 2021-06-07 00:43:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 369 bytes |
コンパイル時間 | 1,943 ms |
コンパイル使用メモリ | 166,684 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 22:22:15 |
合計ジャッジ時間 | 2,439 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> #define NIL (-1) #define ll long long using namespace std; const double PI = acos(-1.0); int main() { ll N, L; cin >> N >> L; ll n = (N + L - 1) / L; const ll mod = 998244353; ll ans = 1, m = 2; while (n) { if (n & 1) { ans *= m; n--; } m *= m; ans %= mod; m %= mod; n /= 2; } cout << ans - 1 << endl; return 0; }