#include #include #include #include #include #include #include int main(){ int n; scanf("%d",&n); int *types = malloc(sizeof(int) * n); int a[5]={0}; for(int types_i = 0; types_i < n; types_i++){ scanf("%d",&types[types_i]); a[types[types_i]-1]++; } int ans=a[0],max=1,i; for(i=1;i<5;i++) {if(a[i]>ans) { ans=a[i]; max=i+1;}} printf("%d",max); // your code goes here return 0; }