結果

問題 No.683 Two Operations No.3
ユーザー raven7959raven7959
提出日時 2021-10-10 10:35:46
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 366 bytes
コンパイル時間 2,341 ms
コンパイル使用メモリ 86,432 KB
実行使用メモリ 82,488 KB
最終ジャッジ日時 2023-10-12 05:23:52
合計ジャッジ時間 3,072 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,384 KB
testcase_01 AC 70 ms
71,164 KB
testcase_02 AC 71 ms
71,400 KB
testcase_03 RE -
testcase_04 AC 72 ms
71,384 KB
testcase_05 WA -
testcase_06 RE -
testcase_07 AC 71 ms
71,400 KB
testcase_08 RE -
testcase_09 AC 71 ms
71,120 KB
testcase_10 AC 72 ms
71,316 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 76 ms
71,200 KB
testcase_14 AC 77 ms
71,196 KB
testcase_15 AC 76 ms
71,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b=map(int,input().split())
def check(a,b):
    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)
            else:
                check(a,b//2)
if check(a,b):
    print("Yes")
else:
    print("No")
0