728x90
반응형
<내가 푼 풀이>
def solution(a, d, included):
answer = 0
for i in range(0,len(included)):
if included[i] == True:
answer += a + (d*i)
return answer
반응형
'코딩 > 프로그래머스' 카테고리의 다른 글
[프로그래머스 / 파이썬] 주사위 게임2 (0) | 2024.03.06 |
---|---|
[프로그래머스 / 파이썬] 9로 나눈 나머지 (0) | 2024.03.04 |
[프로그래머스 / 파이썬] flag에 따라 다른 값 반환하기 (0) | 2024.03.02 |
[프로그래머스 / 파이썬] 조건 문자열 (2) | 2024.02.28 |
[프로그래머스 / 파이썬] 홀짝에 따라 다른 값 반환하기 (0) | 2024.02.26 |