philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): For the natural number A, the quotient of A divided by 9 is 6 and the remainder is 5. What is the value of A?
Question (KO): 자연수 A에 대해 9로 나눈 몫은 6, 나머지는 5입니다. A의 값은 무엇일까요?

Answer: 59

Solution (Python):
var_a = 9
var_b = 6
var_c = var_a * var_b
var_d = 5
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Find the sum of all multiples of 9 that are less than 80.
Question (KO): 80보다 작은 수 중에서 9의 배수의 총합을 구하시오.

Answer: 324

Solution (Python):
var_a = 1
var_b = 80
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
var_f = 9
list_b = []
var_f = int(var_f)
for i in list_a:
    i = int(i)
    if i % var_f == 0:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print(int(var_g))
Category: Possibility

Question (EN): Dongju selects a piece of paper with a number written on it, and wants to make a three-digit number by placing the first selected number in the hundreds place, the second selected in the tens place, and the third selected in the units place. If the numbers written on each paper was 1, 6, and 8, respectively, find the sum of the second smallest and third smallest three-digit numbers that Dongju can make. However, you cannot select the same numbered paper multiple times.
Question (KO): 동주는 숫자가 적힌 쪽지를 뽑아, 처음 뽑은 것을 백의 자리, 두 번째는 십의 자리, 세 번째는 일의 자리로 하여 세 자리수를 만들고자 한다. 쪽지는 1, 6, 8이 있을 때, 동주가 만들 수 있는 두 번째로 작은 수와 세 번째로 작은 세 자리수의 합을 구하시오. 단, 같은 쪽지를 여러 번 뽑을 수 없다.

Answer: 804

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 = 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 = 2
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = 3
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i))
Category: Possibility

Question (EN): Among the numbers that you can make using all of the numbers 1, 2, 6, and 8 once each, find the sum of the second largest four-digit number and the third smallest four-digit number.
Question (KO): 숫자 1, 2, 6, 8을 한 번씩 모두 사용하여 두 번째로 큰 네 자리 수와 세 번째로 작은 네 자리수의 합을 구하시오.

Answer: 10240

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

Question (EN): How many diagonals can you draw in a decagon?
Question (KO): 십각형 내에 그릴 수 있는 대각선의 개수는?

Answer: 35

Solution (Python):
var_a = 10
var_b = 10
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: Arithmetic calculation

Question (EN): The length of one span of Jinseo is about 12 centimeters (cm). When Jinseo measured the length of the shorter side of the bookshelf, it was about two spans. How many centimeters (cm) is the short side of the bookshelf?
Question (KO): 진서의 한 뼘의 길이는 약 12센티미터(㎝)입니다. 진서가 책꽂이의 짧은 쪽의 길이를 재었더니 뼘으로 2번이었습니다. 책꽂이의 짧은 쪽의 길이는 약 몇 센티미터(㎝)입니까?

Answer: 24

Solution (Python):
var_a = 12
var_b = 2
var_c = var_a * var_b
print(int(var_c))
Category: Possibility

Question (EN): What is the difference between the largest number and the smallest number that can be made by selecting four from the number magnets 2, 0, 3, 5, and 8 and arranging them in a row to form a four-digit number?
Question (KO): 숫자 자석 2, 0, 3, 5, 8중 4개를 골라 일렬로 배열하여 네 자리 수를 만들 때, 만들 수 있는 수 중 가장 큰 수와 가장 작은 수의 차는 얼마인가?

Answer: 6497

Solution (Python):
var_a = 2
var_b = 0
var_c = 3
var_d = 5
var_e = 8
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 = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = 1
list_d=list_b.copy()
list_d.sort()
var_j = list_d[var_i-1]
var_k = var_h - var_j
print(int(var_k))
Category: Geometry

Question (EN): Jiho's classmates are standing on the playground. When the students made a big square by matching the front, back, left, and right spacing, there were 3 people left. It is said that 44 more students are needed to increase each horizontal and vertical side of the square by 2 columns. How many students are in Jiho's class?
Question (KO): 지호네 반 학생들이 운동장에 서 있습니다. 학생들이 앞,뒤,좌,우 간격을 맞춰서서 큰 정사각형을 만들었더니 3명이 남았습니다. 만든 정사각형의 가로 한 변과 세로 한 변을 2열씩 늘리려면 41명이 더 필요하다고 합니다. 지호네 반 학생은 모두 몇 명입니까?

Answer: 103

Solution (Python):
var_a = 41
var_b = 3
var_c = var_a + var_b
var_d = 4
var_e = var_c - var_d
var_f = 4
var_g = var_e / var_f
var_h = 2
var_i = var_g ** var_h
var_j = 3
var_k = var_i + var_j
print(int(var_k))
Category: Correspondence

Question (EN): A number divided by 10 is 6. Yoongi got the result by subtracting 15 from a certain number. What is the result he got?
Question (KO): 10으로 어떤 수를 나누었더니 6이 됩니다. 윤기는 어떤 수에서 15를 빼 결과를 얻었습니다. 윤기가 얻은 값은?

Answer: 45

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

Question (EN): A85-2B=364. How much is A?
Question (KO): A85-2B=364입니다. A는 얼마인가요?

Answer: 3

Solution (Python):
var_a = 'A85-2B=364'
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): This year, the age difference between Minsu and his mother is 28 years old, and after 13 years, the age of his mother will be twice that of Minsu. Find the age of Minsu this year.
Question (KO): 올해 민수와 어머니의 나이의 차는 28살이고, 13년 후에는 어머니의 나이가 민수의 나이의 2배가 된다고 한다. 올해 민수의 나이를 구하시오.

Answer: 15

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

Question (EN): You wanted to subtract 46 from a number, but you accidentally subtract 59 and get 43. How much do you get from the correct calculation?
Question (KO): 46을 어떤 수에서 빼야 하는데 실수로 59를 뺐더니 43이 나왔습니다. 바르게 계산한 결과를 구하여라.

Answer: 56

Solution (Python):
var_a = 43
var_b = 59
var_c = var_a + var_b
var_d = 46
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): Jeonghee, Cheolsu, Eunsu, and Minjun went to the cinema to watch a horror movie. If Eunsu and Minjun, who can't watch horror movies, don't sit next to each other, find the number of cases in which four people sit in a row. (However, there are four seats and all are attached.)
Question (KO): 정희, 철수, 은수, 민준 4명이 공포영화를 보러 영화관에 갔다. 이때, 공포영화를 잘 못보는 은수와 민준은 이웃하여 앉지 않는다고 할 때, 네 명이 한 줄로 앉는 경우의 수를 구하시오. (단, 좌석은 네 좌석이며 모두 붙어있다.)

Answer: 12

Solution (Python):
var_a = 'Jeonghee'
var_b = 'Cheolsu'
var_c = 'Eunsu'
var_d = 'Minjun'
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 = len(list_a)
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)
var_h = 'Eunsu'
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_i = len(list_c)
var_j = len(list_c)
var_k = 1
var_i = int(var_i)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
    var_k = var_k * (var_i-i)
var_l = 'Eunsu'
var_m = 'Minjun'
list_d= []
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_d.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_d.append(var_l)
list_d.reverse()
var_n = len(list_d)
var_o = len(list_d)
var_p = 1
var_n = int(var_n)
var_o = int(var_o)
for i, elem in enumerate(range(var_o)):
    var_p = var_p * (var_n-i)
var_q = var_k * var_p
var_r = var_g - var_q
print(int(var_r))
Category: Possibility

Question (EN): Three caterpillars came across a forked road. Each caterpillar must choose the path between left and right. Find the number of ways the last caterpillar chooses the left path.
Question (KO): 애벌레 3마리가 양갈래 길을 마주했습니다. 각 애벌레는 왼쪽 길과 오른쪽 길 중 하나를 골라야 합니다. 마지막 애벌레가 왼쪽 길을 선택하는 경우의 수를 구하시오.

Answer: 4

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

Question (EN): The owner of the snack shop said that for a special occasion, he would give out cookies equal to the three-digit number made by using 1, 7, and 0 all at least once. What number should Haneul make to receive the most sweets?
Question (KO): 과자 가게의 사장님이 행사로, 1, 7, 0을 모두 한 번씩 사용해서 만든 세 자리 숫자 만큼 과자를 준다고 했습니다. 하늘이는 어떤 수를 만들어야 과자를 가장 많이 받을 수 있을까요?

Answer: 710

Solution (Python):
var_a = 7
var_b = 1
var_c = 0
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 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]
print(int(var_f))
Category: Comparison

Question (EN): Jungkook is the 5th place. Find the number of people who crossed the finish line faster than Jungkook.
Question (KO): 정국이가 5등입니다. 정국이보다 결승선을 빨리 통과한 사람의 수를 구하세요.

Answer: 4

Solution (Python):
var_a = 5
var_b = 1
var_c = var_a - var_b
print(int(var_c))
Category: Geometry

Question (EN): A parallelogram was cut to form a trapezoid, the lower side being 4 centimeters (cm) longer than the upper side. If the upper side is 12 centimeters (cm) and the height is 10 centimeters (cm), how much is the area of this trapezoid?
Question (KO): 어떤 평행사변형을 잘라서 사다리꼴 모양을 만들었는데, 아랫변의 길이가 윗변보다 4센티미터(㎝) 더 길다. 윗변의 길이가 12센티미터(㎝)이고, 높이가 10센티미터(㎝)라면, 이 사다리꼴의 넓이는 몇입니까?

Answer: 140

Solution (Python):
var_a = 12
var_b = 12
var_c = 4
var_d = var_b + var_c
var_e = var_a + var_d
var_f = 10
var_g = var_e * var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Possibility

Question (EN): There are five cards of numbers 1, 3, 5, 7, and 9. What is the second largest number less than 500 of the three-digit natural numbers that can be created using this card? (However, a card can be used repeatedly.)
Question (KO): 1, 3, 5, 7, 9 다섯 장의 숫자카드가 있다. 이 카드를 사용하여 만들 수 있는 3자리 자연수 중 500미만인 수 중 2번째로 큰 값은 얼마인지 구하시오. (단, 카드는 중복사용 가능하다.)

Answer: 397

Solution (Python):
var_a = 1
var_b = 3
var_c = 5
var_d = 7
var_e = 9
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
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_f))
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_g = 500
list_c = []
for i in list_b:
    if i < var_g:
        list_c.append(i)
var_h = 2
list_d=list_c.copy()
list_d.sort()
var_i = list_d[-var_h]
print(int(var_i))
Category: Geometry

Question (EN): Farm A has a rectangular shape measuring 6 kilometers (km) by 9 kilometers (km), and Farm B has a square shape measuring 8 kilometers (km) by 8 km by 8 kilometers (km). The owners of both farms want to build a fence around the perimeter of the farm by putting together wooden planks of the same length. Which farm needs more planks?
Question (KO): A 농장은 가로 6킬로미터(㎞), 세로 9킬로미터(㎞)인 직사각형 모양이고, B 농장은 가로 8킬로미터(㎞), 세로 8킬로미터(㎞)인 정사각형 모양입니다. 두 농장의 주인 모두 같은 길이의 나무판자를 여러 개를 이어 붙여서 농장 둘레를 따라 울타리를 설치하려고 합니다. 어느 농장이 나무판자를 더 많이 필요로 합니까?

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 = 6
var_d = 9
var_e = var_c + var_d
var_f = 8
var_g = 8
var_h = var_f + var_g
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
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): The exchange rate refers to the rate at which one country's currency is exchanged for another country's currency. Soojeong came back from a trip to the U.S. and exchanged the remaining 140 dollars for 158,760 won in Korean money at the bank today. What is the exchange rate of the Korean Won to the US Dollar today?

Question (KO): 환율은 자기나라 돈과 다른나라 돈의 교환 비율을 말합니다. 수정이는 미국 여행을 다녀와서 남은 돈 140달러를 오늘 은행에 가서 우리나라 돈 158760원으로 교환 하였습니다. 오늘 미국 돈 달러에 대한 우리나라 돈 원의 환율은 얼마입니까?

Answer: 1134

Solution (Python):
var_a = 158760
var_b = 140
var_c = var_a / var_b
print(int(var_c))
Category: Comparison

Question (EN): Jian has 3 notebooks in his bag, Doyun has 5 notebooks in his bag, and Siu has 2 notebooks in his bag. Who has the second most notebooks?
Question (KO): 지안이 가방에는 공책이 3권, 도윤이 가방에는 공책이 5권, 시우 가방에는 공책이 2권있습니다. 공책이 2번째로 많은 사람은 누구인가요?

Answer: Jian

Solution (Python):
var_a = '지안'
var_b = '도윤'
var_c = '시우'
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
var_e = 5
var_f = 2
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)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_g = 2
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): Seungyeon is wrapping the box with ribbon tape. If 28 identical boxes are wrapped with the ribbon tape that is 82.04 meters (m) long and there should be no tape left after wrapping, how many meters (m) of ribbon tape are needed to wrap one box?
Question (KO): 승연이는 리본 테이프로 상자를 포장하고 있다. 전체 길이가 82.04미터(m)인 리본 테이프로 똑같은 상자 28개를 포장하고 남은 테이프가 없다고 할 때 한 상자를 포장하는데 몇 미터(m)의 리본테이프를 사용해야하는가?

Answer: 2.93

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

Question (EN): The four students, Jimin, Yoongi, Taehyung, and Namjoon, are of different ages. Yoongi is older than Namjoon, and Jimin is older than Taehyung but younger than Namjoon. Who is the youngest among the 4 people?
Question (KO): 네 학생 지민, 윤기, 태형, 남준이의 나이는 모두 다릅니다. 윤기가 남준이 보다 나이가 많고, 지민이는 태형이보다 나이가 많지만 남준이보다는 적습니다. 4사람 중 가장 어린 사람은 누구입니까?

Answer: Taehyung

Solution (Python):
var_a = 'Jimin'
var_b = 'Yoongi'
var_c = 'Taehyung'
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 = 'Jimin'
var_f = 'Taehyung'
var_g = '>'
var_h = 'Jimin'
var_i = 'Namjoon'
var_j = '<'
var_k = 'Yoongi'
var_l = 'Namjoon'
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: Comparison

Question (EN): A country has a total of 3 islands. Each island has 12 ships, and each ship has 24 crew members. Find the number of crew members working on all the islands in this country.
Question (KO): 어느 나라에 총 3개의 섬이 있습니다. 각 섬에는 12척의 배를 가지고 있고, 각 배마다 일하는 선원의 수는 24명으로 같습니다. 이 나라의 모든 섬에서 일하고 있는 선원의 수를 구하시오.

Answer: 864

Solution (Python):
var_a = 3
var_b = 12
var_c = var_a * var_b
var_d = 24
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): We want to simultaneously draw three different numbers from among the natural numbers less than 10. Find the number of ways in which the sum of three numbers is 14.
Question (KO): 10보다 작은 자연수 중에서 서로 다른 세 수를 동시에 뽑으려고 합니다. 세 수의 합이 14인 경우의 수를 구하시오.

Answer: 48

Solution (Python):
var_a = 1
var_b = 10
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
var_f = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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]
list_c=[]
for i in list_b:
    var_g = 0
    i = int(i)
    while i//10 > 0:
        var_g = var_g + i%10
        i = i//10
    var_g = var_g + i%10
    list_c.append(var_g)
var_h = 14
list_d = []
for i in list_c:
    if i <= var_h:
        list_d.append(i)
var_i = 14
list_e = []
for i in list_d:
    if i >= var_i:
        list_e.append(i)
var_j = len(list_e)
print(int(var_j))
Category: Arithmetic calculation

Question (EN): My mother is 43 years old this year. A few years ago, her age was five times her daughter's age, who is 11 years old this year. Find how many years ago it was.
Question (KO): 올해 어머니는 43살입니다. 몇 년 전에는 현재 11살인 딸의 나이에 5를 곱하면 어머니의 나이였습니다. 몇 년 전인지 구하시오.

Answer: 3

Solution (Python):
var_a = 5
var_b = 11
var_c = var_a * var_b
var_d = 43
var_e = var_c - var_d
var_f = 5
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Geometry

Question (EN): Yuran wants to buy a gift box that is 9 centimeters (cm) wide, 4 centimeters (cm) long, and 7 centimeters (cm) high. What is the volume in cubic centimeters (cm) of the gift box Yuran is buying?
Question (KO): 유란이는 가로가 9센티미터(㎝), 세로가 4센티미터(㎝), 높이가 7센티미터(㎝)인 선물 상자를 사려고 합니다. 유란이가 사려고 하는 선물 상자의 부피는 몇 세제곱센티미터(㎤)입니까?

Answer: 252

Solution (Python):
var_a = 9
var_b = 4
var_c = var_a * var_b
var_d = 7
var_e = var_c * var_d
print(int(var_e))