시행착오/[기타]
블로그에 코드 넣기 Color Scripter - (추가)코드 한쪽으로 치우치는 문제 수정
bled
2021. 5. 26. 22:37
Color Scripter
Simple & Flexible Syntax HighLighter
colorscripter.com
[Tistory Blog] 바뀐 Color Scripter 복사 방법 사용
이번 포스팅은 블로그에 코드를 첨부할 때 잘 사용하던 Color Scripter의 복사 방법이 바뀐 것에 대해 포스팅해보도록 하겠습니다. 티스토리 블로그 포스팅할 때 저는 Colort Scripter라는 사이트를 사
gabii.tistory.com
[추가]
코드를 티스토리 블로그에 html 로 붙여넣으면 코드가 다음과 같이 한 가운데 이상하게 붙여넣어지는 것을 확인할 수 있다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import sys
N, P = map(int, sys.stdin.readline().split())
lines = [[] for _ in range(6)]
answer = 0
for i in range(N):
l, p = map(int, sys.stdin.readline().split())
while lines[l-1]:
if lines[l-1][-1] > p:
lines[l-1].pop()
answer += 1
elif lines[l-1][-1] < p:
lines[l-1].append(p)
answer += 1
else:
break
if not lines[l-1]:
lines[l-1].append(p)
answer += 1
print(answer)
|
cs |
그때는 모드를 다시 기본모드로 바꾼다음 코드의 모서리를 마우스로 잡고 사진 크기 늘려주듯이 늘려주면
정상적으로 코드가 보이는 것을 확인할 수 있다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import sys
N, P = map(int, sys.stdin.readline().split())
lines = [[] for _ in range(6)]
answer = 0
for i in range(N):
l, p = map(int, sys.stdin.readline().split())
while lines[l-1]:
if lines[l-1][-1] > p:
lines[l-1].pop()
answer += 1
elif lines[l-1][-1] < p:
lines[l-1].append(p)
answer += 1
else:
break
if not lines[l-1]:
lines[l-1].append(p)
answer += 1
print(answer)
|
cs |