結果

問題 No.2323 Nafmo、A+Bをする
ユーザー redoCtAredoCtA
提出日時 2023-05-28 13:36:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 377 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 8,592 KB
最終ジャッジ日時 2023-08-27 08:06:26
合計ジャッジ時間 1,453 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,488 KB
testcase_01 AC 18 ms
8,572 KB
testcase_02 AC 18 ms
8,552 KB
testcase_03 AC 18 ms
8,480 KB
testcase_04 AC 18 ms
8,476 KB
testcase_05 AC 18 ms
8,536 KB
testcase_06 AC 18 ms
8,584 KB
testcase_07 AC 18 ms
8,484 KB
testcase_08 AC 18 ms
8,484 KB
testcase_09 AC 18 ms
8,472 KB
testcase_10 AC 19 ms
8,536 KB
testcase_11 AC 18 ms
8,488 KB
testcase_12 AC 19 ms
8,448 KB
testcase_13 AC 17 ms
8,472 KB
testcase_14 AC 18 ms
8,412 KB
testcase_15 AC 18 ms
8,488 KB
testcase_16 AC 18 ms
8,472 KB
testcase_17 AC 18 ms
8,592 KB
testcase_18 AC 18 ms
8,544 KB
testcase_19 AC 18 ms
8,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def input():
    return sys.stdin.readline().rstrip()
from collections import deque
def main():
    a = int(input())
    p = 0
    A = 0
    while a:
        A += a%10*2**p
        a //= 10
        p += 1
    b = int(input())
    p = 0
    B = 0
    while b:
        B += b%10*2**p
        b //= 10
        p += 1
    print(A^B)
if __name__ == "__main__":
    main()
0