From 74dd91e6da373f1096ff416a1347e6b7538afab0 Mon Sep 17 00:00:00 2001 From: hyesuuou <68391767+hyesuuou@users.noreply.github.com> Date: Fri, 31 Dec 2021 13:39:16 +0900 Subject: [PATCH] =?UTF-8?q?[#6]=20=EA=B7=B8=EB=A6=AC=EB=94=94,=20=EC=88=98?= =?UTF-8?q?=ED=95=99=EB=AC=B8=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Boj/\352\267\270\353\246\254\353\224\224/11047.py" | 13 +++++++++++++ .../4153.py" | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 "Boj/\352\267\270\353\246\254\353\224\224/11047.py" create mode 100644 "Boj/\352\270\260\353\263\270 \354\210\230\355\225\2312/4153.py" diff --git "a/Boj/\352\267\270\353\246\254\353\224\224/11047.py" "b/Boj/\352\267\270\353\246\254\353\224\224/11047.py" new file mode 100644 index 0000000..af24651 --- /dev/null +++ "b/Boj/\352\267\270\353\246\254\353\224\224/11047.py" @@ -0,0 +1,13 @@ +n, k = map(int, input().split()) +list = [] +for i in range(n): + list.append(int(input())) + +list.sort(reverse=True) + +ans = 0 +for i in list: + ans += k//i + k = k % i + +print(ans) \ No newline at end of file diff --git "a/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2312/4153.py" "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2312/4153.py" new file mode 100644 index 0000000..6c88a32 --- /dev/null +++ "b/Boj/\352\270\260\353\263\270 \354\210\230\355\225\2312/4153.py" @@ -0,0 +1,13 @@ +while True: + data = list(map(int, input().split())) + if data[0] == 0 and data[1] == 0 and data[2] == 0: + break + maxNum = max(data) + data = set(data) - set([maxNum]) + sum = 0 + for i in data: + sum += i*i + if sum == maxNum * maxNum: + print("right") + else: + print("wrong") \ No newline at end of file