Skip to content

Commit d7e9a27

Browse files
committed
점의 위치 구하기 / 기초
1 parent 952ddb9 commit d7e9a27

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function solution(dot) {
2+
let queue = [...dot]
3+
4+
const x = queue.shift();
5+
const y = queue.shift();
6+
7+
if(x > 0 && y > 0) return 1;
8+
if(x < 0 && y > 0) return 2;
9+
if(x < 0 && y < 0) return 3;
10+
return 4;
11+
}

0 commit comments

Comments
 (0)