일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- useDispatch
- 항해99
- react-redux
- 매일메일
- Get
- 알고리즘
- SW
- 자바
- maeil-mail
- 코딩테스트합격자되기
- json-server
- 테코테코
- redux-saga
- JavaScript
- C++
- sw expert academy
- 항해플러스
- Python
- 프로그래머스
- Algorithm
- react-router
- createSlice
- 이코테
- react
- axios
- java
- redux
- redux-toolkit
- programmers
- 리액트
- Today
- Total
목록Python (143)
Binary Journey
출처: https://swexpertacademy.com/ T = int(input()) for test_case in range(1, T + 1): answer = 0 N, M = map(int, input().split()) flies = [] for n in range(N): flies.append(list(map(int, input().split()))) max_kill = 0 for i in range(N - M + 1): for j in range(N - M + 1): temp = 0 for a in range(M): for b in range(M): temp += flies[i +a][j+b] if temp > max_kill: max_kill = temp print(f'#{test_case..
출처: https://swexpertacademy.com/ T = int(input()) for test_case in range(1, T + 1): word = input() answer = 1 if word == ''.join(reversed(word)) else 0 print(f'#{test_case} {answer}')
출처: https://swexpertacademy.com/ T = int(input()) for test_case in range(1, T + 1): print(f'#{test_case}') star_num = int(input()) arr = [[0] * star_num for i in range(star_num)] for i in range(star_num): for j in range(star_num): if j == 0 or j == star_num - 1: arr[i][j] = str(1) else: arr[i][j] = str(int(arr[i-1][j-1]) + int(arr[i-1][j])) print(' '.join(arr[i][:i + 1]))
출처: 프로그래머스 코딩 테스트 연습, https://programmers.co.kr/learn/challenges def solution(citations): citations.sort() for i, citation in enumerate(citations): if citation >= len(citations) - i: return len(citations) - i return 0
출처: https://swexpertacademy.com/ T = int(input()) for test_case in range(1, T + 1): string = input() word = '' for s in string: word += s string = string[1:] if string.index(word) == 0: break print(f'#{test_case} {len(word)}')
출처: https://swexpertacademy.com/ T = int(input()) for t in range(1, T + 1): str_t = str(t) cnt = 0 answer = "" cnt += str_t.count("3") cnt += str_t.count("6") cnt += str_t.count("9") if cnt > 0: answer = cnt * "-" else: answer = str_t print(answer, end=' ')
출처: 프로그래머스 코딩 테스트 연습, https://programmers.co.kr/learn/challenges import heapq def solution(operations): answer = [] while operations: o, num = operations.pop(0).split() if o == "I": heapq.heappush(answer, int(num)) elif answer and o == "D" and int(num) > 0: answer.pop() elif answer and o == "D" and int(num) < 0: answer.pop(0) answer.sort() if answer: return [answer[-1], answer[0]] else: return [..
출처: 프로그래머스 코딩 테스트 연습, https://programmers.co.kr/learn/challenges import heapq def solution(jobs): answer = 0 end = 0 index = 0 start = -1 hq = [] while len(jobs) > index: for job in jobs: if start < job[0]
출처: https://swexpertacademy.com/ T = int(input()) for i in range(T, -1, -1): print(i, end = ' ')