[프로그래머스] 내적

psy4072·2022년 10월 29일
0

Algorithm

목록 보기
9/23


내 답안

def solution(a, b):
	answer = 0
    for i in range(len(a)):
    	answer += a[i] * b[i]
    return answer

다른 사람 답안

def solution(a, b):
	answer = 0
    answer = [x*y for x, y in zip(a, b)]
    return sum(answer)
profile
Ⓓ🅰️🅣🄰 ♡♥︎

0개의 댓글