結果

問題 No.1184 Hà Nội
ユーザー shiomusubi496
提出日時 2020-08-22 17:06:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 273 bytes
コンパイル時間 1,524 ms
コンパイル使用メモリ 165,768 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 11:03:10
合計ジャッジ時間 2,403 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define int long long
using namespace std;
const int mod=1000000007;
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;
}
0