結果

問題 No.2323 Nafmo、A+Bをする
ユーザー toshiconnertoshiconner
提出日時 2023-05-28 13:37:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,236 KB
実行使用メモリ 71,620 KB
最終ジャッジ日時 2023-08-27 08:08:48
合計ジャッジ時間 2,614 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,620 KB
testcase_01 AC 69 ms
71,576 KB
testcase_02 AC 69 ms
71,064 KB
testcase_03 AC 70 ms
71,056 KB
testcase_04 AC 75 ms
71,616 KB
testcase_05 AC 70 ms
71,164 KB
testcase_06 AC 70 ms
71,252 KB
testcase_07 AC 68 ms
71,592 KB
testcase_08 AC 70 ms
71,592 KB
testcase_09 AC 71 ms
71,380 KB
testcase_10 AC 71 ms
71,220 KB
testcase_11 AC 68 ms
71,424 KB
testcase_12 AC 69 ms
71,404 KB
testcase_13 AC 69 ms
71,548 KB
testcase_14 AC 68 ms
71,488 KB
testcase_15 AC 70 ms
71,444 KB
testcase_16 AC 70 ms
71,160 KB
testcase_17 AC 70 ms
71,520 KB
testcase_18 AC 70 ms
71,404 KB
testcase_19 AC 69 ms
71,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A = input()
B = input()

N = max(len(A), len(B))
strA = str(A).zfill(N)
strB = str(B).zfill(N)

ans = ""
for i in range(N):
    if strA[i] == strB[i]:
        ans += "0"
    else:
        ans += "1"

ansin = int(ans, 2)
print(ansin)
0