본문 바로가기

Python/code problem

[sw expert academy] 3314. 보충학습과 평균

https://swexpertacademy.com/main/main.do

 

SW Expert Academy

SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!

swexpertacademy.com

 

T = int(input())
for t in range(1,T+1):
    scores = list(map(int,input().split()))
    new_scores =[]
    for score in scores:
        if score<40:
            score=40
        new_scores.append(score)
    result = sum(new_scores)//len(scores)
    print("#{} {}".format(t,result))
  • 63,800 kb메모리
  • 1,216 ms실행시간