結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
|
提出日時 | 2023-06-23 13:23:01 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 766 ms |
コンパイル使用メモリ | 87,248 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 18:15:09 |
合計ジャッジ時間 | 1,719 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<iostream> #include<cmath> using namespace std; int main(){ int n, i = 0; cin >> n; int count = 0, j = 1; for(i = 0; i < 10000000; i++){ if(j * 2 < n){ j = pow(2, count); count++; } else if(j * 2 >= n)break; } cout << i << endl; }