[프로젝트 오일러/파이썬] Smallest multiple
·
Python & SQL/Python Problems
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? 1 ~ 10 사이의 어떤 수로도 나누어 떨어지는 가장 작은 수는 2520 이다. 그렇다면 1 ~ 20 사이의 어떤 수로도 나누어 떨어지는 가장 작은 수는 얼마인가? # 문제 : 최소공배수 구하기 소인수 최소공배수 1 1 1(제외) 2 2 2 3 3 2*3 4 2^2 2^2*3 5 5 2^2*3*5 6 2*3 2^2*3*5 7 7 2^2*3*5*..
[프로젝트 오일러/파이썬] Largest palindrome product
·
Python & SQL/Python Problems
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. 대칭수는 오른쪽에서 읽어도, 왼쪽에서 읽어도 똑같이 읽어진다. 두 자릿수의 곱으로 만들어진 가장 큰 대칭수는 9009 = 91 × 99 이다. 두 개의 세 자릿수로 만들어진 가장 큰 대칭수를 찾으시오. # 생각 포인트 - 대칭수 확인 : if string = string[::-1] 100001, level 등을 확인하는 방법 # 풀이 : ..
[프로젝트 오일러/파이썬] Even Fibonacci numbers
·
Python & SQL/Python Problems
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. 피보나치 수열의 새로운 항은 이전 두 항을 더하여 생성됩니다. 1과 2로 시작하는 10 개의 항은 다음과 같다. 1, 2, 3, 5, 8, 13, 21, 3..
[프로젝트 오일러/파이썬] Multiples of 3 and 5
·
Python & SQL/Python Problems
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. 만약 10 미만의 모든 자연수에서 우리가 3 또는 5의 배수를 나열한다면, 우리는 3, 5, 6, 9 를 얻을 수 있다. 이들의 총합은 23이다. 1000 미만의 자연수에서 3의 배수와 5의 배수의 총계를 구하라. # 풀이과정 - 입력 받는 값의 범위는? 1000 미만의 자연수 (= 1부터 999까지) - 출력하는 값은? 3의 배수와 5의 배수의 총계 - 생각해 볼 것은? (1..