분류 전체보기(178)
-
[macOS] MOS - 마우스 관련 서드파티 앱
https://mos.caldis.me/ MOS | A lightweight tool used to smooth scrolling and set scroll direction independently for your mouse on MacOSScrolling, Smoother Than Ever Mos's special interpolation algorithm can make every mouse roll as smooth and silky as possible.mos.caldis.me 애플의 매직 마우스가 아닌 일반 마우스로도 부드러운 스크롤이 가능하게 만든다.
2024.09.17 -
[Error] PyInstaller - IndexError: tuple index out of range
PyInstaller를 통해 윈도우 실행 파일을 만들려고 했더니 위와 같은 에러가 발생했다. 이 문제는 Python 3.10 버전에 있는 이슈라고 한다. 이 문제를 해결하는 방법은 파이썬이 설치되어있는 폴더의 Lib 폴더로 이동한다. 만약 설치 폴더를 알 수 없다면 프롬프트 창을 열어서 파이썬 대화형 인터프리터 기능을 사용한다. C:\Windows\System32>pythonPython 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> import sys>>> s..
2024.09.11 -
30970 선택의 기로 - Python
1. 풀이 코드N = int(input())quality = []quantity = []for _ in range(N): qual, quan = map(int, input().split(' ')) quality.append([qual, quan]) quantity.append([quan, qual])quality.sort(key=lambda x: (-x[0], x[1]))quantity.sort(key=lambda x: (x[0], -x[1]))# print(quality)# print(quantity)print(f"{quality[0][0]} {quality[0][1]} {quality[1][0]} {quality[1][1]}")print(f"{quantity[0][1]} {quanti..
2024.08.06 -
26150 Identify, Sort, Index, Solve - Python
1. 풀이 코드N = int(input())answer = ["0"] * Ntemp_list = []for i in range(N): message, num_i, num_d = input().split(' ') temp_list.append([int(num_i), num_d, message])temp_list.sort()for i in range(N): j = int(temp_list[i][1]) - 1 # print(j, temp_list[i][2]) answer[i] = temp_list[i][2][j].upper()print(''.join(answer)) 디버깅으로 사용한 코드는 주석처리하였습니다. 2. 다른 사람 풀이 코드for i,j,k in sorted(map(st..
2024.08.06 -
1384 메시지 - Python
1. 풀이 코드num = 0while True: is_bullying = False n = int(input()) num += 1 if n == 0: break people_list = [] for i in range(n): paper = list(input().split(' ')) people_list.append(paper) print(f"Group {num}") for i in range(n): target = people_list[i] for j in range(n): if target[j] == "N": is_bullying..
2024.08.06 -
23882 알고리즘 수업 - 선택 정렬 2 - Python
1. 풀이 코드change_count = 0N, K = map(int, input().split(' '))num_list = list(map(int, input().split(' ')))i = 0is_search = Falsewhile True: target_num = num_list[N-1-i] if N-1-i == 0: break next_max_num = max(num_list[:N-1-i]) if target_num 2. 다른 사람 풀이 코드a, b = map(int, input().split())lst = list(map(int, input().split()))count = 0for i in range(a-1, 0, -1): max_index = ls..
2024.08.06 -
1120 문자열 - Python
1. 풀이 코드def cal2(str1, str2): result = 0 for char1, char2 in zip(str1, str2): if char1 != char2: result += 1 return resultdef cal(str1, str2): num = len(str2) - len(str1) result = 50 for i in range(num + 1): temp = cal2(str1, str2[i:i+len(str1)]) result = min(result, temp) if result == 0: return 0 return resultstr1, str2 = in..
2024.08.04