JAVA_LeetCode 2525_Categorize Box According to Criteria 풀이 class Solution { public String categorizeBox(int length, int width, int height, int mass) { // 각 조건에 맞춰 논리값 초기화해준다음, 해당 값에 맞춰 반환한다. boolean isBulky = 1000000000 <= ((long)length * width * height) || length >= 10000 || width >= 10000 || height >= 10000; boolean isHeavy = mass >= 100; return isBulky && isHeavy ? "Both" : !
isBulky && !isHeavy ?
"Neither" : isBulky ? "Bulky" : "Heavy"; } } * 출처 https://leetcode.com/problems/categorize-box-ac...
#
JAVA
#
JAVA_CategorizeBoxAccordingtoCriteria
#
JAVA_LeetCode2525
#
JAVA_LeetCode2525_CategorizeBoxAccordingtoCriteria
#
LeetCode2525_CategorizeBoxAccordingtoCriteria