일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 백준
- DP
- Java
- 완전탐색
- 합 구하기
- python3
- 소수판별
- 인프런
- deque
- 프로그래머스
- spring
- popleft
- c#
- unity
- 누적합
- 브루투포스
- pypy3
- JPA
- appendleft
- Python
- 연관관계
- 소수찾기
- mvc
- 1일1솔
- 우선순위큐
- BFS
- 그리디 알고리즘
- 파이썬
- C#강의
- LCM
- Today
- Total
목록분류 전체보기 (139)
jae_coding

문제 문제 링크 코드 import sys from itertools import permutations input = sys.stdin.readline n = int(input()) lst = list(permutations(list(i for i in range(1, n+1)), n)) for j in lst: print(*j)

문제 문제 링크 코드 import sys input = sys.stdin.readline n = int(input()) dp = [0, 1] for i in range(2, n+1): temp = pow(50000, 2) * 4 + 1 count = 1 while pow(count, 2)

문제 문제 링크 코드 import sys # 순열 사용 from itertools import permutations input = sys.stdin.readline n = int(input()) # 모든 경우의 수 num_list = list(permutations(list(i for i in range(1, 10)), 3)) for i in range(n): num, s, b = map(int, input().split()) num = list(str(num)) count = 0 # 모든 경우의 수에서 Strike와 Ball의 카운트가 하나라도 다를 경우에 모든 경우의 수 에서 소거 for j in range(len(num_list)): s_count, b_count = 0, 0 j -= count ..

문제 문제 링크 코드 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..

문제 문제 링크 코드 import sys input = sys.stdin.readline # n-1회차: ‘뻔 – 데기 – 뻔 – 데기 – 뻔(x n번) – 데기(x n번)’ a = int(input()) t = int(input()) ans = int(input()) # 뻔: 0, "데기: 1 n, count, result = 1, 0, 0 lst = list() idx = [i for i in range(a)] while True: lst = lst + [0] + [1] + [0] + [1] + [0] * (n+1) + [1] * (n+1) if len(lst) // 2 >= t: for i in lst: result += 1 if i == ans: count += 1 if count == t: br..

문제 문제 링크 코드 import sys input = sys.stdin.readline n, k = map(int, input().split()) result = 0 for i in range(n+1): for j in range(60): for l in range(60): lst = list(str(i) + str(j) + str(l)) if len(lst) < 6: lst.append("0") if str(k) in lst: result += 1 print(result)

문제 문제 링크 코드 import sys input = sys.stdin.readline a, b, c, d, e, f = map(int, input().split()) for i in range(-999, 1000): for j in range(-999, 1000): value_1 = a * i + b * j value_2 = d * i + e * j if value_1 == c and value_2 == f: print(i, j) break