~2023/프로그래머스 썸네일형 리스트형 2018 KAKAO BLIND RECRUITMENT[1차] 추석 트래픽 def solution(lines): answer = 0 arr = [] for i in lines: tmp = i.split(" ") print(tmp) T_sec = float(tmp[2][:-1]) end_time = int(tmp[1][:2])*3600000 + int(tmp[1][3:5])*60000 + int(tmp[1][6:8])*1000 + int(tmp[1][-3:]) start_time = end_time - T_sec*1000 + 1 print("S :" , start_time) print("T_sec : ", T_sec*1000) print("E :" , end_time) arr.append((end_time,-1)) arr.append((start_time,1)) arr = sor.. 더보기 2020 카카오 코딩테스트 - 어피치 문자열 압축문제 2020년 카카오 블라인드 채용이다. 신입 개발자를 코딩테스트를 통해 선별해낸다. 한번 풀어봤는데, 생각보다 어렵다ㅜㅜ 34점 맞아서, 틀린 코드다.ㅠㅠ def solution(s): answer = 0 tmp = s[1:] try: a = tmp.index(s[0]) except: return len(s) arr = list(range(1, int(len(s)/2)+1)) arr = sorted(arr, reverse=True) is_find = 0 for i in arr: if s[:i] == s[i:i+i]: is_find = i break how_loop = len(s)/is_find rest_ = 0 if how_loop % 1 != 0: rest_ = len(s) - (int(how_loop).. 더보기 이전 1 ··· 6 7 8 9 다음