philschmid/DMath huggingface dataset:
Category: Geometry

Question (EN): In a right triangle, if the hypotenuse is 17 and the non-hypotenuse has length 15, what is the length of the other side?
Question (KO): 직각삼각형에서, 빗변이 17, 빗변이 아닌 한 변이 15의 길이를 갖는다면 나머지 한 변의 길이는 얼마일까요?

Answer: 8

Solution (Python):
var_a = 17
var_b = 2
var_c = var_a ** var_b
var_d = 15
var_e = 2
var_f = var_d ** var_e
var_g = var_c - var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i))
Category: Comparison

Question (EN): Hyunwoo is 1.32 meters (m) tall, and Jinhee is 1.3 meters (m) tall. Who is taller?
Question (KO): 현우의 키는 1.32미터(m)이고, 진희의 키는 1.3미터(m)입니다. 키가 더 큰 사람은 누구입니까?

Answer: Hyunwoo

Solution (Python):
var_a = 'Hyunwoo'
var_b = 'Jinhee'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 1.32
var_d = 1.3
list_b= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Correspondence

Question (EN): Jiho spent 1/2 of the money he had at the fish shop and spent 5,000 won more than 1/3 of the remaining money at the fruit shop. If the amount of money left is 5,000 won, how much money did Jiho initially have?
Question (KO): 지호는 생선가게에서 가지고 있던 돈의 1/2을 썻고,과일가게에서 남은 돈의 1/3보다 5000원 많게 썼습니다. 남은 금액이 5000원이라면 지호가 처음 가지고 있던 돈은 얼마입니까?

Answer: 30000

Solution (Python):
var_a = 5000
var_b = 5000
var_c = var_a + var_b
var_d = 1
var_e = 0.3333333333333333
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 1
var_i = 0.5
var_j = var_h - var_i
var_k = var_g / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2)))))
Category: Correspondence

Question (EN): Write down the correct number for A in 3+A=4.
Question (KO): 3+A=4에서 A에 알맞은 수를 쓰시오.

Answer: 1

Solution (Python):
var_a = 4
var_b = 3
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): You want to divide 12 by some number. If the answer when you mistakenly subtract 42 is 30, what is the correct calculation result?
Question (KO): 어떤 수에 12를 나누려고 합니다. 잘못하여 42를 뺐을 때의 답이 30이라면 바르게 계산한 결과는 얼마일까요?

Answer: 6

Solution (Python):
var_a = 30
var_b = 42
var_c = var_a + var_b
var_d = 12
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): When 3+6AB=691, what number should go in A, where 6AB is a three-digit number?
Question (KO): 3+6AB=691일 때, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 8

Solution (Python):
var_a = '3+6AB=691'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_a
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    term_list = []
    op_list = []
    temp_c = ''
    for tc in temp:
        if tc not in '+-*/=><().':
            temp_c += tc
        else:
            op_list.append(tc)
            term_list.append(temp_c)
            temp_c = ''
    term_list.append(temp_c)
    new_eq = ''
    for i in range(len(op_list)):
        new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    if len(new_eq) == len(var_a):
        new_eq=new_eq.replace('=', '==')
        new_eq=new_eq.replace('>==', '>=')
        new_eq=new_eq.replace('<==', '<=')
        eval_result = False
        try:
            eval_result = eval(new_eq)
        except:
            pass
        if eval_result:
            for i, (k, _) in enumerate(ans_dict.items()):
                ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c))
Category: Possibility

Question (EN): When 6 people A, B, C, D, E, F are lined up in a line, find the number of ways to put E and F next to each other.
Question (KO): A, B, C, D, E, F 6명을 한 줄로 세울 때, E, F를 서로 이웃하게 하여 세우는 경우의 수를 구하시오.

Answer: 240

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
var_e = 'E'
var_f = 'F'
list_a= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_g = 'A'
list_b= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_h = len(list_c)
var_i = len(list_c)
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
    var_j = var_j * (var_h-i)
var_k = 'E'
var_l = 'F'
list_d= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_d.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_d.append(var_k)
list_d.reverse()
var_m = len(list_d)
var_n = len(list_d)
var_o = 1
var_m = int(var_m)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
    var_o = var_o * (var_m-i)
var_p = var_j * var_o
print(int(var_p))
Category: Arithmetic calculation

Question (EN): Giljun ran 1.05 kilometers (km), and Siyeon ran 460 meters (m) less than Giljun. How many kilometers did Siyeon run?
Question (KO): 길준이는 1.05킬로미터(㎞)를 달렸고, 시연이는 길준이보다 460미터(m) 더 적게 달렸습니다. 시연이는 몇 킬로미터(㎞)를 달렸습니까?

Answer: 0.59

Solution (Python):
var_a = 1.05
var_b = 460
var_c = 1000
var_d = var_b / var_c
var_e = var_a - var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Bomin walked 2 kilometers (km) and 600 meters (m) today, and Yunshik walked 3700 meters (m). How many meters (m) did Bomin and Yoonshik walk today?
Question (KO): 정민이가 키우는 강아지의 몸무게는 2킬로그램(㎏) 600그램(g)이고, 고양이의 무게는 3700그램(g)입니다. 정민이가 기르는 동물의 무게의 합은 몇 그램(g)인지 구하시오.

Answer: 6300

Solution (Python):
var_a = 2
var_b = 1000
var_c = var_a * var_b
var_d = 600
var_e = var_c + var_d
var_f = 3700
var_g = var_e + var_f
print(int(var_g))
Category: Comparison

Question (EN): Jungkook is standing on the 19th stair. Yoojeong is 8 steps above Jungkook, and Seokjin is 5 steps below Yoojeong. How many steps does Seokjin stand above Jungkook?
Question (KO): 정국이는 19번째 계단에 서 있습니다. 유정이는 정국이보다 8계단 위에 서 있고, 석진이는 유정이보다 5계단 아래에 서 있습니다. 석진이는 정국이보다 몇 계단 위에 서 있습니까?

Answer: 3

Solution (Python):
var_a = 19
var_b = 8
var_c = var_a + var_b
var_d = 5
var_e = var_c - var_d
var_f = 19
var_g = var_e - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Namjoon wants to divide the marbles into 6 boxes of 6 each. If Namjoon currently has 3 sets of 7 marbles, how many marbles are missing?
Question (KO): 남준이는 구슬을 6개씩 6 상자에 나누어 담으려고 합니다. 현재 남준이는 7개씩 담긴 구슬 묶음이 3개 있을 때, 몇 개의 구슬이 모자랍니까?

Answer: 15

Solution (Python):
var_a = 6
var_b = 6
var_c = var_a * var_b
var_d = 7
var_e = 3
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g))
Category: Possibility

Question (EN): Minsu tries to put 2 Korean and 2 English workbooks in a row on the bookshelf. How many ways are there to put English workbooks side by side?
Question (KO): 민수는 국어 문제집 2권, 영어 문제집 2권을 책꽂이에 일렬로 꽂으려고 한다. 영어 문제집끼리 나란히 꽂는 방법은 모두 몇 가지인가?

Answer: 12

Solution (Python):
var_a = 2
var_b = 1
var_c = var_a + var_b
var_d = 2
var_e = 1
var_f = var_d + var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_c-i)
var_h = 2
var_i = var_g * var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): The distance between Seunghun's house and school is 1.05 kilometers (km), and the distance between Youngjun's house and school is 460 meters (m) closer than the distance between Seunghun's house and school. How many kilometers (km) is the distance between Youngjun's house and the school?
Question (KO): 승훈이네 집과 학교 사이의 거리는 1.05킬로미터(㎞)이고, 영준이네 집과 학교 사이의 거리는 승훈이네 집과 학교 사이의 거리보다 460미터(m) 더 가깝습니다. 영준이네 집과 학교 사이의 거리는 몇 킬로미터(㎞)입니까?

Answer: 0.59

Solution (Python):
var_a = 1.05
var_b = 460
var_c = 1000
var_d = var_b / var_c
var_e = var_a - var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Possibility

Question (EN): Using 3 of 4, 5, 8, and 9, what is the second smallest number whose tens place is 5?
Question (KO): 4, 5, 8, 9 중 3개를 사용하여 십의 자리 숫자가 5인 두 번째 작은 수는 무엇입니까?

Answer: 459

Solution (Python):
var_a = 4
var_b = 5
var_c = 8
var_d = 9
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 10
var_g = 5
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
for i in list_b:
    i = int(i)
    if (i//var_f)%10 == var_g:
        list_c.append(i)
var_h = 2
list_d=list_c.copy()
list_d.sort()
var_i = list_d[var_h-1]
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Seokgi bought bananas for 800 won and kiwis for 400 won, and he bought 18 bananas and kiwis in total. He used 2,800 won less than 4/5 of the 16,000 won he had. Find how much money it cost to buy bananas.
Question (KO): 석기는 가지고 있던 돈 16000원의 4/5보다 2800원 적은 돈으로 800원짜리 바나나와 400원짜리 키위를 합하여 18개 샀습니다. 바나나를 사는 데 든 돈은 얼마인지 구하시오.

Answer: 5600

Solution (Python):
var_a = 16000
var_b = 0.8
var_c = var_a * var_b
var_d = 2800
var_e = var_c - var_d
var_f = 400
var_g = 18
var_h = var_f * var_g
var_i = var_e - var_h
var_j = 800
var_k = 400
var_l = var_j - var_k
var_m = var_i / var_l
var_n = 800
var_o = var_m * var_n
print(int(var_o))
Category: Comparison

Question (EN): There are 4 buses A, B, C, and D. Bus D has the fewest passengers, and bus B has more passengers than bus A, and bus A has more passengers than bus C. Which bus has the most passengers?
Question (KO): 4대의 버스 A, B, C, D가 있습니다. 버스 D에는 가장 적은 승객들이 타고 있고, 버스 B가 버스 A보다 많은 승객을 태우고 있고, 버스 A는 버스 C보다 많은 승객들이 타고 있습니다. 가장 많은 승객을 태운 버스는 무엇일까요?

Answer: B

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 'A'
var_f = 'C'
var_g = '>'
var_h = 'B'
var_i = 'A'
var_j = '>'
var_k = 'D'
var_l = 'A'
var_m = '<'
var_n = 'D'
var_o = 'B'
var_p = '<'
var_q = 'D'
var_r = 'C'
var_s = '<'
list_b= []
if "/" in str(var_s):
    var_s = eval(str(var_s))
list_b.append(var_s)
if "/" in str(var_r):
    var_r = eval(str(var_r))
list_b.append(var_r)
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
    var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
    if cond_ in ("<", ">", "="):
        operand_right = temp_stack.pop()
        operand_left = temp_stack.pop()
        if cond_ == "=":
            cond_ = "=="
        conditions.append(f"{operand_left} {cond_} {operand_right}")
    else:
        if not cond_.isdigit():
            cond_ = "{" + cond_ + "}"
        temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
    item_name_index_dict = dict(zip(items_name_list, perm))
    formatted_conditions = \
        [condition.format_map(item_name_index_dict) for condition in conditions]
    if all(map(eval, formatted_conditions)):
        break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_t = 1
var_u = list_c[var_t-1]
print(var_u)
Category: Arithmetic calculation

Question (EN): The sum of 3 consecutive even numbers is 18 greater than the smallest of the 3 even numbers. Write the largest of the three even numbers.
Question (KO): 3개의 연속된 짝수의 합은 3개의 짝수 중 가장 작은 짝수보다 18만큼 큽니다. 3개의 짝수 중에서 가장 큰 수를 쓰시오.

Answer: 10

Solution (Python):
var_a = 18
var_b = 2
var_c = 1
var_d = var_b * var_c
var_e = 2
var_f = 2
var_g = var_e * var_f
var_h = var_d + var_g
var_i = var_a - var_h
var_j = 3
var_k = 1
var_l = var_j - var_k
var_m = var_i / var_l
var_n = 2
var_o = 2
var_p = var_n * var_o
var_q = var_m + var_p
print(int(var_q))
Category: Comparison

Question (EN): There is a square, equilateral-triangle, and circle. The length of a side of a square is 7 centimeters (cm), the length of a side of an equilateral-triangle is 9 centimeters (cm), and the radius of a circle is 5 centimeters (cm). Which shape has the longest perimeter when the circumference of a circle is 3?
Question (KO): 정사각형, 정삼각형, 원이 있습니다. 정사각형 한 변의 길이는 7센티미터(cm), 정삼각형의 한 변의 길이는 9센티미터(cm), 원의 반지름은 5센티미터(cm) 입니다. 원주율을 3으로 계산 할 때 둘레의 길이가 가장 긴 도형은 어느 것입니까?

Answer: circle

Solution (Python):
var_a = 'square'
var_b = 'equilateral-triangle'
var_c = 'circle'
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 7
var_e = 4
var_f = var_d * var_e
var_g = 9
var_h = 3
var_i = var_g * var_h
var_j = 5
var_k = 3
var_l = 2
var_m = var_k * var_l
var_n = var_j * var_m
list_b= []
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_o = 1
list_c=list_b.copy()
list_c.sort()
var_p = list_c[-var_o]
var_q = list_b.index(var_p)+1
var_r = list_a[var_q-1]
print(var_r)
Category: Possibility

Question (EN): You are trying to put 4 balls of different colors into 2 baskets. At this time, the ball may not be put in the basket. How many ways are there for you to put the ball into the basket?
Question (KO): 서로 색을 가진 4개의 공을 2개의 바구니에 담으려고 합니다. 이때, 바구니에 공이 담기지 않을 수 있습니다. 공을 바구니에 담는 경우는 모두 몇 가지입니까?

Answer: 16

Solution (Python):
var_a = 2
var_b = 4
var_c = var_a ** var_b
print(int(var_c))
Category: Possibility

Question (EN): Three male students and three female students sit on six chairs in a row. Figure out the probability of 3 female students sitting in a row.
Question (KO): 일렬로 있는 6개의 의자에 남학생 3명과 여학생 3명이 각자 앉는다. 여학생 3명이 연속하여 앉아 있을 확률을 구하시오.

Answer: 144

Solution (Python):
var_a = 3
var_b = 3
var_c = var_a + var_b
var_d = 3
var_e = 1
var_f = var_d - var_e
var_g = var_c - var_f
var_h = 3
var_i = 3
var_j = var_h + var_i
var_k = 3
var_l = 1
var_m = var_k - var_l
var_n = var_j - var_m
var_o = 1
var_g = int(var_g)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
    var_o = var_o * (var_g-i)
var_p = 3
var_q = 3
var_r = 1
var_p = int(var_p)
var_q = int(var_q)
for i, elem in enumerate(range(var_q)):
    var_r = var_r * (var_p-i)
var_s = var_o * var_r
print(int(var_s))
Category: Correspondence

Question (EN): Jisoo had 6,000 won and she bought a ballpoint pen for 3,200 won, an eraser for 1,000 won, and candy for 500 won. Assuming that all remaining money is saved, find the amount saved.
Question (KO): 지수는 6000원 중 3200원으로는 볼펜을 사고 1000원으로 지우개를 사고 500원으로는 사탕을 샀다. 남은 돈은 모두 저금했다고 할 때, 지수가 저금한 금액을 구하시오.

Answer: 1300

Solution (Python):
var_a = 6000
var_b = 3200
var_c = var_a - var_b
var_d = 1000
var_e = var_c - var_d
var_f = 500
var_g = var_e - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): One stroke is 12 pencils. Namjoon had two strokes of a pencil. Namjoon gave some pencils to Yoongi, and there were 15 left. How many pencils did you give Yoongi?
Question (KO): 연필 1타는 12자루입니다. 남준이는 연필을 2타 가지고 있었습니다. 남준이가 연필 몇 자루를 윤기에게 주었더니 15자루가 남았습니다. 윤기에게 준 연필은 몇 자루입니까?

Answer: 9

Solution (Python):
var_a = 12
var_b = 2
var_c = var_a * var_b
var_d = 15
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): Seokjin placed the 8th in the swimming competition. How many people got in the finish line faster than Seokjin?
Question (KO): 석진이는 수영 시합에서 8등을 했습니다. 결승선에 석진이보다 빨리 들어온 사람은 모두 몇 명입니까?

Answer: 7

Solution (Python):
var_a = 8
var_b = 1
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): If the elements of set A are 1/2, 1/3, and 1/5, and the elements of set B are 0.2, 0.4, 0.5, and 0.7, find the number of elements in set A minus set B.
Question (KO): 집합 A의 원소는 1/2, 1/3, 1/5이고, 집합 B의 원소는 0.2, 0.4, 0.5, 0.7일 때 A 차집합 B의 원소의 개수를 구하시오.

Answer: 1

Solution (Python):
var_a = 0.5
var_b = 0.3333333333333333
var_c = 0.2
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 0.2
var_e = 0.4
var_f = 0.5
var_g = 0.7
list_b= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_h = len(list_c)
print(int(var_h))
Category: Correspondence

Question (EN): A number needs to be multiplied by 69, but when you mistakenly divide a number by 96, the quotient is 5 and the remainder is 17. What is the correct answer?
Question (KO): 어떤 수에 69를 곱해야 하는데 잘못하여 어떤 수를 96으로 나누었더니 몫이 5이고 나머지가 17이었습니다. 바르게 계산한 답은 얼마일까요?

Answer: 34293

Solution (Python):
var_a = 5
var_b = 96
var_c = var_a * var_b
var_d = 17
var_e = var_c + var_d
var_f = 69
var_g = var_e * var_f
print(int(var_g))
Category: Comparison

Question (EN): Hoseok and 16 of his friends are standing in a line. If 8 people are standing to the right of Hoseok, how many people are standing to the left of Hoseok?
Question (KO): 호석이와 친구 16명이 한 줄로 서 있습니다. 호석이의 오른쪽에 8명이 서 있다면 호석이의 왼쪽에는 몇 명이 서 있습니까?

Answer: 7

Solution (Python):
var_a = 16
var_b = 8
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): When you add a number to 305 and divide it by 16, you get 31. Find the number.
Question (KO): 305에 어떤 수를 더하고 16으로 나누었더니 31이 나왔습니다. 어떤 수를 구하시오.

Answer: 191

Solution (Python):
var_a = 31
var_b = 16
var_c = var_a * var_b
var_d = 305
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): I sorted 2.23, 3.12, 9.434, and 2.453 in ascending order. What is the number that comes in the second?
Question (KO): 2.23, 3.12, 9.434 및 2.453를 작은 순으로 놓았습니다. 두번째로 놓이는 수는 무엇입니까?

Answer: 2.45

Solution (Python):
var_a = 2.23
var_b = 3.12
var_c = 9.434
var_d = 2.453
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 2
list_b=list_a.copy()
list_b.sort()
var_f = list_b[var_e-1]
print('{:.2f}'.format(round(var_f+1e-10,2)))
Category: Correspondence

Question (EN): There are four numbers A, B, C, and D. Find B from the four-digit addition formula, AB4C+17D8=5671.
Question (KO): 네 수 A, B, C, D가 있습니다. 네 자리 수끼리의 덧셈식 AB4C+17D8=5671에서 B를 구하시오.

Answer: 9

Solution (Python):
var_a = 'AB4C+17D8=5671'
var_b = 'B'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_a
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    term_list = []
    op_list = []
    temp_c = ''
    for tc in temp:
        if tc not in '+-*/=><().':
            temp_c += tc
        else:
            op_list.append(tc)
            term_list.append(temp_c)
            temp_c = ''
    term_list.append(temp_c)
    new_eq = ''
    for i in range(len(op_list)):
        new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    if len(new_eq) == len(var_a):
        new_eq=new_eq.replace('=', '==')
        new_eq=new_eq.replace('>==', '>=')
        new_eq=new_eq.replace('<==', '<=')
        eval_result = False
        try:
            eval_result = eval(new_eq)
        except:
            pass
        if eval_result:
            for i, (k, _) in enumerate(ans_dict.items()):
                ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c))
Category: Arithmetic calculation

Question (EN): You want to cut a ribbon in pieces of 0.82 millimeters (mm) to make a ribbon loop. Make a loop with 53.73 millimeters (mm) of ribbon and find how many centimeters (cm) of ribbon are left.
Question (KO): 리본 고리를 만들기 위해 리본을 0.82밀리미터(㎜)씩 자르려고 합니다. 리본 53.73밀리미터(㎜)로 고리를 만들고 남는 리본은 몇 센티미터(㎝)인지 구하시오.

Answer: 0.04

Solution (Python):
var_a = 53.73
var_b = 0.82
var_c = var_a % var_b
var_d = 10
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))