728x90
반응형
SMALL
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<int> numbers) {
sort(numbers.begin(), numbers.end());
int len = numbers.size();
return numbers[len-1] * numbers[len-2];
}
728x90
반응형
LIST
'C++' 카테고리의 다른 글
[프로그래머스] 머쓱이보다 키 큰 사람 (0) | 2025.09.03 |
---|---|
[프로그래머스] 자릿수 더하기 (0) | 2025.09.03 |
[프로그래머스] 세균증식 (0) | 2025.09.03 |
[프로그래머스] 편지 (0) | 2025.09.02 |
[프로그래머스] 뒤집힌 문자열 (0) | 2025.09.02 |
댓글