Skip to content

Commit 85935ec

Browse files
committed
113차 1번 문제풀이
1 parent 1c74f59 commit 85935ec

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

live11/test113/문제1/조진우.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ function solution(input) {
2323

2424
numbers.sort();
2525

26+
let consistent = true;
27+
for (let i = 0; i < N - 1; i++) {
28+
if (numbers[i + 1].startsWith(numbers[i])) {
29+
consistent = false;
30+
break;
31+
}
32+
}
33+
2634
output.push(consistent ? "YES" : "NO");
2735
}
2836

0 commit comments

Comments
 (0)