From faed971d80b5dd41ae8ffc8b39df40e9d8043485 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Fri, 15 Apr 2022 22:05:46 +0900 Subject: [PATCH 1/8] commit1 --- request_test/solution.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/request_test/solution.py b/request_test/solution.py index e69de29..d27d3ba 100644 --- a/request_test/solution.py +++ b/request_test/solution.py @@ -0,0 +1,2 @@ +print("test") +print("12345") \ No newline at end of file From 6bcf8c6a5cf4b055850da55a6023e9559dd70151 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Wed, 20 Apr 2022 22:40:31 +0900 Subject: [PATCH 2/8] =?UTF-8?q?=EB=8D=94=ED=95=98=EA=B8=B0=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=ED=81=B4=201110=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" | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git "a/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" "b/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" index e69de29..5600811 100644 --- "a/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" +++ "b/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" @@ -0,0 +1,10 @@ +originalNumber = int(input()) +count = 0 +newNumber = originalNumber # 첫 시작 숫자가 입력숫자 +# //10 십의 자리 , %10 일의 자리 +while True: + count += 1 + newNumber = (newNumber%10)*10+(newNumber//10+newNumber%10)%10 + if originalNumber == newNumber: + break +print(count) \ No newline at end of file From de1e0045b17f0198f27d93d48558c6d5b17a47c9 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Wed, 20 Apr 2022 22:47:58 +0900 Subject: [PATCH 3/8] =?UTF-8?q?1110=EB=8D=94=ED=95=98=EA=B8=B0=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=ED=81=B4=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" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" "b/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" index 5600811..a00787f 100644 --- "a/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" +++ "b/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" @@ -7,4 +7,4 @@ newNumber = (newNumber%10)*10+(newNumber//10+newNumber%10)%10 if originalNumber == newNumber: break -print(count) \ No newline at end of file +print(count) From 195a233564011a87bf02b4b17fc70e53856d6163 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Wed, 20 Apr 2022 22:57:30 +0900 Subject: [PATCH 4/8] =?UTF-8?q?1110=EB=8D=94=ED=95=98=EA=B8=B0=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=ED=81=B4=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" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" "b/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" index a00787f..b735c07 100644 --- "a/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" +++ "b/week1/1110\353\215\224\355\225\230\352\270\260\354\202\254\354\235\264\355\201\264/solution.py" @@ -7,4 +7,4 @@ newNumber = (newNumber%10)*10+(newNumber//10+newNumber%10)%10 if originalNumber == newNumber: break -print(count) +print(count) \ No newline at end of file From 319bba76007e93518c46b93b37f3a10389be7cee Mon Sep 17 00:00:00 2001 From: daun3046 Date: Wed, 20 Apr 2022 23:05:55 +0900 Subject: [PATCH 5/8] =?UTF-8?q?1977=20=EC=99=84=EC=A0=84=EC=A0=9C=EA=B3=B1?= =?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" | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git "a/week1/1977\354\231\204\354\240\204\354\240\234\352\263\261\354\210\230/solution.py" "b/week1/1977\354\231\204\354\240\204\354\240\234\352\263\261\354\210\230/solution.py" index e69de29..5e11106 100644 --- "a/week1/1977\354\231\204\354\240\204\354\240\234\352\263\261\354\210\230/solution.py" +++ "b/week1/1977\354\231\204\354\240\204\354\240\234\352\263\261\354\210\230/solution.py" @@ -0,0 +1,16 @@ +import math + +M = int(input()) +N = int(input()) +nums = [] + +for i in range(M, N + 1): + if math.sqrt(i) == int(math.sqrt(i)): + # print("correct:", math.sqrt(i), int(math. sqrt(i))) + nums.append(i) # 완전제곱수를 리스트에 저장 + # print("incorrect:", math.sqrt(i), int(math.sqrt(i))) +if nums: + print(sum(nums)) + print(min(nums)) +else: + print(-1) \ No newline at end of file From 597739b03f8ab0524520c5ccc2ea69932e199d91 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Wed, 20 Apr 2022 23:14:57 +0900 Subject: [PATCH 6/8] =?UTF-8?q?10870=20=ED=94=BC=EB=B3=B4=EB=82=98?= =?UTF-8?q?=EC=B9=98=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" | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git "a/week1/10870\355\224\274\353\263\264\353\202\230\354\271\230\354\210\2305/solution.py" "b/week1/10870\355\224\274\353\263\264\353\202\230\354\271\230\354\210\2305/solution.py" index e69de29..5668508 100644 --- "a/week1/10870\355\224\274\353\263\264\353\202\230\354\271\230\354\210\2305/solution.py" +++ "b/week1/10870\355\224\274\353\263\264\353\202\230\354\271\230\354\210\2305/solution.py" @@ -0,0 +1,10 @@ +def F(n): + if n == 0: + return 0 + elif n == 1: + return 1 + else: + return F(n-1) + F(n-2) + +n = int(input()) +print(F(n)) \ No newline at end of file From b3224362d45b20a4b5fc58ddb0d38b4afbe0b42f Mon Sep 17 00:00:00 2001 From: daun3046 Date: Wed, 20 Apr 2022 23:27:25 +0900 Subject: [PATCH 7/8] =?UTF-8?q?17910jointAttack=EA=B9=80=EB=8B=A4=EC=9A=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- week1/17910jointAttack/solution.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/week1/17910jointAttack/solution.py b/week1/17910jointAttack/solution.py index e69de29..5921e3e 100644 --- a/week1/17910jointAttack/solution.py +++ b/week1/17910jointAttack/solution.py @@ -0,0 +1,21 @@ +from fractions import Fraction + +def add(left, right): + x_list.pop() + # print("pop된 x_list:", x_list) + if len(x_list) == 1: + left = x_list[-1] + right = Fraction(1, right) + # print("1left:", left, "1right:", right) + return Fraction(left + right) + else: + # print("2left:", left, "2right:", right) + # print("next left:", x_list[-2], "next right:", Fraction(left + Fraction(1, right))) + return add(x_list[-2], left + Fraction(1, right)) + +x = int(input()) +x_list = list(map(int, input().split())) +if len(x_list) == 1: + print(x_list[0]) +else: + print(add(x_list[-2], x_list[-1])) \ No newline at end of file From ad2f4b2f903b61541daa4483e8d605e4e2bc02d2 Mon Sep 17 00:00:00 2001 From: daun3046 Date: Sat, 23 Apr 2022 20:51:33 +0900 Subject: [PATCH 8/8] =?UTF-8?q?9012=EA=B4=84=ED=98=B8=20=EA=B9=80=EB=8B=A4?= =?UTF-8?q?=EC=9A=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "week1/9012\352\264\204\355\230\270/solution.py" | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git "a/week1/9012\352\264\204\355\230\270/solution.py" "b/week1/9012\352\264\204\355\230\270/solution.py" index e69de29..ad23950 100644 --- "a/week1/9012\352\264\204\355\230\270/solution.py" +++ "b/week1/9012\352\264\204\355\230\270/solution.py" @@ -0,0 +1,11 @@ +def isRight(s): + while True: + s = s.replace("()", "") + if "()" not in s: + if s: return "NO" + else: return "YES" + +T = int(input()) +for i in range(T): + strings = input() + print(isRight(strings)) \ No newline at end of file