2023每日刷题(五) Leetcode—2525.根据规则将箱子分类 实现代码 char * categorizeBox(int length, int width, int height, int mass){long long volume;long long len = (long long)length;long long wid = (long long)width;long
1. 题意 根据体积边长判断是否笨重,根据质量判读是否超重。 根据规则将箱子分类 2. 题解 直接判断即可,注意整形溢出应该使用long long。 class Solution {public:string categorizeBox(int length, int width, int height, int mass) {int v = 0;long long cap = (lon
文章目录 一、题目二、题解 一、题目 Given four integers length, width, height, and mass, representing the dimensions and mass of a box, respectively, return a string representing the category of the box. Th