We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main.java.com.poogle.PG.Q77484; import java.util.HashSet; import java.util.Set; //로또의 최고 순위와 최저 순위 public class Solution { public static int[] solution(int[] lottos, int[] win_nums) { int winCnt = 0; int zeroCnt = 0; int[] level = {6, 6, 5, 4, 3, 2, 1}; Set<Integer> set = new HashSet<>(); for (int i : win_nums) { set.add(i); } for (int i : lottos) { if (i == 0) zeroCnt++; if (set.contains(i)) winCnt++; } return new int[] {level[winCnt + zeroCnt], level[winCnt]}; } public static void main(String[] args) { int[] lottos = {5, 2, 0, 0, 4}; int[] win_nums = {1, 4, 2, 5, 3}; solution(lottos, win_nums); } }
The text was updated successfully, but these errors were encountered:
a4e663c
suhyunsim
No branches or pull requests
문제
핵심 아이디어
어려운 점, 실수
풀이
The text was updated successfully, but these errors were encountered: