philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): There are four numbers 10, 11, 12, and 13. What is the quotient of the second largest number divided by the smallest number?
Question (KO): 4개의 수 10, 11, 12, 13이 있습니다. 그 중에서 2번째로 큰 수와 가장 작은 수로 나눈 몫은 얼마입니까?

Answer: 1

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 = 2
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 1
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): A 32 centimeters (cm) long string was used to make a rectangle with the same length of all four sides. What is the area of the rectangle you created in square centimeters (cm2)?
Question (KO): 길이가 32센티미터(㎝) 인 끈으로 네변의 길이가 모두 같은 사각형을 만들었습니다. 만든 사각형의 넓이는 몇 제곱센티미터(㎠) 입니까?

Answer: 64

Solution (Python):
var_a = 32
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
print(int(var_e))
Category: Comparison

Question (EN): As a result of multiplying two-digit numbers, Hyeonseong got 1485. However, this is a miscalculation of the number 5 in the tens place as 3. If the correctly calculated value is 2385, write the larger number among the two-digit number.
Question (KO): 현성이는 두 자리 수끼리의 곱셈을 한 결과, 1485를 얻었습니다. 하지만 이는 곱하는 수 중 하나의 십의 자리 숫자 5를 3으로 잘못 보고 계산한 것입니다. 바르게 계산한 값이 2385일 때, 2개의 두 자리 수 중 더 큰 수를 쓰시오.

Answer: 53

Solution (Python):
var_a = 1485
var_b = 2385
var_c = var_a - var_b
var_d = 3
var_e = 5
var_f = var_d - var_e
var_g = 10
var_h = var_f * var_g
var_i = var_c / var_h
var_j = 2385
var_k = 1485
var_l = 2385
var_m = var_k - var_l
var_n = 3
var_o = 5
var_p = var_n - var_o
var_q = 10
var_r = var_p * var_q
var_s = var_m / var_r
var_t = var_j / var_s
list_a= []
if "/" in str(var_t):
    var_t = eval(str(var_t))
list_a.append(var_t)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_a.append(var_i)
list_a.reverse()
var_u = 1
list_b=list_a.copy()
list_b.sort()
var_v = list_b[-var_u]
print(int(var_v))
Category: Arithmetic calculation

Question (EN): How numbers are less than 200, which are also multiples of 15 and 6?
Question (KO): 15의 배수이면서 6의 배수인 수 중에 200보다 작은 수는 모두 몇개입니까?

Answer: 6

Solution (Python):
var_a = 1
var_b = 200
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
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 = 15
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 = 200
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: Arithmetic calculation

Question (EN): You want to set up street lights at intervals of 4 meters (m) on both sides of a road that is 260 meters (m) long. If you put up street lights at the beginning and at the end as well, find out how many street lights are needed.
Question (KO): 길이가 260미터(m)인 도로의 양쪽에 4미터(m) 간격으로 가로등을 세우려고 합니다. 처음과 끝에도 가로등을 세운다고 할 때 필요한 가로등은 모두 몇 개인지 구해 보시오.

Answer: 132

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

Question (EN): The four-digit number A12B is a multiple of 8 and when divided by 3, the remainder is 1. Find the sum of the possible B's.
Question (KO): 네 자리 수 A12B는 8의 배수이고 3으로 나누었을 떄 나머지가 1이다. 가능한 B들의 합을 구하시오.

Answer: 8

Solution (Python):
var_a = 'A12B'
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 = 8
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 = 3
var_d = 1
list_c = [] 
var_c = int(var_c)
var_d = int(var_d)
if var_d < 0:
    var_d = var_d + var_c
for i in list_b:
    i = int(i)
    if i%var_c == var_d:
        list_c.append(i)
var_e = 'A12B'
var_f = 'B'
var_e = str(var_e)
var_f = str(var_f)
unk_idx = var_e.index(var_f)
list_d = []
for elem in list_c:
    elem = str(elem)
    list_d.append(int(elem[unk_idx]))
list_d = list(set(list_d))
list_d = [float(i) for i in list_d]
var_g = sum(list_d)
print(int(var_g))
Category: Geometry

Question (EN): Suzy has 3.2 sheets of square paper with sides measuring 8.5 meters (m). How big could this area get by gluing these papers in a row?
Question (KO): 수지는 한 변의 길이가 8.5미터(m)인 정사각형 모양의 종이를 3.2장 갖고 있습니다. 이 종이를 일렬로 붙일 때 얻을 수 있는 넓이는 얼마입니까?

Answer: 231.2

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

Question (EN): Hyungjun's number is 010-3380-2798. How many times do you have to press 3 to call Hyeongjun?
Question (KO): 형준이의 번호는 010-3380-2798이다. 형준이에게 전화를 걸려면 3을 몇 번 눌러야하는가?

Answer: 2

Solution (Python):
var_a = 0
var_b = 1
var_c = 0
var_d = 3
var_e = 3
var_f = 8
var_g = 0
var_h = 2
var_i = 7
var_j = 9
var_k = 8
list_a= []
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_a.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_a.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_a.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_a.append(var_h)
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_l = 3
var_m = 0
var_l = int(var_l)
for i in list_a:
    i = int(i)
    if i == var_l:
        var_m = var_m + 1
print(int(var_m))
Category: Arithmetic calculation

Question (EN): There are four numbers 10, 11, 12, and 13. What do you get for the second largest number minus the smallest number?
Question (KO): 4개의 수 10, 11, 12, 13이 있습니다. 그 중에서 2번째로 큰 수와 가장 작은 수의 차는 얼마입니까?

Answer: 2

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 = 2
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 1
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: Arithmetic calculation

Question (EN): The water supply was turned on at a rate of 200 kilograms (kg) per hour in a water tank that can contain 4,000 kilograms (kg) of water. If you left the water running on this empty water tank for one day, find how many kilograms (kg) of water overflowed.
Question (KO): 4000킬로그램(㎏)의 물이 들어가는 물탱크에 1시간에 200킬로그램(㎏)씩 나오는 수도를 틀어 놓았습니다. 하루 동안 빈 물탱크에 수도를 틀어 놓았다면, 흘러 넘친 물의 양은 몇 킬로그램(㎏)인지 구하시오.

Answer: 800

Solution (Python):
var_a = 200
var_b = 24
var_c = var_a * var_b
var_d = 4000
var_e = var_c - var_d
var_f = abs(var_e)
print(int(var_f))
Category: Comparison

Question (EN): When a string measuring 3 meters (m) and 48 centimeters (cm) in length was cut into two parts, the difference between the lengths of the two parts was 72 centimeters (cm). Find the length of the longer string in centimeters (cm).
Question (KO): 길이가 3미터(m) 48센티미터(㎝)인 끈을 두 도막으로 잘랐더니 두 도막의 길이의 차가 72센티미터(㎝)였습니다. 이때 길이가 긴 끈의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 210

Solution (Python):
var_a = 3
var_b = 100
var_c = var_a * var_b
var_d = 48
var_e = var_c + var_d
var_f = 72
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
var_j = 72
var_k = var_i + var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): There are currently 63 people on the train. 78 people were on the train when it first departed, and 27 people got off after that. How many extra people got on the train?
Question (KO): 현재 기차에 63명이 타고 있습니다. 처음 출발할 때 기차에 탑승한 인원이 78명이고 이후 27명이 내렸습니다. 기차에 추가로 탄 사람은 몇 명입니까?

Answer: 12

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

Question (EN): Hayeon has magnets written 0, 1 and 2 respectively. How many two-digit natural numbers can she make using that number magnets?
Question (KO): 하연이는 숫자 자석 0, 1, 2를 가지고 있다. 가지고 있는 숫자 자석들을 이용하여 만들 수 있는 두 자리 자연수의 개수는 몇 개인가?

Answer: 4

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
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: Comparison

Question (EN): There are five numbers 1/10, 8, 0.9, 7/10, and 5. How many of these numbers are less than 1?
Question (KO): 5개의 수 1/10, 8, 0.9, 7/10, 5가 있습니다. 이 중에서 1보다 작은 수는 모두 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 0.1
var_b = 8
var_c = 0.9
var_d = 0.7
var_e = 5
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
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: Geometry

Question (EN): If the length of the lower side is 6 centimeters (cm) longer than the length of the upper side and the area of the trapezoid is 8 centimeters (cm) and the area is 72 square cm (cm2), find the length of the upper side of the trapezoid.
Question (KO): 아랫변의 길이가 윗변의 길이보다 6 센티미터(㎝) 길고, 높이가 8 센티미터(㎝)인 사다리꼴의 넓이가 72제곱센티미터(㎠)일 때, 이 사다리꼴의 윗변의 길이를 구하시오.

Answer: 6

Solution (Python):
var_a = 72
var_b = 2
var_c = var_a * var_b
var_d = 8
var_e = var_c / var_d
var_f = 6
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Comparison

Question (EN): Yoongi collected 4 and Yuna collected 5. If Jungkook collected the sum of 6 and 3, who has the smallest number?
Question (KO): 윤기는 4, 유나는 5를 모았습니다. 정국이는 6에서 3을 합한 수를 모았다면 누가 가장 작은 수를 가지고 있나요?

Answer: Yoongi

Solution (Python):
var_a = 'Yoongi'
var_b = 'Yuna'
var_c = 'Jungkook'
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 = 4
var_e = 5
var_f = 6
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)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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: Possibility

Question (EN): Find how many are there to divide cookies when you try to put 10 cookies in 2 different boxes. (There should be at least one cookie in the box.)
Question (KO): 서로 다른 2개의 상자에 과자 10개를 넣으려 한다. 상자에는 최소 1개의 과자가 있다고 한다면 과자를 나누는 경우는 방법은 몇 가지인가?

Answer: 9

Solution (Python):
var_a = 10
var_b = 2
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): The weight of the clay used by Chanwoo to make pottery is 0.645 kilograms (kg), and the weight of the clay used by Yerim is 0.65 kilograms (kg). Who used more clay?
Question (KO): 도자기를 만드는 데 찬우가 사용한 찰흙의 무게는 0.645킬로그램(㎏)이고, 예림이가 사용한 찰흙의 무게는 0.65킬로그램(㎏)입니다. 찰흙을 더 많이 사용한 사람은 누구입니까?

Answer: Yerim

Solution (Python):
var_a = 'Yerim'
var_b = 'Chanwoo'
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 = 0.65
var_d = 0.645
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: Geometry

Question (EN): How many times is the volume of a cube with a width, length, and height of 2 meters (m) bigger compared to the volume of a cube with width, length, and height of 100 centimeters (cm)?
Question (KO): 가로, 세로, 높이가 2미터(m)인 정육면체의 부피는 가로, 세로, 높이가 100센티미터(㎝)인 정육면체 부피의 몇 배인가?

Answer: 8

Solution (Python):
var_a = 2
var_b = 3
var_c = var_a ** var_b
var_d = 100
var_e = 100
var_f = var_d / var_e
var_g = 3
var_h = var_f ** var_g
var_i = var_c / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): There are 8 same candies in basket (A) and 17 in basket (B). How many candies should you put in basket (A) to make the number of candies in both baskets equal?
Question (KO): 똑같은 사탕이 (가) 바구니에 8개, (나) 바구니에 17개 있습니다. (가) 바구니에 사탕 몇 개를 더 놓으면 양쪽의 개수가 같아집니까?

Answer: 9

Solution (Python):
var_a = 17
var_b = 8
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): If you subtract Jimin's weight from Taehyung's weight, it is 4 kilograms (kg). If the sum of Taehyung's and Jimin's weights is 88 kilograms (kg), how many kilograms (kg) does Jimin weigh?
Question (KO): 태형이의 몸무게에서 지민이의 몸무게를 빼면 4킬로그램(㎏)입니다. 태형이와 지민이의 몸무게의 합이 88킬로그램(㎏)이라면 지민이의 몸무게는 몇 킬로그램(㎏)인지 구하세요.

Answer: 42

Solution (Python):
var_a = 88
var_b = 4
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Minyoung has a 17 meters (m) and 48 centimeters (cm) of tape, and Yoojung has an 850 centimeters (cm) of tape. Find how much Minyoung should give Yoojung a tape in centimeters (cm), so that both of them have the same length of tape.
Question (KO): 민영이는 테이프를 17미터(m) 48센티미터(㎝) 가지고 있고 유정이는 테이프를 850센티미터(㎝) 가지고 있습니다. 두 사람이 가지고 있는 테이프의 길이가 같아지려면 민영이는 유정이에게 테이프를 몇 센티미터(㎝) 주어야 하는지 구하시오.

Answer: 449

Solution (Python):
var_a = 17
var_b = 100
var_c = var_a * var_b
var_d = 48
var_e = var_c + var_d
var_f = 850
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Possibility

Question (EN): You want to create a three-digit number by drawing three out of 1, 7, 0, and 3 and using them only once. Find the difference between the second largest number and the second smallest number that can be made.
Question (KO): 1, 7, 0, 3 중에서 3개를 뽑아 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 두 번째로 큰 수와 두 번째로 작은 수의 차를 구하시오.

Answer: 623

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

Question (EN): One children's book is 161 pages. If Jimin read this children's book for a week, find the average number of pages she read per day.
Question (KO): 동화책 한 권은 161쪽입니다. 지민이가 이 동화책을 일주일에 걸쳐 읽었다면 하루에 읽은 쪽 수의 평균을 구하세요.

Answer: 23

Solution (Python):
var_a = 161
var_b = 7
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): Cheulsu made a mistake in dividing a number by 18, so he divided the number by 1.8, and the quotient was 21, and the remainder was 0.2. Round the correct quotient to two decimal places.
Question (KO): 철수가 어떤 수를 18 로 나누어야 할 것을 잘못하여 1.8 로 나누어 계산했더니 몫은 21 이고, 나머지는 0.2 가 되었습니다. 바르게 계산했을 때의 몫을 반올림하여 소수 둘째 자리 까지 구하시오.

Answer: 2.11

Solution (Python):
var_a = 21
var_b = 1.8
var_c = var_a * var_b
var_d = 0.2
var_e = var_c + var_d
var_f = 18
var_g = var_e / var_f
var_h = 2
var_i = round(float(var_g)+1e-10, var_h)
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Correspondence

Question (EN): Say that the equation A5+2B=68 is correct. What number can go into A, where A is a single-digit number?
Question (KO): 등식 A5+2B=68이 성립한다고 합니다. 이 때, A에 들어갈 수 있는 숫자는 무엇인가요?

Answer: 4

Solution (Python):
var_a = 'A5+2B=68'
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): Changhyun tries to increase the length of the 48 centimeters (cm) long fishing rod by 1.33 times because it is too short. What is the length of the extended fishing rod?
Question (KO): 창현이는 길이가 48센티미터(㎝)인 낚시대의 길이가 너무 짧아서 낚시대를 1.33배 늘리려한다. 늘어난 낚시대의 길이는 얼마인가?

Answer: 63.84

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

Question (EN): A number divided by 23 minus 67 and multiplied by 2 is 102. Find the number.
Question (KO): 어떤 수를 23으로 나눈 값에서 67을 뺀 후 2를 곱한 값이 102입니다. 어떤 수를 구하시오.

Answer: 2714

Solution (Python):
var_a = 102
var_b = 2
var_c = var_a / var_b
var_d = 67
var_e = var_c + var_d
var_f = 23
var_g = var_e * var_f
print(int(var_g))
Category: Geometry

Question (EN): How many vertices are there in the pyramid, excluding those at the base?
Question (KO): 각뿔에서 밑면의 꼭지점을 제외한 꼭지점은 몇개 인가요?

Answer: 1

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

Question (EN): Find the number of three-digit natural numbers that can be formed using all 3, 6, and 0.
Question (KO): 3, 6, 0을 모두 사용하여 만들 수 있는 세 자리 자연수의 개수를 구하시오.

Answer: 4

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

Question (EN): Yuna is the 4th tallest in the class, and Yujeong is the next tallest after Yuna. How tall is Yujung?
Question (KO): 유나는 교실에서 4번째로 키가 크고, 유정이는 유나 바로 다음으로 키가 큽니다. 유정이는 몇 번째로 키가 큽니까?

Answer: 5

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

Question (EN): Find the number of diagonals in an octagon minus the number of diagonals in a heptagon.
Question (KO): 어떤 팔각형의 대각선의 개수에서 어떤 칠각형의 대각선의 개수를 뺀 값을 구하시오.

Answer: 6

Solution (Python):
var_a = 8
var_b = 8
var_c = 3
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
var_h = 7
var_i = 7
var_j = 3
var_k = var_i - var_j
var_l = var_h * var_k
var_m = 2
var_n = var_l / var_m
var_o = var_g - var_n
print(int(var_o))
Category: Comparison

Question (EN): Kiyoung's classroom has the same number of desks in each row. Kiyoung's seat is 2nd from the back, 4th from the front, and 3rd from the left. Karam is right next to Kiyoung and 2nd from the right. How many desks are there in Kiyoung's classroom?
Question (KO): 기영이의 교실에는 각 줄의 책상 수가 같게 놓여 있습니다. 기영이의 자리는 뒤에서 2번째, 앞에서 4번째, 왼쪽에서 3번째에 있습니다. 가람이는 기영의 바로 오른쪽 옆에 있고 오른쪽에서 2번째에 있습니다. 기영이의 교실에 있는 책상 수 는 모두 몇 개입니까?

Answer: 25

Solution (Python):
var_a = 2
var_b = 4
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 3
var_g = 2
var_h = var_f + var_g
var_i = var_e * var_h
print(int(var_i))
Category: Possibility

Question (EN): If the difference between two of the four digit numbers that can be made by using 0, 3, 4, and 8 once is the greatest, what is the difference?
Question (KO): 0, 3, 4, 8을 한 번 씩 사용하여 만들 수 있는 네 자리수들 중 2개의 차가 가장 큰 경우, 그 차이는 얼마인지 구하시오.

Answer: 5382

Solution (Python):
var_a = 0
var_b = 3
var_c = 4
var_d = 8
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 1
list_d=list_b.copy()
list_d.sort()
var_i = list_d[var_h-1]
var_j = var_g - var_i
print(int(var_j))