結果

問題 No.2323 Nafmo、A+Bをする
ユーザー qib
提出日時 2023-05-29 23:00:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-12-28 10:41:32
合計ジャッジ時間 1,821 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

a = list(map(int, list(input())))
b = list(map(int, list(input())))

a.reverse()
b.reverse()

m = max(len(a), len(b))
while len(a) < m:
  a.append(0)

while len(b) < m:
  b.append(0)

a.reverse()
b.reverse()

ans = 0
for i in range(m):
  ans |= ((a[i] ^ b[i]) << (m - 1 - i))

print(ans)
0