euisblue
12944. 평균 구하기

Level 1 평균 구하기

시간 복잡도: O(N)

1#include <bits/stdc++.h> 2using namespace std; 3 4double solution(vector<int> arr) { 5 int sum = accumulate(arr.begin(), arr.end(), 0); 6 return (sum / (double)arr.size()); 7}