結果

問題 No.8057 A xor B = C
ユーザー Strorkis
提出日時 2020-04-01 21:29:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 640 ms
コンパイル使用メモリ 65,280 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-27 08:34:04
合計ジャッジ時間 957 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    string A, B; cin >> A >> B;
    if (A.size() < B.size()) swap(A, B);
    string S(A.size()-B.size(), '0');
    B = S + B;
    for (int i = 0; i < A.size(); i++)
        cout << (A[i] == B[i] ? 0 : 1);
    cout << "\n";
}
0