結果

問題 No.2323 Nafmo、A+Bをする
ユーザー eve__fuyuki
提出日時 2024-12-06 12:51:24
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 1,926 ms
コンパイル使用メモリ 192,416 KB
最終ジャッジ日時 2025-02-26 11:11:54
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

void fast_io() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
}

int main() {
	fast_io();
	string a, b;
	cin >> a >> b;
	int a_num = 0, b_num = 0;
	for (int i = 0; i < a.size(); i++) {
		a_num = 2 * a_num + (a[i] - '0');
	}
	for (int i = 0; i < b.size(); i++) {
		b_num = 2 * b_num + (b[i] - '0');
	}
	cout << (a_num ^ b_num) << endl;
}
0