From 1de78fce0276d73ab25f2f1af9460aa9ab5aea29 Mon Sep 17 00:00:00 2001 From: yenru0 Date: Sat, 8 Aug 2020 05:22:51 +0900 Subject: [PATCH] =?UTF-8?q?python3=EC=9D=98=20=EB=82=B4=EC=9E=A5=20?= =?UTF-8?q?=EC=A0=95=EB=A0=AC=20=ED=95=A8=EC=88=98=EB=8A=94=20'stable=20so?= =?UTF-8?q?rt'=EC=9E=85=EB=8B=88=EB=8B=A4.=20=EC=A6=89,=20=EB=82=A0?= =?UTF-8?q?=EB=A8=B9=ED=95=98=EA=B8=B0=20=EC=A2=8B=EC=8A=B5=EB=8B=88?= =?UTF-8?q?=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zeta_python/completed/10814.py | 2 ++ zeta_python/completed/11651.py | 3 +++ zeta_python/completed/1181.py | 6 ++++++ zeta_python/completed/1431.py | 8 ++++++++ zeta_python/completed/2752.py | 7 +++++++ zeta_python/stdin.txt | 1 + 6 files changed, 27 insertions(+) create mode 100644 zeta_python/completed/10814.py create mode 100644 zeta_python/completed/11651.py create mode 100644 zeta_python/completed/1181.py create mode 100644 zeta_python/completed/1431.py create mode 100644 zeta_python/completed/2752.py diff --git a/zeta_python/completed/10814.py b/zeta_python/completed/10814.py new file mode 100644 index 0000000..e3d6d83 --- /dev/null +++ b/zeta_python/completed/10814.py @@ -0,0 +1,2 @@ +N = int(input()) +for s in sorted([tuple(map(str, input().split())) for i in range(N)], key=lambda v: int(v[0])): print(s[0], s[1]) diff --git a/zeta_python/completed/11651.py b/zeta_python/completed/11651.py new file mode 100644 index 0000000..07821b9 --- /dev/null +++ b/zeta_python/completed/11651.py @@ -0,0 +1,3 @@ +T = int(input()) +S = [tuple(map(int, input().split()))for _ in range(T)]; S.sort(key=lambda v: (v[1], v[0])) +[print(i, j)for i, j in S] diff --git a/zeta_python/completed/1181.py b/zeta_python/completed/1181.py new file mode 100644 index 0000000..3995feb --- /dev/null +++ b/zeta_python/completed/1181.py @@ -0,0 +1,6 @@ +N = int(input()) +S = [input() for i in range(N)] +S = list(set(S)) +S.sort(key=lambda v: (len(v), v)) +for s in S: + print(s) diff --git a/zeta_python/completed/1431.py b/zeta_python/completed/1431.py new file mode 100644 index 0000000..82f17ca --- /dev/null +++ b/zeta_python/completed/1431.py @@ -0,0 +1,8 @@ +N = int(input()) + + +def c(v): + return sum([int(i) for i in v if i.isdigit()]) + + +for c in sorted([input() for i in range(N)], key=lambda v: (len(v), c(v), v)):print(c) diff --git a/zeta_python/completed/2752.py b/zeta_python/completed/2752.py new file mode 100644 index 0000000..1f1a98c --- /dev/null +++ b/zeta_python/completed/2752.py @@ -0,0 +1,7 @@ +T = list(map(int, input().split())) +for i in range(2): + for j in range(2 - i): + if T[j] > T[j + 1]: + T[j], T[j + 1] = T[j + 1], T[j] +for i in T: + print(i, end=' ') # 버블 diff --git a/zeta_python/stdin.txt b/zeta_python/stdin.txt index e69de29..354bbaf 100644 --- a/zeta_python/stdin.txt +++ b/zeta_python/stdin.txt @@ -0,0 +1 @@ +3 1 2 \ No newline at end of file