結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
|
提出日時 | 2018-12-06 18:35:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 260 bytes |
コンパイル時間 | 650 ms |
コンパイル使用メモリ | 69,232 KB |
最終ジャッジ日時 | 2025-01-06 18:28:51 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<string> #include<iostream> #include<algorithm> using namespace std; int main() { int n,cnt,num; cin>>n; cnt = 0; num = 1; while(1) { if( n <= num){ cout<<cnt<<endl; break; } num=num<<1; cnt++; //cout<<num<<endl; } return 0; }