philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): You are comparing the area of a regular square and a regular triangle. A side of a square is 4 centimeters (cm). If the triangle is 4 centimeters (cm) high and the base is 6 centimeters (cm), choose the wider one.
Question (KO): 정사각형과 삼각형의 넓이를 비교하고 있습니다. 정사각형의 한 변은 4센티미터(cm)입니다. 삼각형은 높이가 4센티미터(cm), 밑변이 6cm(센티미터)일 때, 더 넓은 것을 고르시오.

Answer: square

Solution (Python):
var_a = 'square'
var_b = 'triangle'
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 = 2
var_e = var_c ** var_d
var_f = 6
var_g = 4
var_h = var_f * var_g
var_i = 2
var_j = var_h / var_i
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
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)
Category: Comparison

Question (EN): The four students, Yoongi, Jungkook, Yuna, and Yoojung, each have the numbers 7, 6, 9, and 8. Whose number is the biggest?
Question (KO): 네 명의 학생 윤기, 정국, 유나, 유정은 각각 7, 6, 9, 8만큼의 숫자를 가지고 있습니다. 누구의 숫자가 가장 큽니까?

Answer: Yuna

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

Question (EN): Hajun went to school 5 times and it took him 1 hour and 36 minutes. How many minutes does it take to go once?
Question (KO): 하준이는 학교까지 5번 갔다오는데 1시간 36분이 걸렸습니다. 한 번 갔다오는데 걸리는 시간은 몇 분인가요?

Answer: 19.2

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

Question (EN): There are 24 marbles. Of these, the red marbles are 1/4 of the total, the amount of blue marbles is 6 more than that of the red marbles, and the rest are yellow marbles. What color marbles do you have the most?
Question (KO): 24개의 구슬이 있습니다. 이 중 빨간색 구슬은 전체의 1/4이고, 파란색 구슬은 빨간색 구슬보다 6개 많고, 나머지는 노란색 구슬입니다. 어떤 색 구슬이 가장 많이 있습니까?

Answer: blue

Solution (Python):
var_a = 'red'
var_b = 'blue'
var_c = 'yellow'
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 = 24
var_e = 4
var_f = var_d / var_e
var_g = 24
var_h = 4
var_i = var_g / var_h
var_j = 6
var_k = var_i + var_j
var_l = 24
var_m = 24
var_n = 4
var_o = var_m / var_n
var_p = 6
var_q = var_o + var_p
var_r = var_l - var_q
var_s = 24
var_t = 4
var_u = var_s / var_t
var_v = var_r - var_u
list_b= []
if "/" in str(var_v):
    var_v = eval(str(var_v))
list_b.append(var_v)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_w = 1
list_c=list_b.copy()
list_c.sort()
var_x = list_c[-var_w]
var_y = list_b.index(var_x)+1
var_z = list_a[var_y-1]
print(var_z)
Category: Geometry

Question (EN): Trees were planted in a square shape in the open field. If 5 trees are planted per side, how many trees should be planted?
Question (KO): 공터에 나무를 정사각형 모양으로 심었다. 한 변에 5개의 나무를 심는다면 몇 개의 나무를 심어야한는가?

Answer: 16

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

Question (EN): Minchan is organizing the gym storage. If there are 240 baseballs, ping-pong balls, and tennis balls in total, the baseballs are divided into 35 boxes of 4 each, and the tennis balls are divided into 6 boxes of 3 each. How many ping-pong balls are there if all remaining balls are ping-pong balls?
Question (KO): 민찬이는 체육 창고를 정리하고 있습니다. 야구공, 탁구공, 테니스공이 합하여 240개가 있을 때 야구공은 4개씩 35개의 상자에 나누어 담고 테니스공은 3개씩 6상자에 나누어 담았습니다. 남은 공은 전부 탁구공일 때 탁구공의 개수는 몇 개입니까?

Answer: 82

Solution (Python):
var_a = 240
var_b = 4
var_c = 35
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 3
var_g = 6
var_h = var_f * var_g
var_i = var_e - var_h
print(int(var_i))
Category: Possibility

Question (EN): Kyungsoo went to a stationery store with a friend. If there are 3 types of pencils and 5 types of ballpoint pens in the stationery store, in how many ways can Kyungsoo choose one pencil and one ballpoint pen?
Question (KO): 경수는 친구와 문구점에 갔다. 문구점에 3종류의 연필과 5종류의 볼펜이 있을 때, 경수가 연필 한 개와 볼펜 한 개를 고를 수 있는 경우의 수는?

Answer: 15

Solution (Python):
var_a = 3
var_b = 1
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)
var_d = 5
var_e = 1
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
    var_f = var_f * (var_d-i)
for i, elem in enumerate(range(var_e)):
    var_f = var_f / (i+1)
var_g = var_c * var_f
print(int(var_g))
Category: Comparison

Question (EN): Taehee jumped rope 23 times yesterday, and Jihoon did 35 times. Today, Taehee did 14 times more than yesterday, but Jihoon did 19 times less than yesterday. Who jumped more ropes yesterday and today combined?
Question (KO): 태희는 어제 줄넘기를 23번 했고, 지훈이는 35번 했습니다. 오늘 태희는 어제보다 14번 더 많이 했지만, 지훈이는 어제보다 19번 더 적게 했습니다. 어제와 오늘을 합쳐서 줄넘기를 더 많이 넘은 사람은 누구입니까?

Answer: Taehee

Solution (Python):
var_a = 'Taehee'
var_b = 'Jihoon'
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 = 23
var_d = 23
var_e = 14
list_b= []
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)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
var_g = 35
var_h = 35
var_i = -19
list_c= []
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_c.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_c.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_c.append(var_g)
list_c.reverse()
list_c = [float(i) for i in list_c]
var_j = sum(list_c)
list_d= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_d.append(var_j)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_d.append(var_f)
list_d.reverse()
var_k = 1
list_e=list_d.copy()
list_e.sort()
var_l = list_e[-var_k]
var_m = list_d.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Comparison

Question (EN): Find the probability of getting a card with a number less than or equal to 9 when drawing one of the following number cards: 1, 3, 4, 6, 7, and 9.
Question (KO): 다음 숫자 카드 1, 3, 4, 6, 7, 9 중에서 한 장을 뽑을 때 9 이하의 수가 적힌 카드가 나올 확률을 구하시오.

Answer: 1

Solution (Python):
var_a = 1
var_b = 3
var_c = 4
var_d = 6
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 = 9
list_b = []
for i in list_a:
    if i <= var_g:
        list_b.append(i)
var_h = len(list_b)
var_i = 1
var_j = 3
var_k = 4
var_l = 6
var_m = 7
var_n = 9
list_c= []
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_c.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_c.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_c.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_c.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_c.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_c.append(var_i)
list_c.reverse()
var_o = len(list_c)
var_p = var_h / var_o
print(int(var_p))
Category: Geometry

Question (EN): You made a square by arranging 10 tickets horizontally and vertically without gaps. If the tickets on the perimeter were turned over and the ones on the inside were not turned over, how many of them were not turned over?
Question (KO): 딱지를 가로와 세로 모두 10장씩 빈틈없이 늘어놓아 정사각형을 만들었습니다. 둘레에 놓인 딱지는 뒤집어져 있었고, 안쪽에 놓인 딱지는 안 뒤집어져 있었을 때, 안 뒤집어져 있는 딱지는 모두 몇 개일까요?

Answer: 64

Solution (Python):
var_a = 10
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = var_c ** var_d
print(int(var_e))
Category: Correspondence

Question (EN): You were supposed to multiply a certain number by 5, then add 24, then divide by 7, but you accidentally add 24, divide it by 5, then multiply by 7, and you get 70. Find the correct calculated value.
Question (KO): 어떤 수에 5를 곱한 다음 24를 더한 후 7로 나누어야 할 것을 잘못하여 어떤 수에 24를 더한 다음 5로 나눈 후 7을 곱했더니 70이 되었습니다. 바르게 계산한 값을 구하시오.

Answer: 22

Solution (Python):
var_a = 70
var_b = 7
var_c = var_a / var_b
var_d = 5
var_e = var_c * var_d
var_f = 24
var_g = var_e - var_f
var_h = 5
var_i = var_g * var_h
var_j = 24
var_k = var_i + var_j
var_l = 7
var_m = var_k / var_l
print(int(var_m))
Category: Geometry

Question (EN): There is a rectangle whose long side is 1 meter (m) and its short side is 2/8 meter (m) shorter than its long side. Find the answer in meters (m) equal to the sum of the lengths of the four sides of this rectangle.
Question (KO): 긴 변의 길이가 1 미터(m)이고, 짧은 변의 길이는 긴 변의 길이보다 2/8미터(m)만큼 짧은 직사각형이 있습니다. 이 직사각형의 네 변의 길이의 합은 몇 미터(m)인지 답을 구해 보세요.

Answer: 3.5

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

Question (EN): Jimin is lighter than Namjoon and heavier than Seokjin. Seokjin is heavier than Hoseok. Which of the 4 is the lightest?
Question (KO): 지민이는 남준이보다 가볍고 석진이보다는 무겁습니다. 석진이는 호석이보다 무겁습니다. 4명 중 가장 가벼운 사람은 누구입니까?

Answer: Hoseok

Solution (Python):
var_a = 'Seokjin'
var_b = 'Hoseok'
var_c = 'Jimin'
var_d = 'Namjoon'
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 = 'Seokjin'
var_f = 'Hoseok'
var_g = '>'
var_h = 'Seokjin'
var_i = 'Jimin'
var_j = '<'
var_k = 'Namjoon'
var_l = 'Jimin'
var_m = '>'
list_b= []
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
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)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
    if cond_ in ("<", ">", "="):
        operand_right = temp_stack.pop()
        operand_left = temp_stack.pop()
        if cond_ == "=":
            cond_ = "=="
        conditions.append(f"{operand_left} {cond_} {operand_right}")
    else:
        if not cond_.isdigit():
            cond_ = "{" + cond_ + "}"
        temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
    item_name_index_dict = dict(zip(items_name_list, perm))
    formatted_conditions = \
        [condition.format_map(item_name_index_dict) for condition in conditions]
    if all(map(eval, formatted_conditions)):
        break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_n = len(list_c)
var_o = list_c[var_n-1]
print(var_o)
Category: Geometry

Question (EN): There is an octahedron. Find the number of faces of this octahedron.
Question (KO): 어떤 팔면체가 있습니다. 이 팔면체의 면의 개수를 구하시오.

Answer: 8

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

Question (EN): You are going to use 3 out of 10 wooden blocks of different lengths. How many ways can you choose 3 blocks out of 10?
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: Geometry

Question (EN): If the perimeter of a rectangular picture frame is 30 centimeters (cm) and the width is 10 centimeters (cm), how many centimeters (cm) is the length of the picture frame?
Question (KO): 직사각형 모양의 액자의 둘레가 30센티미터(㎝)이고, 가로의 길이가 10센티미터(㎝)라면, 세로의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 5

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

Question (EN): When the teacher writes the numbers 10 through 99 on the board, how many times does the number 8 appear?
Question (KO): 선생님이 10부터 99까지 수를 칠판에 적을 때, 숫자 8은 모두 몇 번 쓰는지 구하시오.

Answer: 19

Solution (Python):
var_a = 10
var_b = 99
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 = 8
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: Comparison

Question (EN): Hanbyeol and Seulgi did a running exercise. Hanbyeol ran 10.2 kilometers (km) as much as 1/100, and Seulgi ran 100 meters (m). Who ran more?
Question (KO): 한별과 슬기가 달리기 운동을 하였다. 한별은 10.2킬로미터(㎞)를 100분의 1만큼, 슬기는 100미터(m)를 달렸다. 누가 더 많이 달렸습니까?

Answer: Hanbyeol

Solution (Python):
var_a = 'Hanbyeol'
var_b = 'Seulgi'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 10.2
var_d = 1000
var_e = var_c * var_d
var_f = 100
var_g = var_e / var_f
var_h = 100
list_b= []
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)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Arithmetic calculation

Question (EN): Half of the 30 students are girls, and 7 of them are not elementary school students. Find out how many female students are in elementary school.
Question (KO): 30명의 학생 중 절반이 여학생이고 그 중 7명이 초등학생이 아니다. 초등학생인 여학생은 몇 명이 있는지 찾으시오.

Answer: 8

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

Question (EN): Namjoon walks 1.2 kilometers (km) from home to school. Today, Namjoon walked 0.3 kilometers (km), went back home, got things ready, and went to school. How many more kilometers (km) did Namjoon walk than usual today? Find the answer including decimal points.
Question (KO): 남준이는 집에서 학교까지 1.2킬로미터(㎞)를 걸어 다닙니다. 오늘 남준이는 0.3킬로미터(㎞)를 걸어간 후 다시 집으로 돌아가 준비물을 챙긴 후에 학교에 갔습니다. 남준이는 오늘 평소보다 몇 킬로미터(㎞)를 더 많이 걸었는지 소수점을 포함하여 답을 구하시오.

Answer: 0.6

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

Question (EN): The length of the red string is 8 metres (m). The length of the white string is 5 times the length of the red string. The white string is 8 times as long as the blue string. How many metres (m) is the blue string?
Question (KO): 빨간색 끈의 길이는 8미터(m)입니다. 하얀색 끈의 길이는 빨간색 끈의 5배입니다. 하얀색 끈의 길이는 파란색 끈의 8배입니다. 파란색 끈의 길이는 몇 미터(m)입니까?

Answer: 5

Solution (Python):
var_a = 8
var_b = 5
var_c = var_a * var_b
var_d = 8
var_e = var_c / var_d
print(int(var_e))
Category: Possibility

Question (EN): What is the unused card if two of the number cards 6, 9 and 2 are used all at once to make the smallest two-digit number?
Question (KO): 숫자 카드 6, 9, 2 중 2장을 한 번씩 모두 사용하여 가장 작은 두 자리 수를 만들 때, 사용하지 않는 카드의 숫자는 무엇입니까?

Answer: 9

Solution (Python):
var_a = 6
var_b = 9
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
list_d = []
var_f = int(var_f)
while var_f//10 > 0:
    list_d.append(var_f%10)
    var_f = var_f//10
list_d.append(var_f%10)
list_d = list_d[::-1]
list_e = list(set(list_a) - set(list_d))
var_g = 1
var_h = list_e[var_g-1]
print(int(var_h))
Category: Arithmetic calculation

Question (EN): What is the number obtained by subtracting 35 times 4 and 6 times 3 from 240?
Question (KO): 240에서 4를 35번 빼고, 3을 6번 빼면 나오는 수는 얼마입니까?

Answer: 82

Solution (Python):
var_a = 240
var_b = 4
var_c = 35
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 3
var_g = 6
var_h = var_f * var_g
var_i = var_e - var_h
print(int(var_i))
Category: Correspondence

Question (EN): Subtracting from a two-digit natural number by exchanging its tens and ones digits is 36, and the sum of these two numbers is 68. Find the first two-digit number.
Question (KO): 어떤 두 자리 자연수에서 이 수의 십의 자리의 숫자와 일의 자리의 숫자를 서로 바꾼 수를 빼면 36이고, 이들 두 수의 합은 68이다. 처음의 두 자리 자연수를 구하시오.

Answer: 16

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

Question (EN): (a) is larger than (b) and smaller than (c). (e) is smaller than (d). (b) is greater than (d). Which number is the smallest among (a), (b), (c), (d), and (e)?
Question (KO): (가)는 (나)보다 크며 (다)보다 작다. (마)는 (라)보다 작다. (나)는 (라)보다 크다. (가), (나), (다), (라), (마) 중 가장 작은 수는 무엇인가?

Answer: (e)

Solution (Python):
var_a = '(a)'
var_b = '(b)'
var_c = '(c)'
var_d = '(d)'
var_e = '(e)'
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 = '(a)'
var_g = '(b)'
var_h = '>'
var_i = '(a)'
var_j = '(c)'
var_k = '<'
var_l = '(e)'
var_m = '(d)'
var_n = '<'
var_o = '(b)'
var_p = '(d)'
var_q = '>'
list_b= []
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
    var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
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()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
    if cond_ in ("<", ">", "="):
        operand_right = temp_stack.pop()
        operand_left = temp_stack.pop()
        if cond_ == "=":
            cond_ = "=="
        conditions.append(f"{operand_left} {cond_} {operand_right}")
    else:
        if not cond_.isdigit():
            cond_ = "{" + cond_ + "}"
        temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
    item_name_index_dict = dict(zip(items_name_list, perm))
    formatted_conditions = \
        [condition.format_map(item_name_index_dict) for condition in conditions]
    if all(map(eval, formatted_conditions)):
        break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_r = len(list_c)
var_s = list_c[var_r-1]
print(var_s)
Category: Correspondence

Question (EN): I am a three-digit number formed by using the digits 1 to 9 once each. 1 is in the tens place and 8 is in the ones place. I'm greater than 358 and less than 684. What number am I?
Question (KO): 나는 1부터 9까지의 수를 한번 씩 사용하여 만든 세 자리 수입니다. 나는 십의 자리 숫자는 1, 일의 자리 숫자는 8을 나타냅니다. 나는 358보다 크고 684보다 작습니다. 나는 어떤 수 입니까?

Answer: 418

Solution (Python):
var_a = 1
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
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 = 10
var_f = 1
list_c = [] 
var_e = int(var_e)
var_f = int(var_f)
for i in list_b:
    i = int(i)
    if (i//var_e)%10 == var_f:
        list_c.append(i)
var_g = 1
var_h = 8
list_d = [] 
var_g = int(var_g)
var_h = int(var_h)
for i in list_c:
    i = int(i)
    if (i//var_g)%10 == var_h:
        list_d.append(i)
var_i = 358
list_e = []
for i in list_d:
    if i > var_i:
        list_e.append(i)
var_j = 684
list_f = []
for i in list_e:
    if i < var_j:
        list_f.append(i)
var_k = 1
var_l = list_f[var_k-1]
print(int(var_l))
Category: Geometry

Question (EN): Find the difference between the number of verticles of a hexagonal prism and the number of vertices of a pentagonal prism.
Question (KO): 육각기둥의 꼭지점 개수와 오각기둥의 꼭지점 개수의 차를 구하시오.

Answer: 2

Solution (Python):
var_a = 6
var_b = 2
var_c = var_a * var_b
var_d = 5
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): My mother wants to buy 4 bottles of honey weighing 3kg (kg) and distribute 3/4 kg (kg) to each neighbor. With how many people can she share?
Question (KO): 어머니께서 3킬로그램(㎏)짜리 꿀을 4통 사서 이웃 사람들에게 3/4킬로그램(㎏)씩 나누어 주려고 합니다. 몇 명에게 나누어 줄 수 있나요?

Answer: 16

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