From 8223d988d9ed59e125c8b9064752075a2783f005 Mon Sep 17 00:00:00 2001 From: yenru0 <36220355+yenru0@users.noreply.github.com> Date: Sun, 9 Aug 2020 04:31:20 +0900 Subject: [PATCH] =?UTF-8?q?add=20kotlin=20name=20into=20README.md=20&=20?= =?UTF-8?q?=EC=9E=A1=20=ED=95=98=EB=82=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + zeta_python/completed/1251.py | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 zeta_python/completed/1251.py diff --git a/README.md b/README.md index 8a4613a..f2a476c 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ yenru0 code storage C | C | .c C++ | cpp | .cpp Python | python | .py + Kotlin | kotlin | .kt ## stdin.txt 코딩의 편리함을 위한 `stdin.txt`! 이것은 매우 중요 especially 쓰다 C로 because 나 not 편함 diff --git a/zeta_python/completed/1251.py b/zeta_python/completed/1251.py new file mode 100644 index 0000000..07b601f --- /dev/null +++ b/zeta_python/completed/1251.py @@ -0,0 +1,8 @@ +S = input() +MAX = '~'*len(S) +for i in range(1,len(S)-1): + for j in range(i+1, len(S)): + first, second, last = S[:i][::-1], S[i:j][::-1], S[j:][::-1] + if first + second + last < MAX: + MAX = first + second + last +print(MAX) \ No newline at end of file