philschmid/DMath huggingface dataset:
Category: Geometry

Question (EN): There are several ttakjis. I laid out the ttakjis to make a large square, and there were residual 36 ttakjis that were not used to make the square. I increased one horizontal and one vertical side by one column, and there are still three residual ttakjis left. How many ttakjis are there in all?
Question (KO): 딱지 여러장이 있습니다. 딱지를 늘여놓아 큰 정사각형을 만들고 보니 36장의 딱지가 남았습니다. 가로 한 변과 세로 한 변을 1열씩 늘렸더니 아직도 3장의 딱지가 남았습니다. 딱지는 모두 몇 장입니까?

Answer: 292

Solution (Python):
var_a = 36
var_b = 3
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
var_i = var_g ** var_h
var_j = 36
var_k = var_i + var_j
print(int(var_k))
Category: Correspondence

Question (EN): When a number is multiplied by 4 and divided by 8, the quotient is 6 and the remainder is 4. Find out what this number is.
Question (KO): 어떤 수에 4를 곱한 값을 8로 나누었더니 몫이 6이고 나머지가 4였다. 어떤 수는 얼마인지 고르시오.

Answer: 13

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

Question (EN): A cube is made by stacking 8 smaller cubes. If the volume of the stacked cubes is 1000 cubic centimeters (cm3), find the length of one corner of the smaller cube.
Question (KO): 어떤 정육면체는 크기가 작은 정육면체 8개를 쌓아서 만들어졌습니다. 쌓아 만들어진 정육면체의 부피가 1000세제곱센티미터(㎤)일 때, 작은 정육면체의 한 모서리의 길이를 구하시오.

Answer: 5

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

Question (EN): There is a two-digit natural number whose tens digit is 3. If the number of digits in the tens digit and the ones digit of this natural number that are interchanged is 9 less than the initial number, find the initial number.
Question (KO): 십의 자리의 숫자가 3인 두 자리 자연수가 있다. 이 자연수에서 십의 자리의 숫자와 일의 자리의 숫자를 서로 바꾼 수가 처음 수보다 9만큼 작다고 할 때, 처음 수를 구하시오.

Answer: 32

Solution (Python):
var_a = 3
var_b = 10
var_c = var_a * var_b
var_d = 9
var_e = var_c - var_d
var_f = 3
var_g = var_e - var_f
var_h = 10
var_i = 1
var_j = var_h - var_i
var_k = var_g / var_j
var_l = 3
var_m = 10
var_n = var_l * var_m
var_o = var_k + var_n
print(int(var_o))
Category: Arithmetic calculation

Question (EN): Among the numbers from 1 to 100, find the smallest number whose remainder when divided by 7 is 2 and when divided by 8 is also 2.
Question (KO): 1부터 100까지의 수 중 7로 나눈 나머지가 2이고 8로 나눈 나머지도 2인 수 중 가장 작은 값을 구하시오.

Answer: 2

Solution (Python):
var_a = 1
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 7
var_e = 2
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 8
var_g = 2
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 1
list_d=list_c.copy()
list_d.sort()
var_i = list_d[var_h-1]
print(int(var_i))
Category: Correspondence

Question (EN): AB+21=58. Calculate the value of A.
Question (KO): AB+21=58입니다. A는 얼마인가요?

Answer: 3

Solution (Python):
var_a = 'AB+21=58'
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: Geometry

Question (EN): There is a soap in the shape of a rectangular parallelepiped measuring 4 centimeters (cm) wide, 6 centimeters (cm) long, and 5 centimeters (cm) high. If you use this soap and it becomes a cube, what is the maximum volume of the soap?
Question (KO): 가로 4센티미터(㎝), 세로 6센티미터(㎝), 높이 5센티미터(㎝)인 직육면체의 모양의 비누가 있습니다. 이 비누를 사용하였더니 정육면체가 되었다면, 이때 비누 부피의 최대는 얼마입니까?

Answer: 64

Solution (Python):
var_a = 4
var_b = 6
var_c = 4
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 = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
var_f = 1
list_c=list_a.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = 3
var_i = var_g ** var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): This year the mother is 43 years old and the daughter is 11 years old. How many years ago was the mother's age five times her daughter's age?
Question (KO): 올해 어머니는 43살이고 딸은 11살입니다. 어머니 나이가 딸의 나이의 5배였을 때는 몇 년 전입니까?

Answer: 3

Solution (Python):
var_a = 5
var_b = 11
var_c = var_a * var_b
var_d = 43
var_e = var_c - var_d
var_f = 5
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Possibility

Question (EN): How many edges are there on a face of an octahedron?
Question (KO): 정팔면체의 한 면에서 변은 몇 개일까요?

Answer: 3

Solution (Python):
var_a = 3
print(int(var_a))
Category: Correspondence

Question (EN): How many multiples of 7 are three-digit numbers with 7 in the hundreds place?
Question (KO): 백의 자리가 7인 세 자리수 중 7의 배수는 몇 개입니까?

Answer: 15

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

Question (EN): Three people each have a number card. If X is the average of the number cards of each person, the average of the number cards of two people A and B is 23 greater than X, and the average of the number cards of two people B and C is 17 less than X. The number written on B's number card was 66. Find the number written on A's number card.
Question (KO): 세 사람이 숫자 카드를 각각 가지고 있다. 각 사람이 가진 숫자 카드의 평균을 X라고 할때, A, B 두 사람의 숫자 카드의 평균은 X보다 23 크고, B, C 두사람의 숫자 평균은 X보다 17작다. B의 숫자 카드에 적힌 수는 66이었다. A의 숫자 카드에 적힌 수를 구하여라.

Answer: 124

Solution (Python):
var_a = 66
var_b = 23
var_c = 2
var_d = var_b * var_c
var_e = var_a + var_d
var_f = 3
var_g = var_e * var_f
var_h = 17
var_i = 23
var_j = var_h + var_i
var_k = 2
var_l = var_j * var_k
var_m = var_g - var_l
var_n = 66
var_o = 2
var_p = var_n * var_o
var_q = var_m - var_p
var_r = 2
var_s = 2
var_t = var_r + var_s
var_u = 3
var_v = var_t - var_u
var_w = var_q / var_v
print(int(var_w))
Category: Geometry

Question (EN): A rabbit is walking in a park with a side length measuring 13 meters (m). How many meters (m) did the rabbit walk?
Question (KO): 토끼는 한 변의 길이가 13미터(m)인 공원을 산책하고 있습니다. 토끼가 걸은 거리는 총 몇 미터(m)입니까?

Answer: 52

Solution (Python):
var_a = 13
var_b = 4
var_c = var_a * var_b
print(int(var_c))
Category: Correspondence

Question (EN): When 10 is divided by A, the quotient is B and the remainder is C. A, B, and C are natural numbers. If B and C are equal, find the largest possible number of A.
Question (KO): 10를 A로 나눴을 때 몫이 B, 나머지가 C 였습니다. A, B, C는 자연수 입니다. B와 C가 같을 때, 가능한 A 중 가장 큰 수를 구하시오.

Answer: 9

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

Question (EN): Yoongi multiplied 15 by a certain number to get 45. Find the exact result of subtracting 1 from the number.
Question (KO): 윤기는 15를 어떤 수에 곱해 45를 얻었습니다. 어떤 수에서 1를 뺀 결과를 정확히 구하시오.

Answer: 2

Solution (Python):
var_a = 45
var_b = 15
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Jungkook has 3 marbles, Jimin has 4 more marbles than what Jungkook has. What is a total number of their marbles?
Question (KO): 정국이는 구슬을 3개 가지고 있고, 지민이가 가진 구슬은 정국이보다 4개가 더 많습니다. 두 사람이 가지고 있는 구슬은 모두 몇 개입니까?

Answer: 10

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

Question (EN): The sum of the edges of a hexagonal pyramid is 120 centimeters (cm). What is the sum of the edges divided by the number of edges?
Question (KO): 어떤 육각뿔의 모서리의 합은 120센티미터(㎝)입니다. 모서리의 합을 모서리의 개수로 나누면 얼마입니까?

Answer: 10

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

Question (EN): We have the expression 31+6AB=683. Find the number that goes into B
Question (KO): 식 31+6AB=683이 있습니다. B에 들어가야 하는 숫자를 구하시오

Answer: 2

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

Question (EN): Jungkook ate 3 out of 6 apples. If Yoongi has 4 apples, who has more apples?
Question (KO): 정국이는 6개의 사과에서 3개를 먹었습니다. 윤기가 가진 사과가 4개라면 누가 더 많이 사과를 가지고 있나요?

Answer: Yoongi

Solution (Python):
var_a = 'Jungkook'
var_b = 'Yoongi'
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 = 3
var_e = var_c - var_d
var_f = 4
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Possibility

Question (EN): You want to create a three-digit number using the numbers 7, 2, and 9 only once. How many three-digit numbers can you make?
Question (KO): 숫자 7, 2, 9를 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 세 자리 수는 모두 몇 개입니까?

Answer: 6

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

Question (EN): At intervals of 50 meters (m), statues are erected on both sides of the street a distance of 1650 meters (m). If there are statues at the beginning and end of the street, how many statues are there on both sides of the street?
Question (KO): 50미터(m) 간격으로 동상이 1650미터(m) 거리위에 세워져있습니다. 거리의 처음과 끝에도 동상이 세워져 있을 때, 거리 양쪽에 세워진 동상의 수는 모두 몇 개 입니까?

Answer: 68

Solution (Python):
var_a = 1650
var_b = 50
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
var_f = 2
var_g = var_e * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Jimin had three dozen pencils. He gave 8 of them to his younger brother and a few to Yuna, so he has 17 left. If one dozen is 12 pencils, how many pencils did Jimin give Yuna?
Question (KO): 지민이는 연필 3타를 가지고 있었습니다. 그 중 8자루를 동생에게 주고 유나에게도 몇 자루 주었더니 17자루가 남았습니다. 연필 1타는 12자루일때, 지민이가 유나에게 준 연필은 몇 자루일까요?

Answer: 11

Solution (Python):
var_a = 3
var_b = 12
var_c = var_a * var_b
var_d = 8
var_e = var_c - var_d
var_f = 17
var_g = var_e - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): If the sum of three consecutive natural numbers is 30, find the smallest natural number of them.
Question (KO): 연속하는 세 자연수의 합이 30일 때, 세 자연수 중 첫번째 수를 구하시오.

Answer: 9

Solution (Python):
var_a = 30
var_b = 3
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): Yoongi wants to buy 3 out of 5 books at the bookstore. Find how many possible cases there are.
Question (KO): 윤기는 서점에서 5개의 책 중 3개의 책을 사려고 합니다. 가능한 경우의 수는 모두 몇 가지인지 구하시오.

Answer: 10

Solution (Python):
var_a = 5
var_b = 3
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: Geometry

Question (EN): The square and the rectangle have the same area. If one side of the square is 5 centimeters (cm) and one side of the rectangle is 4 centimeters (cm), what is the length of the other side of the rectangle in centimeters (cm)?
Question (KO): 두 정사각형과 직사각형의 넓이는 같습니다. 정사각형의 한 변의 길이가 5센티미터(㎝), 직사각형의 한 변의 길이가 4센티미터(㎝)라고 할 때, 직사각형의 다른 한 변의 길이는 몇 센티미터(㎝)입니까?

Answer: 6.25

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

Question (EN): If you multiply the age of the Seongju by the age of Seongju's younger brother, you get 16. How many possible numbers are there for the age of Seongju? (However, Seongju and his younger brother are not twins.)
Question (KO): 성주의 나이와 성주 동생의 나이를 곱하였더니 16이 되었을 때, 성주의 나이로 가능한 수는 몇 개입니까? (단, 성주와 동생은 쌍둥이가 아닙니다.)

Answer: 2

Solution (Python):
var_a = 16
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
    if var_a % i == 0:
        list_a.append(i)
        list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = len(list_a)
var_c = 2
var_d = var_b // var_c
print(int(var_d))
Category: Correspondence

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

Answer: 8

Solution (Python):
var_a = '57A-B14=364'
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: Correspondence

Question (EN): I had to divide a number by 3, add 14, then multiply by 2, but I made a mistake by multiplying by 3, adding 14, then multiplying by 2 and got 946. How much is the original calculation?
Question (KO): 어떤 수를 3으로 나누고 14를 더한 뒤 2를 곱해야 했는데 잘 못하여 3을 곱하고 14를 더한 뒤 2를 곱하여 946이 나왔습니다. 원래대로 계산하면 얼마입니까?

Answer: 130

Solution (Python):
var_a = 946
var_b = 2
var_c = var_a / var_b
var_d = 14
var_e = var_c - var_d
var_f = 3
var_g = var_e / var_f
var_h = 3
var_i = var_g / var_h
var_j = 14
var_k = var_i + var_j
var_l = 2
var_m = var_k * var_l
print(int(var_m))
Category: Correspondence

Question (EN): There are different numbers A, B, and C. 3×A-A=10, B+A=12, C-B=6. Get C.
Question (KO): 서로 다른 수 A, B, C가 있습니다. 3×A-A=10, B+A=12, C-B=6입니다. C를 구하시오.

Answer: 13

Solution (Python):
var_a = 12
var_b = '3×A-A=10'
var_c = 'A'
ans_dict = dict()
var_b = var_b.replace('×','*')
var_b = var_b.replace('x','*')
var_b = var_b.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_b):
    if v in variable_candi:
        ans_dict[v] = 0
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, repeat=len(ans_dict)))
for c in candi:
    temp = var_b
    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)):
        if term_list[i] == '':
            new_eq += str(term_list[i])+op_list[i]
        else:
            new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    new_eq=new_eq.replace('=', '==')
    new_eq=new_eq.replace('>==', '>=')
    new_eq=new_eq.replace('<==', '<=')
    eval_result = False
    try:
        if '=' in new_eq and '>' not in new_eq and '<' not in new_eq:
            new_eq=new_eq.replace('==','=')
            new_eq=new_eq.replace('>','')
            new_eq=new_eq.replace('<','')
            new_eq=new_eq.split('=')
            for i in range(len(new_eq)-1):
                eval_result = math.isclose(eval(new_eq[i]), eval(new_eq[i+1]))
                if not eval_result:
                    break
        else:
            eval_result = eval(new_eq)
    except:
        eval_result = False
        pass
    if eval_result:
        for i, (k, _) in enumerate(ans_dict.items()):
            ans_dict[k] = int(c[i])
var_d = ans_dict[var_c]
var_e = var_a - var_d
var_f = 6
var_g = var_e + var_f
print(int(var_g))
Category: Geometry

Question (EN): How many times bigger is the diameter of a circle compared to its radius?
Question (KO): 한 원에서 지름은 반지름의 몇 배 입니까?

Answer: 2

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

Question (EN): Taehyung, who participated in the running match, shook hands with everyone else once, and he shook hands a total of 25 times. How many people participated in the running test at this time?
Question (KO): 달리기 시합에 참가한 태형이가 다른 모든 사람들과 악수를 한번씩 했더니 총 25번 악수를 했습니다. 이때 달리기 시험에 참가한 사람은 모두 몇명입니까?

Answer: 26

Solution (Python):
var_a = 25
var_b = 1
var_c = var_a + var_b
print(int(var_c))
Category: Comparison

Question (EN): 127,000 toys were made at the factory in Ulsan. How many more trucks do you need to transport these toys to Seoul by trucks with a capacity of 5000 toys than by trucks with a capacity of 8000 toys?
Question (KO): 울산에 있는 공장에서 127000개의 장난감이 만들어졌습니다. 이 장난감들을 서울까지 운반하려고 할 때 5000개까지 실을 수 있는 트럭으로 운반하려면 8000개까지 실을 수 있는 트럭으로 운반할 때보다 몇 대가 더 필요합니까?

Answer: 10

Solution (Python):
var_a = 127000
var_b = 5000
var_c = var_a / var_b
var_d = 1
var_e=int(((var_c+9*10**(var_d-2))//(10**(var_d-1)))*10**(var_d-1))

var_f = 127000
var_g = 8000
var_h = var_f / var_g
var_i = 1
var_j=int(((var_h+9*10**(var_i-2))//(10**(var_i-1)))*10**(var_i-1))

var_k = var_e - var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): Find the difference between the largest and smallest odd numbers from 1 to 100.
Question (KO): 1부터 100까지의 홀수 중 가장 큰 수와 가장 작은 수의 차를 구하시오.

Answer: 98

Solution (Python):
var_a = 1
var_b = 100
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
list_b=list_a.copy()
list_b.sort()
var_d = list_b[-var_c]
var_e = 1
list_c=list_a.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = var_d - var_f
print(int(var_g))
Category: Correspondence

Question (EN): I made the mistake of multiplying 7 by a number, which was supposed to be the subtraction of 36 and a number, so I got 70. Find the correctly calculated answer.
Question (KO): 36에 어떤 수를 빼야 할 것을 잘못하여 7에 어떤 수를 곱했더니 70이 되었습니다. 바르게 계산하면 얼마인지 구하시오.

Answer: 26

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

Question (EN): Yoongi collected 7 points, Jungkook 6 points, Yuna 9 points, Yoojung 8 points, and Taehyung 10 points. Who collected the largest number?
Question (KO): 윤기는 7, 정국은 6, 유나는 9, 유정은 8, 태형은 10만큼 모았습니다. 누가 모은 숫자가 가장 큽니까?

Answer: Taehyung

Solution (Python):
var_a = 'Yoongi'
var_b = 'Jungkook'
var_c = 'Yuna'
var_d = 'Yoojung'
var_e = 'Taehyung'
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 = 7
var_g = 6
var_h = 9
var_i = 8
var_j = 10
list_b= []
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()
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)