結果
問題 |
No.2416 vs Slime
|
ユーザー |
|
提出日時 | 2023-08-29 21:33:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 341 bytes |
コンパイル時間 | 1,675 ms |
コンパイル使用メモリ | 166,192 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-30 23:45:53 |
合計ジャッジ時間 | 3,267 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 37 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll,ll> #define pii pair<int,int> #define fs first #define sc second int main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); ll h,a; cin>>h>>a; ll ans = 0; ll C = 1; while(h){ ans += C; C<<=1; h/=a; } cout<<ans; }