From 1310852fad0df8252cca366c8bc6c7d7af692715 Mon Sep 17 00:00:00 2001 From: muncool39 Date: Tue, 5 May 2026 16:37:39 +0900 Subject: [PATCH 1/3] solve: Palindrome Number --- .../[LCD] Palindrome Number/Mun.java" | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 "05\354\233\224/1\354\243\274\354\260\250/[LCD] Palindrome Number/Mun.java" diff --git "a/05\354\233\224/1\354\243\274\354\260\250/[LCD] Palindrome Number/Mun.java" "b/05\354\233\224/1\354\243\274\354\260\250/[LCD] Palindrome Number/Mun.java" new file mode 100644 index 0000000..bd6eb7c --- /dev/null +++ "b/05\354\233\224/1\354\243\274\354\260\250/[LCD] Palindrome Number/Mun.java" @@ -0,0 +1,17 @@ +class Mun { + public boolean isPalindrome(int x) { + if(x < 0) { + return false; + } + int origin = x; + int reverse = 0; + while(origin > 0) { + int end = origin%10; + reverse*=10; + reverse+=end; + origin/=10; + } + + return x == reverse; + } +} \ No newline at end of file From ccdc164cf0db044d3c2b04f99a2c2f485788a1ea Mon Sep 17 00:00:00 2001 From: muncool39 Date: Tue, 5 May 2026 16:37:49 +0900 Subject: [PATCH 2/3] solve: Two Sum --- .../[LCD] Two Sum/Mun.java" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "05\354\233\224/1\354\243\274\354\260\250/[LCD] Two Sum/Mun.java" diff --git "a/05\354\233\224/1\354\243\274\354\260\250/[LCD] Two Sum/Mun.java" "b/05\354\233\224/1\354\243\274\354\260\250/[LCD] Two Sum/Mun.java" new file mode 100644 index 0000000..d6a8b32 --- /dev/null +++ "b/05\354\233\224/1\354\243\274\354\260\250/[LCD] Two Sum/Mun.java" @@ -0,0 +1,12 @@ +class Mun { + public int[] twoSum(int[] nums, int target) { + for(int i=0;i Date: Tue, 5 May 2026 16:57:57 +0900 Subject: [PATCH 3/3] =?UTF-8?q?solve:=20=EC=95=BC=EA=B7=BC=20=EC=A7=80?= =?UTF-8?q?=EC=88=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mun.java" | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 "05\354\233\224/1\354\243\274\354\260\250/[PRGRMS] \354\225\274\352\267\274 \354\247\200\354\210\230/Mun.java" diff --git "a/05\354\233\224/1\354\243\274\354\260\250/[PRGRMS] \354\225\274\352\267\274 \354\247\200\354\210\230/Mun.java" "b/05\354\233\224/1\354\243\274\354\260\250/[PRGRMS] \354\225\274\352\267\274 \354\247\200\354\210\230/Mun.java" new file mode 100644 index 0000000..798dbef --- /dev/null +++ "b/05\354\233\224/1\354\243\274\354\260\250/[PRGRMS] \354\225\274\352\267\274 \354\247\200\354\210\230/Mun.java" @@ -0,0 +1,25 @@ +import java.util.*; + +class Mun { + public long solution(int n, int[] works) { + PriorityQueue que = new PriorityQueue<>((o1, o2) -> { + return o2 - o1; + }); + for(int w : works) { + que.add(w); + } + while(n > 0 && que.size() > 0) { + int w = que.poll(); + w--; + n--; + if(w > 0) { + que.add(w); + } + } + long answer = 0; + while(que.size() > 0) { + answer+=(long) Math.pow(que.poll(), 2); + } + return answer; + } +} \ No newline at end of file