結果

問題 No.1556 Power Equality
ユーザー AsahiAsahi
提出日時 2023-02-04 18:15:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 930 bytes
コンパイル時間 2,086 ms
コンパイル使用メモリ 73,244 KB
実行使用メモリ 56,092 KB
最終ジャッジ日時 2023-09-16 14:46:18
合計ジャッジ時間 4,196 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,816 KB
testcase_01 AC 122 ms
55,724 KB
testcase_02 AC 123 ms
55,756 KB
testcase_03 AC 123 ms
55,584 KB
testcase_04 AC 124 ms
55,760 KB
testcase_05 AC 124 ms
55,780 KB
testcase_06 AC 125 ms
56,092 KB
testcase_07 AC 125 ms
55,704 KB
testcase_08 AC 125 ms
55,592 KB
testcase_09 AC 124 ms
55,824 KB
testcase_10 AC 123 ms
55,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;
import java.util.stream.Stream;

public class Main{
    /* 入出力 */
    static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st;
    static PrintWriter output = new PrintWriter(System.out);
    static Scanner sc = new Scanner(System.in);
    /* 定数 */
    static final int [] y4 = {0,1,0,-1};
    static final int [] x4 = {1,0,-1,0};
    static final int  INF1 = Integer.MAX_VALUE;
    static final long INF2 = Long.MAX_VALUE;
    static final long MOD1 = (long)1e9+7;
    static final long MOD2 = 998244353;
    /* Main */
    public static void main(String[] args) throws IOException{
        long a = sc.nextLong();
        long b = sc.nextLong();
        if(a == b || (a == 2 && b == 4) || (a == 4 && b == 2)) output.print("Yes");
        else output.print("No");
        output.flush();        
    }
}
0