April Fools Contest 2017, problem: (C) INTERCALC Solution in C

#include<stdio.h>
int main(){
 int a[10], i, n, max=0;
 scanf("%d", &n);
 for(i=0; i<n; i++){
 scanf("%d", &a[i]);
 if(max<a[i]) max=a[i];
 }
 printf("%d", max^a[n-1]);
 return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *