From 0135f1534c76e9d08d933739dc19ec963378fd25 Mon Sep 17 00:00:00 2001 From: dmswl6310 Date: Wed, 9 Sep 2026 09:35:43 +0900 Subject: [PATCH] 0909 --- .... Categorize Box According to Criteria.js" | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 "leetcode3/\355\231\251\354\235\200\354\247\200/2525. Categorize Box According to Criteria.js" diff --git "a/leetcode3/\355\231\251\354\235\200\354\247\200/2525. Categorize Box According to Criteria.js" "b/leetcode3/\355\231\251\354\235\200\354\247\200/2525. Categorize Box According to Criteria.js" new file mode 100644 index 000000000..446c84cff --- /dev/null +++ "b/leetcode3/\355\231\251\354\235\200\354\247\200/2525. Categorize Box According to Criteria.js" @@ -0,0 +1,23 @@ +/** + * @param {number} length + * @param {number} width + * @param {number} height + * @param {number} mass + * @return {string} + */ +var categorizeBox = function (length, width, height, mass) { + const bulky = + length >= 10000 || + width >= 10000 || + height >= 10000 || + length * width * height >= Math.pow(10, 9); + const heavy = mass >= 100; + + if (bulky) { + if (heavy) return "Both"; + else return "Bulky"; + } else { + if (heavy) return "Heavy"; + else return "Neither"; + } +};