結果

問題 No.1010 折って重ねて
ユーザー courange_coucourange_cou
提出日時 2020-03-20 21:25:50
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 415 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 28,672 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-15 03:40:49
合計ジャッジ時間 1,403 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   int x,y,h;scanf("%d%d%d",&x,&y,&h);
   int ans=0;
   while(1){
      if(x<h){
         x/=2;
         h*=2;
         ans++;
      }else if(y<h){
         y/=2;
         h*=2;
         ans++;
      }else break;
   }
   printf("%d",ans);
}
0