로딩
요청 처리 중입니다...

JAVA_LeetCode 1880_Check if Word Equals Summation of Two Words

 JAVA_LeetCode 1880_Check if Word Equals Summation of Two Words

JAVA_LeetCode 1880_Check if Word Equals Summation of Two Words 풀이 class Solution { public boolean isSumEqual(String firstWord, String secondWord, String targetWord) { int num1 = 0, num2 = 0, res = 0; // 각 word별 숫자를 계산할 때 문자열을 수로 맞추기 위해 n번 반복한 만큼의 n 자리 수를 더해준다. for(int i = 0; i < firstWord.length(); i++) num1 = num1 * 10 + firstWord.charAt(i) - 'a'; for(int i = 0; i < secondWord.length(); i++) num2 = num2 * 10 + secondWord.charAt(i) - 'a'; for(int i = 0; i < targetWord.length(); i++) res = res * ...

# JAVA # JAVA_CheckifWordEqualsSummationofTwoWords # JAVA_LeetCode1880 # JAVA_LeetCode1880_CheckifWordEqualsSummationofTwoWords # LeetCode1880_CheckifWordEqualsSummationofTwoWords