結果

問題 No.1010 折って重ねて
ユーザー Mishan5055Mishan5055
提出日時 2020-03-27 16:46:36
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 657 bytes
コンパイル時間 1,976 ms
コンパイル使用メモリ 71,756 KB
実行使用メモリ 56,612 KB
最終ジャッジ日時 2023-08-30 16:29:42
合計ジャッジ時間 9,083 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
55,936 KB
testcase_01 AC 116 ms
53,924 KB
testcase_02 AC 117 ms
56,080 KB
testcase_03 WA -
testcase_04 AC 117 ms
56,368 KB
testcase_05 AC 115 ms
55,856 KB
testcase_06 AC 113 ms
55,656 KB
testcase_07 AC 112 ms
55,892 KB
testcase_08 AC 118 ms
55,664 KB
testcase_09 AC 112 ms
55,920 KB
testcase_10 AC 115 ms
56,004 KB
testcase_11 AC 121 ms
55,804 KB
testcase_12 AC 113 ms
56,168 KB
testcase_13 AC 112 ms
55,708 KB
testcase_14 AC 115 ms
56,024 KB
testcase_15 AC 112 ms
56,020 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 112 ms
55,980 KB
testcase_20 WA -
testcase_21 AC 115 ms
56,612 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 115 ms
55,672 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 121 ms
56,040 KB
testcase_31 AC 123 ms
55,888 KB
testcase_32 AC 122 ms
55,880 KB
testcase_33 AC 124 ms
55,640 KB
testcase_34 AC 122 ms
55,876 KB
testcase_35 AC 119 ms
55,740 KB
testcase_36 AC 117 ms
55,656 KB
testcase_37 AC 119 ms
56,088 KB
testcase_38 WA -
testcase_39 AC 120 ms
55,732 KB
testcase_40 WA -
testcase_41 AC 115 ms
56,084 KB
testcase_42 AC 115 ms
55,504 KB
testcase_43 AC 119 ms
55,340 KB
testcase_44 WA -
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc=new Scanner(System.in);
        long X=sc.nextLong();
        long Y=sc.nextLong();
        int H=sc.nextInt();
        
        X*=1000;
        Y*=1000;
        
        if(X<Y){// X,Y must be X>Y
            long tmp=X;
            X=Y;
            Y=tmp;
        }
        
        int ans=0;
        
        while(Y>H){
            ans++;
            Y/=2;
            H*=2;
        }
        
        while(X>H){
            ans++;
            X/=2;
            H*=2;
        }
        
        System.out.println(ans);
    }
}
0