結果

問題 No.47 ポケットを叩くとビスケットが2倍
ユーザー takatowin
提出日時 2017-01-07 00:09:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 218 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 30,336 KB
実行使用メモリ 15,048 KB
最終ジャッジ日時 2024-12-17 15:14:08
合計ジャッジ時間 145,263 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 3
other WA * 1 TLE * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |   scanf("%d",&a);
      |   ~~~~~^~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int main(void){
  int a,b,i=0;
  scanf("%d",&a);
  if(a%2!=0)
    i++;
  while(a>1){
    if(a/2==0)
      i++;
  }
  printf("%d",i);
return 0;
}
0