백준 3052번 (복습)

김경욱·2026년 1월 23일

백준

목록 보기
105/121

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

// Press Shift twice to open the Search Everywhere dialog and type show whitespaces,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

   int count = 0;


   Set<Integer> set = new HashSet<>();




    for (int i = 0; i < 10; i++) {
        int a = Integer.parseInt(br.readLine());

        int b = a % 42;

        set.add(b);

    }


    System.out.println(set.size());







}

}

0개의 댓글