We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71f5b39 commit 626ec22Copy full SHA for 626ec22
Week03/pyramid_roca_ozdaman.py
@@ -0,0 +1,5 @@
1
+def calculate_pyramid_height(n):
2
+ h = 0
3
+ while (h + 1) * (h + 2) // 2 <= n:
4
+ h += 1
5
+ return h
0 commit comments