philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): I am going to attach paintings with a width of 30 centimeters (cm) in a row on the wall of an exhibition hall with a width of 3 meters (m) and 20 centimeters (cm). How many centimeters (cm) should be the distance between the end of the wall and the artwork and between the artworks so that all six pieces are put together at the same distance?
Question (KO): 가로가 3미터(m) 20센티미터(㎝)인 전시장 벽에 가로가 30센티미터(㎝)인 그림 작품을 일렬로 붙이려고 합니다. 벽의 끝과 작품 사이, 작품과 작품 사이의 간격을 모두 같게 하여 6개를 붙이려면 간격은 몇 센티미터(㎝)로 하여야 합니까?

Answer: 20

Solution (Python):
var_a = 3
var_b = 100
var_c = var_a * var_b
var_d = 20
var_e = var_c + var_d
var_f = 30
var_g = 6
var_h = var_f * var_g
var_i = var_e - var_h
var_j = 6
var_k = 1
var_l = var_j + var_k
var_m = var_i / var_l
print(int(var_m))
Category: Correspondence

Question (EN): It is said that the total amount of sugar in 12 cups of coffee is 84.6 grams (g). If 12 cups contain the same amount of sugar, find how many grams (g) of sugar are in a cup of coffee.
Question (KO): 12잔의 커피에 들어간 설탕의 양이 총 84.6그램(g)이라고 한다. 12잔에 동일한 양의 설탕이 들어있다면 커피 한잔에 몇 그램(g)의 설탕이 들어있는지 구하시오.

Answer: 7.05

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

Question (EN): When you divide 49 by a number, the remainder is 4, and when you divide the number by 66, the remainder is 6. What number is this?
Question (KO): 어떤 수로 49를 나누면 나머지가 4이고, 66을 나누면 나머지가 6입니다. 이때 어떤 수는 어느 것입니까?

Answer: 15

Solution (Python):
var_a = 49
var_b = 4
var_c = var_a - var_b
var_d = 66
var_e = 6
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
print(int(var_g))
Category: Geometry

Question (EN): All 27 small cubes with an edge length of 1 centimeter (cm) were used to create one large cube with an edge length of 3 centimeters (cm). I painted all sides of the large cube and then separated it into smaller cubes. How many cubes have three painted faces?
Question (KO): 한 모서리의 길이가 1센티미터(㎝)인 작은 정육면체 27개를 모두 사용해서 한 모서리의 길이가 3센티미터(㎝)인 큰 정육면체 1개를 만들었습니다. 큰 정육면체의 모든 면에 페인트를 칠하고 다시 작은 정육면체로 분리했습니다. 이 때 3개의 면에 페인트가 칠해져 있는 정육면체는 몇 개인가요?

Answer: 8

Solution (Python):
var_a = 8
print(int(var_a))
Category: Arithmetic calculation

Question (EN): Juhye used 1/4 of her money and 2/3 of the money she had left to buy a notebook and lunch, leaving 2,500 won at the end. How much money did Juhye have at first?
Question (KO): 주혜가 가지고 있던 돈의 1/4를 공책을 사는 데 쓰고, 남은 돈의 2/3은 점심을 사 먹었더니 2500원이 남았습니다. 주혜가 처음 가지고 있던 돈은 얼마입니까?

Answer: 10000

Solution (Python):
var_a = 2500
var_b = 1
var_c = 0.25
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 1
var_g = 0.6666666666666666
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): How many trees are needed if you plant trees from start to finish on one side of a 100-meter (m) road at 10-meter (m) intervals?
Question (KO): 10미터(m)간격으로 100미터(m)도로 한쪽에 처음부터 끝까지 나무를 심으려고 할때 몇 그루의 나무가 필요합니까?

Answer: 11

Solution (Python):
var_a = 100
var_b = 10
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): How many numbers greater than 50 and less than 100 are divisible by 8?
Question (KO): 50보다 크고 100보다 작은 수 중에서 8로 나누어 떨어지는 수는 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 50
var_b = 1
var_c = var_a + var_b
var_d = 100
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 = 8
list_b = []
var_h = int(var_h)
for i in list_a:
    i = int(i)
    if i % var_h == 0:
        list_b.append(i)
var_i = len(list_b)
print(int(var_i))
Category: Comparison

Question (EN): Taehyung, Minju, Sangmin, Yoonjung, and Yoojeong crossed the finish line in that order. Who went in first?
Question (KO): 태형, 민주, 상민, 윤정, 유정이 교대로 결승선을 넘었다. 누가 먼저 들어갔나?

Answer: Taehyung

Solution (Python):
var_a = 'Taehyung'
var_b = 'Minju'
var_c = 'Sangmin'
var_d = 'Yoonjung'
var_e = 'Yoojeong'
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
var_g = list_a[var_f-1]
print(var_g)
Category: Arithmetic calculation

Question (EN): How many three-digit prime numbers are there that are less than 3.01 and greater than 30.06 divided by 10?
Question (KO): 3.01보다 작고 30.06을 10으로 나눈 값보다 큰 소수 세 자리 수는 모두 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 0
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
list_b = []
for i in list_a:
    if i > var_d:
        list_b.append(i)
var_e = len(list_b)
print(int(var_e))
Category: Arithmetic calculation

Question (EN): You can use the badminton court in the gym for 30 minutes for 4,000 won. How much would it cost for a person to rent 4 coats and use them for 3 hours with 6 friends?
Question (KO): 체육관의 배드민턴 코트는 4000원에 30분을 사용할 수 있습니다. 친구 6명이서 코트 4개를 빌리고 3시간동안 사용하려면 한 사람 당 얼마를 내야할까요?

Answer: 16000

Solution (Python):
var_a = 3
var_b = 60
var_c = var_a * var_b
var_d = 30
var_e = var_c / var_d
var_f = 4000
var_g = var_e * var_f
var_h = 4
var_i = var_g * var_h
var_j = 6
var_k = var_i / var_j
print(int(var_k))
Category: Geometry

Question (EN): There is a polygonal pyramid surrounded by one regular hexagon with sides of 8 centimeters (cm) and six isosceles triangles with two sides of 13 centimeters (cm) and one side of 8 centimeters (cm). What is the sum of all the edges of this pyramid in centimeters (cm)?
Question (KO): 한 변이 8센티미터(㎝)인 정육각형 하나와, 두 변이 13센티미터(㎝)이고 한 변이 8센티미터(㎝)인 이등변 삼각형 6개로 둘러싸인 다각뿔이 있습니다. 이 다각뿔의 모든 모서리의 합은 몇 센티미터(㎝)입니까?

Answer: 126

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

Question (EN): If the radius of a round pancake is 7 centimeters (cm), how many centimeters (cm) is the diameter of the pancake?
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): You mistakingly divided a number by 5 that should have been multiplied and you got 30. Choose the one that is calculated correctly.
Question (KO): 어떤 수에 5를 곱해야 할 것을 실수로 나누었더니 30이 되었다. 바르게 계산한 것을 고르시오.

Answer: 750

Solution (Python):
var_a = 30
var_b = 5
var_c = 5
var_d = var_b * var_c
var_e = var_a * var_d
print(int(var_e))
Category: Geometry

Question (EN): There is a prism made up of six squares. If the sum of the lengths of all the edges of this prism is 72 centimeters (cm), how many centimeters (cm) is the length of one edge?
Question (KO): 정사각형 여섯 개로 이루어진 각기둥이 있습니다. 이 각기둥의 모든 모서리 길이의 합이 72센티미터(㎝)라면 한 모서리의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 6

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

Question (EN): Seulgi and Hyeonjeong went to the stationery store and bought pencils. If Seulgi bought 9 pencils and Hyunjeong bought 12 pencils, who bought more pencils among Seulgi and Hyunjeong?
Question (KO): 슬기와 현정이는 문방구에 가서 연필을 샀습니다. 슬기는 9자루, 현정이는 12자루를 샀다면, 슬기와 현정이 중 연필을 더 많이 산 사람은 누구입니까?

Answer: Hyeonjeong

Solution (Python):
var_a = 'Seulgi'
var_b = 'Hyeonjeong'
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 = 9
var_d = 12
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): Say that the equation 6A5+10B=748 is true. What number should go in A?
Question (KO): 등식 6A5+10B=748이 성립한다고 합니다. A에 들어가야 하는 숫자는 무엇인가요?

Answer: 4

Solution (Python):
var_a = '6A5+10B=748'
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): I'm going to choose two people from Jungkook, Jimin, Yoongi, and Yuna, and line them up. How many cases are there in all?
Question (KO): 정국, 지민, 윤기, 유나 중에서 두 사람을 선택해서 줄 세우려고 합니다. 경우의 수는 모두 몇 가지입니까?

Answer: 12

Solution (Python):
var_a = 'Jungkook'
var_b = 'Jimin'
var_c = 'Yoongi'
var_d = 'Yuna'
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 = len(list_a)
var_f = 2
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_e-i)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Cucumbers are sold for 300 won per 100 grams (g). Determine how many kilograms (kg) of cucumbers you can buy with 7,500 won, including the decimal point.
Question (KO): 오이를 100그램(g)에 300원씩 팔고 있습니다. 7,500원으로 오이를 몇 킬로그램(㎏) 살 수 있는지 소수점을 포함하여 답을 구하시오.

Answer: 2.5

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

Question (EN): Seokgi had 82 sheets of colored paper. If the number of colored paper left is 6 less than the number of pieces of colored paper used for making a piece of art, find how many pieces of colored paper were used.
Question (KO): 석기에게는 색종이가 82장이 있었습니다. 이 중 몇 장을 사용하여 미술 작품을 만들었을 때 남은 색종이 수가 사용한 색종이 수보다 6장 적다면 사용한 색종이는 몇 장인지 구하시오.

Answer: 44

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

Question (EN): To get to her grandmother's house, Wisdom walked one-fifth of the distance and took a bus the rest of the way. How many times the distance travelled by bus is the total distance?
Question (KO): 지혜가 할머니 댁에 가는 데 전체 거리의 1/5은 걷고, 나머지 거리는 버스를 타고 갔습니다. 버스를 타고 간 거리는 전체 거리의 몇 배입니까?

Answer: 0.8

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

Question (EN): Box B is larger than box C but smaller than box E. Among boxes A and D boxes, A is smaller, and between boxes A and E, A is larger. Which box is the largest?
Question (KO): (나) 상자가 (다) 보다 크지만 (마) 상자보다는 작습니다. (가) 상자와 (라) 상자 중에는 (가) 상자가 작고, (가) 상자와 (마) 상자중에는 (가) 상자가 큽니다. 어떤 상자가 가장 큽니까?

Answer: D

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 = 'B'
var_g = 'C'
var_h = '>'
var_i = 'B'
var_j = 'E'
var_k = '<'
var_l = 'A'
var_m = 'D'
var_n = '<'
var_o = 'A'
var_p = 'E'
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 = 1
var_s = list_c[var_r-1]
print(var_s)
Category: Comparison

Question (EN): A box of apples weighs 3/5 kilograms (kg) and a box of tangerines weighs 0.49 kilograms (kg). Which box is heavier?
Question (KO): 사과 한 상자의 무게는 3/5킬로그램(㎏)이고 귤 한 상자의 무게는 0.49킬로그램(㎏)입니다. 어떤 상자가 더 무거울까요?

Answer: apples

Solution (Python):
var_a = 'apples'
var_b = 'tangerines'
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
var_d = 5
var_e = var_c / var_d
var_f = 0.49
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: Geometry

Question (EN): You plan to bake several of the largest cookies by cutting out a rectangle dough measuring 24 centimeters (cm) long and 18 centimeters (cm) wide. How many cookies can you make in all without any leftover?
Question (KO): 가로가 24센티미터(㎝), 세로가 18센티미터(㎝)인 직사각형 모양의 반죽을 남는 부분 없이 잘라 같은 크기의 가장 큰 정사각형 모양의 쿠키를 여러 개 만들려고 합니다. 쿠키는 모두 몇 개 만들 수 있습니까?

Answer: 12

Solution (Python):
var_a = 24
var_b = 24
var_c = 18
var_d = math.gcd(int(var_c), int(var_b))
var_e = var_a // var_d
var_f = 18
var_g = 24
var_h = 18
var_i = math.gcd(int(var_h), int(var_g))
var_j = var_f // var_i
var_k = var_e * var_j
print(int(var_k))
Category: Geometry

Question (EN): The length of one edge of a cube is 7 centimeters (cm). If you are going to glue all the colored paper to the surface of this cube, find the area of the colored paper you will need.
Question (KO): 어떤 정육면체의 한 모서리의 길이가 7센티미터(㎝)이다. 이 정육면체의 겉면에 색종이를 남김없이 붙이려고 한다면, 필요한 색종이의 넓이는 얼마인지 구하시오.

Answer: 294

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

Question (EN): I made a figure using all 9 sticks, each 2 centimeters (cm) long. Find the perimeter of this figure with all the same angles and 9 sides.
Question (KO): 길이가 2센티미터(㎝)인 막대기 9개를 모두 사용하여 도형을 만들었습니다. 각 막대기가 이루는 각은 모두 같고, 변이 9개인 이 도형의 둘레를 구하시오.

Answer: 18

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

Question (EN): Hyeonho's class teacher bought a large sheet of paper from a stationery store to make name tags for 24 students in the shape of a square with a side length of 4 centimeters (cm). If the teacher miscalculated the length and bought a piece of paper with a width of 34 centimeters (cm), and after making the name tag, the width of the paper is 2 centimeters (cm) left and the length is just right, how many centimeters (cm) was the perimeter of the paper the teacher bought?
Question (KO): 현호네 반 담임선생님은 24명의 학생들에게 한 변의 길이가 4센티미터(㎝)인 정사각형 모양으로 이름표를 만들어주기 위해서 문구점에서 큰 종이를 샀습니다. 선생님이 길이 계산을 잘못하여 가로의 길이가 34센티미터(㎝)인 종이를 샀고, 이름표를 만든 후 가로의 길이는 2센티미터(㎝)가 남고 세로의 길이는 딱 맞아떨어졌다면, 선생님이 산 종이의 둘레는 몇 센티미터(㎝)였을까요?

Answer: 92

Solution (Python):
var_a = 24
var_b = 34
var_c = 4
var_d = var_b // var_c
var_e = var_a / var_d
var_f = 4
var_g = var_e * var_f
var_h = 34
var_i = var_g + var_h
var_j = 2
var_k = var_i * var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): The 30 students in Minsu's class have their own attendance numbers from 1 to 30. Among the students in Minsu's class, the students wearing glasses are students 1, 3, 7, 10, 23, and 27, and the students with their hair tied are students 1, 9, 11, 20, and 23. How many students both wear glasses and have their hair tied?
Question (KO): 민수네 반 학생 30명은 1번부터 30번까지 자신의 출석 번호를 가지고 있습니다. 민수네 반 학생 중 안경을 쓴 학생은 1번, 3번, 7번, 10번, 23번, 27번 학생이고, 머리를 묶은 학생은 1번, 9번, 11번, 20번, 23번 학생일 때, 안경을 쓰고 머리를 묶은 학생은 몇 명입니까?

Answer: 2

Solution (Python):
var_a = 1
var_b = 3
var_c = 7
var_d = 10
var_e = 23
var_f = 27
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 = 1
var_h = 9
var_i = 11
var_j = 20
var_k = 23
list_b= []
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)
list_b.reverse()
list_c = list(set(list_a) & set(list_b))
var_l = len(list_c)
print(int(var_l))
Category: Arithmetic calculation

Question (EN): Seokjin has 3 marbles. Yuna has 1 less marble than Seokjin. Jimin has 2 times more marbles than Seokjin. How many more marbles does Jimin have than Yuna?
Question (KO): 석진이는 구슬을 3개 가지고 있습니다. 유나는 석진이보다 구슬을 1개 더 적게 가지고 있습니다. 지민이는 석진이보다 구슬을 2배 더 많이 가지고 있습니다. 지민이는 유나보다 구슬을 몇 개 더 많이 가지고 있습니까?

Answer: 4

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

Question (EN): What do you get when adding all natural numbers that are less than or equal to 31 and greater than 28?
Question (KO): 31보다 같거나 작으며 28보다 큰 자연수를 모두 더하면 얼마입니까?

Answer: 90

Solution (Python):
var_a = 28
var_b = 1
var_c = var_a + var_b
var_d = 31
var_e = 1
list_a = [i for i in range(var_c, var_d + 1, var_e)]
list_a = [float(i) for i in list_a]
var_f = sum(list_a)
print(int(var_f))
Category: Possibility

Question (EN): How many total cases can you pay with 4 500-won coins, 2 100-won coins, and 5 10-won coins (excluding the case where the payment amount is 0 won is)?
Question (KO): 500원짜리 동전 4개, 100원짜리 동전 2개, 10원짜리 동전 5개를 가지고 지불할 수 있는 금액은 모두 몇 가지인지 구하시오. (단, 지불 금액이 0원인 경우는 제외한다.)

Answer: 89

Solution (Python):
var_a = 4
var_b = 1
var_c = var_a + var_b
var_d = 2
var_e = 1
var_f = var_d + var_e
var_g = var_c * var_f
var_h = 5
var_i = 1
var_j = var_h + var_i
var_k = var_g * var_j
var_l = 1
var_m = var_k - var_l
print(int(var_m))
Category: Correspondence

Question (EN): You are going to subtract 24 from a certain number. What is the result of the correct calculation result if you accidentally add 42 and the result is 50?
Question (KO): 어떤 수에 24를 빼려고 합니다. 잘못하여 42를 더했을 때의 답이 50이라면 바르게 계산한 결과는 얼마일까요?

Answer: 16

Solution (Python):
var_a = 50
var_b = 42
var_c = var_a - var_b
var_d = 24
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): If you add A to 10, you get 15. How much is A?
Question (KO): 10에 A를 더했더니 15가 되었습니다. A는 얼마인가요?

Answer: 5

Solution (Python):
var_a = 15
var_b = 10
var_c = var_a - var_b
print(int(var_c))
Category: Comparison

Question (EN): Which of these has a larger volume, cuboid A with a base area is 8 square centimeters (cm2) and a height of 3 centimeters (cm), or cube B with a side length of 5 centimeters (cm)?
Question (KO): 밑면의 넓이가 8제곱센티미터(㎠)이고 높이가 3센티미터(㎝)인 직육면체 A와 한 변의 길이가 5센티미터(㎝)인 정육면체 B 중 부피가 더 큰 것은 무엇인가요?

Answer: B

Solution (Python):
var_a = 'A'
var_b = 'B'
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 = 8
var_d = 3
var_e = var_c * var_d
var_f = 5
var_g = 5
var_h = var_f * var_g
var_i = 5
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: Correspondence

Question (EN): Subtracting 44 from a number gives 15. What number is it?
Question (KO): 44을 어떤 수에서 뺐더니 15가 되었습니다. 어떤 수를 얼마입니까?

Answer: 59

Solution (Python):
var_a = 15
var_b = 44
var_c = var_a + var_b
print(int(var_c))
Category: Correspondence

Question (EN): A4461B is a six-digit number and is a multiple of 72. What is the value of A+B?
Question (KO): A4461B는 여섯 자리 수이고 72의 배수입니다. A+B의 값은 무엇입니까?

Answer: 12

Solution (Python):
var_a = 'A4461B'
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 = 72
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 = 'A4461B'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
var_e = 0
for elem in list_b:
    elem = str(elem)
    var_e = int(elem[unk_idx])
var_f = 'A4461B'
var_g = 'B'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_b:
    elem = str(elem)
    var_h = int(elem[unk_idx])
var_i = var_e + var_h
print(int(var_i))