philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): You want to buy 2 fruits by combining apple, peach, pear, melon, and banana. How many possible combinations are there when allowing duplicates?
Question (KO): 사과, 복숭아, 배, 참외, 바나나를 조합하여 2개의 과일을 사려고 합니다. 중복을 허용하여 조합할 수 있는 경우의 수는 모두 몇 가지입니까?

Answer: 15

Solution (Python):
var_a = 'apple'
var_b = 'peach'
var_c = 'pear'
var_d = 'melon'
var_e = 'banana'
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 = len(list_a)
var_g = 2
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = 2
var_l = 1
var_j = int(var_j)
var_k = int(var_k)
for i, elem in enumerate(range(var_k)):
    var_l = var_l * (var_j-i)
for i, elem in enumerate(range(var_k)):
    var_l = var_l / (i+1)
print(int(var_l))
Category: Geometry

Question (EN): If the perimeter of a rectangle whose length is 2 centimeters (cm) shorter than its width is 16 centimeters (cm), what is its width?
Question (KO): 세로의 길이가 가로의 길이보다 2 센티미터(㎝)만큼 짧은 직사각형의 둘레의 길이가 16 센티미터(㎝)일 때, 가로의 길이는 얼마인가?

Answer: 5

Solution (Python):
var_a = 16
var_b = 2
var_c = var_a / var_b
var_d = 2
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
var_i = var_g + var_h
print(int(var_i))
Category: Comparison

Question (EN): Pine trees were planted 22.75 meters (m) on one side of the 364-meter (m) long road, and ginkgo trees were planted on the other side at intervals of 45.5 meters (m) from start to finish. Find out which of the pine trees or ginkgo trees was planted more.
Question (KO): 길이가 364미터(m) 인 도로의 한쪽에는 소나무를 22.75미터(m) , 다른 한쪽에는 은행나무를 45.5미터(m) 간격으로 각각 처음부터 끝까지 심었습니다. 소나무와 은행나무 중 어느 것을 더 많이 심었는지 구하시오.

Answer: pine

Solution (Python):
var_a = 'pine'
var_b = 'ginkgo'
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 = 364
var_d = 22.75
var_e = var_c / var_d
var_f = 364
var_g = 45.5
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): I want to plant street trees. If street trees are planted from the beginning to the end, equally divided into 4 sections from the 0.35 km (km) point to the 0.37 km (km) point, indicate the kilometers (km) of the position of the street tree planted at the fourth point as a decimal number.
Question (KO): 가로수를 심으려고 합니다. 0.35킬로미터(㎞) 지점에서 0.37킬로미터(㎞) 지점까지 똑같이 4구간으로 나누어 처음부터 끝까지 가로수를 심는다면 네 번째 지점에 심는 가로 수의 위치는 몇 킬로미터(㎞) 지점인지 소수로 나타내시오.

Answer: 0.37

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

Question (EN): Find the number of diagonals in a nine-sided polygon.
Question (KO): 9개의 변으로 둘러싸인 도형의 대각선의 개수를 구하시오.

Answer: 27

Solution (Python):
var_a = 9
var_b = 9
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): In two-digit addition, the number 3 in the tens place of the number added was incorrectly counted as 6. Again, the numbers being added incorrectly read the ones digit as 9 to 2. If the result of the calculation is 119, what is the result of the correct calculation?
Question (KO): 두 자리 수의 덧셈에서 더하는 수의 십의 자리 숫자 3을 6으로 잘못 계산했습니다. 또 더해지는 숫자는 일의 자리 숫자를 9에서 2로 잘못 보았습니다. 계산 결과 그 값이 119라면, 바르게 계산한 결과는 얼마입니까?

Answer: 96

Solution (Python):
var_a = 119
var_b = 1
var_c = 9
var_d = 2
var_e = var_c - var_d
var_f = var_b * var_e
var_g = var_a + var_f
var_h = 10
var_i = 3
var_j = 6
var_k = var_i - var_j
var_l = var_h * var_k
var_m = var_g + var_l
print(int(var_m))
Category: Possibility

Question (EN): Three numbers from 2, 0, 7, 5, and 9 were used to create a three-digit number with different digits. If the numbers made in this way are arranged from left to right in ascending order, what will be the sum of the leftmost number and the fourth number from the left?
Question (KO): 2, 0, 7, 5, 9 중 3개의 숫자를 이용하여 자릿수가 서로 다른 세 자리 수를 만들었다. 이렇게 만든 수를 작은 순서대로 왼쪽부터 나열했을 때, 가장 왼쪽에 있는 수와 왼쪽에서 4번째에 있는 수를 더하면 얼마가 되겠는가?

Answer: 455

Solution (Python):
var_a = 2
var_b = 0
var_c = 7
var_d = 5
var_e = 9
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 = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = 4
list_d=list_b.copy()
list_d.sort()
var_j = list_d[var_i-1]
var_k = var_h + var_j
print(int(var_k))
Category: Geometry

Question (EN): There is a rectangular parallelepiped-shaped lake with a length of 9 meters (m) wide and a length of 7 meters (m) long. If the volume of this lake is 315 square centimeters (cm2), how deep is this lake in centimeters (cm)?
Question (KO): 가로의 길이가 9미터(m), 세로의 길이가 7미터(m)인 직육면체 모양의 호수가 있습니다. 이 호수의 부피가 315제곱센티미터(㎠) 이라면, 이 호수의 깊이는 몇 센티미터(㎝)입니까?

Answer: 5

Solution (Python):
var_a = 315
var_b = 9
var_c = var_a / var_b
var_d = 7
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): When a number is multiplied by 3 twice, it is 18. Find the number.
Question (KO): 어떤 수에 3을 두번 곱하였더니 18이 되었다. 어떤 수를 구하시오.

Answer: 2

Solution (Python):
var_a = 18
var_b = 3
var_c = var_a / var_b
var_d = 3
var_e = var_c / var_d
print(int(var_e))
Category: Comparison

Question (EN): There are tangerine trees (a), (b), (c), and (d). (a) has more tangerines than (d), and (d) has more tangerines than (c). If (b) has more tangerines than (a), which tangerine tree has the most tangerines?
Question (KO): 귤나무 A, B, C, D가 있습니다. A는 D보다 귤이 많이 달렸고, D는 C보다 귤이 많이 달렸습니다. B는 A보다 귤이 많이 달렸을 때, 가장 많은 귤이 달려있는 귤나무는 무엇일까요?

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 = '(d)'
var_g = '>'
var_h = '(d)'
var_i = '(c)'
var_j = '>'
var_k = '(b)'
var_l = '(a)'
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 = 1
var_o = list_c[var_n-1]
print(var_o)
Category: Correspondence

Question (EN): 632-5AB=41. How much is B?
Question (KO): 632-5AB=41입니다. B는 얼마인가요?

Answer: 1

Solution (Python):
var_a = '632-5AB=41'
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: Possibility

Question (EN): Dohun is playing a numbers game with Changu and Chanhee. It is a game in which ranks are ranked according to the size of the number made using all the number-written cards you have, and Dohun has numbers of 3, 9, and 8. When Changu made 850 and Chanhee made 920, what is the number of cases in which Dohun rank in second place?
Question (KO): 도훈이는 찬구와 찬희와 숫자 게임을 하고 있습니다. 자신이 가진 숫자 카드를 모두 이용해 만든 숫자 크기대로 등수가 매겨지는 게임으로, 도훈이는 3, 9, 8을 가지고 있습니다. 찬구는 850을, 찬희는 920을 만들었을 때 도훈이가 2등을 하는 경우는 몇 가지 입니까?

Answer: 1

Solution (Python):
var_a = 3
var_b = 9
var_c = 8
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 = 3
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 = 850
list_c = []
for i in list_b:
    if i > var_e:
        list_c.append(i)
var_f = 920
list_d = []
for i in list_c:
    if i < var_f:
        list_d.append(i)
var_g = len(list_d)
print(int(var_g))
Category: Correspondence

Question (EN): 9A6-BB=BBB is true and A and B are not the same numbers. Find the sum of A and B.
Question (KO): 9A6-BB=BBB고, A와 B는 같은 숫자가 아닙니다. A와 B를 더한 값을 구하시오.

Answer: 15

Solution (Python):
var_a = '9A6-BB=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 = '9A6-BB=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: Geometry

Question (EN): Coins of the same size are arranged without gaps to form a square so that there are 36 coins placed around the perimeter. Find the number of coins lying on the outermost of one side.
Question (KO): 둘레에 놓인 동전의 개수가 36개가 되도록 크기가 같은 동전을 빈틈없이 늘어놓아 정사각형을 만들었습니다. 가장 바깥쪽의 한 변에 놓인 동전의 개수를 구하시오.

Answer: 10

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

Question (EN): A rectangle has a side length of 4 centimeters (cm) and an area of 25/2 square centimeters (cm2). Find the length in centimeters (cm) of the side of this rectangle that is not 4 centimeters (cm) long.
Question (KO): 한 변의 길이가 4센티미터(㎝)이고, 넓이가 25/2제곱센티미터(㎠)인 직사각형이 있습니다. 이 직사각형의 변 중에서 길이가 4센티미터(㎝)가 아닌 변의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 3.13

Solution (Python):
var_a = 12.5
var_b = 4
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Possibility

Question (EN): There is a clothing store that sells red, blue and black clothes. When purchasing two sets of clothes, find the number of all possible choices, allowing duplicates.
Question (KO): 빨간색 옷, 파란색 옷, 검정색 옷을 판매하는 옷가게가 있다. 옷 2벌을 구매할 때 중복을 허용하여 선택가능한 모든 방법의 수를 구하시오.

Answer: 6

Solution (Python):
var_a = 'red'
var_b = 'blue'
var_c = 'black'
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)
var_e = 2
var_f = var_d + var_e
var_g = 1
var_h = var_f - var_g
var_i = 2
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)
for i, elem in enumerate(range(var_i)):
    var_j = var_j / (i+1)
print(int(var_j))
Category: Arithmetic calculation

Question (EN): How many numbers greater than 50 and less than 100 are not divisible by 8 and have a remainder of 4?
Question (KO): 50보다 크고 100보다 작은 수 중에서 8로 나누어 떨어지지 않고 나머지가 4인 수는 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 50
var_b = 1
var_c = var_a + var_b
var_d = 100
var_e = 1
var_f = var_d - var_e
var_g = 1
list_a = [i for i in range(var_c, var_f + 1, var_g)]
var_h = 8
var_i = 4
list_b = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_a:
    i = int(i)
    if i%var_h == var_i:
        list_b.append(i)
var_j = len(list_b)
print(int(var_j))
Category: Correspondence

Question (EN): A number multiplied by 6 plus 17 divided by 5 equals 25. Find the number.
Question (KO): 어떤 수와 6의 곱에 17을 더한 수를 5로 나누었더니 25가 되었습니다. 어떤 수를 구하세요.

Answer: 18

Solution (Python):
var_a = 25
var_b = 5
var_c = var_a * var_b
var_d = 17
var_e = var_c - var_d
var_f = 6
var_g = var_e / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): As a result of the long jump in PE class, Eunseol's record was 1 meter (m) 35 centimeters (cm), and Jeongyeon jumped 9 centimeters (cm) more than Eunseol. How many meters (m) was Jeongyeon's long jump record as a decimal number?
Question (KO): 체육 시간에 멀리 뛰기를 한 결과, 은설이의 기록은 1미터(m) 35센티미터(㎝)가 나왔고, 정연이는 은설이보다 9센티미터(㎝)를 더 뛰었습니다. 정연이의 멀리 뛰기 기록은 몇 미터(m)인지 소수로 나타내시오.

Answer: 1.44

Solution (Python):
var_a = 1
var_b = 35
var_c = 100
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 9
var_g = 100
var_h = var_f / var_g
var_i = var_e + var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Arithmetic calculation

Question (EN): How many natural numbers are greater than 40 and less than or equal to 70?
Question (KO): 40 초과 70 이하인 자연수는 모두 몇 개입니까?

Answer: 30

Solution (Python):
var_a = 70
var_b = 40
var_c = var_a - var_b
print(int(var_c))
Category: Comparison

Question (EN): I made a cake with 3 and 2/6 tablespoons of blueberry syrup and 21/6 tablespoons of grapefruit syrup. Find which one is contained more in the cake.
Question (KO): 블루베리청 3과 2/6 큰 술과 자몽청 21/6 큰 술로 케이크를 만들었습니다. 어떤 것이 케이크에 더 많이 포함되어 있는지 구하시오.

Answer: grapefruit

Solution (Python):
var_a = 'blueberry'
var_b = 'grapefruit'
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 = 3
var_d = 2
var_e = 6
var_f = var_d / var_e
var_g = var_c + var_f
var_h = 21
var_i = 6
var_j = var_h / var_i
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
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: Geometry

Question (EN): There is a cube with the sum of the lengths of all its edges equal to 132 centimeters (cm). What is the area of one side of this cube in square centimeters (cm2)?
Question (KO): 모든 모서리의 길이의 합이 132센티미터(㎝)인 정육면체가 있습니다. 이 정육면체의 한 면의 넓이는 몇 제곱센티미터입니까?

Answer: 121

Solution (Python):
var_a = 132
var_b = 12
var_c = var_a / var_b
var_d = 132
var_e = 12
var_f = var_d / var_e
var_g = var_c * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): 32 apples were divided into 7 boxes, leaving 4 apples. How many apples are there in one box?
Question (KO): 사과 32개를 7개의 상자에 나누어 담았더니 4개의 사과가 남았습니다. 한 상자에 담긴 사과의 개수는 몇 개입니까?

Answer: 4

Solution (Python):
var_a = 32
var_b = 4
var_c = var_a - var_b
var_d = 7
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): 81 is the result of adding 43 to some number. What number is 25 greater than this number?
Question (KO): 81은 어떤 수에 43을 더한 숫자입니다. 어떤 수보다 25 큰 숫자는 얼마인가요?

Answer: 63

Solution (Python):
var_a = 81
var_b = 43
var_c = var_a - var_b
var_d = 25
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): Assuming that the distance between the school and the park is 396 meters (m) and the distance between the school and the pharmacy is 0.389 kilometers (km), find the one closer to the school between the park and the pharmacy.
Question (KO): 학교와 공원 사이의 거리가 396미터(m)이고, 학교와 약국 사이의 거리가 0.389킬로미터(㎞)라고 할 때, 공원과 약국 중 학교와 더 가까운 곳을 구하시오.

Answer: pharmacy

Solution (Python):
var_a = 'park'
var_b = 'pharmacy'
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 = 396
var_d = 0.389
var_e = 1000
var_f = var_d * var_e
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Geometry

Question (EN): Find the area of a square whose diagonal is 12 centimeters (cm).
Question (KO): 한 대각선의 길이가 12미터(m)인 정사각형이 있습니다. 이 정사각형의 넓이는?

Answer: 72

Solution (Python):
var_a = 12
var_b = 2
var_c = var_a ** var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): If the reciprocal of -0.4 is A and the reciprocal of +5/2 is B, find the reciprocal of 3/A + 2/B.
Question (KO): -0.4의 역수가 A이고 +5/2의 역수가 B이면 3/A + 2/B의 역수를 찾으십시오.

Answer: 0.26

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

Question (EN): Jungsoo put 28 marbles equally divided into 4 bags, and Hyeonju put 18 marbles equally divided into 3 bags. Who has fewer marbles in one bag, Jungsoo or Hyeonju?
Question (KO): 정수는 구슬 28개를 주머니 4개에 똑같이 나누어 담았고, 현주는 구슬 18개를 주머니 3개에 똑같이 나누어 담았습니다. 정수와 현주 중에서 주머니 한 개에 들어 있는 구슬이 더 적은 사람은 누구입니까?

Answer: Hyeonju

Solution (Python):
var_a = 'Jungsoo'
var_b = 'Hyeonju'
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 = 28
var_d = 4
var_e = var_c / var_d
var_f = 18
var_g = 3
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-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Comparison

Question (EN): There are a total of three numbers: 0.8, 1/2, and 0.5. What is the sum of all numbers less than 2?
Question (KO): 총 3개의 숫자 0.8, 1/2, 0.5이 있습니다. 이 중 2보다 작은 수를 모두 더하면 얼마인가요?

Answer: 1.8

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.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 = 2
list_b = []
for i in list_a:
    if i < var_d:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print('{:.2f}'.format(round(var_e+1e-10,2)))