💻첫번째 시도 테스트케이스(O),채점결과 100점
def solution(price, money, count):
tmp=0
answer = 0
for i in range(1,count+1):
tmp+=price*i
if tmp>money:
answer=tmp-money
else:
answer=0
return answer
소요시간 10분
접근방식:이용 횟수에 따라 요금이 인상된다는것을 어떻게 짜느냐가 관건이었고 price * i를 tmp에 더해주는 방식으로 접근함
셀프 피드백:없음