Hackerrank 레벨업하기
문제
Jumping on the Clouds
def jumpingOnClouds(c):
location = 0
check = 0
while True:
if location + 2 == len(c) - 1:
check += 1
break
elif location + 1 == len(c) - 1:
check += 1
break
elif c[location + 2] == 0:
location += 2
else:
location += 1
check += 1
return check
궁금하신게 있다면 메일 주세요.
k2h7913@daum.net
cafehero123@gmail.com