結果
問題 | No.2416 vs Slime |
ユーザー |
|
提出日時 | 2023-08-12 17:17:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 282 bytes |
コンパイル時間 | 4,239 ms |
コンパイル使用メモリ | 250,512 KB |
最終ジャッジ日時 | 2025-02-16 07:19:09 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 37 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using i64 = long long int;int main() {i64 h, a;cin >> h >> a;int phase = 0;while (h >= 1) {h /= a;phase++;}cout << ((1LL << phase) - 1) << "\n";return 0;}