結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
![]() |
提出日時 | 2018-08-30 22:11:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 390 bytes |
コンパイル時間 | 608 ms |
コンパイル使用メモリ | 54,328 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 20:35:57 |
合計ジャッジ時間 | 1,573 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include<iostream> #include<cstdint> int MinHitNum(int corrent,int goal); int main(){ std::int32_t goal,count,bisquitnum; std::cin >> goal; count=0; bisquitnum=1; if(goal==1){ count=0; } else{ while(bisquitnum<(goal+1)/2){ bisquitnum*=2; count++; } count+=1; } std::cout << count << std::endl; }