From 3a718ca2effd0e1e1f14abb5292ba366b7b5efe6 Mon Sep 17 00:00:00 2001 From: yenru0 Date: Thu, 23 Apr 2020 12:49:27 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=91=EA=B8=88=EC=9D=98=20=EC=84=B8?= =?UTF-8?q?=ED=83=9C=EC=97=90=EC=84=9C=20=EC=9A=B0=EB=A6=AC=EA=B0=80=20?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8A=94=20BOJ=EB=A5=BC=20?= =?UTF-8?q?=ED=91=B8=EB=8A=94=20=ED=96=89=EB=8F=99=20=EC=A4=91=201?= =?UTF-8?q?=EB=B2=88=EC=A7=B8=20=ED=96=89=EC=9C=84,=20=EC=A6=89=20?= =?UTF-8?q?=ED=96=89=EB=8F=99=20=EA=B0=95=EB=A0=B9=20=EC=A0=9C1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zeta_python/1193.py | 27 --------------------------- zeta_python/completed/1065.py | 8 ++++++++ zeta_python/completed/10951.py | 5 +++++ zeta_python/completed/10996.py | 14 ++++++++++++++ zeta_python/completed/11021.py | 3 +++ zeta_python/completed/1316.py | 19 +++++++++++++++++++ zeta_python/completed/1330.py | 7 +++++++ zeta_python/completed/15596.py | 2 ++ zeta_python/completed/2523.py | 3 +++ zeta_python/completed/2839.py | 9 +++++++++ zeta_python/completed/4673.py | 9 +++++++++ zeta_python/completed/5622.py | 8 ++++++++ zeta_python/stdin.txt | 1 - 13 files changed, 87 insertions(+), 28 deletions(-) create mode 100644 zeta_python/completed/1065.py create mode 100644 zeta_python/completed/10951.py create mode 100644 zeta_python/completed/10996.py create mode 100644 zeta_python/completed/11021.py create mode 100644 zeta_python/completed/1316.py create mode 100644 zeta_python/completed/1330.py create mode 100644 zeta_python/completed/15596.py create mode 100644 zeta_python/completed/2523.py create mode 100644 zeta_python/completed/2839.py create mode 100644 zeta_python/completed/4673.py create mode 100644 zeta_python/completed/5622.py diff --git a/zeta_python/1193.py b/zeta_python/1193.py index 5495c39..e69de29 100644 --- a/zeta_python/1193.py +++ b/zeta_python/1193.py @@ -1,27 +0,0 @@ -""" -1193: 분수찾기 -문제: - 무한히 큰 배열에 다음과 같은 분수들이 적혀 있다. - - 1/1 1/2 1/3 1/4 1/5 … - 2/1 2/2 2/3 2/4 … … - 3/1 3/2 3/3 … … … - 4/1 4/2 … … … … - 5/1 … … … … … - … … … … … … - - 이와 같이 나열된 분수들을 1/1 -> 1/2 -> 2/1 -> 3/1 -> 2/2 -> … 과 같은 지그재그 순서로 차례대로 1번, 2번, 3번, 4번, 5번, … 분수라고 하자. - - X가 주어졌을 때, X번째 분수를 구하는 프로그램을 작성하시오. -입력: - 첫째 줄에 X(1 ≤ X ≤ 10,000,000)가 주어진다. -출력: - 첫째 줄에 분수를 출력한다. -""" -""" -TC1: -Input: -14 -Output: -2/4 -""" \ No newline at end of file diff --git a/zeta_python/completed/1065.py b/zeta_python/completed/1065.py new file mode 100644 index 0000000..70055d9 --- /dev/null +++ b/zeta_python/completed/1065.py @@ -0,0 +1,8 @@ +a = int(input()) +r = 0 +k = [] +for i in range(1, a+1): + k = tuple(map(int, str(i))) + if sum(k) == len(k)*(k[0] + k[-1]) / 2: + r += 1 +print(r) \ No newline at end of file diff --git a/zeta_python/completed/10951.py b/zeta_python/completed/10951.py new file mode 100644 index 0000000..25c9b97 --- /dev/null +++ b/zeta_python/completed/10951.py @@ -0,0 +1,5 @@ +while 1: + try: + print(sum(map(int,input().split()))) + except EOFError: + break diff --git a/zeta_python/completed/10996.py b/zeta_python/completed/10996.py new file mode 100644 index 0000000..d5777c0 --- /dev/null +++ b/zeta_python/completed/10996.py @@ -0,0 +1,14 @@ +N = int(input()) +for i in range(N): + for j in range(N): + if j % 2 == 0: + print("*", end='') + else: + print(" ", end='') + print() + for j in range(N): + if j % 2 == 1: + print("*", end='') + else: + print(" ", end='') + print() diff --git a/zeta_python/completed/11021.py b/zeta_python/completed/11021.py new file mode 100644 index 0000000..2132b90 --- /dev/null +++ b/zeta_python/completed/11021.py @@ -0,0 +1,3 @@ +N = int(input()) +for i in range(N): + print("Case #%s:"%(i+1), sum(map(int, input().split()))) \ No newline at end of file diff --git a/zeta_python/completed/1316.py b/zeta_python/completed/1316.py new file mode 100644 index 0000000..d975cd2 --- /dev/null +++ b/zeta_python/completed/1316.py @@ -0,0 +1,19 @@ +N = int(input()) +c = 0 +for i in range(N): + s = input() + beforehead = s[0] + + befores = set() + befores.add(beforehead) + for t in s: + if t == beforehead: + continue + elif t in befores: + break + else: + beforehead = t + befores.add(t) + else: + c+=1 +print(c) \ No newline at end of file diff --git a/zeta_python/completed/1330.py b/zeta_python/completed/1330.py new file mode 100644 index 0000000..5959fbc --- /dev/null +++ b/zeta_python/completed/1330.py @@ -0,0 +1,7 @@ +a,b = map(int, input().split()) +if a > b: + print(">") +elif a < b: + print("<") +else: + print("==") \ No newline at end of file diff --git a/zeta_python/completed/15596.py b/zeta_python/completed/15596.py new file mode 100644 index 0000000..40787c3 --- /dev/null +++ b/zeta_python/completed/15596.py @@ -0,0 +1,2 @@ +def solve(a): + return sum(a) diff --git a/zeta_python/completed/2523.py b/zeta_python/completed/2523.py new file mode 100644 index 0000000..fb0a24f --- /dev/null +++ b/zeta_python/completed/2523.py @@ -0,0 +1,3 @@ +N = int(input()) +for i in range(2*N-1): + print("*"*(N-abs(N-1-i))) \ No newline at end of file diff --git a/zeta_python/completed/2839.py b/zeta_python/completed/2839.py new file mode 100644 index 0000000..dc1e904 --- /dev/null +++ b/zeta_python/completed/2839.py @@ -0,0 +1,9 @@ +N = int(input()) +a = 0 +while (N%5+5*a)%3 != 0 : + a+=1 + +if N//5-a < 0: + print(-1) +else: + print((N%5+5*a)//3 + (N//5-a)) \ No newline at end of file diff --git a/zeta_python/completed/4673.py b/zeta_python/completed/4673.py new file mode 100644 index 0000000..6bcc2d4 --- /dev/null +++ b/zeta_python/completed/4673.py @@ -0,0 +1,9 @@ +a=set(i for i in range(1,10001)) +s = set() +for i in range(1,10001): + for j in str(i): + i+=int(j) + s.add(i) +a = sorted(a-s) +for i in a: + print(i) \ No newline at end of file diff --git a/zeta_python/completed/5622.py b/zeta_python/completed/5622.py new file mode 100644 index 0000000..8512940 --- /dev/null +++ b/zeta_python/completed/5622.py @@ -0,0 +1,8 @@ +ss = 0 +for n in input(): + for i, s in enumerate(["ABC", "DEF", "GHI", "JKL", "MNO", "PQRS", "TUV", "WXYZ"]): + if n in s: + ss += i+2+1 + + +print(ss) \ No newline at end of file diff --git a/zeta_python/stdin.txt b/zeta_python/stdin.txt index 56a6051..e69de29 100644 --- a/zeta_python/stdin.txt +++ b/zeta_python/stdin.txt @@ -1 +0,0 @@ -1 \ No newline at end of file