結果

問題 No.3149 find X which satisfies with equlation
コンテスト
ユーザー urunea
提出日時 2025-05-22 04:07:43
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 466 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 248 ms
コンパイル使用メモリ 95,720 KB
実行使用メモリ 78,848 KB
最終ジャッジ日時 2026-07-10 22:33:51
合計ジャッジ時間 5,098 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A,B=(int(x) for x in input().split())
a=list(bin(A))[2:][::-1]
b=list(bin(B))[2:][::-1]

for i in range(10):
    a.append(0)
    b.append(0)

res=[]
for i,j in zip(a,b):
    i = int(i)
    j = int(j)
    if i == 1 and j == 0:
        res.append(1)
    elif i == 1 and j == 1:
        res.append(0)
    elif i == 0 and j == 1:
        res.append(1)
    else:
        res.append(0)

ans=0
for i in range(len(res)):
    if res[i] == 1:
        ans += 2**(i)

print(ans)
0