From e784b1410b654323d58e57339be2386e7d93fbd5 Mon Sep 17 00:00:00 2001 From: vss121 Date: Sun, 3 Jul 2022 15:33:50 +0900 Subject: [PATCH 1/6] =?UTF-8?q?[1=EC=A3=BC=EC=B0=A8]=20:=20=EA=B9=80?= =?UTF-8?q?=EC=98=88=EA=B2=BD=20-=2016503=20=EA=B4=84=ED=98=B8=20=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EC=82=AC=EC=B9=99=EC=97=B0=EC=82=B0=20Bronze3=20(C?= =?UTF-8?q?BNU-Nnet#44)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...54\354\271\231\354\227\260\354\202\260.py" | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 "\352\271\200\354\230\210\352\262\275/16503 \352\264\204\355\230\270 \354\227\206\353\212\224 \354\202\254\354\271\231\354\227\260\354\202\260.py" diff --git "a/\352\271\200\354\230\210\352\262\275/16503 \352\264\204\355\230\270 \354\227\206\353\212\224 \354\202\254\354\271\231\354\227\260\354\202\260.py" "b/\352\271\200\354\230\210\352\262\275/16503 \352\264\204\355\230\270 \354\227\206\353\212\224 \354\202\254\354\271\231\354\227\260\354\202\260.py" new file mode 100644 index 0000000..c736291 --- /dev/null +++ "b/\352\271\200\354\230\210\352\262\275/16503 \352\264\204\355\230\270 \354\227\206\353\212\224 \354\202\254\354\271\231\354\227\260\354\202\260.py" @@ -0,0 +1,32 @@ +#입력받기 +k1, o1, k2, o2, k3 = input().split() +k1, k2, k3 = int(k1), int(k2), int(k3) + +#수를 입력해 계산 +def calculate(a, op, b): + if op == '+': + ans = a + b + elif op == '-': + ans = a - b + elif op == '*': + ans = a * b + elif op == '/': + ans = a // b + if a<0 or b<0: + ans = ans+1 + return ans + +# 앞부터 연산 +temp = calculate(k1, o1, k2) +ans1 = calculate(temp, o2, k3) +# 뒤부터 연산 +temp = calculate(k2, o2, k3) +ans2 = calculate(k1, o1, temp) + +# 출력하기 +if ans1 < ans2: + print(ans1) + print(ans2) +else: + print(ans2) + print(ans1) \ No newline at end of file From 7494a68dbc0800ca91fba0de44d755f892fb7fb8 Mon Sep 17 00:00:00 2001 From: vss121 Date: Sun, 3 Jul 2022 18:45:36 +0900 Subject: [PATCH 2/6] =?UTF-8?q?[1=EC=A3=BC=EC=B0=A8]=20:=20=EA=B9=80?= =?UTF-8?q?=EC=98=88=EA=B2=BD=20-=201699=20=EC=A0=9C=EA=B3=B1=EC=88=98?= =?UTF-8?q?=EC=9D=98=20=ED=95=A9=20Sliver2=20(CBNU-Nnet#44)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\263\261\354\210\230\354\235\230 \355\225\251.py" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "\352\271\200\354\230\210\352\262\275/1699 \354\240\234\352\263\261\354\210\230\354\235\230 \355\225\251.py" diff --git "a/\352\271\200\354\230\210\352\262\275/1699 \354\240\234\352\263\261\354\210\230\354\235\230 \355\225\251.py" "b/\352\271\200\354\230\210\352\262\275/1699 \354\240\234\352\263\261\354\210\230\354\235\230 \355\225\251.py" new file mode 100644 index 0000000..8dbf000 --- /dev/null +++ "b/\352\271\200\354\230\210\352\262\275/1699 \354\240\234\352\263\261\354\210\230\354\235\230 \355\225\251.py" @@ -0,0 +1,12 @@ +n = int(input()) + +dp = [i for i in range (n+1)] +print(dp) +for i in range(1, n+1): + for j in range(1, i): + if (j * j) > i: + break + if dp[i] > dp[i - j * j] + 1: # dp[i] = min(dp[i], dp[i - j * j] + 1) 시간초과 + dp[i] = dp[i - j * j] + 1 + +print(dp[n]) \ No newline at end of file From 5e9f2d69cf8f57e274c38706ac275c3dbd11b34a Mon Sep 17 00:00:00 2001 From: vss121 Date: Wed, 6 Jul 2022 20:08:13 +0900 Subject: [PATCH 3/6] =?UTF-8?q?[2=EC=A3=BC=EC=B0=A8]=20:=20=EA=B9=80?= =?UTF-8?q?=EC=98=88=EA=B2=BD=20-=201225=20=EC=9D=B4=EC=83=81=ED=95=9C=20?= =?UTF-8?q?=EA=B3=B1=EC=85=88=20Bronze2=20(CBNU-Nnet#48)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...64\354\203\201\355\225\234 \352\263\261\354\205\210.py" | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 "\352\271\200\354\230\210\352\262\275/1225 \354\235\264\354\203\201\355\225\234 \352\263\261\354\205\210.py" diff --git "a/\352\271\200\354\230\210\352\262\275/1225 \354\235\264\354\203\201\355\225\234 \352\263\261\354\205\210.py" "b/\352\271\200\354\230\210\352\262\275/1225 \354\235\264\354\203\201\355\225\234 \352\263\261\354\205\210.py" new file mode 100644 index 0000000..7aa43ea --- /dev/null +++ "b/\352\271\200\354\230\210\352\262\275/1225 \354\235\264\354\203\201\355\225\234 \352\263\261\354\205\210.py" @@ -0,0 +1,7 @@ +a, b = input().split() +listA = list(map(int, a)) +listB = list(map(int, b)) + +print(sum(listA)*sum(listB)) + +#print(sum) \ No newline at end of file From 80cb400dc8a71642eff6fb6428f065fc52e5be65 Mon Sep 17 00:00:00 2001 From: vss121 Date: Wed, 6 Jul 2022 20:29:53 +0900 Subject: [PATCH 4/6] =?UTF-8?q?[2=EC=A3=BC=EC=B0=A8]=20:=20=EA=B9=80?= =?UTF-8?q?=EC=98=88=EA=B2=BD=20-=2011478=20=EC=84=9C=EB=A1=9C=20=EB=8B=A4?= =?UTF-8?q?=EB=A5=B8=20=EB=B6=80=EB=B6=84=20=EB=AC=B8=EC=9E=90=EC=97=B4?= =?UTF-8?q?=EC=9D=98=20=EA=B0=9C=EC=88=98=20Silver3=20(CBNU-Nnet#48)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4\227\264\354\235\230 \352\260\234\354\210\230.py" | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 "\352\271\200\354\230\210\352\262\275/11478 \354\204\234\353\241\234 \353\213\244\353\245\270 \353\266\200\353\266\204 \353\254\270\354\236\220\354\227\264\354\235\230 \352\260\234\354\210\230.py" diff --git "a/\352\271\200\354\230\210\352\262\275/11478 \354\204\234\353\241\234 \353\213\244\353\245\270 \353\266\200\353\266\204 \353\254\270\354\236\220\354\227\264\354\235\230 \352\260\234\354\210\230.py" "b/\352\271\200\354\230\210\352\262\275/11478 \354\204\234\353\241\234 \353\213\244\353\245\270 \353\266\200\353\266\204 \353\254\270\354\236\220\354\227\264\354\235\230 \352\260\234\354\210\230.py" new file mode 100644 index 0000000..854d700 --- /dev/null +++ "b/\352\271\200\354\230\210\352\262\275/11478 \354\204\234\353\241\234 \353\213\244\353\245\270 \353\266\200\353\266\204 \353\254\270\354\236\220\354\227\264\354\235\230 \352\260\234\354\210\230.py" @@ -0,0 +1,11 @@ +str = input() +arr = [] +#문자열을 list에 추가 +for i in range(len(str)): + for j in range(len(str)-i): + arr.append(str[j:j+1+i]) +#중복 제거 +arr = set(arr) +arr = list(arr) +#출력 +print(len(arr)) \ No newline at end of file From 96339daf662eec6571518f69da13d13fd4dfec3e Mon Sep 17 00:00:00 2001 From: vss121 Date: Sun, 10 Jul 2022 00:52:14 +0900 Subject: [PATCH 5/6] =?UTF-8?q?[2=EC=A3=BC=EC=B0=A8]=20:=20=EA=B9=80?= =?UTF-8?q?=EC=98=88=EA=B2=BD=20-=20=EB=AC=B8=EC=9E=90=EC=97=B4=20?= =?UTF-8?q?=EC=95=95=EC=B6=95=20lv.1=20(CBNU-Nnet#48)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\354\227\264 \354\225\225\354\266\225.py" | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 "\352\271\200\354\230\210\352\262\275/60057 \353\254\270\354\236\220\354\227\264 \354\225\225\354\266\225.py" diff --git "a/\352\271\200\354\230\210\352\262\275/60057 \353\254\270\354\236\220\354\227\264 \354\225\225\354\266\225.py" "b/\352\271\200\354\230\210\352\262\275/60057 \353\254\270\354\236\220\354\227\264 \354\225\225\354\266\225.py" new file mode 100644 index 0000000..d4027b7 --- /dev/null +++ "b/\352\271\200\354\230\210\352\262\275/60057 \353\254\270\354\236\220\354\227\264 \354\225\225\354\266\225.py" @@ -0,0 +1,38 @@ +def solution(s): + res=list() # 문자열 길이를 저장할 list + + # 문자열 길이가 1일 때 처리 + if len(s)==1: + return 1 + + for j in range(1, len(s)//2+1): #j는 slice 단위 + cnt=1 + ss="" + temp="" + for i in range(0,len(s)+1,j): + if s[i:i+j]==temp: + cnt+=1 + else: + if cnt==1: + ss+=temp + else: + ss+=str(cnt)+temp + cnt=1 + temp=s[i:i+j] + + # 뒤쪽 문자열 처리 + if cnt==1: + ss+=temp + else: + ss+=str(cnt)+temp + res.append(len(ss)) + + # 가장 짧은 것의 길이 return + return min(res) + + +print(solution("aabbaccc")) +print(solution("ababcdcdababcdcd")) +print(solution("abcabcdede")) +print(solution("abcabcabcabcdededededede")) +print(solution("xababcdcdababcdcd")) From 5c76aeda72726028b20e1aaaeaa95b3ff5eafa22 Mon Sep 17 00:00:00 2001 From: vss121 Date: Sun, 17 Jul 2022 22:53:22 +0900 Subject: [PATCH 6/6] =?UTF-8?q?[3=EC=A3=BC=EC=B0=A8]=20:=20=EA=B9=80?= =?UTF-8?q?=EC=98=88=EA=B2=BD=20-=2018247=20=EA=B2=A8=EC=9A=B8=EC=99=95?= =?UTF-8?q?=EA=B5=AD=20=ED=8B=B0=EC=BC=93=20=EC=98=88=EB=A7=A4=20Bronze3?= =?UTF-8?q?=20(CBNU-Nnet#60)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5 \355\213\260\354\274\223 \354\230\210\353\247\244.py" | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 "\352\271\200\354\230\210\352\262\275/18247 \352\262\250\354\232\270\354\231\225\352\265\255 \355\213\260\354\274\223 \354\230\210\353\247\244.py" diff --git "a/\352\271\200\354\230\210\352\262\275/18247 \352\262\250\354\232\270\354\231\225\352\265\255 \355\213\260\354\274\223 \354\230\210\353\247\244.py" "b/\352\271\200\354\230\210\352\262\275/18247 \352\262\250\354\232\270\354\231\225\352\265\255 \355\213\260\354\274\223 \354\230\210\353\247\244.py" new file mode 100644 index 0000000..f9f8dbd --- /dev/null +++ "b/\352\271\200\354\230\210\352\262\275/18247 \352\262\250\354\232\270\354\231\225\352\265\255 \355\213\260\354\274\223 \354\230\210\353\247\244.py" @@ -0,0 +1,7 @@ +t = int(input()) +for i in range(t): + n, m = map(int, input().split()) + if m<4 or n<12: # L=12행 + print(-1) + else: + print(11*m+4) \ No newline at end of file