結果

問題 No.1957 Xor Min
ユーザー moon17moon17
提出日時 2022-05-27 22:15:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 369 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 11,928 KB
実行使用メモリ 10,268 KB
最終ジャッジ日時 2023-10-20 20:22:31
合計ジャッジ時間 2,052 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,168 KB
testcase_01 AC 29 ms
10,168 KB
testcase_02 AC 30 ms
10,168 KB
testcase_03 AC 30 ms
10,168 KB
testcase_04 AC 30 ms
10,168 KB
testcase_05 AC 30 ms
10,168 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 29 ms
10,168 KB
testcase_09 AC 29 ms
10,168 KB
testcase_10 AC 29 ms
10,168 KB
testcase_11 AC 30 ms
10,168 KB
testcase_12 AC 30 ms
10,168 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 30 ms
10,168 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 30 ms
10,168 KB
testcase_20 AC 30 ms
10,168 KB
testcase_21 AC 30 ms
10,168 KB
testcase_22 AC 29 ms
10,168 KB
testcase_23 AC 29 ms
10,168 KB
testcase_24 WA -
testcase_25 AC 30 ms
10,168 KB
testcase_26 WA -
testcase_27 AC 29 ms
10,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans=0
amin=max(2**int(math.log2(A))-10,0)
bmin=max(2**int(math.log2(B))-10,0)
amax=min(amin+20,A+1)
bmax=min(bmin+20,B+1)
#print(amin, amax, bmin, bmax)
for a in range(amin, amax, 1):
    for b in range(bmin, bmax, 1):
        ans1=min(a, b, a^b)
#        print(a,b,a^b)
        if ans<ans1:
            ans=ans1
print(ans)
0