반응형 전체 글75 [파이썬] [SWEA] 1209. [S/W 문제해결 기본] 2일차 - Sum swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV13_BWKACUCFAYh SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = 10 N = 100 for tc in range(1, T+1): no = int(input()) arr = [list(map(int, input().split())) for _ in range(N)] # print(arr) max_value = 0 # 행우선 for i in range(N): sum_value = 0 for j in range(N): sum_value += arr[i][j.. 2021. 2. 20. [파이썬] [SWEA] 1210. [S/W 문제해결 기본] 2일차 - Ladder1 1. normal T = 10 for test_case in range(1, T + 1): number = int(input()) arr = [list(map(int, input().split())) for _ in range(100)] #거꾸로 간다. 도착부터 for i in range(100): if arr[99][i] == 2: # 도착 x지점 지정 x = i break # 찾으면 멈춤 # 도착 y지점 지정 y = 99 while True: # 왼쪽으로 갈 수 있는 경우 왼쪽으로 이동 후 위로 if x > 0 and arr[y][x-1]: # 왼쪽으로 갈 수있는 한계까지 이동 while x > 0 and arr[y][x-1]: x -= 1 else: y -= 1 # 한계점 일 때 위로 감 # 오른쪽.. 2021. 2. 20. [파이썬] [SWEA] 1221. [S/W 문제해결 기본] 5일차 - GNS swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14jJh6ACYCFAYD SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다. def BubbleSort(x_list): for i in range(len(x_list) - 1, 0, -1): # 4 for j in range(i): # 4 3 2 1 if x_list[j] > x_list[j + 1]: x_list[j], x_list[j + 1] = x_list[j + 1], x_.. 2021. 2. 20. [파이썬] [SWEA] 1216. [S/W 문제해결 기본] 3일차 - 회문2 swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14Rq5aABUCFAYi SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 1. normal T = 10 def call_me(M, N): # 가로에서 확인되면 세로는 안하게 count = 0 # 가로 확인 for j in range(N): for k in range(N-M+1): cnt = 0 for t in range(M): if tx_list[j][t+k] == tx_list[j][M+k-t-1]: cnt += 1 if cnt == M: result = M count += 1 re.. 2021. 2. 20. 이전 1 ··· 15 16 17 18 19 다음 반응형