結果
問題 |
No.683 Two Operations No.3
|
ユーザー |
|
提出日時 | 2019-09-01 20:10:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 406 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 310,144 KB |
最終ジャッジ日時 | 2024-11-29 05:18:05 |
合計ジャッジ時間 | 11,186 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 RE * 6 |
ソースコード
import sys sys.setrecursionlimit(10 ** 6) def dfs(A, B): if A == 0 and B == 0: return True res = False if A % 2 == 0 and B > 0: res |= dfs(A//2, B-1) if B % 2 == 0 and A > 0: res |= dfs(A-1, B//2) return res def main(): A, B = map(int, input().split()) if dfs(A, B): print('Yes') else: print('No') main()