結果
問題 | No.2416 vs Slime |
ユーザー |
![]() |
提出日時 | 2023-08-12 14:14:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 1,794 ms |
コンパイル使用メモリ | 165,840 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-19 18:05:01 |
合計ジャッジ時間 | 2,720 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 37 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = long long;int main() {ll h, a;cin >> h >> a;int count=0;while(h>0) {h=h/a;count++;}ll ans=0;for(ll i=0; i<count; i++) {ans+=pow(2, i);}cout << ans << endl;}