Programming (102) 썸네일형 리스트형 [C/C++] Project Euler #61 - Cyclical Figurate Numbers This problem follows directly from problem 60 and is labeled as having a 20% difficulty level, but in my case, I didn’t find it particularly hard to solve.To tackle problems involving n-gonal numbers, it’s generally effective to focus on correctly checking whether a number satisfies the condition of being an n-gonal number. That approach should be sufficient without much difficulty.In this probl.. [C/C++] Project Euler #60 - Prime Pair Sets This is the first time I’m tackling a problem with a difficulty level of 20%.Although it’s called a prime pair, there isn’t really any deep mathematical concept involved.For example, if we take the two prime numbers 3 and 7, and simply concatenate them to form 37 and 73, and if both of these numbers are also prime, then (3, 7) is considered a prime pair.Such prime pairs exist infinitely, but the.. [C/C++] BOJ #1057 - Tournament A tournament match is a competition where two teams or players face off, and the winner advances to the next round. It fundamentally follows a binary tree structure.Problem DescriptionThe problem is to determine when two players, A and B, will meet in a tournament, assuming players are lined up from 1 to N in order. Once you recognize that this is essentially a binary tree, the problem becomes q.. [C/C++] Project Euler #59 - XOR Decryption This problem is rated at a 5% difficulty level, but if solved in a standard way, I believe it would be more difficult than that.The method of decrypting this kind of cipher often involves brute-force repeated substitution. While simple repeated substitution can crack the cipher, it often takes thousands or even tens of thousands of years, even with the help of tens of thousands of computers. Thi.. [C++] Project Euler #58 - Spiral Primes #58 is a problem with a difficulty level of 5%.Although the problem may appear complex at first glance, it’s actually not difficult to solve at all.The key idea is that when you arrange numbers in a spiral starting from 1, the numbers that appear on the diagonals are always odd. In that case, the important part for solving this problem is to find the ratio of primes among the odd numbers located.. [C/C++] BOJ #1051 - Number Square The problem itself is quite simple. Its difficulty is rated as Silver III, so it’s not particularly hard. However, the correct answer rate is relatively low, around 37%.You are given an N×M matrix of numbers, and the task is to select four numbers that form a square — meaning the four numbers should be aligned parallel to the rows and columns, forming the corners of a square — and all four numbe.. [C++/Python] Project Euler #57 - Square Root Convergents This problem may appear to be a math problem, but it’s actually just a simple calculation problem.It’s rated as a 5% difficulty problem on the Project Euler site.The content of the problem is that when calculating the square root of 2, it can be expressed as a continued fraction. For more about continued fractions, refer to Pell’s equation.We can express the square root of 2 in such a way using .. [C++/Python] Project Euler #56 - Powerful Digit Sum This problem is categorized as a 5% difficulty level problem, but users of programming languages without a built-in BigInt module may face the challenge of having to implement or acquire such a module. If you use a language like Python, Java, or C#, which already includes a BigInt module, the problem can be solved quite easily. The problem itself is simple:Given values of a and b less than 100, .. [C/C++] BOJ #1049 - Guitar string This problem can be solved simply by performing basic division and appropriate multiplication. Although it is classified as a Silver IV problem, it actually feels easier in terms of difficulty. However, the correct answer rate is quite low at 29.3%.This may be because people are prone to mistakes if they have preconceived notions. If you abandon the assumptions that bundle products should be che.. [C++/Python] Project Euler #55 - Lychrel Numbers This problem is also a difficulty level 5% problem.A Lychrel number is a positive integer that, when expressed in base 10 and added to its reverse, does not form a palindrome. If the result is not a palindrome, the process is repeated by reversing the number and adding again.Theoretically, since the numbers increase gradually, it is assumed that eventually a palindrome (a number that reads the s.. 이전 1 2 3 4 5 ··· 11 다음