목록2025/04/12 (2)
넘치게 채우기
https://leetcode.com/problems/find-the-count-of-good-integers/description/BOJ - Find the Count of Good Integers문제 유형: 조합론, 정수론, 수학, 브루트포스, 백트래킹, 비트마스킹문제 난이도: Hard 문제You are given two positive integers n and k.An integer x is called k-palindromic if:x is a palindrome.x is divisible by k.An integer is called good if its digits can be rearranged to form a k-palindromic integer. For example, for k =..
https://www.acmicpc.net/problem/9019BOJ - DSLR문제 유형: bfs, 그래프문제 난이도: Gold IV시간 제한: 6초메모리 제한: 256MB 문제네 개의 명령어 D, S, L, R 을 이용하는 간단한 계산기가 있다. 이 계산기에는 레지스터가 하나 있는데, 이 레지스터에는 0 이상 10,000 미만의 십진수를 저장할 수 있다. 각 명령어는 이 레지스터에 저장된 n을 다음과 같이 변환한다. n의 네 자릿수를 d1, d2, d3, d4라고 하자(즉 n = ((d1 × 10 + d2) × 10 + d3) × 10 + d4라고 하자)D: D 는 n을 두 배로 바꾼다. 결과 값이 9999 보다 큰 경우에는 10000 으로 나눈 나머지를 취한다. 그 결과 값(2n mod 10000..