๋ฌธ์
https://www.acmicpc.net/problem/11478
ํ์ด
# ๋ฐฑ์ค 11478๋ฒ ๋ฌธ์ - ์๋ก ๋ค๋ฅธ ๋ถ๋ถ ๋ฌธ์์ด์ ๊ฐ์
string = input()
stack = set()
for i in range(len(string)):
for j in range(i, len(string)):
stack.add(string[i:j+1])
print(len(stack))
'๐๏ธ Algorithm > ๐ฉ ๋ฐฑ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๐ฉ [๋ฐฑ์ค] [Python] [Silver1] 6588๋ฒ_๊ณจ๋๋ฐํ์ ์ถ์ธก (0) | 2023.04.25 |
---|---|
๐ฉ [๋ฐฑ์ค] [Python] [Gold1] 2042๋ฒ_๊ตฌ๊ฐ ํฉ ๊ตฌํ๊ธฐ (0) | 2023.04.24 |
๐ฉ [๋ฐฑ์ค] [Python] [Silver3] 2512๋ฒ_์์ฐ (0) | 2023.04.22 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold5] 1107๋ฒ_๋ฆฌ๋ชจ์ปจ (1) | 2023.04.21 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold5] 9251๋ฒ_LCS (0) | 2023.04.21 |