結果
| 問題 | No.2416 vs Slime |
| コンテスト | |
| ユーザー |
LaFolia13
|
| 提出日時 | 2023-07-29 16:16:09 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 473µs | |
| コード長 | 459 bytes |
| 記録 | |
| コンパイル時間 | 930 ms |
| コンパイル使用メモリ | 179,292 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-11 19:30:58 |
| 合計ジャッジ時間 | 3,007 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 37 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using llong = long long;
using ldbl = long double;
using lpair = pair<llong, llong>;
#define ALL(x) x.begin(), x.end()
constexpr llong mod = 1e9+7;
constexpr llong inf = mod * mod;
int main() {
llong H, A;
cin >> H >> A;
llong ans = 0;
llong cnt = 1;
while (H) {
cerr << H << " " << ans << " " << cnt << endl;
H /= A;
ans += cnt;
cnt *= 2;
}
cout << ans << endl;
return 0;
}
LaFolia13