函数原型为 mysolve()
#include <stdio.h>
const int N = 2e7 + 5;
int n;
int a[N];
int mysolve();
int main(){
scanf("%d", &n);
for(int i = 1; i <= n; i ++){
scanf("%d", &a[i]);
}
printf("%d", solve());
return 0;
}
/* 请在这里填写答案 */
int mysolve()
{
int i; int e = 0;
for (i = 1; i <= n; i++)
e = e ^ a[i];
return e;
}
只需要短短几行代码就可以实现