philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): What number must be in B to make A3+61B=695, where A3 and 61B are each two-digit number and three-digit number?
Question (KO): A3+61B=695라는 식이 성립하려면, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 2

Solution (Python):
var_a = 'A3+61B=695'
var_b = 'B'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 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): Write down the number of three-digit numbers that can be made by choosing three cards from four cards written as 2, 4, 8, and 6.
Question (KO): 4장의 숫자 2, 4, 8, 6이 적힌 카드 중에서 3장을 골라 만들 수 있는 세 자리 수의 개수를 구하시오

Answer: 24

Solution (Python):
var_a = 2
var_b = 4
var_c = 8
var_d = 6
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 = len(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): Yoojeong gave 8 of the marbles she had to Eunji, and there were 24 left. How many marbles did Yoojung have at first?
Question (KO): 유정이는 가지고 있던 구슬 중에서 은지에게 8개를 주었더니 24개가 남았습니다. 처음에 유정이가 가지고 있던 구슬은 몇 개입니까?

Answer: 32

Solution (Python):
var_a = 24
var_b = 8
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): I painted some trapezoidal roofs. If the top side is 5 centimeters (cm), the bottom side is 9 centimeters (cm), and the area is 56 square cm (cm 2), what is the height in centimeters (cm) of this roof?
Question (KO): 어떤 사다리꼴 모양의 지붕을 그렸습니다. 윗변이 5센티미터(㎝), 아랫변이 9센티미터(㎝)이고, 넓이가 56제곱센티미터(㎠)라면, 이 지붕의 높이는 몇 센티미터(㎝)입니까?

Answer: 8

Solution (Python):
var_a = 56
var_b = 2
var_c = var_a * var_b
var_d = 5
var_e = 9
var_f = var_d + var_e
var_g = var_c / var_f
print(int(var_g))
Category: Correspondence

Question (EN): A is the number of 55 groups of 100 and 19 groups of 10. B is the number that jumps 5 times from 173 in an increment of 224. Find the value of A-B.
Question (KO): A는 100개씩 묶음이 55개, 10개씩 묶음이 19개인 수입니다. B는 173에서 224씩 커지게 5번 뛰어서 센 수입니다. A-B의 값을 구하시오.

Answer: 4397

Solution (Python):
var_a = 100
var_b = 55
var_c = var_a * var_b
var_d = 10
var_e = 19
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 173
var_i = 224
var_j = 5
var_k = var_i * var_j
var_l = var_h + var_k
var_m = var_g - var_l
print(int(var_m))
Category: Comparison

Question (EN): What is the sum of all numbers greater than or equal to 0.4 among 0.8, 1/2, 0.9, and 1/3?
Question (KO): 0.8, 1/2, 0.9, 1/3 중에서 0.4보다 크거나 같은 수를 모두 더하면 얼마일까요?

Answer: 2.2

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.9
var_d = 0.3333333333333333
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 = 0.4
list_b = []
for i in list_a:
    if i >= var_e:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print('{:.2f}'.format(round(var_f+1e-10,2)))
Category: Geometry

Question (EN): If the lengths of the two sides of a rectangle are 9 centimeters (cm) and 11 centimeters (cm), find the sum of the lengths of the four sides.
Question (KO): 직사각형의 두 변의 길이가 9 센티미터(㎝), 11 센티미터(㎝)일 때 네 변의 길이의 합을 구해 보세요.

Answer: 40

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

Question (EN): How many times is the volume of a cube with a side length of 2 meters (m) bigger compared to the volume of a cube with a side length 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: Geometry

Question (EN): The perimeter of a square is equal to the perimeter of a regular hexagon with sides measuring 6 centimeters (cm). What is the length of one side of this square in centimeters (cm)?
Question (KO): 어떤 정사각형의 둘레의 길이는 한 변이 6센티미터(㎝)인 정육각형의 둘레의 길이와 같다고 합니다. 이 정사각형의 한 변의 길이는 몇 센티미터(㎝)입니까?

Answer: 9

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

Question (EN): I turned on the tap for 21 liters (L) for 6 minutes and received water in the bathtub that drained 0.3 liters (L) for 1 minute. If it took 22 minutes and 30 seconds to fill the bathtub, how many liters of water was in the bathtub at first?
Question (KO): 6분동안 21리터(L)가 나오는 수도를 틀어 1분동안 0.3리터(L)씩 빠져나가는 욕조에 물을 받았다. 가득 채우는데 22분 30초가 걸렸다면 처음 욕조에 담긴 물은 몇 리터(L)인지 구하여라

Answer: 72

Solution (Python):
var_a = 21
var_b = 6
var_c = var_a / var_b
var_d = 0.3
var_e = var_c - var_d
var_f = 22
var_g = 30
var_h = 60
var_i = var_g / var_h
var_j = var_f + var_i
var_k = var_e * var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): There are 5 times as many baseballs in the gym as there are soccer balls. And volleyballs has three times as much as soccer balls. The number of baseballs plus volleyballs is equal to160. Find the number of soccer balls.
Question (KO): 체육관에 있는 야구공의 수는 축구공의 5배입니다. 그리고 배구공은 축구공의 3배만큼 있습니다. 야구공의 수와 배구공의 수를 더하면 160입니다. 축구공의 개수를 구하세요.

Answer: 20

Solution (Python):
var_a = 160
var_b = 5
var_c = 3
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e))
Category: Correspondence

Question (EN): Rounding down 1A77 to the hundreds place gives 1700. Find A
Question (KO): 1A77을 버림하여 백의 자리까지 나타내면 1700이 됩니다. A를 구하시오.

Answer: 7

Solution (Python):
var_a = '1A77'
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 = 1700
list_b = []
for i in list_a:
    if i >= var_b:
        list_b.append(i)
var_c = 1700
var_d = 100
var_e = var_c + var_d
list_c = []
for i in list_b:
    if i < var_e:
        list_c.append(i)
var_f = '1A77'
var_g = 'A'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_c:
    elem = str(elem)
    var_h = int(elem[unk_idx])
print(int(var_h))
Category: Arithmetic calculation

Question (EN): There are four numbers 35, 68, 57, and 95. What is the difference between the second-largest number and the smallest number?
Question (KO): 4개의 수 35, 68, 57, 95가 있습니다. 2번째로 큰 수와 가장 작은 수의 차는 얼마입니까?

Answer: 33

Solution (Python):
var_a = 35
var_b = 68
var_c = 57
var_d = 95
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): There are 500 customers in line in front of a store. If all customers get number tickets numbered from 1 to 500, how many times the number 4 is written on the number tickets?
Question (KO): 어느 가게 앞에 500명의 손님들이 줄을 서 있습니다. 모든 손님들에게 1부터 500까지의 번호표를 차례로 나눠 주었을 때, 숫자 4는 모두 몇 번 적혀 있는지 구하시오.

Answer: 200

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

Question (EN): Taehyung wants to multiply a number by 8. But when he accidentally multiplied it by 5, the result came out as 30. Find the correct calculation result.
Question (KO): 태형이는 어떤 수에 8을 곱하려고 합니다. 하지만 실수로 5를 곱했더니 결과는 30이 되었습니다. 바르게 계산한 결과를 구하세요.

Answer: 48

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

Question (EN): The box contains beads. When you distribute 65 marbles equally to 8 people from the box, there is no marbles left at the box. How many marbles will each person receive if all the marbles are equally distributed to 5 people?
Question (KO): 박스에 구슬이 들어있다. 박스에서 8명에게 똑같이 65개씩 나누어 주었더니 박스의 구슬을 모두 나누어 주게 되었다. 5명에게 똑같이 나누어 준다면 한 명이 몇 개의 구슬을 받는지 구하시오.

Answer: 104

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

Question (EN): Calculate A when the two-digit addition equation AB+BC=BCB and A, B, and C are different numbers.
Question (KO): 두 자리 수의 덧셈식 AB+BC=BCB이고 A, B, C는 서로 다른 숫자일 때 A를 구하시오

Answer: 9

Solution (Python):
var_a = 'AB+BC=BCB'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_a
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    term_list = []
    op_list = []
    temp_c = ''
    for tc in temp:
        if tc not in '+-*/=><().':
            temp_c += tc
        else:
            op_list.append(tc)
            term_list.append(temp_c)
            temp_c = ''
    term_list.append(temp_c)
    new_eq = ''
    for i in range(len(op_list)):
        new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    if len(new_eq) == len(var_a):
        new_eq=new_eq.replace('=', '==')
        new_eq=new_eq.replace('>==', '>=')
        new_eq=new_eq.replace('<==', '<=')
        eval_result = False
        try:
            eval_result = eval(new_eq)
        except:
            pass
        if eval_result:
            for i, (k, _) in enumerate(ans_dict.items()):
                ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c))
Category: Arithmetic calculation

Question (EN): I am going to attach 15 pieces of colored tape, every 20 centimeters (cm) in length, overlapping each other by 5 centimeters (cm) in a long line. Find the total length in centimeters (cm) of the 15 sheets of colored tape.
Question (KO): 길이가 20센티미터(㎝)인 색 테이프 15장을 5센티미터(㎝)씩 겹쳐서 한 줄로 길게 이어 붙이려고 합니다. 15장을 이어 붙인 색 테이프의 전체 길이는 몇 센티미터(㎝)인지 구하시오

Answer: 230

Solution (Python):
var_a = 20
var_b = 20
var_c = 5
var_d = var_b - var_c
var_e = 15
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_a + var_h
print(int(var_i))
Category: Geometry

Question (EN): How many square centimeters (cm2) is the area of a rhombus that can be drawn between the four sides of a square with a circumference of 96 centimeters (cm)?
Question (KO): 둘레가 96센티미터(㎝)인 정사각형의 네 변의 한가운데를 이어서 그릴 수 있는 마름모의 넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 288

Solution (Python):
var_a = 96
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Her father bought 27 tangerines and gave 18 to Eunji. How many tangerines does the father have left?
Question (KO): 아버지께서 귤 27개를 사서 18개를 은지에게 주었습니다. 아버지에게 남은 귤은 몇 개입니까?

Answer: 9

Solution (Python):
var_a = 27
var_b = 18
var_c = var_a - var_b
print(int(var_c))
Category: Geometry

Question (EN): How many edges does a pentagonal pyramid have?
Question (KO): 오각뿔의 모서리의 개수는?

Answer: 10

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

Question (EN): Find the area of a parallelogram with base length 3 and height 3.
Question (KO): 밑변의 길이가 3이고 높이가 3인 평행사변형의 넓이를 구하시오.

Answer: 9

Solution (Python):
var_a = 3
var_b = 2
var_c = var_a ** var_b
print(int(var_c))
Category: Correspondence

Question (EN): You are going to add 24 to a specific number. If the answer when multiplied by 2 incorrectly is 50, what is the result of calculating correctly?
Question (KO): 어떤 수에 24를 더하려고 합니다. 잘못하여 2를 곱했을 때의 답이 50이라면 바르게 계산한 결과는 얼마일까요?

Answer: 49

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

Question (EN): In Juwon's class, 7 out of 15 students brought colored paper, and the rest did not. 48 pieces of colored paper were distributed equally to students who did not bring any colored paper. Find how many sheets of colored paper were given to students.
Question (KO): 주원이네 반 학생 15명 중 7명은 색종이를 가져왔고 나머지는 가져오지 않았다. 색종이를 안 가져온 학생들에게 48개의 색종이를 똑같이 나누어주었다. 학생들은 한명 당 몇 장의 색종이를 받았는지 구하시오.

Answer: 6

Solution (Python):
var_a = 48
var_b = 15
var_c = 7
var_d = var_b - var_c
var_e = var_a / var_d
print(int(var_e))
Category: Possibility

Question (EN): There are 10 bags containing different colored pencils. If you draw 3 colored pencils from a bag, how many possible ways are there?
Question (KO): 가방 안에 서로 다른 색연필 10자루가 있습니다. 만약 가방에서 3자루의 색연필을 뽑는다면 가능한 경우의 수는 모두 몇 가지입니까?

Answer: 120

Solution (Python):
var_a = 10
var_b = 3
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
    var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
    var_c = var_c / (i+1)
print(int(var_c))
Category: Correspondence

Question (EN): There are two different numbers A and B. Find the sum of A and B that satisfy the multiplication equation of AB×6=BBB.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 곱셈식 AB×6=BBB에서 A와 B의 합을 구하시오.

Answer: 11

Solution (Python):
var_a = 'AB×6=BBB'
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]
var_d = 'AB×6=BBB'
var_e = 'B'
ans_dict = dict()
var_d = var_d.replace('×','*')
var_d = var_d.replace('x','*')
var_d = var_d.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_d):
    if v in variable_candi:
        ans_dict[v] = 1
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]))
    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_d):
        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_f = ans_dict[var_e]
var_g = var_c + var_f
print(int(var_g))
Category: Comparison

Question (EN): A is the quotient of 64 divided by 8 plus 27. B is the number of A divided by 7 times 5. Which number is smaller among A and B?
Question (KO): A는 64를 8로 나누었을 시 나운 몫에서 27을 더한 값이다. B는 A를 7로 나눈 후 5를 곱한 수다. 두 수 A,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 = 64
var_d = 8
var_e = var_c / var_d
var_f = 27
var_g = var_e + var_f
var_h = 64
var_i = 8
var_j = var_h / var_i
var_k = 27
var_l = var_j + var_k
var_m = 7
var_n = var_l / var_m
var_o = 5
var_p = var_n * var_o
list_b= []
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_q = 1
list_c=list_b.copy()
list_c.sort()
var_r = list_c[var_q-1]
var_s = list_b.index(var_r)+1
var_t = list_a[var_s-1]
print(var_t)
Category: Arithmetic calculation

Question (EN): The older brother has 2800 won and the younger one has 1500 won. If the older brother gives some money to the younger brother, the older brother will have 360 won more than the younger brother. How much should the older brother give to the younger brother?
Question (KO): 형은 2800원, 동생은 1500원을 가지고 있습니다. 형이 동생에게 얼마를 주면 형은 동생보다 360원이 많게 됩니다. 형이 동생에게 얼마를 주면 됩니까?

Answer: 470

Solution (Python):
var_a = 2800
var_b = 1500
var_c = var_a - var_b
var_d = 360
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g))
Category: Geometry

Question (EN): If you made a square by placing 10 square tiles on each vertical and horizontal line without gaps, how many tiles are placed at the perimeter?
Question (KO): 정사각형 타일을 가로와 세로 모두 10장씩 빈틈없이 놓아서 정사각형을 만들었을 때, 둘레에 놓인 타일의 수는?

Answer: 36

Solution (Python):
var_a = 10
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): 194 students and 235 adults came to the amusement park, and 68 of them got free admission. Find how many more people who paid for admission to the amusement park than those who got in for free.
Question (KO): 놀이공원에 학생이 194명, 성인이 235명 놀러왔고, 그중에서 공짜로 입장한 사람이 68명입니다. 놀이공원에 유료로 입장한 사람은 공짜로 입장한 사람보다 몇 명 더 많은지 구하시오

Answer: 293

Solution (Python):
var_a = 194
var_b = 235
var_c = var_a + var_b
var_d = 68
var_e = var_c - var_d
var_f = 68
var_g = var_e - var_f
print(int(var_g))
Category: Comparison

Question (EN): Junwoo is 1.63 meters (m) tall and Haeun is 1.58 meters (m) tall. Write the name of the taller person.
Question (KO): 준우의 키는 1.63 미터(m)이고, 하은이의 키는 1.58 미터(m) 입니다. 키가 더 큰 사람의 이름을 써 보세요.

Answer: Junwoo

Solution (Python):
var_a = 'Junwoo'
var_b = 'Haeun'
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 = 1.63
var_d = 1.58
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): If you add a number to 55, the result is 88. What is the value of the number?
Question (KO): 55에 어떤 수를 더했더니 결과가 88이 되었습니다. 어떤 수는 얼마입니까?

Answer: 33

Solution (Python):
var_a = 88
var_b = 55
var_c = var_a - var_b
print(int(var_c))
Category: Possibility

Question (EN): Minho is playing a game of using three number cards once to create the largest three-digit number and then find the difference between the two the third largest three-digit number. What is Minho's answer when he has the number cards 1, 6, and 8?
Question (KO): 민호는 세 숫자카드를 한 번씩 이용해 가장 큰 세 자리수와 세 번째로 큰 세 자리수를 만들고 그 둘의 차이를 구하는 게임을 하고 있습니다. 숫자 카드 1, 6, 8이 있을 때 민호가 구하는 답은 얼마입니까?

Answer: 180

Solution (Python):
var_a = 1
var_b = 6
var_c = 8
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 = len(list_a)
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]
var_g = 3
list_d=list_b.copy()
list_d.sort()
var_h = list_d[-var_g]
var_i = var_f - var_h
print(int(var_i))