結果

問題 No.795 Restrictions!!!!!!!!!!!!!!
ユーザー fog_878fog_878
提出日時 2019-03-15 22:44:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 196 ms / 2,000 ms
コード長 638 bytes
コンパイル時間 4,306 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 56,764 KB
最終ジャッジ日時 2023-09-14 13:56:03
合計ジャッジ時間 7,279 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 184 ms
55,748 KB
testcase_01 AC 185 ms
56,116 KB
testcase_02 AC 185 ms
56,276 KB
testcase_03 AC 181 ms
56,068 KB
testcase_04 AC 182 ms
56,488 KB
testcase_05 AC 185 ms
55,852 KB
testcase_06 AC 187 ms
56,132 KB
testcase_07 AC 183 ms
56,240 KB
testcase_08 AC 190 ms
56,264 KB
testcase_09 AC 184 ms
53,628 KB
testcase_10 AC 189 ms
56,164 KB
testcase_11 AC 182 ms
55,664 KB
testcase_12 AC 182 ms
55,728 KB
testcase_13 AC 196 ms
55,848 KB
testcase_14 AC 182 ms
56,440 KB
testcase_15 AC 187 ms
56,072 KB
testcase_16 AC 188 ms
53,540 KB
testcase_17 AC 191 ms
55,636 KB
testcase_18 AC 193 ms
56,764 KB
testcase_19 AC 184 ms
56,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
	}

	void solve() {
		Scanner sc = new Scanner(System.in);
		String n = sc.next();
		String m = sc.next();
		sc.close();
	 	int nlen = n.length();
		int mlen = m.length();

		int end_n = Integer.parseInt(n.substring(nlen-1, nlen));
		int end_m = Integer.parseInt(m.substring(mlen-1, mlen));
		if(end_n == 0)end_n+=2;
		if(end_m == 0)end_m+=2;


		boolean f = false;
		if(end_m%2==1)f=false;
		else if(end_n%2==0&&end_m%2==0)f=true;
		else if(mlen > 1)f = true;
		
		System.out.println(f?"Yes":"No");;
	}

}
0