Created
February 11, 2026 15:11
-
-
Save pvik/2b3251824a7873e18a20866f02b5586f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S uv run --script | |
| # This uses uv to run this python script | |
| # To install uv: https://docs.astral.sh/uv/getting-started/installation/ | |
| def sort(width: int, height: int, length: int, mass: int) -> str: | |
| vol = width * height * length | |
| is_bulky = (vol >= 1_000_000) or (width >= 150) or (height >= 150) or (length >= 150) | |
| is_heavy = (mass >= 20) | |
| if is_heavy and is_bulky: | |
| return "REJECTED" | |
| elif is_heavy or is_bulky: | |
| return "SPECIAL" | |
| else: | |
| return "STANDARD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment