728x90
반응형
SMALL
#include <string>
#include <vector>
using namespace std;
int solution(int num1, int num2) {
return num1%num2;
}
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<int> array) {
sort(array.begin(), array.end());
return array[ array.size() / 2; ];
}
728x90
반응형
LIST
'C++' 카테고리의 다른 글
[프로그래머스] 짝수는 싫어요 (0) | 2025.09.01 |
---|---|
[프로그래머스] 최빈값 구하기 (수정중) (0) | 2025.09.01 |
[프로그래머스] 배열 두 배 만들기 (0) | 2025.09.01 |
[프로그래머스] 분수의 덧셈 (0) | 2025.09.01 |
[프로그래머스] 숫자 비교하기 (0) | 2025.08.29 |
댓글