結果

問題 No.2533 A⇒B問題
ユーザー kusagame12kusagame12
提出日時 2024-03-04 18:33:06
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 548 bytes
コンパイル時間 2,411 ms
コンパイル使用メモリ 74,072 KB
実行使用メモリ 58,080 KB
最終ジャッジ日時 2024-03-04 18:33:14
合計ジャッジ時間 6,326 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
57,568 KB
testcase_01 AC 123 ms
57,840 KB
testcase_02 AC 123 ms
57,700 KB
testcase_03 AC 114 ms
56,680 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 118 ms
57,576 KB
testcase_07 AC 123 ms
57,820 KB
testcase_08 AC 123 ms
57,700 KB
testcase_09 AC 121 ms
57,952 KB
testcase_10 AC 150 ms
57,532 KB
testcase_11 AC 121 ms
57,548 KB
testcase_12 AC 122 ms
57,824 KB
testcase_13 AC 123 ms
57,832 KB
testcase_14 AC 111 ms
56,692 KB
testcase_15 AC 123 ms
57,688 KB
testcase_16 WA -
testcase_17 AC 123 ms
57,648 KB
testcase_18 AC 124 ms
57,544 KB
testcase_19 AC 148 ms
57,784 KB
testcase_20 WA -
testcase_21 AC 123 ms
57,816 KB
testcase_22 AC 129 ms
57,832 KB
testcase_23 AC 112 ms
56,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
       
        Scanner sc = new Scanner(System.in);
        
        long a = sc.nextLong();
        long b = sc.nextLong();
       
        while(a > 0 || b > 0){
            
            a = a / 2;
            b = b / 2;
            
            if(a % 2 == 1 && b % 2 != 1){
                System.out.println("No");
                return;
            }
            
        }
       
        System.out.println("Yes");
        
    }
   
}
0