#include<stdio.h>
#include<stdlib.h>
int main(){
int arr[] = { 2, 45, 6, 2, 5, 8, 8, 45, 5 };
int num = sizeof(arr) / sizeof(arr[0]);
int t = arr[0];
for (int i = 1; i < num; i++){
t = t ^ arr[i];
}
printf("%d\n", t);
system("pause");
return 0;
}
3.编程实现: 一组数据中只有一个数字出现了一次。 其他所有数字都是成对出现的。 请找出这个数字。(使用位运算)
猜你喜欢
转载自blog.csdn.net/weixin_43755544/article/details/86105093
今日推荐
周排行