16769 Mixing Milk1 16769-Mixing Milk (python, 파이썬) 1번: 내가 작성한 코드 bucket_list = [] for _ in range(3): bucket_list.append(list(map(int, input().split()))) # 0번째: capacity # 1번째: amount of milk for x in range(100): pour_amount = min(bucket_list[(x+1)%3][0]-bucket_list[(x+1)%3][1], bucket_list[x%3][1]) bucket_list[x%3][1] -= pour_amount bucket_list[(x+1)%3][1] += pour_amount print('\n'.join([str(bucket[1]) for bucket in bucket_list])) 2번: 1번 성공 후 참고.. 2020. 10. 16. 이전 1 다음