728x90 java switch문1 Leetcode 13. Roman to Integer 문제https://leetcode.com/problems/roman-to-integer/description/(easy) 정답class Solution { public int romanToInt(String s) { Map val = new HashMap(); val.put('I',1); val.put('V', 5); val.put('X', 10); val.put('L', 50); val.put('C', 100); val.put('D', 500); val.put('M', 1000); int sum = 0; for (int i = 0; i 결과 포인트 1. 문자열을 순회하는 .. 2026. 1. 7. 이전 1 다음 728x90