philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): There are two different single-digit numbers A and B. Find the sum of A and B that satisfies the following addition formula AB+640=BBB.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 덧셈식 AB+640=BBB에서 A와 B의 합을 구하시오.

Answer: 8

Solution (Python):
var_a = 'AB+640=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+640=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: Comparison

Question (EN): Suho is taller than Minyoung, and Seongju is shorter than Minyoung. Seonmi is shorter than Seongju. Write down the shortest person.
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: Possibility

Question (EN): If 6 professional baseball teams play with each other once, how many matches will there be in total?
Question (KO): 6개의 프로 야구팀이 서로 한 번씩 시합을 가진다면 모두 몇 번의 시합이 이루어지는지 모두 구하시오

Answer: 15

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

Question (EN): You are comparing the heights of 20 students. If there are 11 students taller than Yoongi, how many students are shorter than Yoongi?
Question (KO): 20명의 학생들의 키를 비교하고 있습니다. 윤기보다 작은 학생이 11명일 때, 윤기보다 큰 학생은 모두 몇 명입니까?

Answer: 8

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

Question (EN): If you add 12 to a number and subtract 27, you get 24. Find the number.
Question (KO): 어떤 수에 12를 더하고 27을 뺐더니 24가 되었습니다. 어떤 수를 구하시오.

Answer: 39

Solution (Python):
var_a = 24
var_b = 27
var_c = var_a + var_b
var_d = 12
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): If there are 10, 50, and 100 won coins, and three coins are thrown at the same time, find the number of possible outcomes. (However, when a coin is thrown, it comes out either heads or tails.)
Question (KO): 10원, 50원, 100원 짜리 동전이 각각 한 개씩 있고, 3개의 동전을 동시에 던졌다고 할 때 나오는 경우의 수를 구하시오. (단, 동전은 던져서 앞면 또는 뒷면이 나온다.)

Answer: 8

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

Question (EN): The five digit number 26AA2 is a multiple of 3. If single-digit number A represents the same number, how many numbers can be in A?
Question (KO): 다섯 자리 수 26AA2는 3의 배수이다. A가 같은 숫자를 나타낼 때, A에 알맞은 숫자는 모두 몇 개인가?

Answer: 3

Solution (Python):
var_a = '26AA2'
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 = 3
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 = '26AA2'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
    elem = str(elem)
    list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_e = len(list_c)
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Yoongi's age is 2 years younger than Hoseok's. The sum of the ages of Yoongi and Hoseok is 18 years old. How old is Yoongi?
Question (KO): 윤기의 나이는 호석이의 나이보다 2살 더 적습니다. 윤기와 호석이의 나이의 합은 18살입니다. 윤기는 몇 살입니까?

Answer: 8

Solution (Python):
var_a = 18
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Geometry

Question (EN): What is the perimeter of an equilateral triangle with a side of 7 centimeters (cm)?
Question (KO): 한 변의 길이가 7센티미터(㎝)인 정삼각형의 둘레는 몇 센티미터(㎝)입니까?

Answer: 21

Solution (Python):
var_a = 7
var_b = 3
var_c = var_a * var_b
print(int(var_c))
Category: Correspondence

Question (EN): You are about to distribute the same two-digit number of pencils to the classmates. There is nothing left when distributing to 6 students and 9 students, and 1 pencil is left when distributing to 7 students. Find how many pencils there are.
Question (KO): 두자리 수의 연필을 학샐들에게 똑같은 개수로 나누어주는데 6명의 학생들과 9명의 학생들에게 나눠줄 때는 남는 것이 없고, 7명의 학생들에게 나누어 줄때는 1개의 연필이 남는다. 연필은 몇 개인지 구하시오.

Answer: 36

Solution (Python):
var_a = 10
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
var_e = 9
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
var_g = 0
list_b = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_a:
    i = int(i)
    if i%var_f == var_g:
        list_b.append(i)
var_h = 7
var_i = 1
list_c = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_b:
    i = int(i)
    if i%var_h == var_i:
        list_c.append(i)
var_j = 1
var_k = list_c[var_j-1]
print(int(var_k))
Category: Possibility

Question (EN): Adding a number to the smallest two-digit number you can make from two different numbers from 1, 3, 5, and 8 equals 88. Find the number.
Question (KO): 1, 3, 5, 8 중에서 서로 다른 숫자 2개를 뽑아 만들 수 있는 가장 작은 두 자리 수에 어떤 수를 더하면 88이 됩니다. 어떤 수를 구하시오.

Answer: 75

Solution (Python):
var_a = 1
var_b = 3
var_c = 5
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 = 2
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
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = 88
var_i = var_g - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Of the people who visited the pool during the week, 1518 were women, of whom 536 were students. There were 525 more men than women, of whom 1257 were non-students. How many students visited the pool in total?
Question (KO): 일주일 동안 수영장을 찾은 사람 중 중 여성은 1518명이고, 이 중에서 학생은 536명이었습니다. 남성은 여성보다 525명이 더 많았고, 이 중에서 학생이 아닌 사람은 1257명이었습니다. 수영장을 찾은 학생은 모두 몇 명입니까?

Answer: 1322

Solution (Python):
var_a = 1518
var_b = 525
var_c = var_a + var_b
var_d = 1257
var_e = var_c - var_d
var_f = 536
var_g = var_e + var_f
print(int(var_g))
Category: Correspondence

Question (EN): When 13 is divided by A, the quotient is 4, the remainder is B. A and B are both natural numbers. Find the largest possible value of A.
Question (KO): 13을 A로 나누면 몫이 4가 되고, 나머지는 B가 됩니다. A와 B는 모두 자연수입니다. 가능한 A 중 가장 큰 수의 값을 구하시오.

Answer: 3

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

Question (EN): How many edges does a cube have?
Question (KO): 정육면체의 모서리의 개수는?

Answer: 12

Solution (Python):
var_a = 6
var_b = 2
var_c = var_a - var_b
var_d = 3
var_e = var_c * var_d
print(int(var_e))
Category: Geometry

Question (EN): If the ratio of the surface areas of two cubes is 9:25, how many times the volume of the larger cube is the smaller one?
Question (KO): 두 정육면체 모양의 큐브의 겉넓이의 비가 9:25일 때, 큰 큐브는 작은 큐브 부피의 몇 배입니까?

Answer: 4.63

Solution (Python):
var_a = 25
var_b = 0.5
var_c = var_a ** var_b
var_d = 3
var_e = var_c ** var_d
var_f = 9
var_g = 0.5
var_h = var_f ** var_g
var_i = 3
var_j = var_h ** var_i
var_k = var_e / var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Comparison

Question (EN): Sangwoo's midterm math score is higher than Hana's score, and Yunyong's math score is lower than Hana's score. Which of the three friends has the highest midterm math score?
Question (KO): 상우의 중간고사 수학 점수는 하나의 점수보다 높고, 윤용이의 수학 점수는 하나의 점수보다 낮습니다. 세 친구 중 중간고사 수학 점수가 가장 높은 친구는 누구입니까?

Answer: Sangwoo

Solution (Python):
var_a = 'Sangwoo'
var_b = 'Hana'
var_c = 'Yunyong'
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 = 'Sangwoo'
var_e = 'Hana'
var_f = '>'
var_g = 'Yunyong'
var_h = 'Hana'
var_i = '<'
list_b= []
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)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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_j = 1
var_k = list_c[var_j-1]
print(var_k)
Category: Comparison

Question (EN): Taehyung and 10 of his friends are standing in a line. If 5 people are standing to Taehyung's left, how many people are standing to Taehyung's right?
Question (KO): 태형이와 친구 10명이 한 줄로 서 있습니다. 태형이의 왼쪽에 5명이 서 있다면 태형이의 오른쪽에는 몇 명이 서 있습니까?

Answer: 4

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

Question (EN): Seongjun spent half of his money and 300 won at the first store, half of the remaining money and 300 won at the second store, and 500 won at the third store. How much money did Seongjun have at the beginning?
Question (KO): 성준은 1호점에서 돈의 절반과 300원을 쓰고, 2호점에서는 남은 돈의 절반과 300원을 쓰고, 3호점에선 500원을 썼다. 성준이는 처음에 돈을 얼마 가지고 있었는가?

Answer: 4200

Solution (Python):
var_a = 0
var_b = 400
var_c = var_a + var_b
var_d = 500
var_e = var_c + var_d
var_f = 1
var_g = 0.5
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 300
var_k = var_i + var_j
var_l = 1
var_m = 0.5
var_n = var_l - var_m
var_o = var_k / var_n
print(int(var_o))
Category: Correspondence

Question (EN): A number divided by 6 is 26. What is the value of the number?
Question (KO): 어떤 수를 6으로 나눈 결과는 26입니다. 어떤 수는 얼마입니까?

Answer: 156

Solution (Python):
var_a = 26
var_b = 6
var_c = var_a * var_b
print(int(var_c))
Category: Correspondence

Question (EN): You need to add 8 to a number and subtract 11. But ended up subtracting 9 and 12 by mistake, and got 24. Find the product of the correctly calculated value and the incorrectly calculated value.
Question (KO): 어떤 수에 8을 더하고 11을 빼야 하는데 9을 빼고 12을 뺐더니 24가 되었습니다. 바르게 계산한 값과 틀리게 계산한 값의 곱은 얼마인지 구하시오.

Answer: 1008

Solution (Python):
var_a = 24
var_b = 12
var_c = var_a + var_b
var_d = 9
var_e = var_c + var_d
var_f = 8
var_g = var_e + var_f
var_h = 11
var_i = var_g - var_h
var_j = 24
var_k = var_i * var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): If you can process 240 kg (kg) of rice in 4 days, how many days will it take to process 1920 kg (kg)?
Question (KO): 4일동안 쌀 240킬로그램(㎏)을 가공할 수 있다면 1920킬로그램(㎏)을 가공하려면 며칠이 걸릴까요?

Answer: 32

Solution (Python):
var_a = 1920
var_b = 240
var_c = 4
var_d = var_b / var_c
var_e = var_a // var_d
print(int(var_e))
Category: Comparison

Question (EN): Among the four students, Minyoung passed the finish line faster than Yoongi, and Yoongi crossed the finish line faster than Jimin. If Jimin and Minyoung got through later than Yuna, who came in first?
Question (KO): 4명의 학생 중 결승선을 민영이가 윤기보다 빨리 통과했고 윤기는 지민이보다 빨리 통과했습니다. 지민이와 민영이는 유나보다 늦게 통과했다면, 1등은 누구입니까?

Answer: Yuna

Solution (Python):
var_a = 'Minyoung'
var_b = 'Yoongi'
var_c = 'Jimin'
var_d = 'Yuna'
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 = 'Minyoung'
var_f = 'Yoongi'
var_g = '>'
var_h = 'Yoongi'
var_i = 'Jimin'
var_j = '>'
var_k = 'Jimin'
var_l = 'Yuna'
var_m = '<'
var_n = 'Minyoung'
var_o = 'Yuna'
var_p = '<'
list_b= []
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_q = 1
var_r = list_c[var_q-1]
print(var_r)
Category: Arithmetic calculation

Question (EN): There are five numbers 10, 11, 12, 13, and 14. What is the sum of the 3rd and 2nd smallest numbers?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 3번째로 작은 수와 2번째로 작은 수의 합은 얼마입니까?

Answer: 23

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
var_e = 14
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 = 3
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g + var_i
print(int(var_j))
Category: Arithmetic calculation

Question (EN): Minyoung ate 10 tangerines from the basket. And an hour later, when she ate 6 more tangerines, the basket was empty. How many tangerines were in the basket?
Question (KO): 민영이는 바구니에서 귤을 10개 먹고 한 시간 후에 귤을 6개 더 먹었더니 바구니가 비었습니다. 바구니 안에 귤은 모두 몇 개가 있었을까요?

Answer: 16

Solution (Python):
var_a = 10
var_b = 6
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): If a rectangle has the width of 0.9 times its length, and the length of 15 centimeters (cm), what is the area of this rectangle?
Question (KO): 세로가 가로의 0.9배이고, 가로의 길이는 15센티미터(㎝)이다. 이 직사각형의 넓이는 얼마인가?

Answer: 202.5

Solution (Python):
var_a = 15
var_b = 15
var_c = 0.9
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): Minha's hair grows at a rate of 0.39 millimeters (mm) per day. If the length of Minha's hair is 32.8 centimeters (cm) today, how many centimeters (cm) will it be after 30 days?
Question (KO): 민하는 하루에 0.39밀리미터(㎜) 씩 머리카락이 자랍니다. 민하 머리카락의 길이가 오늘 32.8 센티미터(㎝) 라면 30일 후의 길이는 몇 센티미터(㎝) 입니까?

Answer: 33.97

Solution (Python):
var_a = 0.39
var_b = 10
var_c = var_a / var_b
var_d = 30
var_e = var_c * var_d
var_f = 32.8
var_g = var_e + var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Comparison

Question (EN): Sort 1.23, 3/4, 2.34, 2.12, 4.23, and 5/3 by largest to smallest. What could be the third?
Question (KO): 1.23, 3/4, 2.34, 2.12, 4.23, 5/3을 크기가 큰 순으로 정렬합니다. 세 번째로 올 수 있는 것은 무엇입니까?

Answer: 2.12

Solution (Python):
var_a = 1.23
var_b = 3
var_c = 4
var_d = var_b / var_c
var_e = 2.34
var_f = 2.12
var_g = 4.23
var_h = 5
var_i = 3
var_j = var_h / var_i
list_a= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_a.append(var_j)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_a.append(var_g)
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_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_k = 3
list_b=list_a.copy()
list_b.sort()
var_l = list_b[-var_k]
print('{:.2f}'.format(round(var_l+1e-10,2)))