86. 0 떼기

김해준's avatar
Dec 16, 2025
86. 0 떼기

사용언어 : Java

문제
notion image
풀이
class Solution { public String solution(String n_str) { String answer = ""; boolean check = false; for(int i = 0 ; i < n_str.length(); i++) { String temp = ""; temp += n_str.charAt(i); if(!check) { if(temp.equals("0")) continue; else { check = true; } } answer += temp; } return answer; } }
notion image
Share article