• Skip to primary navigation
  • Skip to content
  • Skip to footer
우빈의 공부일지
  • Home

    Woo Bin

    성장을 목표로 끊임없이 배우고 있습니다.

    • Seoul
    • Email
    • 📂 전체 글 수 149 개
    • DeepLearning
      • NLP 논문 리뷰 (18)
      • ML & DL (7)
      Coding Test
      • 프로그래머스 (42)
      • 백준 (35)
      TIL 공부 일지
      • TIL(23)
      데이터 분석
      • project(21)
      • GA4(3)

    [프로그래머스][Python] 크레인 인형뽑기 게임

    Index

    def solution(board,moves):
        count=0
        bucket=[]
        for move in moves:
            for i in range(len(board)):
                if board[i][move-1] >0:
                    bucket.append(board[i][move-1])
                    board[i][move-1]=0
                    if bucket[-1:]==bucket[-2:-1]:
                        
                        bucket = bucket[:-2]
                        count+=2
                    break
        return count
    

    Categories: Algorithm

    Updated: May 1, 2022

    Share on

    Twitter Facebook LinkedIn
    Previous Next

    You may also enjoy

    구글 애널리틱스4 분석 환경 설정

    구글 애널리틱스4 시작 전 환경 설정을 알아봅시다!

    디지털 마케팅의 종류

    구글 애널리틱스의 정의와 디지털 마케팅의 종류를 알아봅시다!

    구글 애널리틱스의 데이터 수집 원리

    구글 애널리틱스의 디지털 수집 원리를 알아봅시다!

    A/B Test 프로젝트

    빅쿼리 및 파이썬을 통해 A/B Test 과정을 수행하는 프로젝트입니다.

    • Follow:
    • Feed
    © 2023 Your Name. Powered by Jekyll & Minimal Mistakes.