Skip to content

Instantly share code, notes, and snippets.

@Intey
Created September 23, 2021 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Intey/5c5c93e5272026ced33b827e4b98dfb2 to your computer and use it in GitHub Desktop.
Save Intey/5c5c93e5272026ced33b827e4b98dfb2 to your computer and use it in GitHub Desktop.
Досок в кубометре / цена за N досок
def planks_in_cube(height, width, length):
return (1 * 1000 ** 3) / (height * width * length)
def price_for_planks(count, cube_price, height, width, length):
planks_count_in_cube = planks_in_cube(height, width, length)
one_plank_price = cube_price / planks_count_in_cube
return one_plank_price * count
# price_for_planks(3, 36000, 50, 200, 2000)
# > 2160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment