From b478175ada4d6e6a4b69c09b8e6c82b7773cb962 Mon Sep 17 00:00:00 2001 From: mantuhotep Date: Wed, 7 Jan 2026 17:51:56 +0300 Subject: [PATCH] pyramid_muhammet_topcu --- Week03/pyramid_muhammet_topcu.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Week03/pyramid_muhammet_topcu.py diff --git a/Week03/pyramid_muhammet_topcu.py b/Week03/pyramid_muhammet_topcu.py new file mode 100644 index 00000000..71b83d03 --- /dev/null +++ b/Week03/pyramid_muhammet_topcu.py @@ -0,0 +1,7 @@ +def calculate_pyramid_height(n: int) -> int: + h = 0 + used = 0 + while used + h + 1 <= n: + h += 1 + used += h + return h