Registrations for the November 2021 System Design Cohort are now open Enroll Today

OLOLO Solution



#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;
}

470+ Competitive Programming Solutions

If you like what you read subscribe to my newsletter.

I write essays on various engineering topics and share it through my weekly newsletter 👇