Skip to content

Commit 7b95f4b

Browse files
authored
Update categorize-box-according-to-criteria.cpp
1 parent 54394be commit 7b95f4b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

C++/categorize-box-according-to-criteria.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
class Solution {
66
public:
77
string categorizeBox(int length, int width, int height, int mass) {
8-
bool bulky = (length >= 10000 || width >= 10000 || height >= 10000) ||
9-
1ll * length * width * height >= 1000000000;
8+
bool bulky = (length >= 10'000 || width >= 10'000 || height >= 10'000) ||
9+
1ll * length * width * height >= 1'000'000'000;
1010
bool heavy = mass >= 100;
1111
if (bulky && heavy) {
1212
return "Both";
@@ -28,8 +28,8 @@ class Solution2 {
2828
public:
2929
string categorizeBox(int length, int width, int height, int mass) {
3030
static const vector<string> CATEGORIES = {"Neither", "Heavy", "Bulky", "Both"};
31-
const int i = 2 * ((length >= 10000 || width >= 10000 || height >= 10000) ||
32-
1ll * length * width * height >= 1000000000) + (mass >= 100);
31+
const int i = 2 * ((length >= 10'000 || width >= 10'000 || height >= 10'000) ||
32+
1ll * length * width * height >= 1'000'000'000) + (mass >= 100);
3333
return CATEGORIES[i];
3434
}
3535
};

0 commit comments

Comments
 (0)