結果
問題 | No.683 Two Operations No.3 |
ユーザー | GrayCoder |
提出日時 | 2018-07-29 09:28:03 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 1,231 ms |
コンパイル使用メモリ | 10,868 KB |
実行使用メモリ | 8,008 KB |
最終ジャッジ日時 | 2023-09-22 16:57:31 |
合計ジャッジ時間 | 1,527 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
7,864 KB |
testcase_01 | WA | - |
testcase_02 | AC | 15 ms
7,820 KB |
testcase_03 | AC | 16 ms
7,908 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 15 ms
7,808 KB |
testcase_07 | AC | 15 ms
7,748 KB |
testcase_08 | AC | 15 ms
7,852 KB |
testcase_09 | WA | - |
testcase_10 | AC | 15 ms
7,748 KB |
testcase_11 | AC | 15 ms
7,820 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 14 ms
7,832 KB |
testcase_15 | WA | - |
ソースコード
def main(): A, B = map(int, input().split()) if func(A, B): print('Yes') else: print('No') def func(a, b): if not a or not b: return True elif a % 2 and b % 2: return False if not a % 2: a //= 2 b -= 1 ret = func(a, b) return ret if 'ret' in locals(): if not b % 2 and ret == False: a -= 1 b //= 2 return func(a, b) main()