philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): There is a three-digit number whose number in the hundreds place is 7 and in the ones place 9. If it becomes 800 when this number is rounded up from the tens place, how many numbers can fit in the tens place?
Question (KO): 백의 자리 수가 7, 일의 자리 수가 9인 세 자리 수가 있습니다. 이 수를 십의 자리에서 올림하면 800이 된다고 할 때, 십의 자리에 들어갈 수 있는 숫자는 모두 몇 개입니까?

Answer: 10

Solution (Python):
var_a = 7
var_b = 'A'
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=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
ans_dict = dict()
var_d = str(var_d)
list_b = []
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_d):
    if v in variable_candi:
        ans_dict[v] = 0
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_d
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    if len(var_d) == len(str(int(temp))):
        new_elem = int(temp)
        list_b.append(new_elem)
var_e = 700
list_c = []
for i in list_b:
    if i >= var_e:
        list_c.append(i)
var_f = len(list_c)
print(int(var_f))
Category: Comparison

Question (EN): Eunji is jumping a rope in the 10th row from the left, the 8th row from the right, the 3rd row from the front, and the 12th row from the back. If the number of students standing in each row is the same, how many students are jumping ropes?
Question (KO): 은지가 왼쪽에서 10번째 열, 오른쪽에서 8번째 열, 앞에서 3번째 줄, 뒤에서 12번째 줄에 서서 줄넘기를 하고 있습니다. 각 줄마다 서 있는 학생의 수가 같다고 할 때, 줄넘기를 하고 있는 학생은 모두 몇 명입니까?

Answer: 238

Solution (Python):
var_a = 10
var_b = 8
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 3
var_g = 12
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
print(int(var_k))
Category: Comparison

Question (EN): Yoongi collected 7 points, Jungkook 6 points, Yuna 9 points, Yoojung 8 points, and Taehyung 10 points. Who would be the one with the 2nd smallest number?
Question (KO): 윤기는 7, 정국은 6, 유나는 9, 유정은 8, 태형은 10만큼 모았습니다. 2번째로 작은 숫자를 가진 사람은 누구입니까?

Answer: Yoongi

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 = 2
list_c=list_b.copy()
list_c.sort()
var_l = list_c[var_k-1]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Possibility

Question (EN): What is the largest number among three-digit numbers that used each of 8, 0, and 7 once?
Question (KO): 세 자리수 중 8, 0, 7이 한 번씩 사용된 수는 중 가장 큰 수는 무엇입니까?

Answer: 870

Solution (Python):
var_a = 0
var_b = 8
var_c = 7
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f))
Category: Possibility

Question (EN): The same color stones cannot be distinguished. How many ways can you arrange 2 white and 1 black stones differently?
Question (KO): 같은 색의 바둑돌은 구별이 되지 않습니다. 흰색 바둑돌 2개와 검은색 바둑돌 1개를 배열할때 서로 다르게 배열하는 방법은 모두 몇 가지입니까?

Answer: 3

Solution (Python):
var_a = 1
var_b = 2
var_c = var_a + var_b
var_d = 1
var_e = 2
var_f = var_d + var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_c-i)
var_h = 2
var_i = 2
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
    var_j = var_j * (var_h-i)
var_k = var_g / var_j
print(int(var_k))
Category: Comparison

Question (EN): What is the smallest number among the four numbers 5, 8, 1, and 2?
Question (KO): 4개의 숫자 5, 8, 1, 2 중 가장 작은 숫자는 무엇입니까?

Answer: 1

Solution (Python):
var_a = 5
var_b = 8
var_c = 1
var_d = 2
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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[var_e-1]
print(int(var_f))
Category: Geometry

Question (EN): There are two circles A and B of different sizes. The diameter of circle A is 80 centimeters (cm). The radius of circle A is 4 times the radius of circle B. What is the radius of circle B?
Question (KO): 크기가 다른 두 원 A, B가 있습니다. A 원의 지름은 80센티미터(㎝)입니다. A원의 반지름은 B원의 반지름의 4배입니다. B원의 반지름은 무엇입니까?

Answer: 10

Solution (Python):
var_a = 80
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): There are 5 boxes of 25 candies each. If 13 students try to divide the candy into 8 pieces, how many candies are left after dividing?
Question (KO): 사탕이 25개씩 들어있는 상자가 5개 있습니다. 학생 13명이 사탕을 8개씩 나누어 가지려고 할 때, 나누고 남은 사탕의 개수는 몇 개입니까?

Answer: 21

Solution (Python):
var_a = 25
var_b = 5
var_c = var_a * var_b
var_d = 13
var_e = 8
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g))
Category: Geometry

Question (EN): If the radius of the wheel is 7 centimeters (cm), how many centimeters (cm) is the diameter of the wheel?
Question (KO): 바퀴의 반지름의 길이가 7센티미터(㎝)일 때, 바퀴의 지름의 길이는 몇 센티미터(㎝)인가요?

Answer: 14

Solution (Python):
var_a = 7
var_b = 2
var_c = var_a * var_b
print(int(var_c))
Category: Geometry

Question (EN): The cube-shaped dice have the numbers 1 through 6 written on them. If the numbers written on the opposite side add up to 7, what is the number written on the side opposite to 3?
Question (KO): 정육면체 모양의 주사위에는 1부터 6까지의 수가 적혀 있습니다. 마주 보는 면에 적혀 있는 숫자끼리 더하면 7이 된다고 할 때, 3과 마주보는 면에 적혀있는 수는 무엇일까요?

Answer: 4

Solution (Python):
var_a = 7
var_b = 3
var_c = var_a - var_b
print(int(var_c))
Category: Geometry

Question (EN): Find the number of sides of a polygon of which one diagonal can be drawn from one vertex.
Question (KO): 한 꼭짓점에서 1개의 대각선을 그을 수 있는 다각형의 변의 개수를 구하시오.

Answer: 4

Solution (Python):
var_a = 1
var_b = 3
var_c = var_a + var_b
print(int(var_c))
Category: Correspondence

Question (EN): A and B are different numbers. When the three-digit number 7AB can be divided by 3 without any remainder, how many numbers can satisfy to be 7AB?
Question (KO): A, B는 서로 다른 수입니다. 세 자리 수 7AB는 3으로 나누어떨어질때 7AB가 될 수 있는 수는 모두 몇 개입니까?

Answer: 33

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 = 3
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: Arithmetic calculation

Question (EN): There are 57 roses and 82 tulips in the flower bed. There are 13 more tulips than the sum of roses and lilies. How many lilies are in the flower bed?
Question (KO): 화단에 장미 57송이와 튤립 82송이가 있습니다. 튤립은 장미와 백합의 수를 합한 것보다 13송이 더 많이 있습니다. 화단에 있는 백합은 몇 송이입니까?

Answer: 12

Solution (Python):
var_a = 82
var_b = 13
var_c = var_a - var_b
var_d = 57
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): We are going to divide the road into 16 sections and install flags on the road except for both ends. It takes 9 seconds to plant one flag. We take a rest for 5 seconds after placing another flag. Find the time it takes to place all the flags.
Question (KO): 도로를 16구간으로 나누어 양 끝을 제외한 도로에 깃발을 설치하려고 합니다. 깃발을 하나 설치하는 데에 걸리는 시간은 9초 입니다. 또 하나의 깃발을 설치한 후에는 5초동안 휴식을 취합니다. 깃발을 모두 설치하는 데 걸리는 시간을 구하세요.

Answer: 210

Solution (Python):
var_a = 16
var_b = 1
var_c = var_a - var_b
var_d = 9
var_e = 5
var_f = var_d + var_e
var_g = var_c * var_f
print(int(var_g))
Category: Correspondence

Question (EN): The number is in between 2 and 5 and a single digit number less than 4. Find what the number is.
Question (KO): 어떤 수는 2와 5 사이에 있고, 4보다 작은 한 자리 수입니다. 어떤 수를 구하시오.

Answer: 3

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

Question (EN): 3A3B rounded to the hundreds place is 3400. What is A?
Question (KO): 3A3B를 반올림하여 백의 자리까지 나타내면 3400입니다. A는 무엇입니까?

Answer: 4

Solution (Python):
var_a = '3A3B'
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 = 3400
var_c = 50
var_d = var_b - var_c
list_b = []
for i in list_a:
    if i >= var_d:
        list_b.append(i)
var_e = 3400
var_f = 50
var_g = var_e + var_f
list_c = []
for i in list_b:
    if i < var_g:
        list_c.append(i)
var_h = '3A3B'
var_i = 'A'
var_h = str(var_h)
var_i = str(var_i)
unk_idx = var_h.index(var_i)
var_j = 0
for elem in list_c:
    elem = str(elem)
    var_j = int(elem[unk_idx])
print(int(var_j))
Category: Comparison

Question (EN): Find the difference between the largest number and the smallest number among 0.12, 0.23, and 0.22.
Question (KO): 0.12, 0.23, 0.22 중 가장 큰 수와 가장 작은 수의 차를 구하시오

Answer: 0.11

Solution (Python):
var_a = 0.12
var_b = 0.23
var_c = 0.22
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]
var_f = 1
list_c=list_a.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = var_e - var_g
print('{:.2f}'.format(round(var_h+1e-10,2)))
Category: Comparison

Question (EN): How many out of 1/4, 0.7, 2/3, 0.4, 2/5 are greater than 0.5?
Question (KO): 1/4, 0.7, 2/3, 0.4, 2/5 중 0.5보다 큰 수는 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 0.25
var_b = 0.7
var_c = 0.6666666666666666
var_d = 0.4
var_e = 0.4
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 = 0.5
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): Namjoon has 35 (a) books. Also, he has 16 fewer (b) books than (a) books, and 35 books more (c) books than (b) books. How many books does Namjoon have in all?
Question (KO): 남준이는 (가) 책을 35권 가지고 있습니다. 또 (나) 책은 (가) 책보다 16권 더 적게 가지고 있고, (다) 책은 (나) 책보다 35권 더 많습니다. 남준이가 가진 책은 모두 몇 권입니까?

Answer: 108

Solution (Python):
var_a = 35
var_b = 35
var_c = 16
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 35
var_g = 16
var_h = var_f - var_g
var_i = 35
var_j = var_h + var_i
var_k = var_e + var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): At one bus stop, buses 1 through 54 stop. Find how many times the number 5 occurs in bus numbers that stop at this stop.
Question (KO): 어느 정류장에는 1번 버스부터 54번 버스까지 정거를 합니다. 이 정류장에 정거하는 모든 버스 번호들에 대하여 숫자 5가 몇 번 나오는지 구하시오.

Answer: 10

Solution (Python):
var_a = 1
var_b = 54
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
list_b = []
var_d = int(var_d)
while var_d//10 > 0:
    list_b.append(var_d%10)
    var_d = var_d//10
list_b.append(var_d%10)
list_b = list_b[::-1]
var_e = 5
var_f = 0
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i == var_e:
        var_f = var_f + 1
print(int(var_f))
Category: Arithmetic calculation

Question (EN): If there are 8 2-won bills and 2 1-won bills, how much is the total?
Question (KO): 2원짜리 8개, 1원짜리 2개가 있다면 총 얼마있나요?

Answer: 18

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

Question (EN): In PE class, the students lined up in order of shortest height: Taehyung, Minji, Jiyoung, Jinhyung, and Jingook. Who is the 3rd shortest person?
Question (KO): 체육시간에 학생들이 키가 작은 순서대로 태형, 민지, 지영, 진형, 진국이가 나란히 줄지어 섰습니다. 3번째로 키가 작은 사람은 누구입니까?

Answer: Jiyoung

Solution (Python):
var_a = 'Taehyung'
var_b = 'Minji'
var_c = 'Jiyoung'
var_d = 'Jinhyung'
var_e = 'Jingook'
list_a= []
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 3
var_g = list_a[var_f-1]
print(var_g)
Category: Geometry

Question (EN): How many faces does a prism have if the sum of its edges and vertices is 30?
Question (KO): 모서리와 꼭짓점의 수의 합이 30인 각기둥은 총 몇 개의 면으로 이루어져 있는가?

Answer: 8

Solution (Python):
var_a = 30
var_b = 2
var_c = 3
var_d = var_b + var_c
var_e = var_a / var_d
var_f = 2
var_g = var_e + var_f
print(int(var_g))
Category: Comparison

Question (EN): It is 3.97 kilometers (km) from Kunwoo's house to the school, and it is 4028 meters (m) from Seohyeon's house to the school. Find a friend whose distance from home to school is longer.
Question (KO): 건우네 집에서 학교까지는 3.97킬로미터(㎞)이고, 서현이네 집에서 학교까지는 4028미터(m)입니다. 집에서 학교까지의 거리가 더 먼 친구는 누구인지 구하시오.

Answer: Seohyeon

Solution (Python):
var_a = 'Kunwoo'
var_b = 'Seohyeon'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 3.97
var_d = 1000
var_e = var_c * var_d
var_f = 4028
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: Comparison

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

Answer: Jungkook

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

Question (EN): There are three different numbers A, B, and C. Find A from the three-digit addition formula ABC+ABC+ABC=888.
Question (KO): 서로 다른 세 수 A, B C가 있습니다. 세 자리 수끼리의 덧셈식 ABC+ABC+ABC=888에서 A를 구하시오.

Answer: 2

Solution (Python):
var_a = 'ABC+ABC+ABC=888'
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: Possibility

Question (EN): What is the number of possible two-digit numbers that you can make using two different numbers from 1, 2, 3, 4, 5, and 6?
Question (KO): 1, 2, 3, 4, 5, 6 중에서 서로 다른 2개의 숫자를 사용하여 만들 수 있는 두 자리 수는 모두 몇 개입니까?

Answer: 30

Solution (Python):
var_a = 1
var_b = 2
var_c = 3
var_d = 4
var_e = 5
var_f = 6
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: Comparison

Question (EN): Seokjin and Taehyung have 78 and 81 candies, respectively. Find the one with the most candy.
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: Comparison

Question (EN): Eunji has 21 loaves of bread and Minyoung has 13 loaves. Who has more bread?
Question (KO): 은지는 빵을 21개, 민영이는 13개를 가지고 있습니다. 누가 빵을 더 많이 가지고 있습니까?

Answer: Eunji

Solution (Python):
var_a = 'Minyoung'
var_b = 'Eunji'
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 = 13
var_d = 21
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: Correspondence

Question (EN): Donghyeon's ranch has bulls and black cows. Bulls and black cows both eat 3 barrels of feed. To feed all these cows, Donghyun bought 8 bundles of 15 and 60 individual feeds. If the feeds are just the right amount, and there are 52 bulls, how many black cows are there?
Question (KO): 동현이네 목장에는 황소와 검은소가 있다. 황소와 검은소는 모두 3통의 사료를 먹는다. 이 소들을 모두 먹이기 위해 동현이는 15통 묶음 8개와 60통의 낱개 사료를 사왔다. 사료가 부족하지도 많이도 않고 딱 맞는 양이고 황소가 52마리라고 할 때, 검은 소는 몇 마리인지 구하시오.

Answer: 8

Solution (Python):
var_a = 15
var_b = 8
var_c = var_a * var_b
var_d = 60
var_e = var_c + var_d
var_f = 3
var_g = var_e / var_f
var_h = 52
var_i = var_g - var_h
print(int(var_i))
Category: Geometry

Question (EN): There is a cube whose perimeter of a side are 32 centimeters (cm). What is the volume of this cube in cubic centimeters?
Question (KO): 한 면의 둘레가 32센티미터(㎝)인 정육면체가 있습니다. 이 정육면체의 부피는 몇 세제곱센티미터입니까?

Answer: 512

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

Question (EN): B is greater than 3 and less than 150, and it is a divisor or multiple of 36. If you were to list all the possible numbers for B, starting with the smallest number, what would be the 5th number from the right?
Question (KO): B는 3보다 크고 150보다 작다. B는 36과 약수 혹은 배수 관계이다. B가 될 수 있는 수를 차례로 작은수부터 적는다면 오른쪽에서 5번째 수는 무엇인가?

Answer: 18

Solution (Python):
var_a = 36
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 = 36
var_c = 150
var_d = 1
var_e = var_c - var_d
var_f = 36
list_b = [i for i in range(var_b, var_e + 1, var_f)]
list_c = list(set(list_a) | set(list_b))
var_g = 5
list_d=list_c.copy()
list_d.sort()
var_h = list_d[-var_g]
print(int(var_h))
Category: Geometry

Question (EN): The volume of the cube-shaped box is 729 cubic centimeters (cm). At this time, how many centimeters (cm3) is the length of one corner of the box?
Question (KO): 정육면체 모양의 상자의 부피가 729세제곱센티미터(㎤)입니다. 이 때, 이 상자의 한 모서리의 길이는 몇 센티미터(㎝)입니까?

Answer: 9

Solution (Python):
var_a = 729
var_b = 0.3333333333333333
var_c = var_a ** var_b
print(int(eval('{:.2f}'.format(round(var_c+1e-10,2)))))