結果
| 問題 | No.820 Power of Two |
| コンテスト | |
| ユーザー |
GodNegoto
|
| 提出日時 | 2019-11-08 14:03:12 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 3,131 ms |
| コンパイル使用メモリ | 82,124 KB |
| 実行使用メモリ | 41,692 KB |
| 最終ジャッジ日時 | 2026-04-04 16:06:30 |
| 合計ジャッジ時間 | 4,083 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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