diff --git "a/leetcode3/\354\240\225\354\247\204\354\230\201/2525. Categorize Box According to Criteria" "b/leetcode3/\354\240\225\354\247\204\354\230\201/2525. Categorize Box According to Criteria" new file mode 100644 index 00000000..cd284007 --- /dev/null +++ "b/leetcode3/\354\240\225\354\247\204\354\230\201/2525. Categorize Box According to Criteria" @@ -0,0 +1,20 @@ +/** + * @param {number} length + * @param {number} width + * @param {number} height + * @param {number} mass + * @return {string} + */ + + // 시간 복잡도 O(1) +var categorizeBox = function(length, width, height, mass) { + let volume = length * width * height; + if ((volume >= 10**9 || length >= 10**4 || width >= 10**4 || height >= 10**4) && (mass>=100)){ + return "Both"; + } else if (mass >= 100){ + return "Heavy"; + } else if (volume >= 10**9 || length >= 10**4 || width >= 10**4 || height >= 10**4){ + return "Bulky"; + } + else { return "Neither" }; +};