Playground/자바문제집

[백준] 3052번

미숫가루설탕많이 2023. 1. 20. 22:46
import java.util.HashSet;
import java.util.Scanner;

public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      HashSet<Integer> result = new HashSet<>();

      for (int i = 0; i < 10; i++) {
         result.add(sc.nextInt() % 42);
      }
      sc.close();
      System.out.println(result.size());
   }
}

'Playground > 자바문제집' 카테고리의 다른 글

[백준] 8958번  (0) 2023.01.21
[백준] 1546번  (0) 2023.01.21
[백준] 5597번  (0) 2023.01.20
[백준] 2562번  (0) 2023.01.20
[백준] 10818번  (0) 2023.01.20