B - Base 2 Editorial by evima

別解

言語の標準ライブラリに二進表記の整数を十進表記に直す機能が備わっている場合、 入力を逆順に連結すればそれを使えます。

実装例 (Python)

A = input().split()
print(int(''.join(reversed(A)), 2))

posted:
last update: