class Solution {
    public int solution(int a, int b) {
        int ab = Integer.valueOf("" + a + b);
        int ba = Integer.valueOf("" + b + a);
        return ab >= ba ? ab : ba;
    }
    
}

 

 

'공부 > 프로그래머스' 카테고리의 다른 글

n의 배수  (0) 2024.01.23
두 수의 연산값 비교하기  (0) 2024.01.23
문자열 곱하기  (0) 2023.07.06
문자 리스트를 문자열로 변환하기  (0) 2023.07.06
문자열 섞기  (0) 2023.07.06

+ Recent posts