philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): Seonmi is shorter than Seongju and Seongju is shorter than Minyoung. Who is the shortest person when Minyoung is shorter than Suho?
Question (KO): 선미는 성주보다 키가 작고 성주는 민영이보다 키가 작습니다. 민영이는 수호보다 키가 작을 때 키가 가장 작은 사람은 누구입니까?

Answer: Seonmi

Solution (Python):
var_a = 'Suho'
var_b = 'Minyoung'
var_c = 'Seongju'
var_d = 'Seonmi'
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 = 'Suho'
var_f = 'Minyoung'
var_g = '>'
var_h = 'Seongju'
var_i = 'Minyoung'
var_j = '<'
var_k = 'Seongju'
var_l = 'Seonmi'
var_m = '>'
list_b= []
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_n = len(list_c)
var_o = list_c[var_n-1]
print(var_o)
Category: Geometry

Question (EN): There is a cuboid whose three distinct sides' surface areas are respectively 4 square centimeters (cm2), 3 square centimeters (cm2), and 6 square centimeters (cm2). What is the surface area of this cubioid's planar figure in square centimeters (cm2)?
Question (KO): 서로 다른 세 면의 넓이가 각각 4제곱센티미터(㎠) , 3제곱센티미터(㎠) , 6제곱센티미터(㎠)인 직육면체가 있습니다. 이 직육면체의 전개도의 넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 26

Solution (Python):
var_a = 4
var_b = 3
var_c = 6
var_d = var_b + var_c
var_e = var_a + var_d
var_f = 2
var_g = var_e * var_f
print(int(var_g))
Category: Geometry

Question (EN): Find the difference between a square with side lengths of 8 centimeters (cm) and a rectangle with side lengths of 10 centimeters (cm) and 5 centimeters (cm).
Question (KO): 한 변의 길이가 8센티미터(㎝)인 정사각형과 한 변의 길이가 10센티미터(㎝), 나머지 한 변의 길이가 5센티미터(㎝)인 직사각형 넓이의 차를 구하세요.

Answer: 14

Solution (Python):
var_a = 8
var_b = 2
var_c = var_a ** var_b
var_d = 10
var_e = 5
var_f = var_d * var_e
var_g = var_c - var_f
var_h = abs(var_g)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): You bought 18 boxes, including boxes of 50 tangerines each and boxes of 70 tangerines each. If you counted these tangerines individually and there were 1020 in total, how many boxes of 70 did you buy?
Question (KO): 귤 1상자에 50개짜리와 70개짜리 상자를 합쳐 18상자를 샀습니다. 이 귤을 낱개로 세어보니 모두 1020개였다면, 70개짜리 상자는 몇 상자를 산 것입니까?

Answer: 6

Solution (Python):
var_a = 1020
var_b = 50
var_c = 18
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 70
var_g = 50
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Correspondence

Question (EN): You had to divide a number by 12 but mistakenly multiplied by 2 instead to get 622. Find the sum of the quotient and the remainder of the number divided by 12.
Question (KO): 어떤 수를 12로 나누어야 하는데 잘못하여 2를 곱했더니 622가 되었습니다. 어떤 수를 12로 나눈 몫과 나머지의 합을 구하시오.

Answer: 36

Solution (Python):
var_a = 622
var_b = 2
var_c = var_a / var_b
var_d = 12
var_e = var_c // var_d
var_f = 622
var_g = 2
var_h = var_f / var_g
var_i = 12
var_j = var_h % var_i
var_k = var_e + var_j
print(int(var_k))
Category: Comparison

Question (EN): There are bags weighing 1.2 kilograms (kg), 3.1 kilograms (kg), 2.4 kilograms (kg), 3.0 kilograms (kg), and 1.8 kilograms (kg), respectively. If Hyeon-joo wants to buy a bag that is lighter than 2 kg (kg), how many types of bags can Hyeon-joo buy?
Question (KO): 무게가 각각 1.2킬로그램(㎏), 3.1킬로그램(㎏), 2.4킬로그램(㎏), 3.0킬로그램(㎏), 1.8킬로그램(㎏)인 가방이 있습니다. 현주는 2킬로그램(㎏)보다 가벼운 가방을 사려고 했을 때, 현주가 살 수 있는 가방의 종류는 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 1.2
var_b = 3.1
var_c = 2.4
var_d = 3
var_e = 1.8
list_a= []
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_f = 2
list_b = []
for i in list_a:
    if i < var_f:
        list_b.append(i)
var_g = len(list_b)
print(int(var_g))
Category: Comparison

Question (EN): Jimin's bag weighs 1.2 kilograms (kg) and Seokjin's bag weighs 1350 grams (g). Whose bag is heavier?
Question (KO): 지민이의 가방 무게는 1.2kg이고, 석진이의 가방 무게는 1350g입니다. 누구의 가방이 더 무겁습니까?

Answer: Seokjin

Solution (Python):
var_a = 'Jimin'
var_b = 'Seokjin'
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.2
var_d = 1000
var_e = var_c * var_d
var_f = 1350
list_b= []
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()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Correspondence

Question (EN): A three digit number 7A5 is greater than 751. If A can use numbers from 0 to 9 and is a tens digit, find how many numbers can fit in A.
Question (KO): 어떤 세 자리 수 7A5는 751보다 큽니다. A는 0부터 9까지의 숫자를 사용할 수 있고, 십의 자리 수일 때, A에 들어갈 수 있는 숫자의 개수는 몇 개인지 구하시오.

Answer: 5

Solution (Python):
var_a = '7A5'
ans_dict = dict()
var_a = str(var_a)
list_a = []
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] = 0
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]))
    if len(var_a) == len(str(int(temp))):
        new_elem = int(temp)
        list_a.append(new_elem)
var_b = 751
list_b = []
for i in list_a:
    if i < var_b:
        list_b.append(i)
var_c = len(list_b)
print(int(var_c))
Category: Correspondence

Question (EN): 5 is a result of dividing a particular number by 4 and adding 3. What number is that particular number?
Question (KO): 5는 어떤 수를 4로 나누고 3을 더해준 값입니다. 어떤 수는 얼마입니까?

Answer: 8

Solution (Python):
var_a = 5
var_b = 3
var_c = var_a - var_b
var_d = 4
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): When there are six different people, what is the number of cases in which you select two of them and make one president and the other one secretary?
Question (KO): 서로 다른 6명이 있을 때, 그 중 2명을 뽑아 한 명은 회장, 다른 한명은 서기를 시키는 경우의 수는?

Answer: 30

Solution (Python):
var_a = 6
var_b = 1
var_c = 1
var_d = var_b + var_c
var_e = 1
var_a = int(var_a)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
    var_e = var_e * (var_a-i)
print(int(var_e))
Category: Comparison

Question (EN): In the cinema, the audience sat in rows of chairs. If there are 30 people sitting in the chairs between the audience sitting on the far right and the audience sitting on the far left, how many people are sitting in the chairs?
Question (KO): 영화관에 관객들이 일렬로 나열된 의자에 차례대로 앉았습니다. 맨 오른쪽에 앉은 관객과 맨 왼쪽에 앉은 관객 사이에 30 명이 의자에 앉아 있다면 앉아있는 관객들은 모두 몇 명 입니까?

Answer: 32

Solution (Python):
var_a = 30
var_b = 2
var_c = var_a + var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): On one side of the road, 10 trees are planted at intervals of 10 meters (m) from start to finish. Find the length in meters (m) of this road.
Question (KO): 도로의 한쪽에 처음부터 끝까지 10그루의 나무가 10미터(m) 간격으로 심어져 있습니다. 이 도로의 길이는 몇 미터(m)인지 구해 보시오.

Answer: 90

Solution (Python):
var_a = 10
var_b = 1
var_c = var_a - var_b
var_d = 10
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): The certain amount of salt in 10 liters (L) of salt water is 7/10. If you divide the salt water equally into 4 cups, how many liters of salt are in each cup?
Question (KO): 소금물 10리터(L)에서 소금의 비중이 7/10입니다. 4개의 컵에 소금물을 똑같이 나누어 담을때 각 컵에 있는 소금은 몇 리터(L)인가요?

Answer: 1.75

Solution (Python):
var_a = 10
var_b = 0.7
var_c = var_a * var_b
var_d = 4
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Correspondence

Question (EN): The average of Cheolsu's weight, the mother's weight, and the father's weight is equal to the mother's weight. If Cheolsu's weight is 2/3 of his mother's weight and his father's weight is 72 kilograms (kg), what is Cheolsu's weight?
Question (KO): 철수의 몸무게와 어머니의 몸무게와 아버지의 몸무게의 평균이 어머니의 몸무게와 같다. 철수의 몸무게는 어머니의 몸무게의 2/3이고 아버지의 몸무게는 72킬로그램(㎏)이면 철수의 몸무게는 얼마인지 구하시오.

Answer: 36

Solution (Python):
var_a = 72
var_b = 2
var_c = 1
var_d = 0.6666666666666666
var_e = var_c / var_d
var_f = var_b * var_e
var_g = 1
var_h = var_f - var_g
var_i = var_a / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Of 1 liter (L) of milk, Ye-seul drank 0.1 liters (L), and Ga-young drank 0.2 liters (L) more than Ye-seul, and Hancho drank several liters (L) more and the remaining amount of the milk was 0.3 liters (L). Find how many liters (L) of milk Hancho drank.
Question (KO): 1리터(L)의 우유를 예슬이가 0.1리터(L) 마시고, 가영이가 예슬이보다 0.2리터(L)를 더 많이 마시고, 한초가 몇 리터(L)를 더 마셨더니 0.3리터(L)가 남았습니다. 한초가 마신 우유는 몇 리터(L)일지 구하시오.

Answer: 0.3

Solution (Python):
var_a = 1
var_b = 0.1
var_c = var_a - var_b
var_d = 0.1
var_e = 0.2
var_f = var_d + var_e
var_g = var_c - var_f
var_h = 0.3
var_i = var_g - var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Correspondence

Question (EN): A number is a two-digit number between 30 and 40. The number has a units digit of 2. Find the number.
Question (KO): 어떤 수는 30과 40 사이의 두 자리 수입니다. 어떤 수는 일의 자리 숫자가 2입니다. 어떤 수를 구하시오.

Answer: 32

Solution (Python):
var_a = 30
var_b = 40
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 10
var_e = 2
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 1
var_g = list_b[var_f-1]
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There are five numbers, 3.3, 7/2, 1.9, 14/5, and 2.1. How many of these numbers are greater than 2 and less than 3?
Question (KO): 5개의 수 3.3, 7/2, 1.9, 14/5, 2.1이 있습니다. 이 중에서 2보다 크고 3보다 작은 수는 모두 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 3.3
var_b = 3.5
var_c = 1.9
var_d = 2.8
var_e = 2.1
list_a= []
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_f = 2
list_b = []
for i in list_a:
    if i > var_f:
        list_b.append(i)
var_g = 3
list_c = []
for i in list_b:
    if i < var_g:
        list_c.append(i)
var_h = len(list_c)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): Among natural numbers greater than 14 and less than 105, what is the quotient of the largest number divided by the smallest number?
Question (KO): 14 이상 105 미만인 자연수 중에서 가장 큰 수를 가장 작은 수로 나눈 몫은 얼마입니까?

Answer: 7

Solution (Python):
var_a = 105
var_b = 1
var_c = var_a - var_b
var_d = 14
var_e = var_c // var_d
print(int(var_e))
Category: Geometry

Question (EN): There is a prism with the sum of the number of verticles and the number of edges equal to 40. How many faces does this prism have?
Question (KO): 꼭짓점의 수와 모서리의 수의 합이 40개인 각기둥이 있습니다. 이 각기둥의 면의 수는 몇 개입니까?

Answer: 10

Solution (Python):
var_a = 40
var_b = 2
var_c = 3
var_d = var_b + var_c
var_e = var_a / var_d
var_f = 2
var_g = var_e + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): I divided 38 dolls into 5 boxes, and there are 3 dolls left. How many boxes are there?
Question (KO): 5개의 상자에 38개의 인형을 나누어 담았더니 3개의 인형이 남았습니다. 한 상자에 담겨진 인형의 개수는 몇 개입니까?

Answer: 7

Solution (Python):
var_a = 38
var_b = 3
var_c = var_a - var_b
var_d = 5
var_e = var_c // var_d
print(int(var_e))
Category: Geometry

Question (EN): You are going to make a cube with one edge 13 centimeters (cm) long from a wire. At least how many centimeters (cm) of wire do you need?
Question (KO): 철사로 한 모서리의 길이가 13센티미터(㎝)인 정육면체를 만들려고 합니다. 철사는 적어도 몇 센티미터(㎝)가 필요합니까?

Answer: 156

Solution (Python):
var_a = 13
var_b = 4
var_c = var_a * var_b
var_d = 13
var_e = 4
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 13
var_i = 4
var_j = var_h * var_i
var_k = var_g + var_j
print(int(var_k))
Category: Comparison

Question (EN): Which one is larger between a cube (a) with all edges 5 centimeters (cm) long and a cuboid (b) with width, length, and height 4 centimeters (cm), 5 centimeters (cm), and 6 centimeters (cm), respectively?
Question (KO): 모든 모서리의 길이가 5센티미터(㎝)인 (가) 정육면체와 가로, 세로, 높이가 각각 4센티미터(㎝), 5센티미터(㎝), 6센티미터(㎝)인 (나) 직육면체 중 더 큰 도형은 무엇인가?

Answer: (a)

Solution (Python):
var_a = '(a)'
var_b = '(b)'
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 = 5
var_d = 3
var_e = var_c ** var_d
var_f = 4
var_g = 5
var_h = 6
var_i = var_g * var_h
var_j = var_f * var_i
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Arithmetic calculation

Question (EN): The circumference of pond, which has a circumference of 3km (km), started from the same place as Cheol-su and Young-hee at the same time and walked in opposite directions. If Cheol-su walks at a speed of 100 meters (m) per minute and Young-hee walks at a speed of 150 meters (m) per minute, find the two meet again for the first time in a few minutes.
Question (KO): 둘레가 3킬로미터(㎞)인 연못의 둘레를 철수와 영희가 같은 곳에서 동시에 출발하여 서로 반대 방향으로 걸었다. 철수는 매분 100미터(m)의 속력으로, 영희는 매분 150미터(m)의 속력으로 걸었다면 몇 분 후에 처음으로 다시 만나는지 구하여라

Answer: 12

Solution (Python):
var_a = 3
var_b = 100
var_c = 1000
var_d = var_b / var_c
var_e = 150
var_f = 1000
var_g = var_e / var_f
var_h = var_d + var_g
var_i = var_a / var_h
print(int(var_i))
Category: Comparison

Question (EN): There are students standing in a line. Hoseok is at the left side of Yoongi, and five other students are standing between them. Nine people are standing to Hoseok's left, and six people are standing to Yoongi's right. How many students are in the line?
Question (KO): 학생들이 한 줄로 서 있습니다. 호석이는 윤기보다 왼쪽에 있고 그 사이에는 다른 학생들이 5명 서 있습니다. 호석이의 왼쪽에는 9명이 서 있고, 윤기의 오른쪽에는 6명이 서 있습니다. 줄을 서 있는 학생은 모두 몇 명입니까?

Answer: 22

Solution (Python):
var_a = 1
var_b = 1
var_c = var_a + var_b
var_d = 5
var_e = var_c + var_d
var_f = 9
var_g = var_e + var_f
var_h = 6
var_i = var_g + var_h
print(int(var_i))
Category: Correspondence

Question (EN): A and B are numbers from 0 to 9. When the five-digit number A835B is divisible by 12, find the difference between the largest number and the smallest number that can be made from A835B.
Question (KO): A, B는 0에서 9까지의 수입니다. 다섯자리 수 A835B가 12로 나누어 떨어질 때 A835B가 될 수 있는 가장 큰 수와 가장 작은 수의 차를 구하시오.

Answer: 69996

Solution (Python):
var_a = 'A835B'
ans_dict = dict()
var_a = str(var_a)
list_a = []
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] = 0
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]))
    if len(var_a) == len(str(int(temp))):
        new_elem = int(temp)
        list_a.append(new_elem)
var_b = 12
list_b = []
var_b = int(var_b)
for i in list_a:
    i = int(i)
    if i % var_b == 0:
        list_b.append(i)
var_c = 1
list_c=list_b.copy()
list_c.sort()
var_d = list_c[-var_c]
var_e = 1
list_d=list_b.copy()
list_d.sort()
var_f = list_d[var_e-1]
var_g = var_d - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Dongmin and Kyuhyung each have some candies. If Dongmin has 5 more candies than Kyuhyung and the sum of their candies is 43, how many candies does Kyuhyung have?
Question (KO): 동민이와 규형이는 각각 사탕을 몇 개씩 가지고 있습니다. 동민이가 규형이보다 사탕 수가 5개 더 많고, 두 사람의 사탕 수의 합이 43개라면 규형이는 몇 개를 가지고 있습니까?

Answer: 19

Solution (Python):
var_a = 43
var_b = 5
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Comparison

Question (EN): Jaesuk drank 5 liters (l) of water for two days, and Jaesuk's brother drank 4900 milliliters (ml). Which of the two drank more water in two days?
Question (KO): 재석이는 이틀 동안 5리터(L)의 물을 마셨고, 재석이의 형은 4900밀리리터(㎖)를 마셨습니다. 둘 중 이틀 동안 물을 더 많이 마신 사람은 누구입니까?

Answer: Jaesuk

Solution (Python):
var_a = 'Jaesuk'
var_b = 'brother'
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 = 5
var_d = 1000
var_e = var_c * var_d
var_f = 4900
list_b= []
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()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Correspondence

Question (EN): What is C when A, B, C, and D are different numbers that correspond to this equation of 4A58+C2D7=7070?
Question (KO): 4A5B+C2D7=7070을 만족하는 A, B, C, D가 서로 다른 숫자일 때 C는 얼마입니까?

Answer: 2

Solution (Python):
var_a = '4A5B+C2D7=7070'
var_b = 'C'
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: Correspondence

Question (EN): Subtract this number from 35, and then multiply it by 2, add 12, divide it by 8, then subtract 4, and you get 5. Find this number.
Question (KO): 35에서 어떤 수를 빼고 2를 곱한 뒤 12를 더하여 8로 나눈 다음 4를 뺀 값이 5입니다. 어떤 수를 구하시오.

Answer: 5

Solution (Python):
var_a = 35
var_b = 5
var_c = 4
var_d = var_b + var_c
var_e = 8
var_f = var_d * var_e
var_g = 12
var_h = var_f - var_g
var_i = 2
var_j = var_h / var_i
var_k = var_a - var_j
print(int(var_k))
Category: Comparison

Question (EN): What is the smallest number greater than 0.4 among 0.8, 1/2, 0.3, 1/3?
Question (KO): 0.8, 1/2, 0.3, 1/3에서 0.4보다 큰 수 중 가장 작은 수는?

Answer: 0.5

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.3
var_d = 0.3333333333333333
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 = 0.4
list_b = []
for i in list_a:
    if i > var_e:
        list_b.append(i)
var_f = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Arithmetic calculation

Question (EN): You are going to divide 16 kilograms (kg) of peanuts equally into 6 bags and share one bag with your friends. How many people can eat if each person eats 4/15 kilograms (kg)?
Question (KO): 땅콩 16킬로그램(㎏)을 6봉지에 똑같게 나누어 담고 한 봉지를 친구들과 나누어 먹으려고 합니다. 한 사람이 4/15킬로그램(㎏)씩 먹는다면 몇 명이 먹을 수 있습니까?

Answer: 10

Solution (Python):
var_a = 16
var_b = 6
var_c = var_a / var_b
var_d = 0.26666666666666666
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): When a number is divided by 7, the quotient is 12 and the remainder is 5. What is the remainder when this number is divided by 8?
Question (KO): 어떤 수를 7로 나누었더니 몫이 12이고 나머지가 5였습니다. 이 수를 8로 나누었을 때 나머지는 얼마입니까?

Answer: 1

Solution (Python):
var_a = 12
var_b = 7
var_c = var_a * var_b
var_d = 5
var_e = var_c + var_d
var_f = 8
var_g = var_e % var_f
print(int(var_g))
Category: Geometry

Question (EN): Find the area of a square with side length 3.
Question (KO): 한 변의 길이가 3인 정사각형의 넓이를 구하시오.

Answer: 9

Solution (Python):
var_a = 3
var_b = 2
var_c = var_a ** var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): All 1,260 seats in a concert hall were full. If 7/18 of the audience wore glasses and 6/11 among the audience with no glasses were male, find out the number of male audience members who were not wearing glasses.
Question (KO): 어느 공연장의 객석 1260석은 모두 만석입니다. 관객 중 7/18은 안경을 썼고 안경을 쓰지 않은 관객 중 6/11이 남자라면 안경을 쓰지 않은 남자 관객은 모두 몇 명인지 구하세요.

Answer: 420

Solution (Python):
var_a = 1260
var_b = 1
var_c = 0.3888888888888889
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 0.5454545454545454
var_g = var_e * var_f
print(int(eval('{:.2f}'.format(round(var_g+1e-10,2)))))