結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,812 KB
testcase_01 AC 122 ms
55,756 KB
testcase_02 AC 122 ms
55,804 KB
testcase_03 AC 123 ms
56,008 KB
testcase_04 AC 124 ms
55,944 KB
testcase_05 AC 122 ms
55,868 KB
testcase_06 AC 124 ms
55,800 KB
testcase_07 AC 124 ms
55,936 KB
testcase_08 AC 125 ms
56,084 KB
testcase_09 AC 124 ms
55,700 KB
権限があれば一括ダウンロードができます

ソースコード

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 = n/m;
            if(n<m){
                System.out.println(0);
            }else{
                System.out.println(t);
            }
    }
}
0