From 56542ff2cf9c3112ccc4fb677afe2e47fc9bacc7 Mon Sep 17 00:00:00 2001 From: Hyukjin-Ko <1rhgurwls1@naver.com> Date: Mon, 15 Jan 2024 22:08:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?12914=5F=EA=B3=A0=ED=98=81=EC=A7=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...914_\352\263\240\355\230\201\354\247\204.java" | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 "5\354\243\274\354\260\250/12914/12914_\352\263\240\355\230\201\354\247\204.java" diff --git "a/5\354\243\274\354\260\250/12914/12914_\352\263\240\355\230\201\354\247\204.java" "b/5\354\243\274\354\260\250/12914/12914_\352\263\240\355\230\201\354\247\204.java" new file mode 100644 index 0000000..affc409 --- /dev/null +++ "b/5\354\243\274\354\260\250/12914/12914_\352\263\240\355\230\201\354\247\204.java" @@ -0,0 +1,15 @@ +class Solution { + public long solution(int n) { + long[] arr = new long[n+1]; + arr[0] = 1; + arr[1] = 1; + + for(int i=2; i Date: Mon, 15 Jan 2024 22:08:34 +0900 Subject: [PATCH 2/2] =?UTF-8?q?131127=5F=EA=B3=A0=ED=98=81=EC=A7=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\352\263\240\355\230\201\354\247\204.java" | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 "5\354\243\274\354\260\250/131127/131127_\352\263\240\355\230\201\354\247\204.java" diff --git "a/5\354\243\274\354\260\250/131127/131127_\352\263\240\355\230\201\354\247\204.java" "b/5\354\243\274\354\260\250/131127/131127_\352\263\240\355\230\201\354\247\204.java" new file mode 100644 index 0000000..e807b0b --- /dev/null +++ "b/5\354\243\274\354\260\250/131127/131127_\352\263\240\355\230\201\354\247\204.java" @@ -0,0 +1,28 @@ +import java.util.*; + +class Solution { + public int solution(String[] want, int[] number, String[] discount) { + int answer = 0; + Map hm = new HashMap(); + + for(int i=0; i map = new HashMap(); + + for(int i=0; i<10; i++) + map.put(discount[i+j], map.getOrDefault(discount[i+j], 0) + 1); + + for (Map.Entry entry : hm.entrySet()) + if(map.containsKey(entry.getKey()) && entry.getValue()<=map.get(entry.getKey())) + idx++; + + if(idx == want.length) + answer++; + } + + return answer; + } +} \ No newline at end of file