結果

問題 No.2416 vs Slime
ユーザー twooimp
提出日時 2023-08-12 15:24:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 313 bytes
コンパイル時間 1,607 ms
コンパイル使用メモリ 170,952 KB
実行使用メモリ 814,708 KB
最終ジャッジ日時 2024-11-20 01:47:09
合計ジャッジ時間 8,083 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 35 TLE * 1 MLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll=long long;

int main(){
  ll h,a;
  cin>>h>>a;
  queue<ll> que;
  que.push(h);
  ll ans=0;
  while(que.size()){
    ll q=que.front();
    que.pop();
    ll nh=q/a;
    ans++;
    if(nh>0){
      que.push(nh);
      que.push(nh);
    }
  }
  cout<<ans<<endl;
}
0