philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): Juri is taller than Jungwoo. Myunghyun is taller than Seokjin. Juri is shorter than Jungkook. Myunghyun is shorter than Jungwoo. Who is the tallest person?
Question (KO): 주리는 정우보다 큽니다. 명현이는 석진이보다 큽니다. 주리는 정국이보다 작습니다. 명현이는 정우보다 작습니다. 키가 가장 큰 사람은 누구입니까?

Answer: Jungkook

Solution (Python):
var_a = 'Juri'
var_b = 'Jungwoo'
var_c = 'Myunghyun'
var_d = 'Seokjin'
var_e = 'Jungkook'
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 = 'Juri'
var_g = 'Jungwoo'
var_h = '>'
var_i = 'Myunghyun'
var_j = 'Seokjin'
var_k = '>'
var_l = 'Juri'
var_m = 'Jungkook'
var_n = '<'
var_o = 'Myunghyun'
var_p = 'Jungwoo'
var_q = '<'
list_b= []
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)
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_r = 1
var_s = list_c[var_r-1]
print(var_s)
Category: Correspondence

Question (EN): You were supposed to subtract 12 from a certain number and multiply by 9, but accidentally add 12 and divide by 8. Find the correctly calculated value.
Question (KO): 어떤 수에서 12를 뺀 후 9를 곱해야 할 것을 잘못하여 어떤 수에 12를 더한 후 8로 나누었더니 8이 되었습니다. 바르게 계산한 값을 구하시오.

Answer: 360

Solution (Python):
var_a = 8
var_b = 8
var_c = var_a * var_b
var_d = 12
var_e = var_c - var_d
var_f = 12
var_g = var_e - var_f
var_h = 9
var_i = var_g * var_h
print(int(var_i))
Category: Correspondence

Question (EN): An engineering school has 928 students and 713 of those are male students. Find how many male students outnumber female students.
Question (KO): 어느 공대에 모든 학생의 수는 928명이고 남학생의 수는 713명이다. 남학생이 여학생보다 몇 명이 더 믾은지 구하시오.

Answer: 498

Solution (Python):
var_a = 713
var_b = 928
var_c = 713
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e))
Category: Correspondence

Question (EN): A and B are different numbers ranging from 0 to 9. What is the sum of A and B when the multiplication expression AB×6=BBB is true?
Question (KO): A, B는 서로 다른 0에서 9까지의 수입니다. 곱셈식 AB×6=BBB가 참일 때 A와 B의 합은 무엇입니까?

Answer: 11

Solution (Python):
var_a = 'AB×6=BBB'
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]
var_d = 'AB×6=BBB'
var_e = 'B'
ans_dict = dict()
var_d = var_d.replace('×','*')
var_d = var_d.replace('x','*')
var_d = var_d.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_d):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_d
    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_d):
        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_f = ans_dict[var_e]
var_g = var_c + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Identify which numbers are greater than 2 and less than 3 among 3.3, 7/2, 1.9, 14/5, and 2.1, and count how many of them are.
Question (KO): 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: Correspondence

Question (EN): Made the mistake of subtracting 43.72 from a certain number, when I should subtract 4.372, and I got 16.398. How much would it be if I calculated it correctly?
Question (KO): 어떤 수에서 4.372를 빼야 할 것을 잘못하여 43.72를 빼었더니 16.398이 되었습니다. 바르게 계산하면 얼마가 되겠습니까?

Answer: 55.75

Solution (Python):
var_a = 16.398
var_b = 43.72
var_c = var_a + var_b
var_d = 4.372
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Geometry

Question (EN): The truck carries cabbages from Seoul to Incheon and radishes from Incheon to Seoul. When transported once, 4 kilograms (kg) and 436 grams (g) of cabbage and 1999 grams (g) of radish are loaded. If the truck goes back and forth between Incheon and Seoul twice, what is the total amount of both vegetables the truck carries in kilograms (kg)?
Question (KO): 트럭은 서울에서 인천으로 가면서 배추를 나르고 인천에서 서울로 가면서 무를 나른다. 한번 옮길 때 배추가 4킬로그램(㎏) 436그램(g), 무가 1999그램(g) 실려있다. 트럭이 인천과 서울을 2번 왕복하면 트럭이 옮긴 채소는 총 몇 킬로그램(㎏)인가?

Answer: 12.87

Solution (Python):
var_a = 4
var_b = 436
var_c = 1000
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 1999
var_g = 1000
var_h = var_f / var_g
var_i = var_e + var_h
var_j = 2
var_k = var_i * var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Geometry

Question (EN): If the base of a triangle with an area of 46 square centimeters (cm2) is 10 centimeters (cm), how many centimeters (cm) is its height?
Question (KO): 넓이가 46제곱센티미터(㎠)인 삼각형의 밑변이 10센티미터(㎝)이면, 높이는 몇 센티미터(㎝)입니까?

Answer: 9.2

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

Question (EN): The length of the long rod is 14/15 meters (m), and the length of the short rod is 1/10 meter (m) shorter than the length of the long rod. Find the sum of the lengths of the two rods in meters (m).
Question (KO): 긴 막대의 길이가 14/15미터(m)이고, 짧은 막대의 길이는 긴 막대의 길이보다 1/10미터(m) 더 짧습니다. 이때 두 막대의 길이의 합은 몇 미터(m)인지 구하시오.

Answer: 1.77

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

Question (EN): Jeonghee, Cheolsu, Eunsu, and Minjun went to the baseball field. If Eunsu and Minjun do not sit next to each other because they are not on good terms, find the number of cases in which four people sit in a row. (However, there are four seats and all are attached.)
Question (KO): 정희, 철수, 은수, 민준 4명이 야구장에 갔다. 이때, 은수와 민준은 사이가 좋지 않아 이웃하여 앉지 않는다고 할 때, 네 명이 한 줄로 앉는 경우의 수를 구하시오. (단, 좌석은 네 좌석이며 모두 붙어있다.)

Answer: 12

Solution (Python):
var_a = 'Jeonghee'
var_b = 'Cheolsu'
var_c = 'Eunsu'
var_d = 'Minjun'
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 = len(list_a)
var_f = len(list_a)
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_e-i)
var_h = 'Eunsu'
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_i = len(list_c)
var_j = len(list_c)
var_k = 1
var_i = int(var_i)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
    var_k = var_k * (var_i-i)
var_l = 'Eunsu'
var_m = 'Minjun'
list_d= []
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_d.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_d.append(var_l)
list_d.reverse()
var_n = len(list_d)
var_o = len(list_d)
var_p = 1
var_n = int(var_n)
var_o = int(var_o)
for i, elem in enumerate(range(var_o)):
    var_p = var_p * (var_n-i)
var_q = var_k * var_p
var_r = var_g - var_q
print(int(var_r))
Category: Geometry

Question (EN): A cube with a side length of 1 metre was cut into 64 cubes of equal size. What is the total surface area, in square centimetres (m²), of the smaller cubes?
Question (KO): 모서리의 길이가 1미터(m)인 정육면체를 잘라서 64개의 작은 정육면체를 만들었다. 작은 정육면체들의 겉넓이의 합을 구하면 몇 제곱미터(m2)인가?

Answer: 24

Solution (Python):
var_a = 1
var_b = 4
var_c = var_a / var_b
var_d = 1
var_e = 4
var_f = var_d / var_e
var_g = var_c * var_f
var_h = 6
var_i = var_g * var_h
var_j = 64
var_k = var_i * var_j
print(int(var_k))
Category: Possibility

Question (EN): There are pants and skirts in the closet. There are 4 pants, and 7 possible ways to wear pants or skirts. At this time, how many skirts are there?
Question (KO): 옷장에 옷이 바지와 치마가 있다. 바지는 4벌이 있으며, 바지 또는 치마를 입는 경우가 7가지이다. 이 때, 치마는 몇 벌이 있는가?

Answer: 3

Solution (Python):
var_a = 7
var_b = 4
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Hoonjeong threw away 0.2 of the marbles he had and gave 0.35 of the remaining amount to his friend so that there are 130 marbles left. Find how many marbles Hoonjeong had at first.
Question (KO): 훈정이는 가지고 있는 구슬 중 0.2만큼을 버리고 남은 양의 0.35만큼을 친구에게 주었더니 남은 구슬이 130개 라고 한다. 훈정이가 처음에 가지고 있던 구슬은 몇 개인지 구하시오.

Answer: 250

Solution (Python):
var_a = 130
var_b = 1
var_c = 0.35
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 1
var_g = 0.2
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Comparison

Question (EN): Students are in a line. Suppose Seoyoon's position is at the 5th from the left and 3rd from the right, how many students are in the line?
Question (KO): 학생들이 한 줄로 서있습니다. 서윤이의 위치는 왼쪽에서 5번째, 오른쪽에서 3번째입니다. 줄을 서 있는 학생들은 모두 몇 명입니까?

Answer: 7

Solution (Python):
var_a = 5
var_b = 3
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There were 37 chicks on the farm. If you bought 23 more chicks on day 1 and 12 more chicks on day 2, how many more chicks are there?
Question (KO): 농장에 병아리가 37마리 있었습니다. 1번째 날 병아리 23마리를 더 사 오고, 2번째 날 병아리 12마리를 더 사 왔다면 병아리는 모두 몇 마리가 늘어났습니까?

Answer: 35

Solution (Python):
var_a = 23
var_b = 12
var_c = var_a + var_b
print(int(var_c))
Category: Comparison

Question (EN): Boat A travels at a speed of 92 kilometers (km) per hour, and boat B travels at a speed of 1500 meters (m) per minute. Which of the two boats is faster?
Question (KO): A 보트는 시속 92킬로미터(㎞)의 빠르기로 운행하고, B 보트는 분속 1500미터(m)의 빠르기로 운행합니다. 두 보트 중 어떤 보트의 속력이 더 빠릅니까?

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 = 92
var_d = 1500
var_e = 1000
var_f = var_d / var_e
var_g = 60
var_h = var_f * var_g
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Comparison

Question (EN): Find the value of multiplication the first largest number by the second largest number among 2.1, 3.2, 32, 12, 3.4, and 2.5.
Question (KO): 2.1, 3.2, 32, 12, 3.4, 2.5 중 첫 번째로 큰 수와 두 번째로 큰 수의 곱을 구하시오

Answer: 384

Solution (Python):
var_a = 2.1
var_b = 3.2
var_c = 32
var_d = 12
var_e = 3.4
var_f = 2.5
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 = 1
list_b=list_a.copy()
list_b.sort()
var_h = list_b[-var_g]
var_i = 2
list_c=list_a.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = var_h * var_j
print(int(var_k))
Category: Comparison

Question (EN): There are 24 marbles. Of these, red marbles account for 1/4 of the total. There are 6 more blue marbles than red marbles, and the rest are yellow marbles. What color beads do you have the most?
Question (KO): 구슬이 24개 있습니다. 이 중에서 빨간색 구슬은 전체의 1/4이고, 파란색 구슬은 빨간색 구슬보다 6개 더 많고, 나머지는 노란색 구슬입니다. 어떤 색의 구슬이 가장 많습니까?

Answer: blue

Solution (Python):
var_a = 'red'
var_b = 'blue'
var_c = 'yellow'
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 = 24
var_e = 0.25
var_f = var_d * var_e
var_g = 24
var_h = 0.25
var_i = var_g * var_h
var_j = 6
var_k = var_i + var_j
var_l = 24
var_m = 24
var_n = 0.25
var_o = var_m * var_n
var_p = 6
var_q = var_o + var_p
var_r = var_l - var_q
var_s = 24
var_t = 0.25
var_u = var_s * var_t
var_v = var_r - var_u
list_b= []
if "/" in str(var_v):
    var_v = eval(str(var_v))
list_b.append(var_v)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_w = 1
list_c=list_b.copy()
list_c.sort()
var_x = list_c[-var_w]
var_y = list_b.index(var_x)+1
var_z = list_a[var_y-1]
print(var_z)
Category: Arithmetic calculation

Question (EN): Minyoung is 10 years old this year and her grandmother is 65 years old this year. How old was her grandmother when Minyoung was 7 years old?
Question (KO): 민영이는 올해 10살이고 할머니는 올해 65세 입니다. 민영이가 7살이었을 때 할머니의 나이는 몇 세였습니까?

Answer: 62

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

Question (EN): There are six different numbers: 9, 2, 4, 1, 5, and 6. Find the difference between the largest number and the second largest number.
Question (KO): 서로 다른 여섯 개의 수 9, 2, 4, 1, 5, 6이 있습니다. 이 중에서 가장 큰 수와 두번째로 큰 수의 차는 몇인지 구하시오.

Answer: 3

Solution (Python):
var_a = 6
var_b = 2
var_c = 4
var_d = 1
var_e = 5
var_f = 9
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 = 1
list_b=list_a.copy()
list_b.sort()
var_h = list_b[-var_g]
var_i = 2
list_c=list_a.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = var_h - var_j
print(int(var_k))
Category: Possibility

Question (EN): Jungsoo was playing a game making a number using number cards once. Given the numbers 1, 4, and 5, he gets a higher score as the number gets smaller. Which number would be better for him to make?
Question (KO): 정수는 숫자 카드를 한 번씩 사용하여 숫자 만들기 게임을 하고 있습니다. 숫자가 작을수록 높은 점수를 얻을 떄, 숫자 1, 4, 5가 주어진다면 어떤 수를 만드는 것이 좋습니까?

Answer: 145

Solution (Python):
var_a = 1
var_b = 4
var_c = 5
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 = len(list_a)
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
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_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
print(int(var_f))
Category: Correspondence

Question (EN): I was supposed to subtract 382 from a number, but I mistakenly added 238 to it and get 637. What is the result of the correct calculation?
Question (KO): 어떤 수에서 382를 빼야 하는데 잘못하여 238을 더했더니 637이 되었습니다. 바르게 계산한 결과를 구하시오.

Answer: 17

Solution (Python):
var_a = 637
var_b = 238
var_c = var_a - var_b
var_d = 382
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): A playground is in the shape of a square with sides measuring 12 meters (m). The time it took for Seoyoon to walk around the playground was the same as the time it took for Seoyoon to walk around the 9 meters (m) rectangular playground. If you walk at the same speed, what is the vertical length of the rectangular playground in meters (m)?
Question (KO): 한 변의 길이가 12미터(m)인 정사각형 모양의 운동장이 있다. 서윤이가 이 운동장의 둘레를 걷는 데에 걸린 시간이 가로의 길이가 9미터(m)인 직사각형 모양의 운동장의 둘레를 걷는 데에 걸린 시간과 동일했다. 동일한 속도로 걸었다고 한다면, 직사각형 모양의 운동장의 세로의 길이는 몇 미터(m)입니까?

Answer: 15

Solution (Python):
var_a = 12
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
var_f = 9
var_g = var_e - var_f
print(int(var_g))
Category: Geometry

Question (EN): The area of a certain square was found to be 324 square meters (m2). Find the perimeter of the square.
Question (KO): 어떤 정사각형의 넓이를 구했더니 324제곱미터(㎡)였다. 정사각형의 둘레를 구하시오.

Answer: 72

Solution (Python):
var_a = 324
var_b = 0.5
var_c = var_a ** var_b
var_d = 4
var_e = var_c * var_d
print(int(var_e))
Category: Correspondence

Question (EN): When you multiply a number by 7 and add 37, you get 100. Find this number.
Question (KO): 어떤 수를 7배 한 수에 37을 더했더니 100이 되었습니다. 어떤 수를 구하시오.

Answer: 9

Solution (Python):
var_a = 100
var_b = 37
var_c = var_a - var_b
var_d = 7
var_e = var_c / var_d
print(int(var_e))
Category: Comparison

Question (EN): Seokjin jumped ropes 32 times yesterday, and today he jumped 15 times more than yesterday. Taehyung jumped ropes 58 times yesterday, and today he jumped 12 times fewer than yesterday. Who jumped more ropes today?
Question (KO): 석진이는 줄넘기를 어제는 32번 했고, 오늘은 어제보다 15번 더 많이 했습니다. 태형이는 줄넘기를 어제는 58번 했고, 오늘은 어제보다 12번 더 적게 했습니다. 오늘 줄넘기를 더 많이 한 사람은 누구입니까?

Answer: Seokjin

Solution (Python):
var_a = 'Seokjin'
var_b = 'Taehyung'
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 = 32
var_d = 15
var_e = var_c + var_d
var_f = 58
var_g = 12
var_h = var_f - var_g
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Arithmetic calculation

Question (EN): Eunji collected 1 piece of red confetti and 9 pieces of green confetti. If she gives 4 pieces of collected confetti to Yuna, find how many pieces are left with Eunji.
Question (KO): 은지는 빨간색 색종이 1장과 초록색 색종이 9장을 모았습니다. 모은 색종이 중 4장을 유나에게 주면 은지에게 남는 색종이는 몇 장인지 구하시오.

Answer: 6

Solution (Python):
var_a = 1
var_b = 9
var_c = var_a + var_b
var_d = 4
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): Use the four number cards 0, 1, 4, and 8 once to find the third largest three-digit number whose units digit is 8, then find the sum of each digit.
Question (KO): 4개의 숫자 카드 0, 1, 4, 8을 한 번씩 사용하여 일의 자리 숫자가 8인 세 번째 큰 세 자리 수를 구한 후, 각 자리 수의 합을 구하시오.

Answer: 13

Solution (Python):
var_a = 0
var_b = 1
var_c = 4
var_d = 8
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 = 1
var_g = 8
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 = 3
list_d=list_c.copy()
list_d.sort()
var_i = list_d[-var_h]
list_e = []
var_i = int(var_i)
while var_i//10 > 0:
    list_e.append(var_i%10)
    var_i = var_i//10
list_e.append(var_i%10)
list_e = list_e[::-1]
list_e = [float(i) for i in list_e]
var_j = sum(list_e)
print(int(var_j))