code_practice

Hackerrank 레벨업 하기26 [Picking Numbers]

  • By Khel Kim, 김현호
  • 21 Jan 2019
  • Tags : coding_practice

Hackerrank 레벨업하기
문제
Picking Numbers

def pickingNumbers(a):
    collect = []
    for i in range(len(a)):
        collect.append([])
        for j in a:
            if 0 <= a[i] - j <= 1:
                collect[i].append(j)
    count = []
    for i in collect:
        count.append(len(i))
    return max(count)

궁금하신게 있다면 메일 주세요.
k2h7913@daum.net
cafehero123@gmail.com