結果

問題 No.795 Restrictions!!!!!!!!!!!!!!
ユーザー tentententen
提出日時 2020-12-09 18:14:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 212 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 3,455 ms
コンパイル使用メモリ 75,196 KB
実行使用メモリ 58,052 KB
最終ジャッジ日時 2023-10-19 05:03:49
合計ジャッジ時間 8,646 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 200 ms
57,968 KB
testcase_01 AC 198 ms
57,800 KB
testcase_02 AC 203 ms
57,700 KB
testcase_03 AC 193 ms
57,660 KB
testcase_04 AC 200 ms
57,628 KB
testcase_05 AC 196 ms
57,708 KB
testcase_06 AC 201 ms
57,632 KB
testcase_07 AC 210 ms
55,776 KB
testcase_08 AC 194 ms
58,052 KB
testcase_09 AC 200 ms
57,936 KB
testcase_10 AC 197 ms
57,940 KB
testcase_11 AC 195 ms
57,660 KB
testcase_12 AC 208 ms
57,832 KB
testcase_13 AC 212 ms
57,660 KB
testcase_14 AC 196 ms
57,888 KB
testcase_15 AC 195 ms
57,768 KB
testcase_16 AC 200 ms
57,924 KB
testcase_17 AC 196 ms
57,568 KB
testcase_18 AC 198 ms
57,792 KB
testcase_19 AC 193 ms
57,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] n = sc.next().toCharArray();
        char[] m = sc.next().toCharArray();
        boolean isNEv = ((n[n.length - 1] - '0') % 2 == 0);
        boolean isMEv = ((m[m.length - 1] - '0') % 2 == 0);
        int mLength = m.length;
        if ((isNEv && isMEv) || (!isNEv && isMEv && mLength > 1)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
0