結果
| 問題 |
No.1957 Xor Min
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-27 21:28:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 2,000 ms |
| コード長 | 280 bytes |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-09-20 15:28:14 |
| 合計ジャッジ時間 | 1,904 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
a,b=map(int,input().split())
if a>b:
tmp=a
a=b
b=tmp
def two_digit(x):
result=0
while(x>0):
x//=2
result+=1
return result
a_digit=two_digit(a)
b_digit=two_digit(b)
if a_digit==b_digit:
ans=2**(a_digit-1)-1
else:
ans=a
print(ans)