結果

問題 No.683 Two Operations No.3
ユーザー raven7959
提出日時 2021-10-10 10:39:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 405 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 82,724 KB
実行使用メモリ 53,296 KB
最終ジャッジ日時 2024-09-14 04:55:44
合計ジャッジ時間 1,680 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b=map(int,input().split())
def check(a,b):
    if a*b==0:
        return True
    if a%2==1 and b%2==1:
        return False
    elif a%2+b%2==1:
        return True
    else:
        if a%4!=0 and b%4!=0:
            return False
        else:
            if a%4==0:
                check(a//2,b-1)
            else:
                check(a-1,b//2)
if check(a,b):
    print("Yes")
else:
    print("No")
0