結果
問題 | No.2323 Nafmo、A+Bをする |
ユーザー |
![]() |
提出日時 | 2024-12-06 12:51:24 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 392 bytes |
コンパイル時間 | 2,466 ms |
コンパイル使用メモリ | 200,064 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-06 12:51:28 |
合計ジャッジ時間 | 3,731 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
#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;}