From 67bbef6faf11e087ec15ca91b4f8bb2779d3b092 Mon Sep 17 00:00:00 2001 From: YoonYn9915 Date: Sat, 12 Jul 2025 23:23:54 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[BOJ]=20=EC=A3=BD=EC=9D=8C=EC=9D=98=20?= =?UTF-8?q?=EA=B2=8C=EC=9E=84/=20=EC=8B=A4=EB=B2=84=203=20/=2040=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acmicpc.net/problem/17204 --- ...\214\354\235\230 \352\262\214\354\236\204.py" | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 "YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#17204-\354\243\275\354\235\214\354\235\230 \352\262\214\354\236\204.py" diff --git "a/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#17204-\354\243\275\354\235\214\354\235\230 \352\262\214\354\236\204.py" "b/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#17204-\354\243\275\354\235\214\354\235\230 \352\262\214\354\236\204.py" new file mode 100644 index 0000000..d6aa453 --- /dev/null +++ "b/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#17204-\354\243\275\354\235\214\354\235\230 \352\262\214\354\236\204.py" @@ -0,0 +1,16 @@ +N, K = map(int, input().split()) + +num_list = [int(input()) for _ in range(N)] + +point = 0 # 지목을 하는 사람 (0부터 시작) +M = 0 # 지목 횟수(M번째 지목) + +for i in range(N): + target = num_list[point] # target: 지목당한 사람 + M += 1 # 지목했으니까 카운트 1 증가 + if target == K: + print(M) + break + point = target # 지목당한 사람이 이제는 지목하는 사람이 됨 +else: + print(-1) \ No newline at end of file From a09ccab663d5913f59d80aaa332e046287837853 Mon Sep 17 00:00:00 2001 From: YoonYn9915 Date: Sat, 12 Jul 2025 23:24:36 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[BOJ]=20=EC=9D=B4=EB=A6=84=20=EA=B6=81?= =?UTF-8?q?=ED=95=A9=20=ED=85=8C=EC=8A=A4=ED=8A=B8/=20=EC=8B=A4=EB=B2=84?= =?UTF-8?q?=205=20/=2035=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acmicpc.net/problem/17269 --- ...1 \355\205\214\354\212\244\355\212\270.py" | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#17269-\354\235\264\353\246\204\352\266\201\355\225\251 \355\205\214\354\212\244\355\212\270.py" diff --git "a/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#17269-\354\235\264\353\246\204\352\266\201\355\225\251 \355\205\214\354\212\244\355\212\270.py" "b/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#17269-\354\235\264\353\246\204\352\266\201\355\225\251 \355\205\214\354\212\244\355\212\270.py" new file mode 100644 index 0000000..ca8a54c --- /dev/null +++ "b/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#17269-\354\235\264\353\246\204\352\266\201\355\225\251 \355\205\214\354\212\244\355\212\270.py" @@ -0,0 +1,29 @@ +import copy +dic = {'A':3,'B':2,'C':1,'D':2,'E':4,'F':3,'G':1,'H':3,'I':1,'J':1,'K':3,'L':1,'M':3,'N':2,'O':1,'P':2,'Q':2,'R':2,'S':1,'T':2,'U':1,'V':1,'W':1,'X':2,'Y':2,'Z':1} +N, M = map(int, input().split()) +A, B = input().split() + +min_len = min(N,M) +new = [] +for i in range(min_len): + new += A[i] + B[i] + +if N > M: + new += A[min_len:] +elif N < M: + new += B[min_len:] + +new_num = [] +for j in new: + new_num.append(dic[j]) + +while len(new_num) > 2: + temp = [] + for k in range(1, len(new_num)): + temp_num = new_num[k-1] + new_num[k] + if temp_num >= 10: + temp_num -= 10 + temp.append(temp_num) + new_num = copy.deepcopy(temp) + +print("{}%".format(new_num[0]*10 + new_num[1])) \ No newline at end of file From 048d33c311e9061041fc244c07120243d147bf59 Mon Sep 17 00:00:00 2001 From: YoonYn9915 Date: Sat, 12 Jul 2025 23:25:38 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[BOJ]=20ZOAC=203/=20=EC=8B=A4=EB=B2=84=205?= =?UTF-8?q?=20/=2040=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acmicpc.net/problem/20436 --- ...353\260\261\354\244\200]-#20436-ZOAC 3.py" | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 "YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#20436-ZOAC 3.py" diff --git "a/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#20436-ZOAC 3.py" "b/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#20436-ZOAC 3.py" new file mode 100644 index 0000000..1de3f95 --- /dev/null +++ "b/YoonYn9915/implementation/2025-07-12-[\353\260\261\354\244\200]-#20436-ZOAC 3.py" @@ -0,0 +1,26 @@ +def coordinate(char): + for i in range(3): + if char in keyboard[i]: + j = keyboard[i].index(char) + return (i, j) + + +# 쿼터식 키보드 이중 배열 +keyboard = [['z', 'x', 'c', 'v', 'b', 'n', 'm'], ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l'], + ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']] + +l, r = map(str, input().split()) +string = str(input()) +# 입력된 문자 좌표로 바꾸기 +now = [coordinate(l), coordinate(r)] +word = [coordinate(i) for i in string] + +sum = 0 +for char in word: + if (char[0] == 0 and char[1] >= 4) or char[1] >= 5: # 오른손으로 입력하는 경우 + sum += abs(now[1][0] - char[0]) + abs(now[1][1] - char[1]) + 1 + now[1] = char + else: # 왼손으로 입력하는 경우 + sum += abs(now[0][0] - char[0]) + abs(now[0][1] - char[1]) + 1 + now[0] = char +print(sum) \ No newline at end of file