結果

問題 No.683 Two Operations No.3
ユーザー akitsugu777akitsugu777
提出日時 2019-09-04 15:19:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 393 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,796 KB
実行使用メモリ 7,860 KB
最終ジャッジ日時 2023-08-27 07:16:54
合計ジャッジ時間 4,133 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,788 KB
testcase_01 AC 16 ms
7,736 KB
testcase_02 AC 17 ms
7,860 KB
testcase_03 AC 18 ms
7,824 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y = map(int, input().split())

ans = 0
l = [[x, y]]
for i, j in l:
    if i == 0 and j == 0:
        ans += 1
    elif i % 2 == j % 2 == 1:
        ans += 0
    elif i % 2 == 0 and j % 2 != 0:
        l.append([i//2, j-1])
    elif i % 2 != 0 and j % 2 == 0:
        l.append([i-1, j//2])
    else:
        l.append([i//2, j-1])
        l.append([i-1, j//2])

print(['No', 'Yes'][ans != 0])
0