diff --git a/Week03/pyramid_alisher_shalenov.py b/Week03/pyramid_alisher_shalenov.py new file mode 100644 index 00000000..0f1c5457 --- /dev/null +++ b/Week03/pyramid_alisher_shalenov.py @@ -0,0 +1,10 @@ +def calculate_pyramid_height(blocks): + height = 0 + layer = 1 + + while blocks >= layer: + blocks -= layer + height += 1 + layer += 1 + + return height