#include <stdio.h>

int main() {
    int n, media=0;
    scanf("%d", &n);

    int c[n];
    //Le o peso de cada camelo
    for(int i=0; i<n; i++){
        scanf("%d", &c[i]);
    }
    //Distribui o peso
    for(int i=0; i<n; i++){
        media=media+c[i];
    }
    media=media/n;
    //Peso que sera retirado ou colocado em cada camelo
    for(int i=0; i<n; i++){
        c[i]=c[i]-media;
        c[i]=c[i]*(-1);
        printf("%d\n", c[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: