From e14a61311d0d518460a287e130c1b8f14405878d Mon Sep 17 00:00:00 2001 From: daun3046 Date: Wed, 27 Apr 2022 23:25:04 +0900 Subject: [PATCH 1/4] =?UTF-8?q?1181=EB=8B=A8=EC=96=B4=EC=A0=95=EB=A0=AC=20?= =?UTF-8?q?=EA=B9=80=EB=8B=A4=EC=9A=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../solution.py" | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git "a/week2/1181\353\213\250\354\226\264\354\240\225\353\240\254/solution.py" "b/week2/1181\353\213\250\354\226\264\354\240\225\353\240\254/solution.py" index e69de29..1eb6107 100644 --- "a/week2/1181\353\213\250\354\226\264\354\240\225\353\240\254/solution.py" +++ "b/week2/1181\353\213\250\354\226\264\354\240\225\353\240\254/solution.py" @@ -0,0 +1,9 @@ +n = int(input()) +word_list = [] +for i in range(n): + word_list.append(input()) +word_list = list(set(word_list)) +word_list = sorted(word_list) +word_list = sorted(word_list, key = lambda x: len(x)) +for word in word_list: + print(word) \ No newline at end of file From 665e753662a27b90ba1990929ad36b93f230d8a0 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Thu, 28 Apr 2022 00:52:47 +0900 Subject: [PATCH 2/4] =?UTF-8?q?week2=2017478=20=EC=9E=AC=EA=B7=80=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EA=B9=80=EB=8B=A4=EC=9A=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../solution.py" | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git "a/week2/17478\354\236\254\352\267\200\355\225\250\354\210\230\352\260\200\353\255\224\352\260\200\354\232\224/solution.py" "b/week2/17478\354\236\254\352\267\200\355\225\250\354\210\230\352\260\200\353\255\224\352\260\200\354\232\224/solution.py" index e69de29..7b594df 100644 --- "a/week2/17478\354\236\254\352\267\200\355\225\250\354\210\230\352\260\200\353\255\224\352\260\200\354\232\224/solution.py" +++ "b/week2/17478\354\236\254\352\267\200\355\225\250\354\210\230\352\260\200\353\255\224\352\260\200\354\232\224/solution.py" @@ -0,0 +1,35 @@ +def chatbot(num): + global text1, text2, text3, text4, text5, text6, marks + + if num == 0: + print(marks + text1 + '\n' + marks + text5 + '\n' + marks + text6) + return + + # print("#### marks:", marks, "####") + print(marks + text1 + '\n' + marks + text2 + + '\n' + marks + text3 + '\n' + marks + text4) + + marks += '____' + # print("after plus marks:", marks) + + chatbot(num - 1) + marks = marks[4:] + # print("after minus marks:", marks) + print(marks + text6) + + +n = int(input()) + +marks = '' + +text1 = '"재귀함수가 뭔가요?"' +text2 = '"잘 들어보게. 옛날옛날 한 산 꼭대기에 이세상 모든 지식을 통달한 선인이 있었어.' +text3 = '마을 사람들은 모두 그 선인에게 수많은 질문을 했고, 모두 지혜롭게 대답해 주었지.' +text4 = '그의 답은 대부분 옳았다고 하네. 그런데 어느 날, 그 선인에게 한 선비가 찾아와서 물었어."' + +text5 = '"재귀함수는 자기 자신을 호출하는 함수라네"' +text6 = '라고 답변하였지.' + + +print('어느 한 컴퓨터공학과 학생이 유명한 교수님을 찾아가 물었다.') +chatbot(n) \ No newline at end of file From d28a13a0d899104de277acea2380c8fa089831e5 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Thu, 28 Apr 2022 01:16:22 +0900 Subject: [PATCH 3/4] =?UTF-8?q?10773=20=EC=A0=9C=EB=A1=9C=20=EA=B9=80?= =?UTF-8?q?=EB=8B=A4=EC=9A=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "week2/10773\354\240\234\353\241\234/solution.py" | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git "a/week2/10773\354\240\234\353\241\234/solution.py" "b/week2/10773\354\240\234\353\241\234/solution.py" index e69de29..b8afd95 100644 --- "a/week2/10773\354\240\234\353\241\234/solution.py" +++ "b/week2/10773\354\240\234\353\241\234/solution.py" @@ -0,0 +1,11 @@ +k = int(input()) +num_list = [] + +for i in range(k): + n = int(input()) + if n == 0: + num_list.pop() + else: + num_list.append(n) + +print(sum(num_list)) \ No newline at end of file From 2feeb94799155bca9074cddad9d0d0d96837d995 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Thu, 28 Apr 2022 02:30:43 +0900 Subject: [PATCH 4/4] =?UTF-8?q?2751=20=EC=88=98=EC=A0=95=EB=A0=AC=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20=EA=B9=80=EB=8B=A4=EC=9A=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../solution.py" | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git "a/week2/2751\354\210\230\354\240\225\353\240\254\355\225\230\352\270\2602/solution.py" "b/week2/2751\354\210\230\354\240\225\353\240\254\355\225\230\352\270\2602/solution.py" index e69de29..1de7cf5 100644 --- "a/week2/2751\354\210\230\354\240\225\353\240\254\355\225\230\352\270\2602/solution.py" +++ "b/week2/2751\354\210\230\354\240\225\353\240\254\355\225\230\352\270\2602/solution.py" @@ -0,0 +1,19 @@ +import sys +# import time +# start_time = time.time() +# 예제 기준 time: 2.5560574531555176 + +n = int(sys.stdin.readline()) + +num_list = [] + +for _ in range(n): + num_list.append(int(sys.stdin.readline())) + +num_list.sort() + +for num in num_list: + print(num) + +# end_time = time.time() +# print("time:", end_time - start_time)