728x90
반응형

이 문제도, 그렇게 어렵지 않은데 왜 그렇게 점수를 후하게 주는지 모르겠다.

다른 기초 문제들은 1점인데 무려 9점이나 줬다.

 

 

def solution(price, money, count):
    answer = 0
    total = 0
    
    for i in range(1,count+1):
        total += price * i
    
    if total > money:
        answer = total - money
    else :
        answer = 0
    

    return answer

 

https://school.programmers.co.kr/learn/courses/30/lessons/82612

 

프로그래머스

코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.

programmers.co.kr

 

728x90
반응형

+ Recent posts