본문 바로가기
KOREATECH 1043: 위성 사진 Link : judge.koreatech.ac.kr/problem.php?id=1043 Python 더보기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 from sys import stdin map_x, map_y = list(map(int, stdin.readline().strip().split())) map_data = [[s for s in stdin.readline().strip()] for i in range(map_y)] def able_move(x, y): if x = map_y: return Fa.. 2021. 1. 21.
PROGRAMMERS 43164: 여행경로 Link : programmers.co.kr/learn/courses/30/lessons/43164 Python 더보기 1234567891011121314151617181920212223242526272829303132def DFS(data, start, result, deapth): status = False for i in data: status = status or (len(data[i]) > 0) if status: if start in data: for idx, target in enumerate(data[start]): data[start].remove(target) result[deapth] = target var = DFS(data, target, result, deapth + 1) if .. 2021. 1. 14.
PROGRAMMERS 17687: [3차] n진수 게임 Link : programmers.co.kr/learn/courses/30/lessons/17687 Python 더보기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 def getN(val, n): if val == 0: return '0' arr = ['A', 'B', 'C', 'D', 'E', 'F'] result = [] while val: result.insert(0, str(val % n) if val % n 2021. 1. 14.
PROGRAMMERS 42888: 오픈채팅방 Link : programmers.co.kr/learn/courses/30/lessons/42888 Python 더보기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 def solution(record): answer = [] data = dict() for i in record: command_line = i.split(' ') if command_line[0] != 'Leave': command = command_line[0] uid = command_line[1] name = command_line[2] if command == 'Enter': answer.append(uid + '#님이 들어왔습니다.') data[uid] = name else: uid = comm.. 2021. 1. 13.
PROGRAMMERS 17679: [1차] 프렌즈4블록 Link : programmers.co.kr/learn/courses/30/lessons/17679 Python 더보기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 def solution(m, n, board): ## 90도 회전 ## board = [[board[i][j] for i in range(m)] for j in range(n)] for i in range(n): board[i].reverse() ############## y, x = m, n total = 0 whi.. 2021. 1. 13.