結果

問題 No.683 Two Operations No.3
ユーザー H3PO4
提出日時 2020-11-24 11:42:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
MLE  
実行時間 -
コード長 354 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 817,920 KB
最終ジャッジ日時 2024-07-23 18:26:37
合計ジャッジ時間 3,036 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 MLE * 1 -- * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10 ** 9)


def rec(a, b):
    if a == b == 0:
        return True
    elif a % 2 and b % 2:
        return False

    res = False
    if not a % 2:
        res |= rec(a // 2, b - 1)
    if not b % 2:
        res |= rec(a - 1, b // 2)
    return res


A, B = map(int, input().split())
print('Yes' if rec(A, B) else 'No')
0