본문 바로가기

코딩테스트22

1220. [S/W 문제해결 기본] 5일차 - Magnetic (코딩테스트, SW Expert Academy) 문제 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14hwZqABsCFAYD SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 나의 코드 : 11분 30초 T = 10 for test_case in range(1, T + 1): N = int(input()) table = [] answer = 0 for i in range(N): table.append(list(map(int, input().split()))) for i in zip(*table): target = [j for j in i if j != 0] for .. 2022. 5. 7.
1206. [S/W 문제해결 기본] 1일차 - View (코딩테스트, SW Expert Academy) 문제 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV134DPqAA8CFAYh SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 나의 코드 :8분 21초 T = 10 for test_case in range(1, T + 1): num = int(input()) input_list = list(map(int, input().split())) answer = 0 for i in range(2,num-2): target = input_list[i-2:i+3] if max(target) == target[2]: target.s.. 2022. 5. 6.
2001. 파리 퇴치 (코딩테스트, SW Expert Academy) 문제 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PzOCKAigDFAUq SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 나의 코드 : 23분 34초 T = int(input()) for test_case in range(1, T + 1): N, M = map(int, input().split()) table = [list(map(int,input().split())) for i in range(N)] sum_table = [] answer = 0 for i in range(N): tmp = [sum(table[.. 2022. 5. 6.
1216. [S/W 문제해결 기본] 3일차 - 회문2 (코딩테스트, SW Expert Academy) 문제 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14Rq5aABUCFAYi SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 나의 코드 : 41분23초 def check_answer(target):#내가 짠 함수, 사용시 11초안에 클리어 ->비효율적 return list(target)==list(reversed(target)) # def check_answer(lst): #다른사람 코드보고 끌어옴 사용시 3.8초안에 클리어 # for i in range(len(lst)//2): # if lst[i]!=lst[-i-.. 2022. 5. 5.
1979. 어디에 단어가 들어갈 수 있을까 (코딩테스트, SW Expert Academy) 문제: https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PuPq6AaQDFAUq SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 나의코드 : 8분 30초 T = int(input()) for test_case in range(1, T + 1): N,K = map(int, input().split())#k단어길이 N테이블크기 table = [] answer = [] for i in range(N): table.append(list(map(str, input().split()))) for i in table: target.. 2022. 5. 3.
1961. 숫자 배열 회전 (코딩테스트, SW Expert Academy) 문제: https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5Pq-OKAVYDFAUq SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com 나의코드 : 19분 51초 from collections import defaultdict T = int(input()) for test_case in range(1, T + 1): N = int(input()) answer = defaultdict(list) table = [] for i in range(N): #input 받는 코드 table.append(list(map(int, inpu.. 2022. 4. 29.