-
[프로그래머스 76501] 음양 더하기Coding Test/프로그래머스 2021. 4. 20. 23:33
# 문제
내 풀이
def solution(absolutes, signs): answer = 0 for num, sign in zip(absolutes, signs): answer += num if sign else -num return answer
시간 복잡도
O(N)
'Coding Test > 프로그래머스' 카테고리의 다른 글
[프로그래머스 42626번] 더 맵게 (0) 2021.04.22 [프로그래머스 43165] 타겟 넘버 (0) 2021.04.15 [프로그래머스 43162번] 네트워크 (0) 2021.04.15 [프로그래머스 43163번] 단어 변환 (0) 2021.04.15 [프로그래머스 42747번] H-Index (0) 2020.12.23