結果

問題 No.2323 Nafmo、A+Bをする
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2023-05-28 14:54:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 252 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 71,392 KB
最終ジャッジ日時 2023-08-27 10:50:11
合計ジャッジ時間 2,717 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,080 KB
testcase_01 AC 65 ms
71,108 KB
testcase_02 AC 65 ms
70,904 KB
testcase_03 AC 63 ms
70,880 KB
testcase_04 AC 63 ms
71,200 KB
testcase_05 AC 67 ms
70,916 KB
testcase_06 AC 65 ms
71,388 KB
testcase_07 AC 65 ms
71,056 KB
testcase_08 AC 65 ms
71,320 KB
testcase_09 AC 65 ms
71,000 KB
testcase_10 AC 66 ms
71,284 KB
testcase_11 AC 66 ms
71,316 KB
testcase_12 AC 68 ms
71,132 KB
testcase_13 AC 67 ms
71,392 KB
testcase_14 AC 66 ms
71,280 KB
testcase_15 AC 67 ms
71,232 KB
testcase_16 AC 66 ms
71,128 KB
testcase_17 AC 66 ms
71,384 KB
testcase_18 AC 65 ms
71,376 KB
testcase_19 AC 66 ms
71,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = list(input())
B = list(input())

A.reverse()
B.reverse()

while len(A) < len(B):
    A.append(0)
while len(B) < len(A):
    B.append(0)

ans = 0

A.reverse()
B.reverse()

for i,j in zip(A,B):

    ans *= 2
    ans += int(i) ^ int(j)

print (ans)

0