[Softeer] [인증평가(1차) 기출] 로봇이 지나간 경로- 파이썬
·
코딩/Softeer
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=577 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai 해결하지 못했던 문제를 해결하는 쾌감은 엄청나다는걸 다시 한번 느끼며? import sys from collections import deque import copy H, W = map(int,sys.stdin.readline().split()) graph = [] for i in range(H): graph.append(list(sys.stdin.readline().rstrip())) dx = [1, -1, 0, 0] dy = [0, 0, 1, -1] def check_dir(x,y): if x == -1: ..
[Softeer] 이미지 프로세싱- 파이썬
·
코딩/Softeer
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=627 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai import sys from collections import deque sys.setrecursionlimit(10**5) h, w = map(int,sys.stdin.readline().split()) image = [] for i in range(h): image.append(list(map(int,sys.stdin.readline().split()))) q = int(sys.stdin.readline()) dx = [-1,1,0,0] dy = [0,0,-1,1] for k in range(q): i, j..
[Softeer] 성적 평균 - 파이썬
·
코딩/Softeer
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=389 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai import sys n, k = map(int,sys.stdin.readline().split()) score_list = list(map(int,sys.stdin.readline().split())) for i in range(k): a,b = map(int,sys.stdin.readline().split()) mean=format(round(sum(score_list[a-1:b])/(b-a+1),2),'.2f') print(mean) 풀어본 문제중 가장 쉬운 거같다? 참고한 블로그 https://code-c..
[Softeer] 택배 마스터 광우 - 파이썬
·
코딩/Softeer
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=581 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai from itertools import permutations import sys n, m, k = map(int,sys.stdin.readline().split()) rail = list(map(int,sys.stdin.readline().split())) rail_list = list(permutations(rail, n)) def weight(m, k, array): basket = 0 count = 0 order = 0 answer = 0 while True: # 배열에 있는 짐을 실어 넣는다. bask..
[Softeer] 전광판 - 파이썬
·
코딩/Softeer
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=624 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai T = int(input()) switch = {"0": [1,1,1,0,1,1,1], "1": [0,0,1,0,0,1,0], "2": [1,0,1,1,1,0,1], "3": [1,0,1,1,0,1,1], "4": [0,1,1,1,0,1,0], "5": [1,1,0,1,0,1,1], "6": [1,1,0,1,1,1,1], "7": [1,1,1,0,0,1,0], "8": [1,1,1,1,1,1,1], "9": [1,1,1,1,0,1,1], " ": [0,0,0,0,0,0,0]} count = 0 for i in ..
[Softeer] 비밀메뉴 - 파이썬
·
코딩/Softeer
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=623 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai m,n,k = input().split() secret_code = list(map(int, input().split())) enter_code = list(map(int,input().split())) def search_screct(secret_code,enter_code): for i in range(len(enter_code)): for j in range(len(secret_code)): if enter_code[i]==secret_code[j]: if secret_code == enter_code[i..
[softeer] 파이썬 - 8단 변속기
·
코딩/Softeer
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=408 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai dct =list(map(int, input().split())) if dct ==[1,2,3,4,5,6,7,8]: print("ascending") elif dct == [8,7,6,5,4,3,2,1]: print("descending") else: print("mixed") 이문제의 교훈 쉬운 문제는 어렵게 생각하지 말자
[softeer] 파이썬 - 회의실 예약
·
코딩/Softeer
https://softeer.ai/practice/info.do?eventIdx=1&psProblemId=626 Softeer 연습문제를 담을 Set을 선택해주세요. 취소 확인 softeer.ai import sys n,m = map(int,input().split()) meeting_room_reserve_dic = {} for i in range(n): room = input() # 미팅룸의 예약 시간을 계수를 이용하여 표현한다.(딕셔너리를 이용한다.) meeting_room_reserve_dic[room] = [0]*18 for i in range(m): # 룸, 시작 시간, 끝나는 시간을 각각 저장한다. room, start, end = input().split() start = int(start..