분류 전체보기 72

[SWEA] 20019. 회문의 회문 (Python)

#Problemhttps://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&problemLevel=3&contestProbId=AY2hjCWKbykDFATh&categoryId=AY2hjCWKbykDFATh&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com #Think조건문 덕지덕지면 뭐든 풀 수 있다!#CodeT=int(input())fo..

SWEA 2024.11.16

[SWEA] 20728. 공평한 분배 2 (Python)

#Problem SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com #Think나열했을 때 제일 큰 수에서 제일 작은 수 빼는 게 아니다서로의 차가 제일 작아야된다.무슨 말이냐면 100 10 10 1로 정렬했을 때 100 10 10으로 출력하는 지 알았는데 100이랑 10차이가 겁나게 크니까 안 된다. 100이랑 10의 차이, 10이랑 1의 차이를 비교해서 더 작은 거로 출력해야 한다.#CodeT=int(input())for tc in range(1,T+1): m, g = map(int, input().split()) candy = list(map(int, input().split())) diff_ca..

카테고리 없음 2024.11.16

[SWEA] 1209. [S/W 문제해결 기본] 2일차 - Sum (Python)

#Problemhttps://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV13_BWKACUCFAYh&categoryId=AV13_BWKACUCFAYh&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com#Think우선 테스트 케이스가 10으로 고정되어 있는 걸 잊지 마러ㅋzip에 대해 알게 되었다.for col in z..

SWEA 2024.11.16

[SWEA] 1859. 백만 장자 프로젝트(Python)

#Problemhttps://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5LrsUaDxcDFAXc&categoryId=AV5LrsUaDxcDFAXc&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=2&pageSize=10&pageIndex=1 SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com #Think사실 D2 문제 중에 제일 위에 뜨기 전에 처음으로 도전했던 문제인데 포기했었음ㅋ뒤에서부터 출력해서 ..

SWEA 2024.11.16

[SWEA] 2001. 파리 퇴치 (Python)

#Problem SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com #Thinkspace = [list(map(int, input().split())) for _ in range(n)]이걸 그냥 외워버려야겠다... 하...#CodeT = int(input())# 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다.for tc in range(1, T + 1): #n이 큰 사각형이고, m은 파리채 n, m = map(int, input().split()) #space => n*n 배열 만들기 space = [list(map(int, input().split())) for _ in range(n)..

SWEA 2024.11.16

[SWEA] 1940. 가랏! RC카! (Python)

#Problem SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com #Think0일 땐 뒤에 붙는 숫자가 없으니까 map으로 쪼개서 생각하면 안 된담.!#CodeT = int(input())# 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다.for tc in range(1, T + 1): n = int(input()) distance = 0 speed = 0 for i in range(n): plus = list(map(int, input().split())) if plus[0] == 1 : speed += plus[1] elif p..

카테고리 없음 2024.11.16

[SWEA] 1959. 두 개의 숫자열 (Python)

#Problem SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com #Think- 하 드럽게 복잡하네...난 어렵다고 생각하는데... 다들 안 어려우슈,,? ㅠㅠ#CodeT = int(input())# 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다.for tc in range(1, T + 1): a, b = map(int, input().split()) #큰 수를 big로 작은 수를 small으로 #큰 수 나열을 big_list에, 작은 수 나열을 small_list에 저장 if a > b : big = a small = b big_list = lis..

카테고리 없음 2024.11.15

[SWEA] 1946. 간단한 압축 풀기(Python)

#Problem SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com#Think하... list 10개 출력하고그 이후부터 리스트 재지정할 생각을 왜 못했을꼬...#CodeT = int(input())# 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다.for tc in range(1, T + 1): N = int(input()) list = [] number = 0 for i in range(1,N+1): alpha, repeat = map(str, input().split()) repeat= int(repeat) list += alpha * repeat..

카테고리 없음 2024.11.15