Question
Test Case 1
Shell
복사
Test Case 2
Shell
복사
Solve
Python
복사
실행시간 : ms
function solution(info, query) {
let result = new Array(query.length).fill(0);
for (let k = 0; k < query.length; k++) {
const [cLanguage, , cPosition, , cCareer, , cSoulFood, cScore] = query[k].split(' ');
for (let i of info) {
let [language, position, career, soulFood, score] = i.split(' ');
if (cLanguage !== '-' && cLanguage !== language) continue;
if (cPosition !== '-' && cPosition !== position) continue;
if (cCareer !== '-' && cCareer !== career) continue;
if (cSoulFood !== '-' && cSoulFood !== soulFood) continue;
if (parseInt(cScore) > parseInt(score)) continue;
result[k] += 1;
}
}
return result;
}
JavaScript
복사
ㅎㅎ 역시나 실패
실행시간 : ms