philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): The equation A85-B1=364 makes. What number should go in B?
Question (KO): 등식 A85-B1=364이 성립한다고 합니다. B에 들어가야 하는 숫자는 무엇인가요?

Answer: 2

Solution (Python):
var_a = 'A85-B1=364'
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): How many two-digit integers can be formed by drawing two of the three flags with the numbers 3, 4, and 5 on them?
Question (KO): 3, 4, 5의 숫자가 각각 적힌 3개의 깃발 중 2개를 뽑아서 만들 수 있는 두 자리 정수의 개수는?

Answer: 6

Solution (Python):
var_a = 3
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 = 2
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 = len(list_b)
print(int(var_e))
Category: Correspondence

Question (EN): AB40C is a five-digit number and a multiple of 45. Find the number of numbers that can be AB40C.
Question (KO): AB40C는 다섯 자리 수이면서 45의 배수입니다. AB40C가 될 수 있는 수의 개수를 구하시오.

Answer: 20

Solution (Python):
var_a = 'AB40C'
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 = 45
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 = len(list_b)
print(int(var_c))
Category: Correspondence

Question (EN): If A78-21B=364, what number should go in B?
Question (KO): A78-21B=364일 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 4

Solution (Python):
var_a = 'A78-21B=364'
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: Correspondence

Question (EN): A3+61B=695. What is B?
Question (KO): A3+61B=695입니다. B는 얼마인가요?

Answer: 2

Solution (Python):
var_a = 'A3+61B=695'
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: Correspondence

Question (EN): When A is divided by B, the quotient is C and the remainder is 3. A, B, and C are natural numbers. If B and C are equal, what is the smallest possible number of A?
Question (KO): A를 B로 나누면 몫이 C가 되고, 나머지가 3이 됩니다. A, B, C는 자연수 입니다. B와 C가 같을 때, 가능한 A 중 가장 작은 수는 무엇인가요?

Answer: 19

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

Question (EN): The sum of the lengths of all the edges of a cuboid is 100 centimeters (cm), and the length and width of the base are twice the height each. What is the surface area of this cuboid in square centimeters (cm2)?
Question (KO): 어떤 직육면체의 모든 모서리의 길이의 합은 100센티미터(㎝)이고, 밑면의 세로 길이와 가로 길이는 각각 높이의 2배입니다. 이 직육면체의 겉넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 400

Solution (Python):
var_a = 100
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = 2
var_f = var_d + var_e
var_g = 1
var_h = var_f + var_g
var_i = var_c / var_h
var_j = 2
var_k = var_i ** var_j
var_l = 2
var_m = 2
var_n = var_l * var_m
var_o = 2
var_p = var_n * var_o
var_q = 1
var_r = 2
var_s = var_q * var_r
var_t = 2
var_u = var_s * var_t
var_v = 1
var_w = 2
var_x = var_v * var_w
var_y = 2
var_z = var_x * var_y
var_A = var_u + var_z
var_B = var_p + var_A
var_C = var_k * var_B
print(int(var_C))
Category: Arithmetic calculation

Question (EN): Ten trees are planted on one side of the road at intervals of 10 meters (m). If trees are planted at both ends of the road, find the length in meters (m) of the road.
Question (KO): 10미터(m) 간격으로 도로의 한쪽에 10그루의 나무가 심어져있습니다. 도로의 양끝에도 나무가 심어져있다면 도로의 길이는 몇 미터(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: Comparison

Question (EN): Which shape has a longer perimeter, a regular-hexagon with a side length of 6 centimeters (cm) or a regular-pentagon with a side length of 7 centimeters (cm)?
Question (KO): 한 변의 길이가 6센티미터(㎝)인 정육각형과 한 변의 길이가 7센티미터(㎝)인 정오각형 중에서 둘레의 길이가 더 긴 도형은 어느 것입니까?

Answer: regular-hexagon

Solution (Python):
var_a = 'regular-hexagon'
var_b = 'regular-pentagon'
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 = 6
var_d = 6
var_e = var_c * var_d
var_f = 7
var_g = 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: Geometry

Question (EN): A rectangular flower bed is 4 meters (m) long and has an area of 143.2 square meters (m2). At this time, how many meters (m) is the width of the flower field?
Question (KO): 어떤 직사각형 모양의 꽃밭의 세로가 4미터(m)이며 넓이가 143.2제곱미터(㎡)입니다. 이 때, 꽃밭의 가로는 몇 미터(m)입니까?

Answer: 35.8

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

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

Answer: 23

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

Question (EN): The sum of the lengths of all the edges of the cube equals 72 centimeters (cm). If you select two faces of this cube that touch each other, find the length in centimeters (cm) of the line segment that forms the boundary.
Question (KO): 정육면체의 모든 모서리 길이를 더하면 72센티미터(㎝)입니다. 이 정육면체에서 서로 맞닿아 있는 면 두개를 선택했을 때 경계를 이루는 선분의 길이는 몇 센티미터(㎝)일지 구하시오.

Answer: 6

Solution (Python):
var_a = 72
var_b = 4
var_c = 3
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e))
Category: Correspondence

Question (EN): While taking a math test, Jinyong misunderstood the question that required division by 9/4 as multiplied by 9/4, and submitted 18/5 as the answer. What is the correct answer to the problem that Jinyong solved incorrectly?
Question (KO): 진용이는 수학시험을 보다가 9/4를 나누어야 하는 문제를 잘못보고 9/4를 곱하여 18/5를 답으로 제출하였다. 진용이가 잘못 푼 문제의 정답은 얼마인가?

Answer: 0.71

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

Question (EN): Of the five numbers 1.4, 9/10, 1.2, 0.5, and 13/10, how many are less than 1.1?
Question (KO): 5가지 숫자 1.4, 9/10, 1.2, 0.5, 13/10 중에서 1.1보다 작은 수는 몇 개 인가요?

Answer: 2

Solution (Python):
var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
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 = 1.1
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: Arithmetic calculation

Question (EN): Ho-yun is trying to divide marbles into several pieces. Dividing Hoyun's marbles into pockets 12 each, leaves 55 pockets. How many pockets will there be if you put 15 marbles in each?
Question (KO): 호윤이는 구슬 여러개를 나누어 담으려고 합니다. 호윤이가 가진 구슬을 12개씩 주머니에 나눠 담으면 55개의 주머니가 나옵니다. 이 구슬을 15개씩 담으면 주머니는 모두 몇 개가 될까요?

Answer: 44

Solution (Python):
var_a = 12
var_b = 55
var_c = var_a * var_b
var_d = 15
var_e = var_c / var_d
var_f = 1
var_g=int(((var_e+9*10**(var_f-2))//(10**(var_f-1)))*10**(var_f-1))

print(int(var_g))
Category: Possibility

Question (EN): Find the number of ways to draw 3 people among Namjoon, Yoongi, Hoseok, and Minyoung and put them in a line.
Question (KO): 남준, 윤기, 호석, 민영이 중에서 3명을 뽑아 한 줄로 세우는 경우의 수를 구하시오.

Answer: 24

Solution (Python):
var_a = 'Namjoon'
var_b = 'Yoongi'
var_c = 'Hoseok'
var_d = 'Minyoung'
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 = 3
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)
print(int(var_g))
Category: Correspondence

Question (EN): You had to divide a number by 6 but instead multiplied by 7 to get 126. What is the correctly calculated value?
Question (KO): 6을 어떤 수에 나누어 줘야 할 것을 잘못하여 7을 어떤 수에 곱한 결과는 126이 나옵니다. 바르게 계산하면 얼마인가요?

Answer: 3

Solution (Python):
var_a = 126
var_b = 7
var_c = var_a / var_b
var_d = 6
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): When the length of 8.8 centimeters (cm) of colored tape was overlapped by 0.5 centimeters (cm), the total length of the connected colored tape was 282.7 centimeters (cm). How many pieces of colored tape are there in total?
Question (KO): 길이가 8.8 센티미터(㎝) 인 색 테이프를 0.5 센티미터(㎝) 씩 겹치게 이었더니 이은 색 테이프의 전체 길이가 282.7 센티미터(㎝) 였습니다. 이은 색 테이프는 모두 몇 장입니까?

Answer: 34

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

Question (EN): If there are 3 airplane routes and 2 boat routes from Seohee’s city to Jeju Island, find the number of ways to go by boat.
Question (KO): 서희네 집에서 학교까지 가는 버스 노선은 3개, 지하철 노선은 2개, 기차 노선은 4개일 때 지하철로 가는 경우의 수를 구하시오.

Answer: 2

Solution (Python):
var_a = 2
print(int(var_a))
Category: Geometry

Question (EN): A cube is 1 meter (m) long on one side, and a cuboid is 50 centimeters (cm) wide, 50 centimeters (cm) long, and 20 centimeters (cm) high. How many times the volume of this cube is the cuboid?
Question (KO): 어떤 정육면체는 한 모서리의 길이가 1미터(m)이고, 어떤 직육면체는 가로가 50센티미터(㎝), 세로가 50센티미터(㎝), 높이가 20센티미터(㎝)입니다. 이 정육면체는 직육면체 부피의 몇 배입니까?

Answer: 20

Solution (Python):
var_a = 1
var_b = 100
var_c = var_a * var_b
var_d = 3
var_e = var_c ** var_d
var_f = 50
var_g = 50
var_h = var_f * var_g
var_i = 20
var_j = var_h * var_i
var_k = var_e / var_j
print(int(var_k))
Category: Correspondence

Question (EN): Subtracting 39 from a number gives 54. Find the value of this number divided by 3.
Question (KO): 어떤 수에서 39를 뺐더니 54가 되었습니다. 어떤 수를 3으로 나눈 값을 구하시오.

Answer: 31

Solution (Python):
var_a = 39
var_b = 54
var_c = var_a + var_b
var_d = 3
var_e = var_c / var_d
print(int(var_e))
Category: Possibility

Question (EN): Five number cards with different digits were used each time to create a five-digit number that is a multiple of 99, with 6 in the ten thousands digit, 3 in the thousands digit, and 9 in the hundreds digit. Find the correct number on the two invisible cards and get the five digit number.
Question (KO): 서로 다른 숫자가 쓰인 숫자 카드 5장을 한 번씩 사용하여 만의 자리 수가 6, 천의 자리 수가 3, 백의 자리 수가 9이면서 99의 배수인 다섯 자리 수를 만들었다. 보이지 않는 2장의 카드에 알맞은 숫자를 찾아 다섯 자리 수를 구하여라.

Answer: 63954

Solution (Python):
var_a = 0
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 5
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 = 10000
var_f = 6
list_c = [] 
var_e = int(var_e)
var_f = int(var_f)
for i in list_b:
    i = int(i)
    if (i//var_e)%10 == var_f:
        list_c.append(i)
var_g = 1000
var_h = 3
list_d = [] 
var_g = int(var_g)
var_h = int(var_h)
for i in list_c:
    i = int(i)
    if (i//var_g)%10 == var_h:
        list_d.append(i)
var_i = 100
var_j = 9
list_e = [] 
var_i = int(var_i)
var_j = int(var_j)
for i in list_d:
    i = int(i)
    if (i//var_i)%10 == var_j:
        list_e.append(i)
var_k = 99
list_f = []
var_k = int(var_k)
for i in list_e:
    i = int(i)
    if i % var_k == 0:
        list_f.append(i)
var_l = 1
var_m = list_f[var_l-1]
print(int(var_m))
Category: Possibility

Question (EN): How many cases can you make a number that is 10 or more and 100 or less by selecting two cards from 1, 7, and 9?
Question (KO): 1, 7, 9 가 적힌 카드 중 두 장을 뽑아 10 이상 100이하의 수를 만들 때, 만들 수 있는 경우는 모두 몇 가지입니까?

Answer: 6

Solution (Python):
var_a = 1
var_b = 7
var_c = 9
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 = [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 = len(list_b)
print(int(var_e))
Category: Correspondence

Question (EN): A, B, C are different numbers from 0 to 9. Find A from the following two-digit addition: AB+BC=BCB.
Question (KO): A, B, C는 0에서 9까지의 서로 다른 숫자입니다. 두 자리 수끼리의 덧셈식 AB+BC=BCB에서 A를 구하시오.

Answer: 9

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

Question (EN): What is the fifth largest number that can come out when you divide a number by 85?
Question (KO): 어떤 수를 85로 나눌 때 나올 수 있는 나머지 중에서 다섯 번째로 큰 수는 얼마입니까?

Answer: 80

Solution (Python):
var_a = 85
var_b = 5
var_c = var_a - var_b
print(int(var_c))
Category: Comparison

Question (EN): Hohyeon is 162 centimeters (cm) tall and Seulgi is 159 centimeters (cm) tall. Who is taller?
Question (KO): 호현이는 키가 162센티미터(㎝)이고 슬기는 키가 159센티미터(㎝)입니다. 키가 더 큰 사람은 누구입니까?

Answer: Hohyeon

Solution (Python):
var_a = 'Hohyeon'
var_b = 'Seulgi'
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 = 162
var_d = 159
list_b= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Arithmetic calculation

Question (EN): Use 400 grams (g) of wood to make 3 crafts. How many crafts can you make using 2.3 kilograms (kg) of wood? (However, crafts are made 3 at a time.)
Question (KO): 나무 400그램(g)을 사용하여 공예품 3개를 만듭니다. 나무 2.3킬로그램(㎏)을 사용하여 공예품을 최대 몇 개 만들수 있습니까? (단, 공예품은 한 번에 3개씩 만든다.)

Answer: 15

Solution (Python):
var_a = 2.3
var_b = 1000
var_c = var_a * var_b
var_d = 400
var_e = var_c // var_d
var_f = 3
var_g = var_e * var_f
print(int(var_g))
Category: Comparison

Question (EN): Children lined up at the sledding range to ride the sled. If there are 30 people between the foremost child and the fifth child from the back, how many children are in the line?
Question (KO): 썰매를 타려고 눈썰매장에서 아이들이 줄을 섰습니다. 맨 앞에 서있는 아이와 뒤에서 5번째에 서 있는 아이 사이에 30 명이 있다면, 줄을 선 아이들은 모두 몇 명입니까?

Answer: 36

Solution (Python):
var_a = 5
var_b = 30
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): You have a rectangular garden. The garden is 500 centimeters (cm) wide and 800 centimeters (cm) long. What is the area of this garden in square meters (m2)?
Question (KO): 직사각형 텃밭이 있다. 텃밭의 가로가 500센티미터(㎝), 세로가 800센티미터(㎝) 이다. 이 텃밭의 넓이는 몇 제곱미터(㎡) 입니까?

Answer: 40

Solution (Python):
var_a = 500
var_b = 100
var_c = var_a / var_b
var_d = 800
var_e = 100
var_f = var_d / var_e
var_g = var_c * var_f
print(int(var_g))
Category: Geometry

Question (EN): Nine people stand in a line in order from shortest to tallest. Hoseok is standing 4th from the front. If you line up again in order from the tallest to the shortest, what number will Hoseok stand from the back?
Question (KO): 키가 작은 사람부터 순서대로 9명이 한 줄로 서 있습니다. 호석이가 앞에서부터 4번째에 서 있습니다. 키가 큰 사람부터 순서대로 다시 줄을 서면 호석이는 뒤에서부터 몇 번째에 서게 됩니까?

Answer: 4

Solution (Python):
var_a = 4
print(int(var_a))
Category: Geometry

Question (EN): Find the area of a quadrilateral with two pairs of opposite sides parallel if the base is 3.8 meters (m) and the height is 6.36 meters (m).
Question (KO): 마주보는 두 쌍의 변이 평행한 사각형의 밑변의 길이가 3.8미터(m)이고 높이가 6.36미터(m)일 때 넓이를 구하시오.

Answer: 24.17

Solution (Python):
var_a = 3.8
var_b = 6.36
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Geometry

Question (EN): What is the perimeter in centimeters (cm) of an octagon with all sides equal to 12 centimeters (cm)?
Question (KO): 모든 변의 길이가 12센티미터(㎝)로 같은 팔각형의 둘레는 몇 센티미터(㎝)입니까?

Answer: 96

Solution (Python):
var_a = 12
var_b = 8
var_c = var_a * var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): How many single-digit odd numbers and two-digit even numbers are there?
Question (KO): 한 자리 수의 홀수와 두 자리수의 짝수는 모두 몇 개인지 구하시오.

Answer: 50

Solution (Python):
var_a = 10
var_b = 99
list_a = []
if var_a%2!=0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
var_c = 1
var_d = 9
list_b = []
if var_c%2==0:
    for i in range(var_c+1, var_d+1, 2):
        list_b.append(i)
else:
    for i in range(var_c, var_d+1, 2):
        list_b.append(i)
list_c = list(set(list_a) | set(list_b))
var_e = len(list_c)
print(int(var_e))