본문 바로가기
PROGRAMMERS 42839: 소수 찾기 Link : programmers.co.kr/learn/courses/30/lessons/42839 Python 더보기 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 counter = 0 memory = dict() def is_prime(n: int) -> bool: if n 2021. 1. 2.
KOREATECH 1008: 순환 소수 Link : judge.koreatech.ac.kr/problem.php?id=1008 Python 더보기 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 from sys import stdin testcase = int(stdin.readline().strip()) while testcase: a, b = map(int, stdin.readline().strip().split()) front = a // b calc = (a % b) * 10 first = calc // 10 memory = dict() back = [] idx = 0 while calc != 0: back.append(calc // b) .. 2021. 1. 2.
PROGRAMMERS 42883: 큰 수 만들기 Link : programmers.co.kr/learn/courses/30/lessons/42883 C++ 더보기 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 #include #include using namespace std; string solution(string number, int k) { string answer = ""; int length = number.length() - k; int stack = 0; for (int i = stack; i 2020. 12. 18.
PROGRAMMERS 42576: 완주하지 못한 선수 Link : programmers.co.kr/learn/courses/30/lessons/42576 Python 더보기 1234567891011121314151617def solution(participant, completion): data = dict() for i in participant: if i not in data: data[i] = 1 else: data[i] += 1 for i in completion: if i not in data: return i else: data[i] -= 1 for i in data: if data[i] >= 1: return ics FeedBack cjw.git@gmail.com 2020. 12. 18.
KOREATECH 1172: 킹콩 영준이와 종욱이의 대도시 파괴 프로젝트 Link : judge.koreatech.ac.kr/problem.php?id=1172 Python 더보기 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 from sys import stdin testcase = int(stdin.readline().strip()) while testcase: save = [] arr = list(map(str, stdin.readline().strip())) before = '.' # 변환 점을 기억함 for i, val in enumerate(arr): if .. 2020. 12. 16.