BOJ/백준-11656-python
문제
풀이
- 첫째 줄에 문자열 s가 주어진다.
- s는 알파벳 소문자로만 이루어져 있고, 길이는 1,000보다 작거나 같다.
- 첫째 줄부터 s의 접미사를 사전순으로 한 줄에 하나씩 출력한다.
코드
# boj, 11656:접미사 배열, python3
def solution(word):
return '\n'.join(sorted([word[x:] for x in range(len(word))]))
if __name__ == '__main__':
s = str(input()) # baekjoon
print(solution(s))
결과
출처 && 깃허브
Author And Source
이 문제에 관하여(BOJ/백준-11656-python), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@cosmos/BOJ백준-11656-python저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)