結果

問題 No.820 Power of Two
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2019-04-26 21:43:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 1,847 ms
コンパイル使用メモリ 70,896 KB
実行使用メモリ 56,372 KB
最終ジャッジ日時 2023-08-16 13:43:30
合計ジャッジ時間 3,947 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,924 KB
testcase_01 AC 120 ms
56,128 KB
testcase_02 AC 119 ms
55,660 KB
testcase_03 AC 120 ms
55,984 KB
testcase_04 AC 120 ms
55,684 KB
testcase_05 AC 121 ms
55,668 KB
testcase_06 AC 120 ms
56,372 KB
testcase_07 AC 119 ms
53,904 KB
testcase_08 AC 119 ms
56,152 KB
testcase_09 AC 119 ms
56,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int ans = (int) ( Math.pow(2,n) / Math.pow(2,k) );
        System.out.println(ans);
    }
}
0