philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): When a basket containing several watermelons of the same weight was 63 kilograms (kg), its weight changed to 34 kilograms (kg) after half of the watermelon was removed. What is the weight of watermelons in total?
Question (KO): 무게가 같은 수박 여러개가 담긴 바구니의 무게를 재었더니 63킬로그램(㎏)이었습니다. 절반의 수박을 덜어낸 후 무게를 재어 보니 34킬로그램(㎏)이 되었습니다. 처음 바구니에 담겨 있던 수박의 무게는 몇 킬로그램(㎏)입니까?

Answer: 58

Solution (Python):
var_a = 63
var_b = 34
var_c = var_a - var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): If you use the number cards 4, 5, and 6 once to form a 3-digit number less than 560, how many cases match the condition?
Question (KO): 숫자 카드 4, 5, 6을 한 번씩 사용하여 560보다 작은 세 자리 수를 만들었을 때, 조건에 맞는 수는 모두 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 4
var_b = 5
var_c = 6
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 = 560
list_c = []
for i in list_b:
    if i < var_e:
        list_c.append(i)
var_f = len(list_c)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): Jungkook has 5 bundles of 8 pieces of colored paper. He is going to arrange this colored paper into 9 rows of 6 sheets each. How many more sheets of colored paper does he need?
Question (KO): 정국이는 색종이를 8장씩 5묶음 가지고 있습니다. 이 색종이를 6장씩 9줄로 늘어놓으려고 합니다. 몇 장의 색종이가 더 필요합니까?

Answer: 14

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

Question (EN): There is a trapezoid with an upper side of 10 centimeters (cm) and a lower side that is twice the length of the upper side. If the height of this trapezoid is 5 centimeters (cm), What is the area of this trapezoid in square centimeters (cm2)?
Question (KO): 윗변이 10센티미터(㎝)이고, 아랫변 길이는 윗변 길이의 2배인 사다리꼴이 있습니다. 이 사다리꼴의 높이가 5센티미터(㎝)일 때 넓이는 몇 제곱센티미터입니까?

Answer: 75

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

Question (EN): The perimeter of a square with one side length of 80 centimeters (cm) is equal to the perimeter of a rectangle with a vertical length of 100 centimeters (cm). How many centimeters (cm) is the horizontal length of the rectangle?
Question (KO): 한 변의 길이가 80센티미터(㎝)인 정사각형의 둘레와 세로 길이가 100센티미터(㎝)인 직사각형의 둘레가 같습니다. 직사각형의 가로 길이는 몇 센티미터(㎝)입니까?

Answer: 60

Solution (Python):
var_a = 80
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
var_f = 100
var_g = var_e - var_f
print(int(var_g))
Category: Correspondence

Question (EN): Hoseok multiplied a certain number by 8 to get 64. Find the result of multiplying this number by 7.
Question (KO): 호석이는 어떤 수에 8을 곱해 64를 얻었습니다. 어떤 수에 7을 곱한 결과를 구하시오.

Answer: 56

Solution (Python):
var_a = 64
var_b = 8
var_c = var_a / var_b
var_d = 7
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): 12 boxes of 25 apples were sold in 4 days. On average, how many apples are sold per day?
Question (KO): 25개의 사과가 든 상자 12개를 4일 만에 다 팔았다. 하루에 판매된 평균 사과는 몇 개인가?

Answer: 75

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

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

Answer: 1.27

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
var_e = 14
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
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g / var_i
print('{:.2f}'.format(round(var_j+1e-10,2)))
Category: Correspondence

Question (EN): 1A+4B3=469. How much is B?
Question (KO): 1A+4B3=469입니다. B는 얼마인가요?

Answer: 5

Solution (Python):
var_a = '1A+4B3=469'
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: Comparison

Question (EN): Three students order snacks at a cafe. Sangwoo ordered 8 snacks and Jaehyuk ordered 10. Minsu bought more snacks than Sangwoo and less than Jaehyuk. How many snacks did Minsu buy?
Question (KO): 카페에서 3명의 학생이 과자를 주문합니다. 상우는 과자 8개를 주문하였고 재혁이는 10개를 주문했습니다. 민수는 상우보다는 과자를 많이 사고 재혁이보다는 적게 샀습니다. 민수가 산 과자는 모두 몇 개입니까?

Answer: 9

Solution (Python):
var_a = 8
var_b = 10
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e))
Category: Comparison

Question (EN): In the multiplication of two-digit numbers, the number 5 in the tens place of the multiplying number was mistakenly calculated as 3, and the product value was 1485. If the correctly calculated value is 2385, write the larger two-digit numbers.
Question (KO): 두 자리 수끼리의 곱셈에서 곱하는 수의 십의 자리 숫자 5를 3으로 잘못 보고 계산한 값이 1485가 되었습니다. 바르게 계산한 값이 2385일 때, 2개의 두 자리 수 중 더 큰 수를 쓰시오.

Answer: 53

Solution (Python):
var_a = 1485
var_b = 2385
var_c = var_a - var_b
var_d = 3
var_e = 5
var_f = var_d - var_e
var_g = 10
var_h = var_f * var_g
var_i = var_c / var_h
var_j = 2385
var_k = 1485
var_l = 2385
var_m = var_k - var_l
var_n = 3
var_o = 5
var_p = var_n - var_o
var_q = 10
var_r = var_p * var_q
var_s = var_m / var_r
var_t = var_j / var_s
list_a= []
if "/" in str(var_t):
    var_t = eval(str(var_t))
list_a.append(var_t)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_a.append(var_i)
list_a.reverse()
var_u = 1
list_b=list_a.copy()
list_b.sort()
var_v = list_b[-var_u]
print(int(var_v))
Category: Correspondence

Question (EN): When you multiply a certain number by 8 and add 5400 and divide it by 12, the resulting quotient is 530. Find that number.
Question (KO): 어떤 수에 8을 곱한 다음 5400을 더한 후 12로 나눈 몫이 530이다. 어떤 수를 구하시오.

Answer: 120

Solution (Python):
var_a = 530
var_b = 12
var_c = var_a * var_b
var_d = 5400
var_e = var_c - var_d
var_f = 8
var_g = var_e / var_f
print(int(var_g))
Category: Comparison

Question (EN): Jungkook, Yoojeong, and Seokjin are standing on the stairs. The stairs Jungkook is standing on are the 19th stairs. If Yoojeong climbed 8 steps higher than Jungkook and Seokjin climbed 5 steps less than Yoojung, how many steps is Seokjin higher than Jungkook?
Question (KO): 정국, 유정, 석진이 계단에 서 있습니다. 정국이가 서 있는 계단이 19번째 계단입니다. 유정이는 정국이보다 8계단 더 올라갔고, 석진이는 유정이보다 5계단 덜 올라갔을 때, 석진이는 정국이보다 몇 계단 위에 있습니까?

Answer: 3

Solution (Python):
var_a = 19
var_b = 8
var_c = var_a + var_b
var_d = 5
var_e = var_c - var_d
var_f = 19
var_g = var_e - var_f
print(int(var_g))
Category: Correspondence

Question (EN): Yoongi got 15 after subtracting 46 from a certain number. Next, Hoseok subtracted 29 from this same number to get the result. What is the value of this result?
Question (KO): 윤기는 어떤 수에서 46을 빼 15를 얻었습니다. 다음으로 호석이는 어떤 수에서 29를 빼어 결과를 얻었습니다. 이 결과값은?

Answer: 32

Solution (Python):
var_a = 15
var_b = 46
var_c = var_a + var_b
var_d = 29
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Find the sum of the largest and smallest odd numbers from 5 to 12.
Question (KO): 5부터 12까지의 홀수 중 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 16

Solution (Python):
var_a = 5
var_b = 12
list_a = []
if var_a%2==0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
var_c = 1
list_b=list_a.copy()
list_b.sort()
var_d = list_b[-var_c]
var_e = 1
list_c=list_a.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = var_d + var_f
print(int(var_g))
Category: Geometry

Question (EN): There is a pentagon. What is the sum of the number of edges and the number of vertices?
Question (KO): 오각형이 있습니다. 변의 수와 꼭짓점의 수를 모두 더하면 몇 개 일까요?

Answer: 10

Solution (Python):
var_a = 5
var_b = 5
var_c = var_a + var_b
print(int(var_c))
Category: Possibility

Question (EN): If you write down all the even numbers up to 100 on a piece of paper, how many times should you write down the number 1?
Question (KO): 100이하인 짝수를 모두 종이에 적으면, 숫자 1을 몇 번 적어야 하는지 구하시오.

Answer: 6

Solution (Python):
var_a = 1
var_b = 100
list_a = []
if var_a%2!=0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
var_c=""
for i in list_a:
    i = str(i)
    var_c = var_c + i
list_b = []
var_c = int(var_c)
while var_c//10 > 0:
    list_b.append(var_c%10)
    var_c = var_c//10
list_b.append(var_c%10)
list_b = list_b[::-1]
var_d = 1
var_e = 0
var_d = int(var_d)
for i in list_b:
    i = int(i)
    if i == var_d:
        var_e = var_e + 1
print(int(var_e))
Category: Correspondence

Question (EN): When any number is divided by 20, the quotient is 15 and the remainder is 6. What number is it?
Question (KO): 어떤 수를 20으로 나누면 몫은 15이고 나머지는 6입니다. 어떤 수는 얼마일까요?

Answer: 306

Solution (Python):
var_a = 15
var_b = 20
var_c = var_a * var_b
var_d = 6
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): Twenty-seven dice with each edge of 3 centimeters (cm) are stacked in the shape of a cube. What is the surface area of the stacked cubes in square centimeters (cm2)?
Question (KO): 한 모서리의 길이가 3센티미터(㎝)인 주사위 27개를 정육면체 모양으로 쌓았습니다. 쌓아 만든 정육면체의 겉넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 486

Solution (Python):
var_a = 3
var_b = 27
var_c = 0.3333333333333333
var_d = var_b ** var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e ** var_f
var_h = 6
var_i = var_g * var_h
print(int(var_i))
Category: Geometry

Question (EN): There is a square-shaped cookie. When you add up all the sides of this cookie, you get 17.8 centimeters (cm). Find the length of one side of the cookie.
Question (KO): 정사각형 모양의 쿠키가 있습니다. 이 쿠키의 모든 변의 길이를 다 더했더니 17.8센티미터(㎝)가 나왔습니다. 쿠키의 한 변의 길이를 구하시오.

Answer: 4.45

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

Question (EN): Minyoung collected 4 and 9. Yuna collected 5 and 6. Whose sum of numbers is greater?
Question (KO): 민영이는 4와 9를 모았습니다. 유나는 5와 6을 모았습니다. 누구의 모은 수의 합이 더 큽니까?

Answer: Minyoung

Solution (Python):
var_a = 'Minyoung'
var_b = 'Yuna'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 4
var_d = 9
var_e = var_c + var_d
var_f = 5
var_g = 6
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): Find the sum of the largest and smallest even numbers less than or equal to 49.
Question (KO): 49 이하의 짝수 중 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 50

Solution (Python):
var_a = 1
var_b = 49
list_a = []
if var_a%2!=0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
var_c = 1
list_b=list_a.copy()
list_b.sort()
var_d = list_b[-var_c]
var_e = 1
list_c=list_a.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = var_d + var_f
print(int(var_g))
Category: Possibility

Question (EN): When the four numbers 2, 5, 6, and 9 are written on the target board, write the sum of the third largest number and the third smallest number that can be made using three of them.
Question (KO): 과녁판에 4개의 숫자 2, 5, 6, 9가 적혀있을 때, 이 중 3개를 사용하여 만들 수 있는 세 번째 큰 수와 세 번째 작은 수의 합을 쓰시오.

Answer: 1221

Solution (Python):
var_a = 2
var_b = 5
var_c = 6
var_d = 9
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 = 3
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: Arithmetic calculation

Question (EN): The length of the string A is 5 times the length of the string B, and the length of A is 6 times longer than C. If B is 12 meters (m) long, what is the length of the string C in meters (m)?
Question (KO): (가) 끈의 길이는 (나) 끈의 5배입니다. (가) 끈의 길이는 (다) 끈의 6배입니다. (나) 끈의 길이가 12미터(m)이면 (다) 끈의 길이는 몇 미터(m)입니까?

Answer: 10

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

Question (EN): The cross-section of a sphere with a radius of 4 centimeters (cm) passing through the center of the sphere is a circle. Find the diameter of this circle.
Question (KO): 반지름이 4센티미터(㎝)인 구를 구의 중심을 지나도록 자른 단면은 원이다. 이 원의 지름을 구하시오.

Answer: 8

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

Question (EN): You want to find three-digit numbers that are greater than 550 and less than 850 by using three numbers from 5, 2, 8, and 0. How many three-digit numbers can you think of?
Question (KO): 5, 2, 8, 0 중에서 3개의 숫자를 사용하여 550보다 크고 850보다 작은 세 자리 수를 모두 만드려고 합니다. 만들 수 있는 세 자리 수의 개수는 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 5
var_b = 2
var_c = 8
var_d = 0
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 = 550
list_c = []
for i in list_b:
    if i > var_f:
        list_c.append(i)
var_g = 850
list_d = []
for i in list_c:
    if i < var_g:
        list_d.append(i)
var_h = len(list_d)
print(int(var_h))
Category: Geometry

Question (EN): The area of a rectangular notebook is 1.77 square centimeters (cm2). If the width is 3 centimeters (cm), how many centimeters (cm) is the length?
Question (KO): 어느 직사각형 모양의 공책의 각형의 넓이가 1.77제곱센티미터(㎠)입니다. 가로의 길이가 3센티미터(㎝)일 때, 세로의 길이는 몇 센티미터(㎝) 입니까?

Answer: 0.59

Solution (Python):
var_a = 1.77
var_b = 3
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Arithmetic calculation

Question (EN): It is said that several 25 centimeters (cm) bars are to be made. If you have a 2 meter (m) 50 centimeters (cm) bar, how many times do you have to cut the bar?
Question (KO): 25센티미터(㎝)막대를 여러개 만든다고 합니다. 2미터(m) 50센티미터(㎝) 막대가 있다고 할 때 막대를 몇 번 잘라야 하나요?

Answer: 9

Solution (Python):
var_a = 2
var_b = 100
var_c = var_a * var_b
var_d = 50
var_e = var_c + var_d
var_f = 25
var_g = var_e / var_f
var_h = 1
var_i = var_g - var_h
print(int(var_i))
Category: Comparison

Question (EN): Jungkook collected 6 multiplied by 3, and Yoongi collected 4. Who got the bigger number?
Question (KO): 정국이는 6에서 3을 곱한 수를 모았고, 윤기는 4를 모았습니다. 누가 더 큰 수를 모았나요?

Answer: Jungkook

Solution (Python):
var_a = 'Jungkook'
var_b = 'Yoongi'
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 = 3
var_e = var_c * var_d
var_f = 4
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: Comparison

Question (EN): In the jumping rope competition, Jimin placed 6th and Jungkook placed 8th. Taehyung did better than Jungkook but worse than Jimin. What is Taehyung's rank?
Question (KO): 줄넘기 시합에서 지민이는 6등을 했고, 정국이는 8등을 했습니다. 태형이는 정국이보다 잘했지만 지민이보다는 못했습니다. 태형이의 등수는 몇 등입니까?

Answer: 7

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

Question (EN): When a wire was divided by intervals of 120 centimeters (cm), it was split into two parts, with 2.4 centimeters (cm) being left. Find how many centimeters (cm) of wire you'll get if you divide this wire into three parts.
Question (KO): 어떤 철사를 120센티미터(㎝)씩 나눴더니 2개로 나뉘고 2.4센티미터(㎝)가 남았다. 이 철사를 3등분하면 몇 센티미터(㎝)의 철사가 나오는지 구하시오.

Answer: 80.8

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

Question (EN): There were 156 Strawberry Flavored Candies and 267 Lemon Flavored Candies in the box. I wrapped 115 of these and gave them to a friend. How many candies do I have left after giving my friend?
Question (KO): 상자 안에 딸기맛 사탕이 156개, 레몬맛 사탕이 267개 있었습니다. 이 중에서 115개를 포장하여 친구에게 주었습니다. 친구에게 주고 남은 사탕은 몇 개입니까?

Answer: 308

Solution (Python):
var_a = 156
var_b = 267
var_c = var_a + var_b
var_d = 115
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): The length of one edge of a cube is 9 centimeters (cm). From this cube, a small cube with one edge 2 centimeters (cm) long was cut from the vertex. What is the surface area of the remaining part in square centimeters (cm2)?
Question (KO): 어떤 정육면체의 한 모서리의 길이는 9센티미터(㎝)이다. 이 정육면체에서 한 모서리의 길이가 2센티미터(㎝)인 작은 정육면체를 꼭짓점 부분에서 잘라냈다. 남은 부분의 겉넓이는 몇 제곱센티미터(㎠)일까?

Answer: 486

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

Question (EN): There are 48 students in Seokjin's class. One day, there were 37 students who did math homework and 42 students who did Korean homework. If there is no student who has not done both math homework and Korean homework, how many students have done both math homework and Korean homework?
Question (KO): 석진이네 반에는 48명의 학생이 있습니다. 어느 날 수학 숙제를 해 온 학생이 37명, 국어 숙제를 해 온 학생이 42명이었습니다. 수학 숙제와 국어 숙제를 모두 하지 않은 학생이 한 명도 없을 때, 수학 숙제와 국어 숙제를 모두 해 온 학생은 몇 명입니까?

Answer: 31

Solution (Python):
var_a = 37
var_b = 42
var_c = var_a + var_b
var_d = 48
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): There are multi-colored pens in the stationery store. 3/10 of the pens in the stationery store are red and 1/5 are black. There are 12 red pens in the stationery store. Find how many black pens are in the stationery store.
Question (KO): 문구점에 여러 색의 펜이 있습니다. 문구점의 펜 중 3/10은 빨간펜이고 1/5는 검정펜입니다. 문구점에 빨간펜이 12개 있습니다. 문구점에 검정펜은 몇 개인지 구하시오.

Answer: 8

Solution (Python):
var_a = 12
var_b = 0.3
var_c = var_a / var_b
var_d = 0.2
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Yoo Seung's number of marbles is three times that of Han-sol's, and Han-sol's has 15 more marbles than Young-soo's. If the three of them have 165 marbles, how many marbles does Yoo Seung have?
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: Comparison

Question (EN): There are three people: Youngseo, Gunuk, and Suhwan. When Youngseo is heavier than Gunwook and Suhwan is heavier than Youngseo, who is the heaviest?
Question (KO): 영서, 건욱, 수환 세 사람이 있습니다. 영서는 건욱이보다 무겁고, 수환이는 영서보다 무거울 때, 가장 무거운 사람은 누구입니까?

Answer: Suhwan

Solution (Python):
var_a = 'Youngseo'
var_b = 'Gunuk'
var_c = 'Suhwan'
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 = 'Youngseo'
var_e = 'Gunuk'
var_f = '>'
var_g = 'Suhwan'
var_h = 'Youngseo'
var_i = '>'
list_b= []
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)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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_j = 1
var_k = list_c[var_j-1]
print(var_k)