programmers | Lv1.x만큼 간격이 있는 n개의 숫자 [Python]

yeonk·2022년 2월 6일
0

algorithm

목록 보기
4/88
post-thumbnail

💡 Python 3






🔗 문제

x만큼 간격이 있는 n개의 숫자 [Link]






💻 코드

def solution(x, n):
    answer = []
    y = 0
    for _ in range(n):
        y += x
        answer.append(y)
    return answer

0개의 댓글