문제출처 : https://www.acmicpc.net/problem/3052
code
#include <iostream>
using namespace std;
int main()
{
int ten = 10, num, i = 0, cnt = 10;
int arr[42];
while (ten--)
{
cin >> num;
arr[i] = num % 42;
i++;
}
for (int i = 0; i < 9; i++)
{
for (int j = i + 1; j < 10; j++)
{
if (arr[i] == arr[j])
{
cnt--;
break;
}
}
}
cout <<cnt;
return 0;
}