https://school.programmers.co.kr/learn/courses/30/lessons/82612
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
def solution(price, money, count):
sum = 0
for i in range(count):
sum += price * (i + 1)
if sum - money > 0:
return sum - money
else:
return 0
728x90
반응형
'🔻Algorithm > Programmers' 카테고리의 다른 글
[Programmers] 프로그래머스 숫자 문자열과 영단어 Python (0) | 2024.05.07 |
---|---|
[Programmers] 프로그래머스 소수 찾기 Python (0) | 2024.05.06 |
[Programmers] 프로그래머스 성격 유형 검사하기 Python (0) | 2024.05.05 |
[Programmers] 프로그래머스 k번째수 Python (0) | 2024.05.04 |
[Programmers] 프로그래머스 가장 먼 노드 Python (0) | 2024.05.03 |