結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
![]() |
提出日時 | 2018-05-09 14:51:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 240 bytes |
コンパイル時間 | 480 ms |
コンパイル使用メモリ | 63,932 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-28 02:43:28 |
合計ジャッジ時間 | 1,319 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 1 WA * 20 |
ソースコード
#include <iostream> int main(void) { unsigned int num = 0; std::cin >> num; int cnt = 0; while(true) { num /= 2; if(num % 2 != 0) { num--; } cnt++; if(num <= 1) { break; } } std::cout << cnt << std::endl; return 0; }