philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): The lowest temperatures in Seoul during the week were 18 degrees, 20 degrees, 15 degrees, 19 degrees, 14 degrees, 13 degrees, and 17 degrees. How many days did the temperature drop below 17 degrees in one week?
Question (KO): 일주일 동안 서울의 최저 기온은 18도, 20도, 15도, 19도, 14도, 13도, 17도였습니다. 일주일 동안 17도 이하로 떨어진 날은 몇 번 있었나요?

Answer: 4

Solution (Python):
var_a = 18
var_b = 20
var_c = 15
var_d = 19
var_e = 14
var_f = 13
var_g = 17
list_a= []
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_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_h = 17
list_b = []
for i in list_a:
    if i <= var_h:
        list_b.append(i)
var_i = len(list_b)
print(int(var_i))
Category: Arithmetic calculation

Question (EN): A barrel full of fish of the same size and weight was weighed and found to be 54 kilograms (kg). After removing half of the fish from the barrel, it turned out to be 29 kilograms (kg). How many kilograms (kg) was the fish in the first place?
Question (KO): 크기와 무게가 같은 물고기가 가득 담긴 통의 무게를 재었더니 54킬로그램(㎏)이었습니다. 이 중 절반의 물고기를 덜어낸 후 통의 무게를 재어 보니 29킬로그램(㎏)이었습니다. 원래 있던 물고기만의 무게는 몇 킬로그램(㎏)입니까?

Answer: 50

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

Question (EN): 16 pieces of colored tape, each 10.4 centimeters (cm) long, were overlapped by 3.5 centimeters (cm) and connected in a circle shape. What is the total length in centimeters (cm) of the circle-shaped colored tapes that were connected together?
Question (KO): 길이가 10.4센티미터(㎝)인 색 테이프 16개를 3.5센티미터(㎝)씩 겹치게 하여 원 모양으로 이어 붙였습니다. 이어 붙인 원 모양의 색 테이프의 전체 길이는 몇 센티미터(㎝)입니까?

Answer: 110.4

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

Question (EN): When number cards 2 and 4 are given, find the smallest number that can be made by using all number cards once.
Question (KO): 숫자 카드 2, 4가 주어졌을 때, 주어진 숫자 카드를 한 번씩 모두 사용하여 만들 수 있는 수 중 가장 작은 수를 구하시오.

Answer: 24

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

Question (EN): Seokjin has 78 candies, and Taehyung has 81 candies. Who has more candies?
Question (KO): 석진이는 사탕을 78개 가지고 있습니다. 태형이는 사탕을 81개 가지고 있습니다. 사탕을 더 많이 가지고 있는 사람은 누구입니까?

Answer: Taehyung

Solution (Python):
var_a = 'Seokjin'
var_b = 'Taehyung'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 78
var_d = 81
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): Hose A takes 10 hours to fill the bathtub, and Hose B takes 15 hours to fill the bathtub. Determine how many hours it will take to fill the bathtub if both hoses are used.
Question (KO): 호스 A는 욕조를 가득 체우는데 10시간이 걸리고, 호스 B는 욕조를 가득 체우는데 15시간이 걸린다. 두 개의 호스를 모두 사용하면 욕조를 가득 체우는데 몇 시간이 걸리는지 구하시오.

Answer: 6

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

Question (EN): Daejun was presented with 20 bags containing 156 marbles. How many marbles does Daejun have?
Question (KO): 대준이는 156개의 구슬이 담긴 주머니 20개를 선물받았습니다. 대준이가 가진 구슬의 개수는 모두 몇 개입니까?

Answer: 3120

Solution (Python):
var_a = 156
var_b = 20
var_c = var_a * var_b
print(int(var_c))
Category: Possibility

Question (EN): Yoongi can choose 3 out of 10 classes for after-school classes. How many ways can Yoongi take classes?
Question (KO): 윤기는 방과후수업으로 10개의 수업 중 3개를 선택할 수 있습니다. 윤기가 수업을 들을 수 있는 경우의 수는 모두 몇 가지입니까?

Answer: 120

Solution (Python):
var_a = 10
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: Correspondence

Question (EN): There is a product that is packaged in 7 pieces. Hyeonsu has 12 bundles and 5 individual pieces of this product. If this product is repackaged in units of 8, how many bundles can be made?
Question (KO): 7개씩 포장되어있는 어떤 제품이 있다. 현수는 이 제품을 12개의 묶음과 5개의 낱개를 가지고 있다. 이 제품을 8개씩 다시 포장한다면 현수는 몇 개의 묶음을 만들 수 있는지 구하시오.

Answer: 11

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

Question (EN): My father is 34 years old and my mother is 30 years old. What is the age of my father in the year when the sum of the ages of my father and mother becomes 100?
Question (KO): 아버지는 34살이고 어머니는 30살입니다. 아버지와 어머니의 나이의 합이 100살이 되는 해의 아버지의 나이는 몇 살입니까?

Answer: 52

Solution (Python):
var_a = 34
var_b = 100
var_c = 34
var_d = 30
var_e = var_c + var_d
var_f = var_b - var_e
var_g = 2
var_h = var_f / var_g
var_i = var_a + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Hyeji decided to drink 2 liters (L) of water a day. If she drank 460 milliliters (ml) more by eating spicy food after drinking all the water she needs to drink today, how many milliliters (ml) of water Hyeji drank today?
Question (KO): 혜지는 하루에 물을 2리터(L)씩 마시기로 하였습니다. 오늘 마셔야 하는 물을 다 마신 후에 매운 것을 먹어 460밀리리터(㎖)를 더 마셨다면, 혜지가 오늘 마신 물은 몇 밀리리터(㎖)일까요?

Answer: 2460

Solution (Python):
var_a = 2
var_b = 1000
var_c = var_a * var_b
var_d = 460
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): I made the widest square out of wire, and its size is 324 square centimeters (cm2). Find the length of the wire.
Question (KO): 철사로 가장 넓은 크기의 사각형을 만들었더니 그 크기가 324제곱센티미터(㎠)입니다. 철사의 길이를 구하시오.

Answer: 72

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

Question (EN): How many five-digit numbers are divisible by the two numbers 3 and 4?
Question (KO): 2개의 수 3, 4로 나누어 떨어질 수 있는 다섯 자리 수는 모두 몇 개 있습니까?

Answer: 7500

Solution (Python):
var_a = 10000
var_b = 99999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
list_b = []
var_d = int(var_d)
for i in list_a:
    i = int(i)
    if i % var_d == 0:
        list_b.append(i)
var_e = 4
list_c = []
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i % var_e == 0:
        list_c.append(i)
var_f = len(list_c)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): Hyeonjun takes a bus for 2 kilometers (km) and walks 560 meters (m) to go to school from home. How many meters (m) does Hyunjun travel to go to school?
Question (KO): 현준이는 집에서 학교에 가기 위해 2킬로미터(㎞)는 마을버스를 타고 560미터(m)는 걸어갑니다. 현준이가 학교에 가기 위해 이동한 총 거리는 몇 미터(m)입니까?

Answer: 2560

Solution (Python):
var_a = 2
var_b = 1000
var_c = var_a * var_b
var_d = 560
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Yesterday Seok-jin bought 10 fish and paid 3,000 won. He paid 6,000 won more than yesterday because he bought more fish from the same store. Find the total number of fish that Seok-jin bought yesterday and today.
Question (KO): 어제 석진이는 물고기 10마리를 구매하고 3,000원을 지불했습니다. 같은 가게에서 더 많은 수의 물고기를 구매했더니 어제보다 6,000원을 더 냈습니다. 석진이가 어제와 오늘 구매한 물고기는 총 몇 마리인지 구하시오.

Answer: 40

Solution (Python):
var_a = 3000
var_b = 6000
var_c = var_a + var_b
var_d = 3000
var_e = 10
var_f = var_d / var_e
var_g = var_c / var_f
var_h = 10
var_i = var_g + var_h
print(int(var_i))
Category: Correspondence

Question (EN): 695 minus 329 equals a number minus 254. Find the number.
Question (KO): 695에서 329를 뺀 값과 어떤 수에서 254를 뺀 값이 같다. 어떤 수를 구하시오.

Answer: 620

Solution (Python):
var_a = 695
var_b = 329
var_c = var_a - var_b
var_d = 254
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): At the bank, 1 yuan in Chinese money is exchanged for 17.25 yen in Japanese money. Saeyoung has one 1000 yuan bill and one 10 yuan coin. How much is Seyoung's Chinese money in Japanese money?
Question (KO): 은행에서 중국 돈 1 위안은 일본 돈으로 17.25 엔으로 바꿔 준다고 합니다. 세영이는 1000 위안짜리 지폐 1 장과 10 위안짜리 동전 1 개를 가지고 있습니다. 세영 이가 가진 중국 돈은 일본 돈으로 얼마입니까?

Answer: 17422.5

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

Question (EN): There are 200 grams (g) of 5% sugar water. If water evaporated from this sugar water to make it 8% sugar water, find how many grams (g) of water has evaporated.
Question (KO): 5%의 설탕물이 200그램(g) 있습니다. 이 설탕물에서 물이 증발하여 8%의 설탕물이 되었다면, 증발된 물은 몇 그램(g)인지 구하시오.

Answer: 75

Solution (Python):
var_a = 200
var_b = 200
var_c = 5
var_d = 100
var_e = var_c / var_d
var_f = var_b * var_e
var_g = 100
var_h = 8
var_i = var_g / var_h
var_j = var_f * var_i
var_k = var_a - var_j
print(int(var_k))
Category: Correspondence

Question (EN): What number must go in A to make A78-2B4=364?
Question (KO): A78-2B4=364라는 식이 성립하려면, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 5

Solution (Python):
var_a = 'A78-2B4=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: Arithmetic calculation

Question (EN): 1.2 kg (kg) of glutinous rice flour is needed to make 3.8 kg (kg) of chapsalttock. The total weight of chapsalttocks made in the store is 53.2 kg (kg), and the amount of glutinous rice flour in a box is 3 kg (kg). How many boxes of glutinous rice flour do they need to make all the chapsalttocks in the store?
Question (KO): 찹쌀떡 3.8킬로그램(㎏)를 만드는 데 찹쌀가루 1.2킬로그램(㎏)이 필요하다고 합니다. 가게에서 만드는 총 찹쌀떡의 무게는 53.2킬로그램(㎏)이고 한 통에 들어있는 찹쌀가루의 양은 3킬로그램(㎏)입니다. 가게의 찹쌀떡을 모두 만드려면 찹쌀가루는 모두 몇 통이 필요합니까?

Answer: 6

Solution (Python):
var_a = 1.2
var_b = 3.8
var_c = var_a / var_b
var_d = 53.2
var_e = var_c * var_d
var_f = 3
var_g = var_e / var_f
var_h = 1
var_i=int(((var_g+9*10**(var_h-2))//(10**(var_h-1)))*10**(var_h-1))

print(int(var_i))
Category: Geometry

Question (EN): If the largest rhombus is drawn inside a circle with a radius of 10 centimeters (cm), how long centimeters (cm) is the diagonal of the rhombus?
Question (KO): 반지름이 10센티미터(㎝)인 원 안에 가장 큰 마름모를 그렸을 때 마름모의 대각선 길이는 몇 센티미터(㎝) 입니까?

Answer: 20

Solution (Python):
var_a = 2
var_b = 10
var_c = var_a * var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): I paid 1,000 won after buying a glue for 270 won and pencils for 210 won and received 100 won as change. How many pencils did I buy?
Question (KO): 270원짜리 풀 1개와 210원짜리 연필 몇 자루를 사고 1,000원을 내었더니 거스름돈으로 100원을 받았습니다. 연필은 몇 자루를 샀는지 구하시오.

Answer: 3

Solution (Python):
var_a = 1000
var_b = 100
var_c = var_a - var_b
var_d = 270
var_e = 1
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 210
var_i = var_g / var_h
print(int(var_i))
Category: Correspondence

Question (EN): Sumin's candies are in two flavors, strawberry and grape. If there are 821 candies and 267 strawberry candies, find the difference between the number of grape and strawberry candies.
Question (KO): 수민이가 가진 캔디는 딸기맛과 포도맛 2가지이다. 캔디가 모두 821개이고 딸기맛 캔디는 267개이면 포도맛 캔디와 딸기맛 캔디의 개수 차를 구하시오.

Answer: 287

Solution (Python):
var_a = 821
var_b = 267
var_c = var_a - var_b
var_d = 267
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): I have square notebooks. When these notebooks were laid out in a big square shape without gaps, a total of 36 notebooks were left over. I then increased one horizontal and one vertical side by one column, and there were still three notebooks left over. How many notebooks did I have?
Question (KO): 정사각형 모양의 수첩이 있습니다. 이 수첩을 빈틈없이 정사각형 모양으로 늘여놓았더니 총 36개의 수첩이 남았습니다. 가로 한 변과 세로 한 변을 1열씩 늘렸더니 아직도 3개의 수첩이 남았습니다. 수첩은 모두 몇 개일까요?

Answer: 397

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 = 3
var_k = var_i - var_j
print(int(var_k))
Category: Possibility

Question (EN): Find the number of numbers less than 500 when choosing 3 out of 4 number cards 8, 4, 6, 9 to make a three-digit number.
Question (KO): 4장의 숫자 카드 8, 4, 6, 9 중 3장을 골라 세 자리 수를 만들 때, 500보다 작은 수의 개수를 구하시오

Answer: 6

Solution (Python):
var_a = 8
var_b = 4
var_c = 6
var_d = 9
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 500
list_c = []
for i in list_b:
    if i < var_f:
        list_c.append(i)
var_g = len(list_c)
print(int(var_g))
Category: Geometry

Question (EN): There is a square with a perimeter of 52 centimeters (cm), and a rectangle with a length of 15 centimeters (cm) and a perimeter of 52 centimeters (cm). What is the difference between the areas of the two shapes?
Question (KO): 둘레가 52센티미터(㎝) 인 정사각형과 가로가 15센티미터(㎝) 이고, 둘레가 52센티미터(㎝) 인 직사각형이 있습니다. 두 도형의 넓이의 차는 몇 입니까?

Answer: 4

Solution (Python):
var_a = 52
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
var_f = 52
var_g = 2
var_h = var_f / var_g
var_i = 15
var_j = var_h - var_i
var_k = 15
var_l = var_j * var_k
var_m = var_e - var_l
var_n = abs(var_m)
print(int(var_n))
Category: Possibility

Question (EN): How many numbers among the two-digit numbers consisting of 0, 1, 3, 5, 7, and 9 change when each digit is rearranged?
Question (KO): 0, 1, 3, 5, 7, 9로 이루어진 두 자리 수 중 각 자리의 숫자를 바꾸었을 때 달라지는 숫자의 개수는 모두 몇 개인가?

Answer: 25

Solution (Python):
var_a = 0
var_b = 1
var_c = 3
var_d = 5
var_e = 7
var_f = 9
list_a= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_g = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_g))
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_h = len(list_b)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): If there are 12 cars in the parking lot, but no additional cars have entered, and there are currently 9 cars remaining, how many cars have left the parking lot?
Question (KO): 주차장에 12대의 자동차가 있었는데 추가로 들어온 자동차는 없고, 현재 9대의 자동차가 남아있다고 할 때, 주차장에서 나간 자동차는 몇 대입니까?

Answer: 3

Solution (Python):
var_a = 12
var_b = 9
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): Find the smallest natural number B that satisfies the equation 360÷(A×A×A/B)=5.
Question (KO): 360÷(A×A×A/B)=5의 식을 만족하는 가장 작은 자연수 B를 구하여라.

Answer: 3

Solution (Python):
var_a = '360÷(A×A×A/B)=5'
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] = []
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, 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)):
        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].append(int(c[i]))
list_a = list(set(ans_dict[var_b]))
var_c = 1
list_b=list_a.copy()
list_b.sort()
var_d = list_b[var_c-1]
print(int(var_d))
Category: Correspondence

Question (EN): Dividing 90.1 by a number gets you 5.3. What number is it?
Question (KO): 90.1을 어떤 숫자로 나누면 5.3이 됩니다. 어떤 숫자는 얼마입니까?

Answer: 17

Solution (Python):
var_a = 1
var_b = 5.3
var_c = 90.1
var_d = var_b / var_c
var_e = var_a / var_d
print(int(var_e))
Category: Comparison

Question (EN): Jimin did 30 laps in 3 hours and 30 minutes and Dongguk did 10 laps in 1 hour. Which of the two ran faster?
Question (KO): 지민이는 3시간 30분동안 운동장 30바퀴를 돌았고 동국이는 1시간 동안 10바퀴를 돌았습니다. 두 명중 누가 더 빠르게 돌았습니까?

Answer: Dongguk

Solution (Python):
var_a = 'Jimin'
var_b = 'Dongguk'
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 = 30
var_d = 3
var_e = 60
var_f = var_d * var_e
var_g = 30
var_h = var_f + var_g
var_i = var_c / var_h
var_j = 10
var_k = 1
var_l = 60
var_m = var_k * var_l
var_n = var_j / var_m
list_b= []
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
list_b.reverse()
var_o = 1
list_c=list_b.copy()
list_c.sort()
var_p = list_c[-var_o]
var_q = list_b.index(var_p)+1
var_r = list_a[var_q-1]
print(var_r)
Category: Correspondence

Question (EN): Subtract 26 from any number and divide by 2 is 37. Find the value of dividing a number by 4 and subtracting it from 48.
Question (KO): 어떤 수에서 26을 빼고 2로 나눈 수가 37입니다. 어떤 수를 4로 나눈 뒤 48에서 뺀 값을 구하시오.

Answer: 23

Solution (Python):
var_a = 48
var_b = 37
var_c = 2
var_d = var_b * var_c
var_e = 26
var_f = var_d + var_e
var_g = 4
var_h = var_f / var_g
var_i = var_a - var_h
print(int(var_i))
Category: Geometry

Question (EN): A figure with one side of 16 centimeters (cm) and all sides of the same length has a perimeter of 80 centimeters (cm). How many angles does this shape have?
Question (KO): 한 변의 길이가 16센티미터(㎝)이고, 모든 변의 길이가 같은 도형의 둘레는 80센티미터(㎝)입니다. 이 도형은 총 몇 개의 각으로 이루어져 있습니까?

Answer: 5

Solution (Python):
var_a = 80
var_b = 16
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): 24 minus AB equals 6. What is the value of A, where AB is two-digit number?
Question (KO): 24에서 AB를 빼면 6입니다. A는 얼마인가요?

Answer: 3

Solution (Python):
var_a = 6
var_b = 24
var_c = var_a + var_b
var_d = 10
var_e = var_c // var_d
print(int(var_e))
Category: Correspondence

Question (EN): AB19 rounded up to the hundreds place equals 7300. Round down AB19 to the tens place.
Question (KO): AB19를 올림하여 백의 자리까지 나타내면 7300입니다. AB19를 버림하여 십의 자리까지 나타내시오.

Answer: 7210

Solution (Python):
var_a = 'AB19'
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 = 7200
list_b = []
for i in list_a:
    if i > var_b:
        list_b.append(i)
var_c = 7300
list_c = []
for i in list_b:
    if i <= var_c:
        list_c.append(i)
var_d = 'AB19'
var_e = 'A'
var_d = str(var_d)
var_e = str(var_e)
unk_idx = var_d.index(var_e)
var_f = 0
for elem in list_c:
    elem = str(elem)
    var_f = int(elem[unk_idx])
var_g = 1000
var_h = var_f * var_g
var_i = 'AB19'
var_j = 'B'
var_i = str(var_i)
var_j = str(var_j)
unk_idx = var_i.index(var_j)
var_k = 0
for elem in list_c:
    elem = str(elem)
    var_k = int(elem[unk_idx])
var_l = 100
var_m = var_k * var_l
var_n = var_h + var_m
var_o = 19
var_p = var_n + var_o
var_q = 2
var_r=int((var_p//(10**(var_q-1)))*10**(var_q-1))

print(int(var_r))