지나가던 개발자
[Python] 백준 2196번((중략)) 문제 풀이 본문
n = int(input())
s = input()
if n <= 25:
print(s)
else:
mid = s[11:-11]
sentences = s.split(".")
printed = False
for i in sentences:
if mid in i+".":
print(s[:11] + "..." + s[-11:])
printed = True
break
if not printed:
print(s[:9] + "......" + s[-10:])
'PS > Python' 카테고리의 다른 글
[Python] 백준 14584번(암호 해독) 문제 풀이 (0) | 2022.11.09 |
---|---|
[Python] 백준 25325번(학생 인기도 측정) 문제 풀이 (0) | 2022.11.08 |
[Python] 백준 15904번(UCPC는 무엇의 약자일까?) 문제 풀이 (0) | 2022.11.07 |
[Python] 백준 12871번(무한 문자열) 문제 풀이 (0) | 2022.11.06 |
[Python] 백준 11008번(복붙의 달인) 문제 풀이 (0) | 2022.11.06 |
Comments