SPOJ OLOLO Solution

| July 01, 2015

The correct, optimal and working solution for programming question OLOLO on spoj

#include <stdio.h>

int main ( int argc , char * argv[] ) {

	int n , t , i;

	scanf("%d" , &n);

	scanf("%d" , &t);

	for ( i = 0 ; i < n-1 ; i++ ) {
		int a;
		scanf("%d" , &a);

		t = t ^ a;
	}

	printf("%d\n" , t );

	return 0;
}