Skip to content

Instantly share code, notes, and snippets.

@pvik
Created February 11, 2026 15:11
Show Gist options
  • Select an option

  • Save pvik/2b3251824a7873e18a20866f02b5586f to your computer and use it in GitHub Desktop.

Select an option

Save pvik/2b3251824a7873e18a20866f02b5586f to your computer and use it in GitHub Desktop.
#!/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