結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
![]() |
提出日時 | 2018-02-23 12:21:57 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 351 bytes |
コンパイル時間 | 521 ms |
コンパイル使用メモリ | 64,348 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-07 15:52:34 |
合計ジャッジ時間 | 1,397 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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++; cout << ans << endl; return 0; } while (n > ans) { i++; ans = pow(2, i); } cout << i << endl; return 0; }