#include <iostream> using n
#include <iostream>
using namespace std;
int n;
int d[1000];
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> d[i];
}
int ans = -1;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
if (d[i] < d[j])
ans = max(ans, d[i] + d[j] - (d[i] & d[j]));
cout << ans;
return 0;
}假设输入的 n 和 d[i] 都是不超过 10000 的正整数。
2)判断:输出一定大于等于 0。( )
答案
B