結果
問題 | No.683 Two Operations No.3 |
ユーザー | 👑 Kazun |
提出日時 | 2021-02-14 17:21:42 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 508 ms |
コンパイル使用メモリ | 87,352 KB |
実行使用メモリ | 95,856 KB |
最終ジャッジ日時 | 2023-09-29 08:33:19 |
合計ジャッジ時間 | 4,377 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 107 ms
72,648 KB |
testcase_01 | AC | 107 ms
72,416 KB |
testcase_02 | AC | 106 ms
72,252 KB |
testcase_03 | AC | 105 ms
72,636 KB |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | AC | 106 ms
72,468 KB |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | AC | 107 ms
72,268 KB |
testcase_11 | AC | 105 ms
72,352 KB |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | AC | 106 ms
72,436 KB |
testcase_15 | RE | - |
ソースコード
from functools import lru_cache @lru_cache(maxsize=10**6) def f(A,B): if A==B==0: return True if A&1==B&1==1: return False X=False if A&1==0: X|=f(A//2,B-1) if B&1==0: X|=f(A-1,B//2) return X A,B=map(int,input().split()) print("Yes" if f(A,B) else "No")