Recent postings
-
Project Euler
[C/C++] Project Euler #64 - Odd period square roots
Project Euler Problem #64 is about expressing square roots as continued fractions. The difficulty of this problem is around 20%. I think the challenge lies more in the mathematical concept rather than algorithmic complexity.A similar problem of expressing square roots as continued fractions appeared previously in Problem #57: https://odev.tistory.com/entry/CPython-Project-Euler-57-Square-Root-Co..
-
BOJ
[C/C++] BOJ #1068 - Tree
This problem is about finding the number of leaf nodes after deleting a specific node in a tree. As shown in the figure above, when a tree is given and, for example, node 1 is deleted, nodes 3 and 4 are also deleted as a result. Only node 2 remains as a leaf node. The task is to count such remaining leaf nodes. Although the difficulty is marked as Silver I, the implementation itself is not very ..
-
Project Euler
[C/C++] Project Euler #63 - Powerful digit counts
This is a problem involving powers, but unexpectedly, it’s quite easy. The difficulty level is only 5%. The problem is: How many n-digit numbers are also nth powers of some number?For example, \(16807 = 7^5\), and 16807 is a 5-digit number, which is exactly the 5th power of 7. Even a brute-force solution works just fine for this problem. First, only numbers less than 10 are worth considering as ..
-
Project Euler
[C++] Project Euler #62 - Cubic Permutations
This problem is rated at a difficulty level of 15%.Surprisingly, I solved it quite easily (using a brute-force method).The problem asks for the smallest number among five different cube numbers that are made up of the same digits.To be honest, if you were to solve this problem properly, you’d need to check that exactly five such numbers exist, but I didn’t go that far.I also excluded cases where..
-
BOJ
[C++] BOJ #1067 - Moving
This problem is classified as Platinum II difficulty.To solve this problem, you need to understand convolution codes. Convolution codes are broadly categorized into non-cyclic and cyclic codes. This problem is related to cyclic convolution codes. Though convolution codes are widely used in communication, they are also an important concept in understanding systems in general.You are given two seq..