philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): If you put 6 candies in a bag, there will be 4 left over, and if you put 7 candies in a bag, there will be 5 left over. If 8 candies are in each bag, 6 will be left, and 10 candies in each bag will have 8 left over. Find the minimum number of candies.
Question (KO): 사탕을 한 봉지에 6개씩 담으면 4개가 남고, 7개씩 담으면 5개가 남고, 8개씩 담으면 6개가 남고, 10개씩 담으면 8개가 남는다고 한다. 사탕은 최소 몇 개인지 구하여라.

Answer: 838

Solution (Python):
var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
var_e = 4
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 7
var_g = 5
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 8
var_i = 6
list_d = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_c:
    i = int(i)
    if i%var_h == var_i:
        list_d.append(i)
var_j = 10
var_k = 8
list_e = [] 
var_j = int(var_j)
var_k = int(var_k)
if var_k < 0:
    var_k = var_k + var_j
for i in list_d:
    i = int(i)
    if i%var_j == var_k:
        list_e.append(i)
var_l = 1
list_f=list_e.copy()
list_f.sort()
var_m = list_f[var_l-1]
print(int(var_m))
Category: Arithmetic calculation

Question (EN): Willow trees are planted at 30-meter (m) intervals along the circular pond. If the circumference of the pond is 1 kilometer (km) and 200 meters (m), how many willow trees were planted in all?
Question (KO): 원 모양의 연못을 따라 30미터(m) 간격으로 버드나무가 심어져 있습니다. 연못의 둘레가 1킬로미터(㎞) 200미터(m)라면, 버드나무는 모두 몇 그루 심어진 것입니까?

Answer: 40

Solution (Python):
var_a = 1
var_b = 1000
var_c = var_a * var_b
var_d = 200
var_e = var_c + var_d
var_f = 30
var_g = var_e / var_f
print(int(var_g))
Category: Correspondence

Question (EN): When AB2-41=591 is true, what number should go in B?
Question (KO): AB2-41=591일 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 3

Solution (Python):
var_a = 'AB2-41=591'
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: Arithmetic calculation

Question (EN): There are 30 trees along the straight road. If the distance between every tree is 3 meters (m), what is the distance between the first and the last trees?
Question (KO): 직선 도로에 가로수가 30개 있습니다. 가로수 사이의 간격이 3미터(m)이고, 첫 가로수와 마지막 가로수 사이의 거리는 얼마인지 구하시오.

Answer: 87

Solution (Python):
var_a = 3
var_b = 30
var_c = 1
var_d = var_b - var_c
var_e = var_a * var_d
print(int(var_e))
Category: Comparison

Question (EN): The length of the colored tape that Juman has is 0.6 meters (m). The length of the colored tape that Jeongho has is 3/10 meters (m) longer than that of Juman. Jiyong's colored tape is 19/25 meters (m) long, and Cheoljung's colored tape is 0.2 meters (m) shorter than Jiyong's. Who has the 2nd shortest colored tape?
Question (KO): 주만이가 가지고 있는 색 테이프의 길이는 0.6미터(m)입니다. 정호가 가지고 있는 색 테이프의 길이는 주만이보다 3/10미터(m) 더 깁니다. 지용이가 가지고 있는 색 테이프의 길이는 19/25미터(m)이고, 철중이가 가지고 있는 색 테이프의 길이는 지용이보다 0.2미터(m) 더 짧습니다. 가지고 있는 색 테이프의 길이가 2번째로 짧은 사람은 누구입니까?

Answer: Juman

Solution (Python):
var_a = 'Juman'
var_b = 'Jeongho'
var_c = 'Jiyong'
var_d = 'Cheoljung'
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.6
var_f = 0.6
var_g = 0.3
var_h = var_f + var_g
var_i = 0.76
var_j = 0.76
var_k = 0.2
var_l = var_j - var_k
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
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_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_m = 2
list_c=list_b.copy()
list_c.sort()
var_n = list_c[var_m-1]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p)
Category: Correspondence

Question (EN): If 20 is the product of some number divided by 3 and 12 added, what is that number?
Question (KO): 20이 어떤 수를 3으로 나누고 12를 더해준 값이라면 어떤 수는 얼마입니까?

Answer: 24

Solution (Python):
var_a = 20
var_b = 12
var_c = var_a - var_b
var_d = 3
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11, and 12. What is the quotient of the largest number divided by the second smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 큰 수를 2번째로 작은 수로 나눈 몫은 얼마입니까?

Answer: 1

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[-var_d]
var_f = 2
list_c=list_a.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = var_e // var_g
print(int(var_h))
Category: Geometry

Question (EN): The gift box that Jaewoong is buying is 9 centimeters (cm) wide, 4 centimeters (cm) long, and 7 centimeters (cm) high. What is this gift box's volume in cubic centimeters (cm3)?
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))
Category: Comparison

Question (EN): There are 3 boxes containing 16 Red-bean bread each weighing 200 grams (g). There are 2 boxes containing 12 pieces of conch-shaped bread each weighing 250 grams (g). All empty boxes weigh the same. Which bread is in the box that weighs more than other boxes?
Question (KO): 1개의 무게가 200g인 단팥빵을 16개씩 담은 상자가 3개 있습니다. 1개의 무게가 250g인 소라빵을 12개씩 담은 상자는 2개 있습니다. 빈 상자의 무게는 모두 같습니다. 한 상자의 무게가 더 무거운 상자 안에 들어 있는 빵은 무엇입니까?

Answer: Red-bean

Solution (Python):
var_a = 'Red-bean'
var_b = 'conch-shaped'
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 = 200
var_d = 16
var_e = var_c * var_d
var_f = 250
var_g = 12
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): Multiplying the grandson's age by 6 equals the grandfather's age. After 4 years, the ages of grandfather and grandson add up to be 78. How old is the grandson now?
Question (KO): 손자의 나이에 6을 곱하면 할아버지의 나이와 같습니다. 4년 후 할아버지와 손자의 나이를 더하면 78일 때, 현재 손자는 몇 살입니까?

Answer: 10

Solution (Python):
var_a = 78
var_b = 4
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 1
var_g = 6
var_h = var_f + var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Yeon-seok ran 18 meters (m) today. If he doubles his distance each day, find how many meters (m) he would run on the fourth day.
Question (KO): 연석이는 오늘 18미터(m)를 달렸습니다. 매일 2배씩 거리를 늘려 달린다면 넷째날에는 몇 미터(m)를 달리게 되는 지 구하세요.

Answer: 144

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

Question (EN): Yoongi collected 4 apples, Jungkook collected 6 divided by 3 apples, and Yuna collected 5 apples. Whose apples are the most?
Question (KO): 윤기는 4개, 정국이는 6 나누기 3만큼의 사과를 모았고, 유나는 5개의 사과를 모았습니다. 누가 가진 사과가 가장 많습니까?

Answer: Yuna

Solution (Python):
var_a = 'Yoongi'
var_b = 'Jungkook'
var_c = 'Yuna'
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 = 4
var_e = 6
var_f = 3
var_g = var_e // var_f
var_h = 5
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_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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: Possibility

Question (EN): Find the sum of the largest and the third smallest three-digit number that can be created by using the three natural numbers 1, 6, and 8 once.
Question (KO): 세 자연수 1, 6, 8을 한 번씩 이용하여 만들 수 있는 가장 큰 세 자리 수와 세 번째로 작은 세 자리 수의 합을 구하시오.

Answer: 1479

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 = 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-1]
var_i = var_f + var_h
print(int(var_i))
Category: Geometry

Question (EN): A piece of paper that is 12 centimeters (cm) long was folded in half once, leaving a line in the middle. How long is it from the end of the paper to the central line?
Question (KO): 길이가 12센티미터(㎝)인 종이를 반으로 한 번 접었더니 가운데에 선이 하나 생겼습니다. 종이의 끝에서 가운데 선까지의 길이는 얼마입니까?

Answer: 6

Solution (Python):
var_a = 12
var_b = 2
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): Some fruit boxes contain pears and apples. When these fruits were packed in 4 pieces, 12 bundles came out and 3 pieces remained. If there are 12 apples, how many pears are there?
Question (KO): 어떤 과일 박스에 배와 사과가 들어있다. 이 과일을 4개씩 포장하였더니 12묶음이 나오고 3개가 남았다. 사과가 12개 있다면, 배는 몇 개인지 구하시오.

Answer: 39

Solution (Python):
var_a = 12
var_b = 4
var_c = var_a * var_b
var_d = 3
var_e = var_c + var_d
var_f = 12
var_g = var_e - var_f
print(int(var_g))
Category: Correspondence

Question (EN): 17 is the result of mistakenly subtracting 82 from a certain number that should have subtracted 28. Find the certain number.
Question (KO): 17은 어떤수에서 28을 빼야 할것을 실수로 82를 빼서 나온 결과입니다. 어떤 수를 구하세요.

Answer: 99

Solution (Python):
var_a = 17
var_b = 82
var_c = var_a + var_b
print(int(var_c))
Category: Correspondence

Question (EN): We have the expression 38A-B1=364. Find the number that is required in B.
Question (KO): 식 38A-B1=364이 있습니다. B에 들어가야 하는 숫자를 구하시오

Answer: 2

Solution (Python):
var_a = '38A-B1=364'
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: Arithmetic calculation

Question (EN): Eunji went to the mart. She bought a toy with 1/4 of the total money and a book with 1/3 of the remaining money. If she ended up having 1,600 won, how much money did Eunji take at the beginning?
Question (KO): 은지는 마트에 갔습니다. 가지고 간 돈의 1/4로 장난감을 사고, 나머지 돈의 1/3로 책을 샀습니다. 남은 돈이 1,600원이라면 은지가 처음에 가지고 간 돈은 얼마입니까?

Answer: 3200

Solution (Python):
var_a = 1600
var_b = 1
var_c = 0.3333333333333333
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 1
var_g = 0.25
var_h = var_f - var_g
var_i = var_e / var_h
print(int(eval('{:.2f}'.format(round(var_i+1e-10,2)))))
Category: Geometry

Question (EN): What is the number of edges of a cube?
Question (KO): 정육면체가 있을 때 모서리의 수를 구하시오.

Answer: 12

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

Question (EN): I should have added 32 to a number and multiply it by 12 but I accidently multiplied it by 3 and subtracted 45, and 159 came out as a result. If you calculate this correctly, how much is it? 
Question (KO): 어떤 수에 32를 더하고 12를 곱하여야 하는데 실수로 3을 곱하고 45를 빼서 159가 나왔다고 한다. 올바르게 계산하면 얼마인지 구하시오.

Answer: 1200

Solution (Python):
var_a = 159
var_b = 45
var_c = var_a + var_b
var_d = 3
var_e = var_c / var_d
var_f = 32
var_g = var_e + var_f
var_h = 12
var_i = var_g * var_h
print(int(var_i))
Category: Possibility

Question (EN): If there are 3 bus routes and 2 subway routes going from Seohee's house to school, find the number of ways to go by subway.
Question (KO): 서희네 집에서 학교까지 가는 버스 노선은 3개, 지하철 노선은 2개일 때 지하철로 가는 경우의 수를 구하시오.

Answer: 2

Solution (Python):
var_a = 3
var_b = 2
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 = 'bus'
var_d = 'subway'
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 = 'subway'
var_f = list_b.index(var_e)+1
var_g = list_a[var_f-1]
print(int(var_g))
Category: Possibility

Question (EN): You are playing ball toss. If you hit inside the red circle, you get 3 points, if you hit inside the yellow circle, you get 2 points, and if you don't hit inside the circle, you get 1 point. How many different points can you get by throwing the ball 3 times?
Question (KO): 공 던지기 놀이를 합니다. 빨간색 원 안에 맞히면 3점, 노란색 원 안에 맞히면 2점, 원 안에 맞히지 못하면 1점입니다. 공을 3번 던질 때 얻을 수 있는 서로 다른 점수는 모두 몇 가지입니까?

Answer: 27

Solution (Python):
var_a = 3
var_b = 2
var_c = 1
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.product(list_b, repeat=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]
list_c=[]
for i in list_b:
    var_e = 0
    i = int(i)
    while i//10 > 0:
        var_e = var_e + i%10
        i = i//10
    var_e = var_e + i%10
    list_c.append(var_e)
var_f = len(list_c)
print(int(var_f))
Category: Comparison

Question (EN): The four students, Yoongi, Jungkook, Yuna, and Yoojung, each have the numbers 7, 6, 9, and 8. Who has the 2nd smallest number?
Question (KO): 네 명의 학생 윤기, 정국, 유나, 유정은 각각 7, 6, 9, 8만큼의 숫자를 가지고 있습니다. 2번째로 작은 숫자를 가진 사람은 누구입니까?

Answer: Yoongi

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

Question (EN): The three friends Seunga, Kyunghwan, and Doyun each have 20,000 won in pocket money. Looking at the remaining pocket money of the three people, if Seunga is 1/4 of the total, Kyunghwan is 1/8 of the total, and Doyun is 1/5 of the total, find out who spent the most pocket money.
Question (KO): 승아, 경환, 도윤 세 친구에겐 각각 용돈이 2만원씩 있습니다. 세 사람이 쓰고 남은 용돈을 보니 승아는 전체의 1/4, 경환이는 전체의 1/8, 도윤이는 전체의 1/5라면 용돈을 가장 많이 쓴 사람은 누구인지 구하시오.

Answer: Kyunghwan

Solution (Python):
var_a = 'Seunga'
var_b = 'Kyunghwan'
var_c = 'Doyun'
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 1
var_e = 0.25
var_f = var_d - var_e
var_g = 1
var_h = 0.125
var_i = var_g - var_h
var_j = 1
var_k = 0.2
var_l = var_j - var_k
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p)
Category: Arithmetic calculation

Question (EN): The number of blue marbles is 3 times the number of red marbles and the number of red marbles is 15 more than the number of yellow marbles. If the number of all marbles is 165, find the number of blue marbles.
Question (KO): 파란 구슬 수는 빨간 구슬 수의 3배이고 빨간 구슬의 수는 노란 구슬의 수보다 15개가 더 많다. 모든 구슬의 개수가 165개 일 때, 파란 구슬의 수를 구하시오.

Answer: 108

Solution (Python):
var_a = 165
var_b = 15
var_c = var_a + var_b
var_d = 3
var_e = 1
var_f = 1
var_g = var_e + var_f
var_h = var_d + var_g
var_i = var_c / var_h
var_j = 3
var_k = var_i * var_j
print(int(var_k))
Category: Possibility

Question (EN): You want to create a three-digit number using some numbers from 2, 0, 5, 9, and 6 without any duplicates. Find the value of the largest number minus the smallest number.
Question (KO): 2, 0, 5, 9, 6 중에서 3개를 뽑아 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 가장 큰 수와 가장 작은 수의 차를 구하시오.

Answer: 760

Solution (Python):
var_a = 2
var_b = 0
var_c = 5
var_d = 9
var_e = 6
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.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
var_l = abs(var_k)
print(int(var_l))
Category: Arithmetic calculation

Question (EN): Jimin went to the stationery store and bought 37 red ballpoint pens and 17 blue ballpoint pens. How many ballpoint pens are there in all?
Question (KO): 지민이는 문구점에 가서 빨간 볼펜 37자루와 파란 볼펜 17자루를 샀습니다. 볼펜은 모두 몇 자루입니까?

Answer: 54

Solution (Python):
var_a = 37
var_b = 17
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): Hyeonseong made a hexagonal pyramid with a side edge of 8 centimeters (cm) on colored paper during math class. If the sum of the lengths of all the edges of this pyramid is 120 centimeters (cm), how long is the length of one edge of the base?
Question (KO): 현성이는 수학시간에 색종이로 옆면의 모서리의 길이가 8센티미터(㎝)인 육각뿔을 만들었습니다. 이 각뿔의 모든 모서리의 길이의 합이 120센티미터(㎝)라면, 밑면의 한 변의 길이는 몇이 되겠습니까?

Answer: 12

Solution (Python):
var_a = 120
var_b = 8
var_c = 6
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 6
var_g = var_e / var_f
print(int(var_g))
Category: Correspondence

Question (EN): I need to subtract 23 from a number, but I accidentally subtracted 32 and it turned out to be 25. How much do you get if you calculate it right?
Question (KO): 23을 어떤 수에서 빼야하는데 실수로 32를 뺐더니 25가 됐습니다. 바르게 계산하면 얼마입니까?

Answer: 34

Solution (Python):
var_a = 25
var_b = 32
var_c = var_a + var_b
var_d = 23
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): There are candies in the box. If you pack 30 of these candies, you have 14 leftovers, if you pack 50 of these candies, you have 24 left over, and if you pack 70 of these candies, you have 34 left over. Find the minimum number of candies in the box.
Question (KO): 상자 안에 사탕이 들어 있습니다. 이 사탕을 30개씩 포장하면 14개가 남고, 50개씩 포장하면 24개가 남고, 70개씩 포장하면 34개가 남습니다. 상자 안에 들어있는 사탕은 최소 몇 개인지 구하시오.

Answer: 524

Solution (Python):
var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 30
var_e = 14
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 50
var_g = 24
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 70
var_i = 34
list_d = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_c:
    i = int(i)
    if i%var_h == var_i:
        list_d.append(i)
var_j = 1
list_e=list_d.copy()
list_e.sort()
var_k = list_e[var_j-1]
print(int(var_k))