結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
![]() |
提出日時 | 2018-02-23 12:23:18 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 353 bytes |
コンパイル時間 | 668 ms |
コンパイル使用メモリ | 63,956 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-07 16:00:26 |
合計ジャッジ時間 | 1,680 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 WA * 1 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <math.h> #define LL long long int using namespace std; int main(void) { int n; cin >> n; int i = 0; int ans = 0; if (n == 1) { ans = 1; cout << ans << endl; return 0; } while (n > ans) { i++; ans = pow(2, i); } cout << i << endl; return 0; }