[알고리즘문제풀기] 편지

241128
이나겸's avatar
Nov 28, 2024
[알고리즘문제풀기] 편지
Contents
Q. 풀이

Q.

notion image
 
 

풀이

class Solution { public int solution(String message) { int answer = 0; // 문자열의 길이 구하기 int stringLength = message.length(); if (stringLength >= 1 && stringLength <= 50) { answer = stringLength * 2; } return answer; } }
Share article

Nakyeom's Study