From 3c1154a667bc55dfc9c6d726e3b61188d10310bc Mon Sep 17 00:00:00 2001 From: muncool39 Date: Tue, 12 May 2026 16:19:49 +0900 Subject: [PATCH 1/2] solve: Roman to Integer --- .../[LCD] Roman to Integer/Mun.java" | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 "05\354\233\224/2\354\243\274\354\260\250/[LCD] Roman to Integer/Mun.java" diff --git "a/05\354\233\224/2\354\243\274\354\260\250/[LCD] Roman to Integer/Mun.java" "b/05\354\233\224/2\354\243\274\354\260\250/[LCD] Roman to Integer/Mun.java" new file mode 100644 index 0000000..98723bf --- /dev/null +++ "b/05\354\233\224/2\354\243\274\354\260\250/[LCD] Roman to Integer/Mun.java" @@ -0,0 +1,42 @@ +import java.util.*; + +class Mun { + HashMap map = new HashMap<>(){{ + put("I", 1); + put("V", 5); + put("X", 10); + put("L", 50); + put("C", 100); + put("D", 500); + put("M", 1000); + put("IV", 4); + put("IX", 9); + put("XL", 40); + put("XC", 90); + put("CD", 400); + put("CM", 900); + }}; + + public int romanToInt(String s) { + if(s.length() == 1) { + return map.get(s); + } + + int sum = 0; + for(int i=0;i Date: Tue, 12 May 2026 16:20:01 +0900 Subject: [PATCH 2/2] solve: Longest Common Prefix --- .../[LCD] Longest Common Prefix/Mun.java" | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 "05\354\233\224/2\354\243\274\354\260\250/[LCD] Longest Common Prefix/Mun.java" diff --git "a/05\354\233\224/2\354\243\274\354\260\250/[LCD] Longest Common Prefix/Mun.java" "b/05\354\233\224/2\354\243\274\354\260\250/[LCD] Longest Common Prefix/Mun.java" new file mode 100644 index 0000000..66d6fba --- /dev/null +++ "b/05\354\233\224/2\354\243\274\354\260\250/[LCD] Longest Common Prefix/Mun.java" @@ -0,0 +1,24 @@ + +class Mun { + public String longestCommonPrefix(String[] strs) { + StringBuilder sb = new StringBuilder(""); + String basic = strs[0]; + for(int i=0;i