Rohyoohyun / C

0 stars 0 forks source link

3052 나머지 #39

Open Rohyoohyun opened 3 months ago

Rohyoohyun commented 3 months ago
#include <stdio.h>

int main(){
    int arr[10] = {0};
    for(int i=0; i<10; i++){
        int a;
        scanf("%d", &a);
        arr[i] = a%42;
    }

    int res = 0;
    for(int i=0; i<10; i++) {
        int cnt = 0;
        for(int j=i+1; j<10; j++)
            if(arr[i] == arr[j]) cnt++;
        if (cnt == 0) res++;
    }
    printf("%d", res);

    return 0;
}