#include <stdio.h>

int main() {
    int N;
    scanf("%d", &N);
    int V[N], cont[10], ultimo=0;
    
    for(int i=0; i<N;i++){
        scanf("%d", &V[i]);
    }
    for(int j=0; j<10; j++){
        cont[j]=0;
    }
    for(int i=0; i<N; i++){
        for(int j=0; V[i]!=0; j++){
            ultimo=V[i]%10;
            cont[ultimo]=cont[ultimo]+1;
            V[i]=V[i]/10;
        }
    }
    for(int i=0; i<10; i++){
        printf("%d - %d\n", i, cont[i]);
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: