강의

멘토링

커뮤니티

Inflearn Community Q&A

bsm72103507's profile image
bsm72103507

asked

I opened my eyes and it was the day before the coding test.

Problem 2 - With JAVA poison!

이렇게 해도되나요?

Written on

·

248

0

def going(stone, dog):

    list_n = [];

    for i in dog:

        print(i)

        cur_loc = 0

        while cur_loc < len(stone)-1:

            print(cur_loc)

            stone[int(i["점프력"])-1] = stone[int(i["점프력"])-1] - int(i["몸무게"])

            cur_loc = cur_loc + int(i["점프력"])

            print("이동후", cur_loc)

            if stone[cur_loc]<0:

#                 list_n.append("0")

                break

        if cur_loc >= len(stone)-1:

            list_n.append(i["이름"])

      

            

        

    

    print(list_n)

#     for i in list_n:

#         if i == True:

            

            

                

                

        

going(stone, dog)

코테 준비 같이 해요!

Answer

This question is waiting for answers
Be the first to answer!
bsm72103507's profile image
bsm72103507

asked

Ask a question