結果

問題 No.683 Two Operations No.3
ユーザー titia
提出日時 2024-09-24 07:06:58
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-24 07:07:09
合計ジャッジ時間 1,349 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B=map(int,input().split())

def calc(x,y):
    if x*y==0:
        return True

    if x%2==0:
        if calc(x//2,y-1)==True:
            return True

    if y%2==0:
        if calc(x-1,y//2)==True:
            return True

    return False

if calc(A,B)==True:
    print("Yes")
else:
    print("No")
0