結果

問題 No.683 Two Operations No.3
ユーザー raven7959raven7959
提出日時 2021-10-10 10:41:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 331 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 76,096 KB
最終ジャッジ日時 2023-10-12 05:31:13
合計ジャッジ時間 2,817 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
71,264 KB
testcase_01 AC 81 ms
71,464 KB
testcase_02 AC 82 ms
71,172 KB
testcase_03 AC 80 ms
71,196 KB
testcase_04 AC 101 ms
76,096 KB
testcase_05 AC 88 ms
75,896 KB
testcase_06 AC 80 ms
71,284 KB
testcase_07 AC 80 ms
71,248 KB
testcase_08 AC 80 ms
71,256 KB
testcase_09 AC 78 ms
71,276 KB
testcase_10 AC 79 ms
71,300 KB
testcase_11 AC 80 ms
71,496 KB
testcase_12 AC 80 ms
71,148 KB
testcase_13 AC 81 ms
71,056 KB
testcase_14 AC 81 ms
71,052 KB
testcase_15 AC 83 ms
71,468 KB
権限があれば一括ダウンロードができます

ソースコード

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
    else:
        ret=False
        if a%2==0:
            ret|=check(a//2,b-1)
        if b%2==0:
            ret|=check(a-1,b//2)
        return ret
if check(a,b):
    print("Yes")
else:
    print("No")
0