結果

問題 No.683 Two Operations No.3
ユーザー c-yanc-yan
提出日時 2021-02-20 00:35:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 415 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 11,940 KB
実行使用メモリ 296,732 KB
最終ジャッジ日時 2023-10-17 03:50:27
合計ジャッジ時間 3,968 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,060 KB
testcase_01 AC 31 ms
10,052 KB
testcase_02 AC 29 ms
10,052 KB
testcase_03 AC 29 ms
10,052 KB
testcase_04 AC 30 ms
10,056 KB
testcase_05 AC 29 ms
10,056 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import setrecursionlimit

setrecursionlimit(10 ** 6)

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


def f(X, Y):
    if X == 0 and Y == 0:
        return True
    if X < 0 or Y < 0:
        return False
    if X % 2 == 0:
        if f(X // 2, Y - 1):
            return True
    if Y % 2 == 0:
        if f(X - 1, Y // 2):
            return True
    return False


if f(A, B):
    print('Yes')
else:
    print('No')
0