본문 바로가기
반응형

전체 글75

[파이썬] [SWEA] 4843. [파이썬 S/W 문제해결 기본] 2일차 - 특별한 정렬 swexpertacademy.com/main/learn/course/subjectList.do?courseId=AVuPDN86AAXw5UW6 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal def BubbleSort(x_list): for i in range(len(x_list) - 1, 0, -1): for j in range(i): if x_list[j] > x_list[j + 1]: x_list[j], x_list[j + 1] = x_list[j + 1], x_list[j] return x_list T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다... 2021. 2. 20.
[파이썬] [SWEA] 4839. [파이썬 S/W 문제해결 기본] 2일차 - 이진탐색 swexpertacademy.com/main/learn/course/subjectList.do?courseId=AVuPDN86AAXw5UW6 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다. for test_case in range(1, T + 1): P, Pa, Pb = map(int, input().split()) # 전체 쪽 수: P 각각찾을 쪽수 a, b def cent(P,Pa): start = 1 end = P count = 1 center = (start + end) // 2 while cen.. 2021. 2. 20.
[파이썬] [SWEA] 4837. [파이썬 S/W 문제해결 기본] 2일차 - 부분집합의 합 swexpertacademy.com/main/learn/course/subjectList.do?courseId=AVuPDN86AAXw5UW6 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다. for test_case in range(1, T + 1): N, K = map(int, input().split()) arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] n = len(arr) total = [] count = 0 for i in range(1 2021. 2. 20.
[파이썬] [SWEA] 4836. [파이썬 S/W 문제해결 기본] 2일차 - 색칠하기 swexpertacademy.com/main/learn/course/subjectList.do?courseId=AVuPDN86AAXw5UW6 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다. for test_case in range(1, T + 1): box = [[0] * 10 for i in range(10)] N = 0 n = int(input()) for i in range(n): x1, y1, x2, y2, color = map(int, input().split()) for j in range(x.. 2021. 2. 20.
반응형