91. 문자열 정수의 합

김해준's avatar
Dec 16, 2025
91. 문자열 정수의 합

사용언어 : Java

문제
notion image
풀이
class Solution { public int solution(String num_str) { int answer = 0; for(int i = 0 ; i < num_str.length(); i++) { String temp = ""; temp += num_str.charAt(i); answer += Integer.parseInt(temp); } return answer; } }
notion image
Share article