結果
| 問題 |
No.1184 Hà Nội
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-08-28 01:22:16 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 578 bytes |
| コンパイル時間 | 795 ms |
| コンパイル使用メモリ | 99,628 KB |
| 最終ジャッジ日時 | 2025-02-16 15:18:36 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 |
ソースコード
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
#include<string>
using namespace std;
long long pow1(long long x, long long n, long long mod){
long long ans = 1;
while (n){
if (n%2){
ans *= x;
ans %= mod;
}
x *= x;
x %= mod;
n >>= 1;
}
return ans;
}
int main()
{
long long n, l, t, mod = 998244353, ans;
cin >> n >> l;
t = (n+l-1)/l;
ans = pow1(2, t, mod) -1;
cout << ans << endl;
}
kpinkcat