일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 코딩테스트합격자되기
- Algorithm
- react-router
- 항해플러스
- useDispatch
- maeil-mail
- 매일메일
- 테코테코
- 리액트
- JavaScript
- Python
- redux
- SW
- 이코테
- 알고리즘
- json-server
- sw expert academy
- java
- react-redux
- C++
- 항해99
- react
- createSlice
- redux-toolkit
- 자바
- Get
- redux-saga
- axios
- 프로그래머스
- programmers
- Today
- Total
목록Python (143)
Binary Journey
출처: https://swexpertacademy.com/ input 값을 받는 거였네..? T = input() alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" for t in T: print(alphabet.find(t) + 1, end = ' ')
출처: https://swexpertacademy.com/ 날짜 검증 day = [-99, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] T = int(input()) for test_case in range(1, T + 1): YYYYMMDD = input() YYYY = YYYYMMDD[:4] MM = YYYYMMDD[4:6] DD = YYYYMMDD[6:] mm = int(MM) dd = int(DD) if (mm == 0 or mm > 12) or (dd == 0 or dd > day[mm]): print(f'#{test_case} -1') else: print(f'#{test_case} {YYYY}/{MM}/{DD}')
레벨에 비해 쉬운 문제지만 혼자서 문제의도를 지켜서 큐 만들어 풀었다는 거에 매우 만족 예전에 풀어놨던 문제라 점수는 알 수 없지만 그래도 아주 만족 from collections import deque def solution(progresses, speeds): wait_for_complete = deque() for progress, speed in zip(progresses, speeds): div, mod = divmod((100 - progress), speed) if mod > 0 : wait_for_complete.append(div + 1) else: wait_for_complete.append(div) 기준 = [0, wait_for_complete.popleft()] answer = [..
출처: https://swexpertacademy.com/ T = int(input()) answer = 0 while T > 0: div, mod = divmod(T, 10) answer += mod T = div print(answer)
출처: https://swexpertacademy.com/ SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com T = int(input()) numbers = list(map(int, input().split())) numbers.sort() print(numbers[T//2])
출처: https://swexpertacademy.com/ SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com T = int(input()) for test_case in range(1, T + 1): numbers = list(map(int, input().split())) print(f'#{test_case} {max(numbers)}')
출처: 프로그래머스 코딩 테스트 연습, https://programmers.co.kr/learn/challenges 사실 조건은 4개로 보아야 함 오랜만에 +2점...! from functools import cmp_to_key def cmp_sum(x, y): return y[1] - x[1] def cmp_by_condition(x, y): x_index, x_play = x y_index, y_play = y if x_play == y_play: return x_index - y_index else: return y_play - x_play def solution(genres, plays): answer = [] _dict1 = dict() _dict2 = dict() for i, (genre, p..
출처: https://swexpertacademy.com/ 입력된 두 수를 비교하여 부등호로 나타내기 T = int(input()) for test_case in range(1, T + 1): a, b = input().split() c = int(a) - int(b) result = '=' if c == 0 else '>' if c > 0 else '
출처: https://swexpertacademy.com/ T = int(input()) for take in range(1, T + 1): _sum = 0 numbers = list(map(int, input().split())) for number in numbers: if number % 2: _sum += number print(f'#{take} {_sum}')
출처: https://swexpertacademy.com/ input 으로 들어오는 10자리 수를 각 행마다 평균값을 구하기 출력값은 #{회차} {반올림된 정수의 평균값} T = int(input()) for take in range(1, T + 1): numbers = list(map(int, input().split())) total = sum(numbers) divide = len(numbers) print(f'#{take} {round(total / divide)}')