From 626ec223817b5e04a9a7c2db20ecd85fc4f2523b Mon Sep 17 00:00:00 2001 From: rozdaman <159765883+rozdaman@users.noreply.github.com> Date: Mon, 22 Dec 2025 18:26:47 +0300 Subject: [PATCH] Create pyramid_roca_ozdaman.py --- Week03/pyramid_roca_ozdaman.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Week03/pyramid_roca_ozdaman.py diff --git a/Week03/pyramid_roca_ozdaman.py b/Week03/pyramid_roca_ozdaman.py new file mode 100644 index 00000000..81a308eb --- /dev/null +++ b/Week03/pyramid_roca_ozdaman.py @@ -0,0 +1,5 @@ +def calculate_pyramid_height(n): + h = 0 + while (h + 1) * (h + 2) // 2 <= n: + h += 1 + return h