結果

問題 No.683 Two Operations No.3
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-11 22:42:52
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 2,208 ms
コンパイル使用メモリ 71,288 KB
実行使用メモリ 56,472 KB
最終ジャッジ日時 2023-09-10 17:39:35
合計ジャッジ時間 5,095 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 122 ms
55,656 KB
testcase_02 AC 122 ms
55,700 KB
testcase_03 AC 122 ms
55,692 KB
testcase_04 AC 122 ms
55,696 KB
testcase_05 AC 123 ms
56,272 KB
testcase_06 AC 121 ms
56,432 KB
testcase_07 WA -
testcase_08 AC 119 ms
55,668 KB
testcase_09 AC 121 ms
55,728 KB
testcase_10 AC 120 ms
55,692 KB
testcase_11 WA -
testcase_12 AC 123 ms
55,748 KB
testcase_13 AC 119 ms
55,736 KB
testcase_14 WA -
testcase_15 AC 120 ms
56,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Long a = in.nextLong();
        Long b = in.nextLong();

        String ans = "Yes";

        if(a == b && a != 0 && b != 0) ans = "No";

        if(a % 2 != 0 && b % 2 != 0)
            if((a-b) % 2 == 0 || (b-a) % 2 == 0)
                ans = "No";

        System.out.println(ans);
    }
}
0