[Programmers] 003 - 두 수의 연산값 비교하기

Sunny·2023년 5월 9일
0

class Solution {
    public int solution(int a, int b) {
        int ab = Integer.parseInt(String.valueOf(a) + String.valueOf(b));
        int calc = 2 * a * b;
        
        return Math.max(ab, calc);
    }
}
profile
자꾸자꾸 헤엄치는 중

0개의 댓글