백준 1546 파이썬1 [백준/파이썬3/1546] 평균 풀이 N = map(int, input().split()) #작동X score = list(map(int, input().split())) total =0 for i in range(len(score)): total = total + (score[i]/max(score)*100) print(total/(i+1)) 우선 파이썬에서는 입력받는 개수가 중요하지 않으므로 첫재줄은 그냥 N을 입력 받고 따로 작동하지 않는다. score라는 배열에 값을 입력받고, 그다음에 for문을 사용하여 낮은점수를 (score[i]/max(score)*100)을 사용하여 UP시켜주면된다. 2019. 12. 21. 이전 1 다음