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