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 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