結果

問題 No.683 Two Operations No.3
ユーザー kohei2019kohei2019
提出日時 2022-03-12 15:44:22
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 227 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 81,828 KB
実行使用メモリ 79,440 KB
最終ジャッジ日時 2023-10-16 23:14:39
合計ジャッジ時間 2,030 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,552 KB
testcase_01 AC 35 ms
53,552 KB
testcase_02 AC 35 ms
53,552 KB
testcase_03 AC 34 ms
53,552 KB
testcase_04 AC 36 ms
53,604 KB
testcase_05 AC 36 ms
53,604 KB
testcase_06 RE -
testcase_07 AC 35 ms
53,568 KB
testcase_08 RE -
testcase_09 AC 37 ms
53,684 KB
testcase_10 AC 36 ms
53,560 KB
testcase_11 AC 35 ms
53,560 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 35 ms
53,560 KB
testcase_15 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def dfs(s,t):
    if s == t == 0:
        print('Yes')
        exit()
    if s % 2 == 0 and t > 0:
        dfs(s//2,t-1)
    if t % 2 == 0 and s > 0:
        dfs(s-1,t//2)
dfs(A, B)
print('No') 
0