Baekjoon Online Judge
[python]1546.평균
((•_•))
2021. 1. 1. 22:12
인성이 의심되는 세준이의 기말고사 평균을 구하는 문제이다.
간단하다.
1
2
3
4
5
6
7
8
9
|
subject=int(input()) #과목 수 입력
realScore_list=list(map(int, input().split())) #각 과목당 점수 입력
fakeScore_list=[] #조작한 점수를 담는 리스트
Max=max(realScore_list) #세준이의 원래 기말고사 점수중 최고 점수
for i in realScore_list:
fakeScore_list.append(i/Max*100) #점수 조작
print(sum(fakeScore_list)/subject) #평균 출력
|
cs |