File tree 1 file changed +48
-39
lines changed
1 file changed +48
-39
lines changed Original file line number Diff line number Diff line change 1
1
## 파일 업로드 양식
2
2
3
- - ### 파일 이름
4
- - .js
5
- - 예) ` Lv0_2018_카카오_별풍선게임_LRU_호준.js `
6
- - 출제 연도가 없는 예) ` Lv0_0000_프로그래머스_hello_스택큐_호준.js `
7
- - .py
8
- - 예) ` Lv0_2018_카카오_별풍선게임_LRU_호준.py `
9
- - 출제 연도가 없는 예) ` Lv0_0000_프로그래머스_hello_스택큐_호준.py `
3
+ ### 파일 이름
4
+
5
+ - .js
6
+ - 예) ` Lv0_2018_카카오_별풍선게임_LRU_호준.js `
7
+ - 출제 연도가 없는 예) ` Lv0_0000_프로그래머스_hello_스택큐_호준.js `
8
+ - .py
9
+
10
+ - 예) ` Lv0_2018_카카오_별풍선게임_LRU_호준.py `
11
+ - 출제 연도가 없는 예) ` Lv0_0000_프로그래머스_hello_스택큐_호준.py `
12
+
13
+ - 문제 이름에 띄어쓰기가 있을 경우, 그대로 작성하기
14
+ - 언더바(\_ )로 작성할 경우 데이터가 취합되지 않습니다. (excluded_list에 추가됨)
15
+ - 올바른 예)
16
+ ` Lv1_0000_월간코드챌린지시즌2_음양 더하기_구현_성철.py `
17
+ - 잘못된 예)
18
+ ` Lv1_0000_월간코드챌린지시즌2_음양_더하기_구현_성철.py `
10
19
11
20
---
12
21
13
- - ### 파일 내용
22
+ ### 파일 내용
14
23
15
- - .js
24
+ - .js
16
25
17
- ``` js
18
- function solution (s ) {
19
- let isOpen = 0 ;
20
- s = s .split (' ' );
26
+ ``` js
27
+ function solution (s ) {
28
+ let isOpen = 0 ;
29
+ s = s .split (' ' );
21
30
22
- for (let i = 0 ; i < s .length ; i++ ) {
23
- if (s[i] === ' (' ) {
24
- isOpen++ ;
25
- } else {
26
- if (isOpen < 1 ) {
27
- return false ;
28
- }
29
- isOpen-- ;
31
+ for (let i = 0 ; i < s .length ; i++ ) {
32
+ if (s[i] === ' (' ) {
33
+ isOpen++ ;
34
+ } else {
35
+ if (isOpen < 1 ) {
36
+ return false ;
30
37
}
38
+ isOpen-- ;
31
39
}
32
- return isOpen === 0 ? true : false ;
33
40
}
34
- ```
35
-
36
- - .py
37
- ` ` ` python
38
- def solution(quiz):
39
- answer = []
40
- for i in quiz:
41
- c = i.split('=')
42
- for j in range (len(c)):
43
- if eval(c[0]) == eval(c[1]):
44
- answer.append('O')
45
- break
46
- else:
47
- answer.append('X')
48
- break
49
- return answer
50
- ` ` `
41
+ return isOpen === 0 ? true : false ;
42
+ }
43
+ ```
44
+
45
+ - .py
46
+ ``` python
47
+ def solution (quiz ):
48
+ answer = []
49
+ for i in quiz:
50
+ c = i.split(' =' )
51
+ for j in range (len (c)):
52
+ if eval (c[0 ]) == eval (c[1 ]):
53
+ answer.append(' O' )
54
+ break
55
+ else :
56
+ answer.append(' X' )
57
+ break
58
+ return answer
59
+ ```
51
60
52
61
---
You can’t perform that action at this time.
0 commit comments