[Programmers/코딩테스트 연습] 과일장수 Python
Lv.1 과일장수 (python) #include #include #include using namespace std; int solution(int k, int m, vector score) { int answer = 0; sort(score.begin(), score.end(), greater()); for(int l = 1; (l*m)-1 < score.size(); l++) { answer += (m * score[l*m -1]); } return answer; } C/C++로 먼저 했었는데, 10, 11, 12, 13 테스트가 시간 초과로 실패했다. 대체 뭐가 문제인지 모르겠고 백엔드에서는 c/c++ 안쓰는 것 같아서 그냥 앞으로 python이랑 java에 전념하기로... #include #in..
2022.11.21