結果
問題 |
No.1184 Hà Nội
|
ユーザー |
![]() |
提出日時 | 2020-08-22 13:10:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 2,094 ms |
コンパイル使用メモリ | 191,280 KB |
最終ジャッジ日時 | 2025-01-13 07:16:27 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define endl "\n" const i64 MOD = 998244353; i64 modpow(i64 a, i64 n) { i64 res = 1; while (n > 0) { if (n & 1) res = res * a % MOD; a = a * a % MOD; n >>= 1; } return res; } int main() { i64 N, L; cin >> N >> L; N = (N + L - 1) / L; cout << (modpow(2, N) - 1 + MOD) % MOD << endl; return 0; }