結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー nmnmnmnmnmnmnm
提出日時 2014-10-21 23:59:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 744 ms
コンパイル使用メモリ 53,980 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-30 12:57:37
合計ジャッジ時間 1,864 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
 
using namespace std;
 
int main(){
  int n;
  cin>>n;
  if(n==1){
    cout << 0 << endl;
  }
  int ans = 1;
  for(int i = 2;;i*=2){
    cout << i << endl;
    if(n<=i){
      cout << ans << endl;
      return 0;
    }
    ans++;
  }
  return 0;
}
0