結果
| 問題 | No.820 Power of Two |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-03 15:07:01 |
| 言語 | Java (openjdk 27 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 39 ms / 2,000 ms |
| + 143µs | |
| コード長 | 857 bytes |
| 記録 | |
| コンパイル時間 | 2,885 ms |
| コンパイル使用メモリ | 85,300 KB |
| 実行使用メモリ | 43,488 KB |
| 最終ジャッジ日時 | 2026-10-13 04:00:25 |
| 合計ジャッジ時間 | 5,049 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
package test.demo;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class YukicoderN820 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
try {
String str=bf.readLine();
String[] str2=str.split(" ");
if(str2.length==2) {
int a=Integer.parseInt(str2[0]);
int b=Integer.parseInt(str2[1]);
System.out.println(new YukicoderN820().test(a,b));
}else {
throw new IOException();
}
return;
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
}
public int test(int a,int b) {
if(a<b) {
return 0;
}else {
return (int) Math.pow(2, a-b);
}
}
}