結果
問題 |
No.2416 vs Slime
|
ユーザー |
![]() |
提出日時 | 2025-05-08 16:17:41 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 3,363 ms |
コンパイル使用メモリ | 272,600 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-05-08 16:17:47 |
合計ジャッジ時間 | 5,926 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 28 RE * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int H, A; cin >> H >> A; int count = 0; while (H) { H /= A; count++; } long long ans = 1; for (int i = 1; i <= count + 1; i++) { ans *= 2; } ans -= 2; cout << ans; }