結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー lunnear
提出日時 2018-11-20 04:00:34
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 57,720 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 15:21:12
合計ジャッジ時間 1,372 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:18: warning: ‘out’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   15 |     std::cout << out << std::endl;
      |                  ^~~

ソースコード

diff #

#include <iostream>
#include <math.h>

int main()
{
    int in, out;
    std::cin >> in;
    
    while(in)
    {
        in /= 2;
        out++;
    }
    
    std::cout << out << std::endl;
    
    return 0;
}
0