자바(3)
-
추억 점수
문제 설명 답12345678910111213141516171819202122232425import java.util.*; class Solution { public int[] solution(String[] name, int[] yearning, String[][] photo) { int[] result = new int[photo.length]; HashMapString, Integer> map = new HashMapString, Integer>(); for(int i=0; iname.length; i++) { map.put(name[i], yearning[i]); } f..
2024.08.27 -
Day10 : 함수, 함수 호출
consoleTool이라는 함수를 선언해보자. 함수를 사용하라면 '호출'이 필요하다. → 함수명() vscode에서도 태그에 함수를 추가해주면 사용할 수 있다.
2023.11.18 -
크레인 인형뽑기 게임
문제 결과 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 import java.util.*; class Solution { public int solution(int[][] board, int[] moves) { int answer = 0; Stack stack = new Stack(); for(int j=0; j
2023.09.04