inblog logo
|
goho
    알고리즘문제풀기

    [프로그래머스/JAVA]문자 반복 출력하기

    gov's avatar
    gov
    Dec 04, 2024
    [프로그래머스/JAVA]문자 반복 출력하기
    Contents
    문제풀이

    문제

    notion image

    풀이

    class Solution { public String solution(String my_string, int n) { String answer = ""; for (int i = 0; i < my_string.length(); i++) { for (int j = 0; j < n; j++) { answer += my_string.charAt(i); } } return answer; } }
    Share article

    goho

    RSS·Powered by Inblog