Algorithm/프로그래머스 연습 문제
프로그래머스 / 코딩 테스트 / 행렬의 덧셈
Forgotten One
2020. 12. 24. 12:51
문제 설명
문제 해결
comprehension을 쓰면 깔끔하게 작성할 수 있다.
def solve(x, n):
return [x * i for i in range(1,n+1)]
def solution(x, n):
answer = solve(x,n)
return answer