結果
| 問題 |
No.1184 Hà Nội
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-22 17:11:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 272 bytes |
| コンパイル時間 | 1,598 ms |
| コンパイル使用メモリ | 165,572 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 11:10:52 |
| 合計ジャッジ時間 | 2,564 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 |
ソースコード
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int mod=998244353;
int p(int a,int b){
if(!b)return 1;
if(b%2)return p(a,b-1)*a%mod;
int c=p(a,b/2);
return c*c%mod;
}
signed main(){
int N,L;
cin>>N>>L;
cout<<p(2,(N+L-1)/L)-1<<endl;
}