From a0e5f9502760a375a58d37cd0cba1fa62286d1ad Mon Sep 17 00:00:00 2001 From: yenru0 Date: Wed, 6 Mar 2024 14:49:31 +0900 Subject: [PATCH] boj step 5 rework --- zeta_cpp/completed/27866.cpp | 10 ++++++++++ zeta_cpp/completed/9086.cpp | 13 +++++++++++++ zeta_python/completed/9086.py | 4 ++++ 3 files changed, 27 insertions(+) create mode 100644 zeta_cpp/completed/27866.cpp create mode 100644 zeta_cpp/completed/9086.cpp create mode 100644 zeta_python/completed/9086.py diff --git a/zeta_cpp/completed/27866.cpp b/zeta_cpp/completed/27866.cpp new file mode 100644 index 0000000..0efa67b --- /dev/null +++ b/zeta_cpp/completed/27866.cpp @@ -0,0 +1,10 @@ +#include + +int main() { + std::string s; int N; + std::cin >> s; + std::cin >> N; + std::cout << s[N-1]; + + return 0; +} \ No newline at end of file diff --git a/zeta_cpp/completed/9086.cpp b/zeta_cpp/completed/9086.cpp new file mode 100644 index 0000000..961fd52 --- /dev/null +++ b/zeta_cpp/completed/9086.cpp @@ -0,0 +1,13 @@ +#include + +int main() { + int N; + std::string s; + std::cin >> N; + + for (int i = 0; i < N; i++) { + std::cin >> s; + std::cout << s[0] << s.back() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/zeta_python/completed/9086.py b/zeta_python/completed/9086.py new file mode 100644 index 0000000..afde7dc --- /dev/null +++ b/zeta_python/completed/9086.py @@ -0,0 +1,4 @@ +N = int(input()) +for i in range(N): + s = input() + print(s[0] + s[-1]) \ No newline at end of file