Skip to content

Commit a6a0f23

Browse files
authored
Create cut-the-sticks.py
1 parent 05d40cc commit a6a0f23

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cut-the-sticks.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# https://www.hackerrank.com/challenges/cut-the-sticks/problem
2+
3+
n = int(input().strip())
4+
arr = [int(arr_temp) for arr_temp in input().strip().split(' ')]
5+
while arr:
6+
print(len(arr))
7+
arr = [x for x in arr if x != min(arr)]
8+

0 commit comments

Comments
 (0)