2023. 9. 14. 03:03, 알고리즘/프로그래머스
https://school.programmers.co.kr/learn/courses/30/lessons/120817
#include <string>
#include <vector>
using namespace std;
double solution(vector<int> numbers) {
double answer = 0;
for(auto c: numbers){
answer+=c;
}
answer/=numbers.size();
return answer;
}
'알고리즘 > 프로그래머스' 카테고리의 다른 글
Lv 0. 아이스 아메리카노 (0) | 2023.09.14 |
---|---|
Lv 0. 옷가게 할인 받기 (0) | 2023.09.14 |
Lv 0. 피자 나눠 먹기(3) (0) | 2023.09.14 |
Lv 0. 피자 나눠 먹기(2) - gcd(), lcm()은 <numeric> 헤더에 있다. (0) | 2023.09.14 |
Lv 0. 피자 나눠 먹기(1) - 나머지 연산자는 %다. &로 착각하지 말자. (0) | 2023.09.14 |
Comments, Trackbacks