def solution(t, p):
    count = 0
    for i in range(len(t) - len(p) + 1):
        num = int(''.join(t[i: i + len(p)]))
        if num <= int(p):
            count += 1
    return count

Untitled

def solution(t, p):
    count = 0
    arr = list(t[: len(p) - 1])
    for i in range(len(p) - 1, len(t)):
        arr.append(t[i])
        num = int(''.join(arr))
        if num <= int(p):
            count += 1
            print(num)
        arr.pop(0)
    return count

Untitled

수업 차수별 Keywords & Recap 및 과제

Prettier

copy config JSON > save as .prettierrc