| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 파이썬
- mvc
- 소수찾기
- spring
- 누적합
- BFS
- python3
- 인프런
- Java
- deque
- JPA
- 완전탐색
- Python
- 브루투포스
- LCM
- 소수판별
- 그리디 알고리즘
- 연관관계
- DP
- 합 구하기
- 1일1솔
- C#강의
- popleft
- c#
- 우선순위큐
- appendleft
- 프로그래머스
- unity
- pypy3
- 백준
- Today
- Total
목록전체 글 (139)
jae_coding
문제 문제 링크 코드 import sys # 중복을 허용하는 조합 from itertools import product input = sys.stdin.readline n, k = map(int, input().split()) lst = list(map(int, input().split())) # 큰수부터 정렬(오름차순) lst.sort(reverse=True) result = 0 flag = False length = len(str(n)) while flag is False: for i in product(lst, repeat=length): temp = 0 for j in i: temp = temp * 10 + j if temp
문제 문제 링크 코드 import sys from itertools import combinations input = sys.stdin.readline n, m = map(int, input().split()) board = list([0] * n for _ in range(n)) result = 0 for i in range(m): a, b = map(int, input().split()) board[a-1][b-1] = 1 board[b-1][a-1] = 1 for c in combinations(range(n), 3): x, y, z = c if board[x][y] != 1 and board[x][z] != 1 and board[y][z] != 1: result += 1 print(result)
문제 문제 링크 코드 import sys input = sys.stdin.readline n, m = map(int, input().split()) s = list(list(input().strip()) for _ in range(n)) # hamming distance: 각 위치의 문자가 다른 것의 개수 hamming_distance = 0 DNA = [[] for _ in range(m)] DNA_s = "" for i in range(m): for j in range(n): DNA[i].append(s[j][i]) for i in range(m): a = DNA[i].count('A') t = DNA[i].count('T') g = DNA[i].count('G') c = DNA[i].count('C..