Light Blue Pointer
본문 바로가기
Coding Test

[프로그래머스]로또의 최고 순위와 최저 순위

by Greedy 2023. 12. 11.

문제 설명

로또 6/45(이하 '로또'로 표기)는 1부터 45까지의 숫자 중 6개를 찍어서 맞히는 대표적인 복권입니다. 아래는 로또의 순위를 정하는 방식입니다. 

순위 당첨 내용

1 6개 번호가 모두 일치
2 5개 번호가 일치
3 4개 번호가 일치
4 3개 번호가 일치
5 2개 번호가 일치
6(낙첨) 그 외

로또를 구매한 민우는 당첨 번호 발표일을 학수고대하고 있었습니다. 하지만, 민우의 동생이 로또에 낙서를 하여, 일부 번호를 알아볼 수 없게 되었습니다. 당첨 번호 발표 후, 민우는 자신이 구매했던 로또로 당첨이 가능했던 최고 순위와 최저 순위를 알아보고 싶어 졌습니다.

알아볼 수 없는 번호를 0으로 표기하기로 하고, 민우가 구매한 로또 번호 6개가 44, 1, 0, 0, 31 25라고 가정해보겠습니다. 당첨 번호 6개가 31, 10, 45, 1, 6, 19라면, 당첨 가능한 최고 순위와 최저 순위의 한 예는 아래와 같습니다.

당첨 번호 31 10 45 1 6 19 결과

최고 순위 번호 31 0→10 44 1 0→6 25 4개 번호 일치, 3등
최저 순위 번호 31 0→11 44 1 0→7 25 2개 번호 일치, 5등
  • 순서와 상관없이, 구매한 로또에 당첨 번호와 일치하는 번호가 있으면 맞힌 걸로 인정됩니다.
  • 알아볼 수 없는 두 개의 번호를 각각 10, 6이라고 가정하면 3등에 당첨될 수 있습니다.
    • 3등을 만드는 다른 방법들도 존재합니다. 하지만, 2등 이상으로 만드는 것은 불가능합니다.
  • 알아볼 수 없는 두 개의 번호를 각각 11, 7이라고 가정하면 5등에 당첨될 수 있습니다.
    • 5등을 만드는 다른 방법들도 존재합니다. 하지만, 6등(낙첨)으로 만드는 것은 불가능합니다.

민우가 구매한 로또 번호를 담은 배열 lottos, 당첨 번호를 담은 배열 win_nums가 매개변수로 주어집니다. 이때, 당첨 가능한 최고 순위와 최저 순위를 차례대로 배열에 담아서 return 하도록 solution 함수를 완성해주세요.

제한사항

  • lottos는 길이 6인 정수 배열입니다.
  • lottos의 모든 원소는 0 이상 45 이하인 정수입니다.
    • 0은 알아볼 수 없는 숫자를 의미합니다.
    • 0을 제외한 다른 숫자들은 lottos에 2개 이상 담겨있지 않습니다.
    • lottos의 원소들은 정렬되어 있지 않을 수도 있습니다.
  • win_nums은 길이 6인 정수 배열입니다.
  • win_nums의 모든 원소는 1 이상 45 이하인 정수입니다.
    • win_nums에는 같은 숫자가 2개 이상 담겨있지 않습니다.
    • win_nums의 원소들은 정렬되어 있지 않을 수도 있습니다.

풀이과정

class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {
        int correct = 0;
        int zero = 0;
        //0인건 굳이 비교 안 해도 될거같긴 한데..아니지 0도 세어봐야함
        for(int w : win_nums){
            for(int l : lottos){
                if(w==l){
                    correct++;
                }else if(l==0){
                    zero++;
                }
            }
        }

        int[] answer = new int [2];
        String min = correct;
        String max = (correct+zero);
        
        min.replace("2","1");
        //음 일단 Collection에 넣어서 ifExist이런거 쓰는게
        
        return answer;
    }
}

 

Arraylist.contains() in Java

// creating an Empty Integer ArrayList
        ArrayList<Integer> arr = new ArrayList<Integer>(4);
 
        // using add() to initialize values
        // [1, 2, 3, 4]
        arr.add(1);
        arr.add(2);
        arr.add(3);
        arr.add(4);
 
        // use contains() to check if the element
        // 2 exits or not
        boolean ans = arr.contains(2);
 
        if (ans)
            System.out.println("The list contains 2");
        else
            System.out.println("The list does not contains 2");

ifExist이런거 쓰는게 더 귀찮을거 같아!

걍 String replace 쓰기로 함

class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {
        int correct = 0;
        int zero = 0;
        //0인건 굳이 비교 안 해도 될거같긴 한데..아니지 0도 세어봐야함
        for(int w : win_nums){
            for(int l : lottos){
                if(w==l){
                    correct++;
                }else if(l==0){
                    zero++;
                }
            }
        }

        String min = ""+correct;
        String max = ""+(correct+zero);
        
        if(min.equals("0")){
            min.replace("0","6");
        }else if(min.equals("1")){
            min.replace("1","6");
        }else{
            String minReplace = Integer.toString(5-Integer.parseInt(min));
            String maxReplace = Integer.toString(7-Integer.parseInt(min));
             min.replace(minReplace,maxReplace);
        }
        
        int[] answer = new int [2];
        answer[0]=Integer.parseInt(max);
        answer[1]=Integer.parseInt(min);
        return answer;
    }
}

else{
            String minReplace = Integer.toString(Integer.parseInt(min));
            String maxReplace = Integer.toString(7-Integer.parseInt(min));
             min.replace(minReplace,maxReplace);
        }

로 수정함

⭐java 삼항연산자

int b = (5 < 4) ? 50 : 40;
int d = (a > b) ? a - b : b - a;
//삼항연산자를 사용해보자
        Integer.parseInt(min)>1 ? min.replace(min,7-Integer.parseInt(min)) : min.replace(min,"6");
        //삼항연산자를 사용해보자
        Integer.parseInt(max)>1 ? max.replace(max,7-Integer.parseInt(min)) : max.replace(max,"6");
class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {
        int correct = 0;
        int zero = 0;
        //0인건 굳이 비교 안 해도 될거같긴 한데..아니지 0도 세어봐야함
        for(int w : win_nums){
            for(int l : lottos){
                if(w==l){
                    correct++;
                }else if(l==0){
                    zero++;
                }
            }
        }

        String min = ""+correct;
        String max = ""+(correct+zero);
        
        //삼항연산자를 사용해보자
        min = Integer.parseInt(min)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
        //삼항연산자를 사용해보자
        max = Integer.parseInt(max)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
       
        
        int[] answer = new int [2];
        answer[0]=Integer.parseInt(max);
        answer[1]=Integer.parseInt(min);
        return answer;
    }
}
테스트 1
입력값 〉	[44, 1, 0, 0, 31, 25], [31, 10, 45, 1, 6, 19]
기댓값 〉	[3, 5]
실행 결과 〉	실행한 결괏값 [2,5]이 기댓값 [3,5]과 다릅니다.
테스트 2
입력값 〉	[0, 0, 0, 0, 0, 0], [38, 19, 20, 40, 15, 25]
기댓값 〉	[1, 6]
실행 결과 〉	테스트를 통과하였습니다.
테스트 3
입력값 〉	[45, 4, 35, 20, 3, 9], [20, 9, 3, 45, 4, 35]
기댓값 〉	[1, 1]
실행 결과 〉	실행한 결괏값 [6,1]이 기댓값 [1,1]과 다릅니다.

로그 찍어봄

 

테스트 1
입력값 〉	[44, 1, 0, 0, 31, 25], [31, 10, 45, 1, 6, 19]
기댓값 〉	[3, 5]
실행 결과 〉	실행한 결괏값 [2,5]이 기댓값 [3,5]과 다릅니다.
출력 〉	correct2
zero12
테스트 2
입력값 〉	[0, 0, 0, 0, 0, 0], [38, 19, 20, 40, 15, 25]
기댓값 〉	[1, 6]
실행 결과 〉	테스트를 통과하였습니다.
출력 〉	correct0
zero36
테스트 3
입력값 〉	[45, 4, 35, 20, 3, 9], [20, 9, 3, 45, 4, 35]
기댓값 〉	[1, 1]
실행 결과 〉	실행한 결괏값 [6,1]이 기댓값 [1,1]과 다릅니다.
출력 〉	correct6
zero0

오 너무 반복하면서 세어버렸음

 

java array to arrayList

List<String> list = Arrays.asList(array);
List<String> list = new ArrayList<>(Arrays.asList(array));

 

ArrayList.remove()

remove(int index)
remove() 메소드의 파라미터로 int를 전달하면,
해당 index의 값이 삭제됩니다.
 
remove(Object o)
remove() 메소드의 파라미터로 Object 객체를 전달하면,
ArrayList에서 해당 객체를 찾아서
첫번째로 나오는 값만 삭제합니다.
그리고, 값을 삭제하면 true를 리턴하고,
만약 삭제할 값이 없으면 false를 리턴합니다.

 

import java.util.ArrayList;
import java.util.Arrays;
class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {
        int correct = 0;
        int zero = 0;
        //0인건 굳이 비교 안 해도 될거같긴 한데..아니지 0도 세어봐야함
        //근데 이것도 ArrayList로 세다가 이미 센거 빼버리면 더 낫지 않나?
        ArrayList<Integer> winList =  new ArrayList<Integer>(win_nums);
        ArrayList<Integer> lottoList =  new ArrayList<Integer>(lottos);
        
        for(int i = 0; i< lottoList.size(); i++){
            if(lottoList.get(i)==0){
                zero++;
                lottoList.remove(i);
                continue;
            }
            for(int j = 0; j<winList.size();j++){
                if(lottoList.get(i)==winList.get(j)){
                    correct++;
                    lottoList.remove(i);
                    winList.remove(j);
                }
            }
        }

        System.out.println("correct"+correct);
        System.out.println("zero"+zero);
        String min = ""+correct;
        String max = ""+(correct+zero);
        
        //삼항연산자를 사용해보자
        min = Integer.parseInt(min)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
        //삼항연산자를 사용해보자
        max = Integer.parseInt(max)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
  
        int[] answer = new int [2];
        answer[0]=Integer.parseInt(max);
        answer[1]=Integer.parseInt(min);
        return answer;
    }
}

/Solution.java:9: error: no suitable constructor found for ArrayList(int[])

ArrayList<Integer> winList = new ArrayList<Integer>(win_nums);

^

constructor ArrayList.ArrayList(int) is not applicable

(argument mismatch; int[] cannot be converted to int)

constructor ArrayList.ArrayList(Collection<? extends Integer>) is not applicable

(argument mismatch; int[] cannot be converted to Collection<? extends Integer>)

/Solution.java:10: error: no suitable constructor found for ArrayList(int[])

ArrayList<Integer> lottoList = new ArrayList<Integer>(lottos);

^

constructor ArrayList.ArrayList(int) is not applicable

(argument mismatch; int[] cannot be converted to int)

constructor ArrayList.ArrayList(Collection<? extends Integer>) is not applicable

(argument mismatch; int[] cannot be converted to Collection<? extends Integer>)

Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output

2 errors

ArrayList<Integer> winList =  new ArrayList<Integer>( Arrays.asList(win_nums));
        ArrayList<Integer> lottoList =  new ArrayList<Integer>( Arrays.asList(lottos));

 

/Solution.java:8: error: no suitable constructor found for ArrayList(List<int[]>)

ArrayList<Integer> winList = new ArrayList<Integer>( Arrays.asList(win_nums));

^

constructor ArrayList.ArrayList(int) is not applicable

(argument mismatch; no instance(s) of type variable(s) T exist so that List<T> conforms to int)

constructor ArrayList.ArrayList(Collection<? extends Integer>) is not applicable

(argument mismatch; inference variable T has incompatible bounds

lower bounds: Integer,Object

 

import java.util.ArrayList;
class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {
        int correct = 0;
        int zero = 0;
        
        ArrayList<Integer> winList =  new ArrayList<Integer>();
        ArrayList<Integer> lottoList =  new ArrayList<Integer>();
        for(int l : lottos){
            lottoList.add(l);
        }
        for(int w : win_nums){
            lottoList.add(w);
        }
        
        for(int i = 0; i< lottoList.size(); i++){
            if(lottoList.get(i)==0){
                zero++;
                lottoList.remove(i);
                continue;
            }
            for(int j = 0; j<winList.size();j++){
                if(lottoList.get(i)==winList.get(j)){
                    correct++;
                    lottoList.remove(i);
                    winList.remove(j);
                }
            }
        }

        System.out.println("correct"+correct);
        System.out.println("zero"+zero);
        String min = ""+correct;
        String max = ""+(correct+zero);
        
        //삼항연산자를 사용해보자
        min = Integer.parseInt(min)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
        //삼항연산자를 사용해보자
        max = Integer.parseInt(max)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
  
        int[] answer = new int [2];
        answer[0]=Integer.parseInt(max);
        answer[1]=Integer.parseInt(min);
        return answer;
    }
}

 

correct가 안 세어져요~~

continue가 제대로 안 되고 있었나

import java.util.ArrayList;
class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {
        int correct = 0;
        int zero = 0;
        
        ArrayList<Integer> winList =  new ArrayList<Integer>();
        ArrayList<Integer> lottoList =  new ArrayList<Integer>();
        for(int l : lottos){
            lottoList.add(l);
        }
        for(int w : win_nums){
            lottoList.add(w);
        }
        
        for(int i = 0; i<lottoList.size(); i++){
            
            for(int j = 0; j<winList.size();j++){
                if(lottoList.get(i)==winList.get(j)){
                    correct++;
                    lottoList.remove(i);
                    winList.remove(j);
                }
            }
            if(lottoList.get(i)==0){
                zero++;
                lottoList.remove(i);
            }
        }

        System.out.println("correct"+correct);
        System.out.println("zero"+zero);
        String min = ""+correct;
        String max = ""+(correct+zero);
        
        //삼항연산자를 사용해보자
        min = Integer.parseInt(min)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
        //삼항연산자를 사용해보자
        max = Integer.parseInt(max)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
  
        int[] answer = new int [2];
        answer[0]=Integer.parseInt(max);
        answer[1]=Integer.parseInt(min);
        return answer;
    }
}

이렇게 순서를 바꾸고 contirue를 빼봐도correct가 안 세어짐

for(int i = 0; i<lottoList.size(); i++){
            if(lottoList.get(i)==0){
                zero++;
                lottoList.remove(i);
                continue;
            }
            for(int j = 0; j<winList.size();j++){
                if(lottoList.get(i)==winList.get(j)){//-> 이 부분이 아예 안 되는거 같음
                    correct++;
                    lottoList.remove(i);
                    winList.remove(j);
                }
            }
        }

⭐comparing elements of two arrayList in java

secondList.contains(firstList.get(counter))
secondList.get(counter2).equals(firstList.get(counter))

찾다가 신기한 거 봄 이거 신기함

Comparing two ArrayList In Java

// create two Array List
        ArrayList<String> ArrayList1
            = new ArrayList<String>();
        ArrayList<String> ArrayList2
            = new ArrayList<String>();
 
        // insert items in ArrayList 1
        ArrayList1.add("item 1");
        ArrayList1.add("item 2");
        ArrayList1.add("item 3");
        ArrayList1.add("item 4");
 
        // insert items in ArrayList 2
        ArrayList2.add("item 1");
        ArrayList2.add("item 2");
        ArrayList2.add("item 3");
        ArrayList2.add("item 4");
 
        // Display both ArrayList
        System.out.println(" ArrayList1 = " + ArrayList2);
        System.out.println(" ArrayList1 = " + ArrayList1);
 
        // compare ArrayList1 with ArrayList2
        if (ArrayList1.equals(ArrayList2) == true) {
            System.out.println(" Array List are equal");
        }
        else
        // else block execute when
        // ArrayList are not equal
        {
            System.out.println(" Array List are not equal");
        }
 
        // insert one more item in ArrayList 1
        System.out.println(
            "\\n Lets insert one more item in Array List 1");
        ArrayList1.add("item 5");
 
        // display both ArrayList
        System.out.println(" ArrayList1 = " + ArrayList1);
        System.out.println(" ArrayList = " + ArrayList2);
 
        // again compare ArrayList 1 with ArrayList 2
        if (ArrayList1.equals(ArrayList2) == true) {
            System.out.println(" Array List are equal");
        }
        else {
            System.out.println(" Array List are not equal");
        }

오 그리고 찾다가 더 신기한거 봄

You can transform the lists to sets, and then use Set.retainAll method for intersection between the different sets.

Once you intersect all sets, you are left with the common elements, and you can transform the resulting set back to a list.

A. 이거 이따가 해봐야지

 

for(int w : win_nums){
            winList.add(w);
        }

 

지금보니 여기도 잘못되어있었어서 고침 lottoList에다 winnums를 넣고있었음

테스트 1
입력값 〉	[44, 1, 0, 0, 31, 25], [31, 10, 45, 1, 6, 19]
기댓값 〉	[3, 5]
실행 결과 〉	실행한 결괏값 [1,6]이 기댓값 [3,5]과 다릅니다.
출력 〉	
correct1
zero1
테스트 2
입력값 〉	[0, 0, 0, 0, 0, 0], [38, 19, 20, 40, 15, 25]
기댓값 〉	[1, 6]
실행 결과 〉	테스트를 통과하였습니다.
출력 〉	
correct0
zero3
테스트 3
입력값 〉	[45, 4, 35, 20, 3, 9], [20, 9, 3, 45, 4, 35]
기댓값 〉	[1, 1]
실행 결과 〉	실행한 결괏값 [3,4]이 기댓값 [1,1]과 다릅니다.
출력 〉	
correct3
zero0

오 이제 correct가 들어가긴 하는데 잘못 들어가네 로그 찍어봄

import java.util.ArrayList;
class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {
        /*등록 파트*/
        ArrayList<Integer> winList =  new ArrayList<Integer>();
        ArrayList<Integer> lottoList =  new ArrayList<Integer>();
        for(int l : lottos){
            lottoList.add(l);
        }
        for(int w : win_nums){
            winList.add(w);
        }
        
        int correct = 0;
        int zero = 0;
        for(int i = 0; i<lottoList.size(); i++){
            System.out.println("lottoList "+lottoList.get(i));
            if(lottoList.get(i)==0){
                zero++;
                lottoList.remove(i);
                System.out.println("remove zero");
                continue;
            }
            for(int j = 0; j<winList.size();j++){
                System.out.println("winList "+winList.get(j));
                if(lottoList.get(i)==winList.get(j)){
                    correct++;
                    lottoList.remove(i);
                    winList.remove(j);
                    System.out.println("remove both");
                }
            }
        }

        System.out.println("correct"+correct);
        System.out.println("zero"+zero);
        String min = ""+correct;
        String max = ""+(correct+zero);
        
        min = Integer.parseInt(min)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
        max = Integer.parseInt(max)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
  
        int[] answer = new int [2];
        answer[0]=Integer.parseInt(max);
        answer[1]=Integer.parseInt(min);
        return answer;
    }
}
lottoList 44
winList 31
winList 10
winList 45
winList 1
winList 6
winList 19
lottoList 1
winList 31
winList 10
winList 45
winList 1
remove both
winList 19
lottoList 0
remove zero
lottoList 25
winList 31
winList 10
winList 45
winList 6
winList 19
correct1
zero1

근데 지금 삭제하면서 읽고있는데 그럼 인덱스 바뀌어서 중간에 뛰어넘어지지 않을까? 싶어서 삭제하는 파트를 빼봄

for(int i = 0; i<lottoList.size(); i++){
            System.out.println("lottoList "+lottoList.get(i));
            if(lottoList.get(i)==0){
                zero++;
                //lottoList.remove(i);
            }
            if(winList.contains(lottoList.get(i))){
                System.out.println("contains");
                correct++;
            }
        }

이렇게 바꾸니까

테스트 1
입력값 〉	[44, 1, 0, 0, 31, 25], [31, 10, 45, 1, 6, 19]
기댓값 〉	[3, 5]
실행 결과 〉	실행한 결괏값 [2,5]이 기댓값 [3,5]과 다릅니다.
출력 〉	lottoList 44
lottoList 1
contains
lottoList 0
lottoList 0
lottoList 31
contains
lottoList 25
correct2
zero2
테스트 2
입력값 〉	[0, 0, 0, 0, 0, 0], [38, 19, 20, 40, 15, 25]
기댓값 〉	[1, 6]
실행 결과 〉	테스트를 통과하였습니다.
출력 〉	lottoList 0
lottoList 0
lottoList 0
lottoList 0
lottoList 0
lottoList 0
correct0
zero6
테스트 3
입력값 〉	[45, 4, 35, 20, 3, 9], [20, 9, 3, 45, 4, 35]
기댓값 〉	[1, 1]
실행 결과 〉	실행한 결괏값 [6,1]이 기댓값 [1,1]과 다릅니다.
출력 〉	lottoList 45
contains
lottoList 4
contains
lottoList 35
contains
lottoList 20
contains
lottoList 3
contains
lottoList 9
contains
correct6
zero0

zero랑 correct개수는 잘 세어짐

max = Integer.parseInt(max)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";

여기 오른쪽에 max여야 되는데 min으로 오타난거 수정했더니 잘 됨

max = Integer.parseInt(max)>1 ? Integer.toString(7-Integer.parseInt(max)) : "6";

 

제출 코드

import java.util.ArrayList;
class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {

        ArrayList<Integer> winList =  new ArrayList<Integer>();
        ArrayList<Integer> lottoList =  new ArrayList<Integer>();
        for(int l : lottos){
            lottoList.add(l);
        }
        for(int w : win_nums){
            winList.add(w);
        }
        
        int correct = 0;
        int zero = 0;
        
        for(int i = 0; i<lottoList.size(); i++){
            if(lottoList.get(i)==0){
                zero++;
            }
            if(winList.contains(lottoList.get(i))){
                correct++;
            }
        }

        String min = ""+ correct;
        String max = ""+ (correct+zero);
        
        min = Integer.parseInt(min)>1 ? Integer.toString(7-Integer.parseInt(min)) : "6";
        max = Integer.parseInt(max)>1 ? Integer.toString(7-Integer.parseInt(max)) : "6";
        
        int[] answer = new int [2];
        answer[0]=Integer.parseInt(max);
        answer[1]=Integer.parseInt(min);
        return answer;
    }
}

 

다른 사람의 풀이

import java.util.HashMap;
import java.util.Map;

class Solution {
    public int[] solution(int[] lottos, int[] win_nums) {
        Map<Integer, Boolean> map = new HashMap<Integer, Boolean>();
        int zeroCount = 0;

        for(int lotto : lottos) {
            if(lotto == 0) {
                zeroCount++;
                continue;
            }
            map.put(lotto, true);
        }


        int sameCount = 0;
        for(int winNum : win_nums) {
            if(map.containsKey(winNum)) sameCount++;
        }

        int maxRank = 7 - (sameCount + zeroCount);
        int minRank = 7 - sameCount;
        if(maxRank > 6) maxRank = 6;
        if(minRank > 6) minRank = 6;

        return new int[] {maxRank, minRank};
    }
}

Q. 나는 왜 배열로 못 풀었지?

 

내가 삼항연산자로 한 부분 min max로 한 사람도 있네

int[] answer = {Math.min(7 - max, 6), Math.min(7 - min, 6)};
        return answer;

'Coding Test' 카테고리의 다른 글

[프로그래머스] 숫자 짝꿍  (0) 2023.12.12
[프로그래머스]옹알이  (1) 2023.12.11
[프로그래머스]푸드 파이트 대회  (1) 2023.11.30
[프로그래머스]콜라 문제  (0) 2023.11.30
[프로그래머스] 카드 뭉치  (0) 2023.11.30