프로그래밍/알고리즘

백준 3052 나머지

ILove_NS_MoKa 2019. 9. 2. 22:18

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
 
int main()
{
    const int size = 10;
    bool list[42= { false };
    int input = 0;
    int count = 0;
    for (int i = 0; i < size; i++)
    {
        scanf("%d"&input);
        list[input % 42= true;
    }
    for (int idx = 0; idx < 42; idx++)
    {
        if (list[idx])
        {
            count++;
        }
    }
    return 0;
}
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs