2525
2525
给你四个整数 length ,width ,height 和 mass ,分别表示一个箱子的三个维度和质量,请你返回一个表示箱子 类别 的字符串。 如果满足以下条件,那么箱子是 "Bulky" 的: 箱子 至少有一个 维度大于等于 104 。 或者箱子的 体积 大于等于 109 。 如果箱子的质量大 ......
[LeetCode] 2525. Categorize Box According to Criteria
Given four integers length, width, height, and mass, representing the dimensions and mass of a box, respectively, return a string representing the cat ......
2525. 根据规则将箱子分类
1.题目介绍 2.题解(模拟) 2.1 思路 这题十分简单,唯一要注意的是length * height * width的运算结果(右边式子)默认是int类型,无法存储(不是说左边设置的变量是long long就行了,右边也要进行强制转换) 还有一个有趣的点就是这里对于\(10^4,10^9\), ......