結果
| 問題 | No.2416 vs Slime |
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2024-11-15 17:08:19 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 284 bytes |
| 記録 | |
| コンパイル時間 | 1,001 ms |
| コンパイル使用メモリ | 210,488 KB |
| 実行使用メモリ | 9,184 KB |
| 最終ジャッジ日時 | 2026-07-06 03:58:37 |
| 合計ジャッジ時間 | 2,864 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 37 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void fast_io() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
int main() {
fast_io();
long long h, a;
cin >> h >> a;
long long ans = 0, cnt = 1;
while (h) {
ans += cnt;
h /= a;
cnt *= 2;
}
cout << ans << "\n";
}
eve__fuyuki