結果

問題 No.581 XOR
ユーザー Project2017C2Project2017C2
提出日時 2017-10-29 22:16:16
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 484 bytes
コンパイル時間 1,294 ms
コンパイル使用メモリ 165,160 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-01 22:27:10
合計ジャッジ時間 1,753 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'll gcd(ll, ll)':
main.cpp:16:17: warning: control reaches end of non-void function [-Wreturn-type]
   16 |         else gcd(b, a%b);
      |              ~~~^~~~~~~~

ソースコード

diff #

#include "bits/stdc++.h"

using namespace std;
using ll = long long;
using IP = pair<int, int>;

const ll INF = 1LL << 62;
#define atcoder(int)1e9+7
#define Endl endl
#define mp make_pair
#define all(v) v.begin(),v.end()
#define pb push_back

ll gcd(ll a, ll b) {//最大公約数
	if (a%b == 0)return b;
	else gcd(b, a%b);
}

ll lcm(ll a, ll b) {//最小公倍数
	return (a / gcd(a, b))*b;
}

int main() {

	ll a, c;

	cin >> a >> c;

	ll b = a^c;

	cout << b << endl;

	return 0;
}
0