結果

問題 No.820 Power of Two
ユーザー d07ki3bq1uzd07ki3bq1uz
提出日時 2019-12-08 22:56:14
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 2,063 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 58,044 KB
最終ジャッジ日時 2023-08-30 21:12:16
合計ジャッジ時間 4,228 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 119 ms
56,292 KB
testcase_04 AC 121 ms
56,080 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main{
    public static void main (String[] args) {
        
        Scanner s = new Scanner(System.in);
        int a =s.nextInt();
        int b =s.nextInt();
            int n = (int)Math.pow(2,a);
            int m = (int)Math.pow(2,b);
            int t = m/n;
            if(n>m){
                System.out.println(0);
            }else{
                System.out.println(t);
            }
    }
}
0