https://www.acmicpc.net/problem/3052
나의 풀이
bool[] remainder = new bool[42];
int count = 0;
for (int i = 0; i < 10; i++)
{
int number = int.Parse(Console.ReadLine());
int remain = number % 42;
if(!remainder[remain])
{
remainder[remain] = true;
count++;
}
}
Console.WriteLine(count);'알고리즘 문제(백준) > C#' 카테고리의 다른 글
| [백준] 1546번 평균 (0) | 2025.09.02 |
|---|---|
| [백준] 10811번 바구니 뒤집기 (0) | 2025.09.02 |
| [백준] 10810번 공 바꾸기 (2) | 2025.08.26 |
| [백준] 10810번 공 넣기 (0) | 2025.08.25 |
| [백준] 2562번 최대값 구하기 (0) | 2025.08.02 |