結果
問題 |
No.2323 Nafmo、A+Bをする
|
ユーザー |
![]() |
提出日時 | 2025-03-20 18:45:15 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 184 ms |
コンパイル使用メモリ | 82,732 KB |
実行使用メモリ | 54,072 KB |
最終ジャッジ日時 | 2025-03-20 18:45:23 |
合計ジャッジ時間 | 1,823 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
A = input().strip() B = input().strip() max_len = max(len(A), len(B)) A_padded = A.zfill(max_len) B_padded = B.zfill(max_len) result = [] for a, b in zip(A_padded, B_padded): sum_bit = (int(a) + int(b)) % 2 result.append(str(sum_bit)) binary_result = ''.join(result) decimal_result = int(binary_result, 2) print(decimal_result)