結果

問題 No.2323 Nafmo、A+Bをする
ユーザー shin3110shin3110
提出日時 2023-05-28 15:40:34
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 414 bytes
コンパイル時間 1,807 ms
コンパイル使用メモリ 86,348 KB
実行使用メモリ 78,884 KB
最終ジャッジ日時 2023-08-27 12:41:01
合計ジャッジ時間 3,058 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,160 KB
testcase_01 AC 72 ms
70,936 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 72 ms
71,024 KB
testcase_05 AC 71 ms
70,872 KB
testcase_06 AC 72 ms
71,216 KB
testcase_07 AC 73 ms
71,396 KB
testcase_08 AC 72 ms
71,272 KB
testcase_09 AC 72 ms
71,008 KB
testcase_10 AC 73 ms
71,436 KB
testcase_11 AC 74 ms
71,264 KB
testcase_12 AC 72 ms
71,144 KB
testcase_13 AC 72 ms
70,868 KB
testcase_14 AC 71 ms
71,024 KB
testcase_15 RE -
testcase_16 AC 73 ms
71,100 KB
testcase_17 AC 73 ms
71,172 KB
testcase_18 AC 73 ms
71,068 KB
testcase_19 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
t = input()

if s > t:
    s, t = t, s

while len(s) < len(t):
    s = '0' + s

ans = ''
for i in range(len(s)):
    if s[i] == '1':
        if t[i] == '0':
            ans += '1'
        else:
            ans += '0'
    else:
        if t[i] == '0':
            ans += '0'
        else:
            ans += '1'

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

print(z)
0