PassingCars1 [Codility] Passing Cars (JavaScript) https://app.codility.com/programmers/lessons/5-prefix_sums/passing_cars/ PassingCars coding task - Learn to Code - CodilityCount the number of passing cars on the road.app.codility.com 문제:도로에 겹치는 차량 쌍 개수를 반환한다.내 풀이:function solution(A) { let eastCnt = 0; let pairs = 0; for (const a of A) { if (a === 0) { eastCnt++; } else { pairs += eastCnt; } .. 2025. 6. 14. 이전 1 다음