题解 | #寻找奇数#
寻找奇数
https://www.nowcoder.com/practice/849b9e545f4742398d278f5dc4e003d2
#include <stdio.h> int main() { int n = 0; scanf("%d",&n); int arr[n]; int ret = 0; for(int i = 0;i < n;i++) { scanf("%d",&arr[i]); } for(int i = 0;i < n;i++) { ret ^= arr[i]; } printf("%d\n",ret); return 0; }