結果
| 問題 |
No.820 Power of Two
|
| コンテスト | |
| ユーザー |
GodNegoto
|
| 提出日時 | 2019-11-08 14:03:12 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 130 ms / 2,000 ms |
| コード長 | 355 bytes |
| コンパイル時間 | 3,418 ms |
| コンパイル使用メモリ | 74,468 KB |
| 実行使用メモリ | 41,588 KB |
| 最終ジャッジ日時 | 2024-09-15 00:50:45 |
| 合計ジャッジ時間 | 5,359 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
package algo;
import java.util.Scanner;
public class sample7 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
if(Math.pow(2, N) >= (Math.pow(2, K))) {
System.out.println((int)((Math.pow(2, N)) / (Math.pow(2, K))));
}
else {
System.out.println(0);
}
}
}
GodNegoto