結果

問題 No.2533 A⇒B問題
ユーザー steinnsteinn
提出日時 2023-11-10 21:28:51
言語 Julia
(1.10.2)
結果
AC  
実行時間 378 ms / 2,000 ms
コード長 438 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 263,836 KB
最終ジャッジ日時 2024-04-09 14:32:43
合計ジャッジ時間 10,330 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 378 ms
263,192 KB
testcase_01 AC 376 ms
260,720 KB
testcase_02 AC 372 ms
259,512 KB
testcase_03 AC 374 ms
258,604 KB
testcase_04 AC 373 ms
261,292 KB
testcase_05 AC 374 ms
263,836 KB
testcase_06 AC 374 ms
259,408 KB
testcase_07 AC 373 ms
262,468 KB
testcase_08 AC 372 ms
260,208 KB
testcase_09 AC 372 ms
261,068 KB
testcase_10 AC 370 ms
263,332 KB
testcase_11 AC 370 ms
259,772 KB
testcase_12 AC 374 ms
261,252 KB
testcase_13 AC 370 ms
258,788 KB
testcase_14 AC 373 ms
263,236 KB
testcase_15 AC 369 ms
260,940 KB
testcase_16 AC 370 ms
258,820 KB
testcase_17 AC 373 ms
261,320 KB
testcase_18 AC 372 ms
260,544 KB
testcase_19 AC 374 ms
260,628 KB
testcase_20 AC 373 ms
262,332 KB
testcase_21 AC 372 ms
260,044 KB
testcase_22 AC 375 ms
261,124 KB
testcase_23 AC 374 ms
260,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

parseInts() = parse.(Int64, readline()::String |> split)::Vector{Int64}
parseInt() = parse(Int64, readline()::String)::Int64

function main()
    a, b = parseInts()
    size = 0
    now = 1
    while a ≥ now || b ≥ now
        now *= 2
        size += 1
    end
    pa = digits(a, base=2, pad=size)
    pb = digits(b, base=2, pad=size)
    (count(i -> (pa[i] != 1 || pb[i] == 1), 1:size) == size ? "Yes" : "No") |> println
end

main()
0