백준 - 1546 평균

AekT·2021년 10월 23일
0

단계별로풀어보기

목록 보기
8/11
post-thumbnail

백준 1546 평균

문제 : https://www.acmicpc.net/problem/1546

Swift :

readLine()
let input = readLine()!.split(separator: " ").map{Int($0)!}
let max = Double(input.max()!)
let convert = input.map{Double($0) / max * 100}
print(convert.reduce(0, +)/Double(convert.count))
profile
으악

0개의 댓글