전체 글(140)
-
백준 [ALGORITHM] - 로마 숫자 만들기 (16922)
from itertools import combinations_with_replacement answer = [] def check_sum(n, lst): combination = combinations_with_replacement(lst, n) for combination in combination: total = sum(combination) answer.append(total) N = int(input()) lst = [1,5,10,50] check_sum(N, lst) print(len(set(answer)))
2024.02.15 -
2023년 회고록 / 2024년 목표설정
보호되어 있는 글입니다.
2024.02.04 -
백준 [ALGORITHM] - 뒤집기 (1439)
def find_divided_parts(s): divided_parts = [] current_part = s[0] for char in s[1:]: if char == current_part[-1]: current_part += char else: divided_parts.append(current_part) current_part = char divided_parts.append(current_part) return [part for part in divided_parts if part] def ans_counter(a, b): count = 0 for part in result_set: if part[0] == a: count += 1 ans_count.append(count) input_str ..
2024.02.04 -
백준 [ALGORITHM] - 베스트셀러 (1302)
N = int(input()) books = dict() for i in range(N): title = input() if title not in books: books[f'{title}'] = 1 else: books[f'{title}'] += 1 tmp = [k for k,v in books.items() if max(books.values()) == v] print(''.join(sorted(tmp)[0]))
2024.02.03 -
[CTF] Dice-ctf write up
dice와 block이 정확히 9번째 움직임에서 만나면 되는 문제. wasd로 움직일수 있다. dice가 아래 방향으로 9번 움직일때 block도 왼쪽으로 9번 오면 flag가 출력된다 하지만 dice를 움직일 때 block도 랜덤하게 움직이게 되는데, 이를 해결하기위해서 적용된 js code를 조금 수정해주면 된다. 아래는 원본 코드 var icons = [ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAD1BMVEUAAADDGBgwMDD%2F%2F%2F%2FNMzNpjlSGAAAAAXRSTlMAQObYZgAAAJJJREFUKM%2Bd0dEJgyEQA2DpBncuoKELyI3Q%2FXdqzO%2FVVv6nBgTzEXyx%2..
2024.02.03 -
백준 [ALGORITHM] - 아이폰 9S (5883)
보호되어 있는 글입니다.
2024.02.02