Skip to content

Instantly share code, notes, and snippets.

View yuda110's full-sized avatar
👩‍💻
work work work

Dahyun Yu yuda110

👩‍💻
work work work
View GitHub Profile
#python3
from fractions import Fraction
exception_list = [11, 22, 33, 44, 55, 66, 77, 88, 99]
def get_interesting_formula():
result_fraction = 1
for nume in range(11, 99):
for deno in range(10, 98):
if nume <= deno or nume in exception_list or deno in exception_list:
#>>분자(numerator), 분모(denominator)의 숫자를 일단 ['9', '8']과 같이 리스트로 뽑은 후에 비교해서 같은 수 고르기?
#>>아니면 같은 수를 넣고나서 분자 분모를 만들기?
#11, 22 등과 같은 경우는 예외 처리
exception_list = [11, 22, 33, 44, 55, 66, 77, 88, 99]
def make_분자_분모_리스트():
분자분모_list = []
for 분자 in range(11, 99):
for 분모 in range(10, 98):
#python3
result = 0
i = 1
while i < 1000 :
if i % 3 == 0 or i % 5 == 0:
result += i
i += 1
print(result)
#python3
num1 = 0
num2 = 1
num3 = num1 + num2
result = 0
while num3 <= 4000000 :
num3 = num1 + num2
num1 = num2
num2 = num3
#python3
palindrome = []
def get_palindrome(num1, num2) :
max_palindrome = 0
num2_org = num2
while num1 > (num1/10) :
while num2 > (num2/10) :
multipled_num = num1*num2
if is_palindrome(multipled_num) and (max_palindrome < multipled_num):
#python3
def is_devidable(num_todo, num_to_devide):
return num_todo % num_to_devide == 0
def is_devidable_at_range(num_todo,range_from, range_to ):
result = True
for i in range(range_from, range_to):
if not is_devidable(num_todo, i):
result = False
break
#python3
def sum_square(range_from, range_to) :
sum_square = 0
for i in range(range_from, range_to) :
sum_square += i**2
return sum_square
def square_sum(range_from, range_to) :
sum = 0
for i in range(range_from, range_to) :
#python3
def is_prime_num(num) :
for i in range(2, int(num**0.5) + 1):
if num % i==0:
return False
return True
def find_prime_num(seq_range_to) :
num = 3
prime_seq = 1
from primesieve import nth_prime
print(nth_prime(10001))
#python3
def multiple_five_num(five_num) :
multiple = 1
for i in range(0, 5) :
multiple = multiple * int(five_num[i])
return multiple
def pickup_multiple_five_num(num) :
range_to = len(num)
max_num = 0