philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Which three-digit number is the largest multiple of 6 and multiple of 5 and multiple of 8 and multiple of 9?
Question (KO): 6의 배수이면서 5의 배수이면서 8의 배수이면서 9의 배수인 수 중 가장 큰 세 자리 수는?

Answer: 720

Solution (Python):
var_a = 100
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
list_b = []
var_d = int(var_d)
for i in list_a:
    i = int(i)
    if i % var_d == 0:
        list_b.append(i)
var_e = 5
list_c = []
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i % var_e == 0:
        list_c.append(i)
var_f = 8
list_d = []
var_f = int(var_f)
for i in list_c:
    i = int(i)
    if i % var_f == 0:
        list_d.append(i)
var_g = 9
list_e = []
var_g = int(var_g)
for i in list_d:
    i = int(i)
    if i % var_g == 0:
        list_e.append(i)
var_h = 1
list_f=list_e.copy()
list_f.sort()
var_i = list_f[-var_h]
print(int(var_i))
Category: Arithmetic calculation

Question (EN): When water in a beaker was poured into a 120 milliliter (ml) bucket, 2 buckets were filled and 2.4 milliliters (ml) remained in the beaker. Calculate how many milliliters (ml) each of the three beakers contains if the same amount of water is equally divided into three beakers.
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): Seokjin solved 12 Korean problems, and he solved 7 more afterwards. How many problems did he solve?
Question (KO): 석진이는 국어 문제 12개를 푼 후에 7개를 더 풀었습니다. 석진이는 국어 문제를 모두 몇 개 풀었습니까?

Answer: 19

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

Question (EN): You want to form a two-digit number by picking two different numbers from 0, 2, 4, 6, and 8. How many two-digit numbers can you make?
Question (KO): 0, 2, 4, 6, 8 중 서로 다른 2개의 숫자를 뽑아서 두 자리 수를 만들려고 합니다. 만들 수 있는 두 자리 수는 모두 몇 개입니까?

Answer: 16

Solution (Python):
var_a = 0
var_b = 2
var_c = 4
var_d = 6
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 = 2
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 = len(list_b)
print(int(var_g))
Category: Comparison

Question (EN): Which of the five numbers 5, 8, 1, 2, 6 is the smallest?
Question (KO): 5개의 숫자 5, 8, 1, 2, 6 중 가장 작은 숫자는 무엇입니까?

Answer: 1

Solution (Python):
var_a = 5
var_b = 8
var_c = 1
var_d = 2
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 = 1
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
print(int(var_g))
Category: Geometry

Question (EN): Fifteen pieces of rectangular colored tape, 9.4 cm (cm) wide and 3.7 cm (cm) long, overlap each other by 0.6 centimeters (cm). Find the total area of the entire colored tape joint together, excluding the overlapping area.
Question (KO): 가로가 9.4센티미터(㎝), 세로가 3.7센티미터(㎝)인 직사각형 모양의 색 테이프를 가로 부분이 0.6센티미터(㎝)씩 겹치도록 15장을 이어 붙였습니다. 이어 붙인 색 테이프 전체의 넓이를 구하시오.

Answer: 490.62

Solution (Python):
var_a = 9.4
var_b = 15
var_c = var_a * var_b
var_d = 15
var_e = 1
var_f = var_d - var_e
var_g = 0.6
var_h = var_f * var_g
var_i = var_c - var_h
var_j = 3.7
var_k = var_i * var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Possibility

Question (EN): Use the number cards 1, 6, and 8 all once to find the third small three-digit number.
Question (KO): 숫자 카드 1, 6, 8를 한 번씩 모두 사용하여 세 번째 작은 세 자리 수를 구하시오.

Answer: 618

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 = 3
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
print(int(var_f))
Category: Geometry

Question (EN): There is a parallelogram whose 2 times the sum of its base and its height is 56. If the base is 16 centimeters (cm), what is the area of the parallelogram?
Question (KO): 밑변과 높이의 합의 2배가 56인 평행사변형이 있습니다. 밑변이 16센티미터(㎝)이면, 평행사변형의 넓이는 얼마입니까?

Answer: 192

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

Question (EN): When I ran one lap around the playground, I ran at 15 kilometers (km) per hour the first time, and ran at 10 kilometers (km) per hour the second time, which took 30 minutes longer than the first time. Find the time to run the playground for the second time.
Question (KO): 운동장을 한 바퀴 뛸 때 처음에는 시속 15킬로미터(㎞)로 달렸고, 두 번째에는 시속 10킬로미터(㎞)로 달렸더니 처음보다 30분이 더 걸렸다. 두 번째에 운동장을 돈 시간을 구하시오.

Answer: 1.5

Solution (Python):
var_a = 10
var_b = 30
var_c = 60
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 15
var_g = 10
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 30
var_k = 60
var_l = var_j / var_k
var_m = var_i + var_l
print('{:.2f}'.format(round(var_m+1e-10,2)))
Category: Arithmetic calculation

Question (EN): The large barrel contained 10 liters (L) of juice and the small barrel contained 8 liters (L) of juice. When 3 liters (L) of juice from the small barrel is poured into a large barrel, how many more liters (L) of juice is in the large barrel than the juice in the small barrel?
Question (KO): 큰 통에는 10리터(L)의 주스가 들어 있고 작은 통에는 8리터(L)의 주스가 들어 있었습니다. 작은 통에 들어 있던 주스 3리터(L)를 큰 통에 따랐을 때 큰 통의 주스는 작은 통의 주스보다 몇 리터(L) 더 많습니까?

Answer: 8

Solution (Python):
var_a = 10
var_b = 3
var_c = var_a + var_b
var_d = 8
var_e = 3
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g))
Category: Geometry

Question (EN): A rectangular marble measuring 1120 centimeters (cm) by 630 centimeters (cm) will be cut and used to cover the floor. If you cut marble into squares with sides measuring 70 centimeters (cm), how many can you make?
Question (KO): 가로가 1120센티미터(㎝), 세로가 630센티미터(㎝)인 직사각형 모양의 대리석을 잘라 마룻바닥을 덮는 데 사용하려고 합니다. 대리석을 한 변의 길이가 70센티미터(㎝)인 정사각형 모양으로 자른다면, 몇 개까지 만들 수 있습니까?

Answer: 144

Solution (Python):
var_a = 1120
var_b = 70
var_c = var_a // var_b
var_d = 630
var_e = 70
var_f = var_d // var_e
var_g = var_c * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): A water bottle is full of water. After scooping out the water 20 times with a 250 milliliter (㎖) cup and 13 times with a 600 milliliter (㎖) cup from this water bottle, the water bottle became completely empty. How many liters (L) does this water bottle hold?
Question (KO): 어떤 물통에 물이 가득 들어있습니다. 이 물통에서 250밀리리터(㎖) 들이의 컵으로 물을 가득 담아 20번 퍼낸 후, 600밀리리터(㎖) 들이의 컵으로 물을 가득 담아 13번 퍼내었더니 물통이 완전히 비워졌습니다. 이 물통의 들이는 몇 리터(L)입니까?

Answer: 12.8

Solution (Python):
var_a = 250
var_b = 20
var_c = var_a * var_b
var_d = 600
var_e = 13
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 1000
var_i = var_g / var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Comparison

Question (EN): Find how many numbers among 0.8, 1/2, 0.3 are less than 0.4.
Question (KO): 0.8, 1/2, 0.3 중 0.4보다 작은 수의 개수를 구하시오.

Answer: 1

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.3
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 = 0.4
list_b = []
for i in list_a:
    if i < var_d:
        list_b.append(i)
var_e = len(list_b)
print(int(var_e))
Category: Correspondence

Question (EN): Multiply a number by 11, add 6, divide that number by 5, then subtract 42 and the result is 12. Find the number.
Question (KO): 어떤 수에 11을 곱한 후 6을 더하고, 그 값을 5로 나눈 후 42를 뺀 값이 12입니다. 어떤 수를 구하시오.

Answer: 24

Solution (Python):
var_a = 12
var_b = 42
var_c = var_a + var_b
var_d = 5
var_e = var_c * var_d
var_f = 6
var_g = var_e - var_f
var_h = 11
var_i = var_g / var_h
print(int(var_i))
Category: Comparison

Question (EN): What is the sum of all numbers less 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: 0.33

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: Arithmetic calculation

Question (EN): Find the number of divisors of 32.
Question (KO): 32의 약수의 개수를 구하시오.

Answer: 6

Solution (Python):
var_a = 32
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
    if var_a % i == 0:
        list_a.append(i)
        list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = len(list_a)
print(int(var_b))
Category: Arithmetic calculation

Question (EN): The average score for Korean and mathematics is 86 points. Find the average score of the three subjects when English is 98 points.
Question (KO): 국어, 수학의 평균 점수가 86점이다. 영어가 98점일때 세과목의 평균 점수를 구하여라

Answer: 90

Solution (Python):
var_a = 86
var_b = 2
var_c = var_a * var_b
var_d = 98
var_e = var_c + var_d
var_f = 3
var_g = var_e / var_f
print(int(var_g))
Category: Geometry

Question (EN): Try to make a square as small as possible by arranging rectangular cards with a width of 20 centimeters (cm) and a length of 8 centimeters (cm) without overlapping. How many cards will you need in total?
Question (KO): 가로가 20 센티미터(㎝), 세로가 8 센티미터(㎝)인 직사각형 모양의 카드를 겹치지 않게 늘어놓아 최대한 작은 정사각형을 만들려고 합니다. 카드는 모두 몇 장 필요할까요?

Answer: 10

Solution (Python):
var_a = 20
var_b = 8
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
var_d = 2
var_e = var_c ** var_d
var_f = 20
var_g = 8
var_h = var_f * var_g
var_i = var_e / var_h
print(int(var_i))
Category: Comparison

Question (EN): There are a total of 4 numbers: 0.8, 1/2, 0.5 and 1/3. What is the sum of all given numbers less than 3?
Question (KO): 총 4개의 숫자 0.8, 1/2, 0.5, 1/3이 있습니다. 이 중 3보다 작은 수를 모두 더하면 얼마인가요?

Answer: 2.13

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.5
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 = 3
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: Comparison

Question (EN): Yoongi has 4 apples and Jungkook had 6 apples, but he has eaten 3. Who has fewer apples?
Question (KO): 윤기가 가진 사과가 4개, 정국이는 6개의 사과의 사과를 가지고 있었지만 3개를 먹었습니다. 누가 더 적은 사과를 가지고 있나요?

Answer: Jungkook

Solution (Python):
var_a = 'Yoongi'
var_b = 'Jungkook'
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 = 6
var_e = 3
var_f = var_d - var_e
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Possibility

Question (EN): Using number cards 1, 6, and 8 all once, find the difference between the second largest three-digit number and the third largest three-digit number.
Question (KO): 숫자 카드 1, 6, 8를 한 번씩 모두 사용하여 두 번째로 큰 세 자리 수와 세 번째로 큰 세 자리수의 차를 구하시오.

Answer: 198

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]
var_g = 3
var_h = list_b[var_g-1]
var_i = var_f - var_h
var_j = abs(var_i)
print(int(var_j))
Category: Geometry

Question (EN): When attaching a square picture drawn by students to a rectangular blackboard 120 centimeters (cm) wide and 96 centimeters (cm) long without any remaining parts, find how many centimeters (cm) long a side should be to maximize the size of the picture.
Question (KO): 가로가 120센티미터(㎝), 세로가 96센티미터(㎝)인 직사각형 모양의 칠판에 학생들이 그린 정사각형 모양의 그림을 남는 부분 없이 붙일 때, 그림의 크기가 최대가 되려면 한 변의 길이는 몇 센티미터(㎝)가 되어야 하는지 구하시오.

Answer: 24

Solution (Python):
var_a = 120
var_b = 96
var_c = math.gcd(int(var_b), int(var_a))
print(int(var_c))
Category: Geometry

Question (EN): Two of the triangle's three angles measure 30 degrees and 60 degrees, respectively. What is the measure of the other angle of this triangle in degrees?
Question (KO): 삼각형의 세 각 중 두 각의 크기는 각각 30도, 60도였습니다. 이 삼각형의 나머지 한 각의 크기는 몇 도입니까?

Answer: 90

Solution (Python):
var_a = 180
var_b = 30
var_c = var_a - var_b
var_d = 60
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): What is the sum of the numbers 6, 8 and 11?
Question (KO): 숫자 6, 8, 11의 합은 얼마입니까?

Answer: 25

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

Question (EN): Find the sum of the largest number and the second smallest number among 75, 91, 83, and 72.
Question (KO): 네 개의 수 75, 91, 83, 72 중 가장 큰 수와 2번째로 작은 수를 더한 값을 구하시오.

Answer: 166

Solution (Python):
var_a = 75
var_b = 91
var_c = 83
var_d = 72
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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 2
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: Geometry

Question (EN): You want to find the length and width of a rectangle whose perimeter is 16 centimeters (cm) and whose length is shorter than its width by 2 centimeters (cm). What is the horizontal length?
Question (KO): 둘레의 길이가 16 센티미터(㎝)이고, 세로의 길이가 가로의 길이보다 2 센티미터(㎝)만큼 짧은 직사각형의 가로의 길이와 세로의 길이를 구하려고 한다. 가로의 길이는 얼마인가?

Answer: 5

Solution (Python):
var_a = 16
var_b = 2
var_c = var_a / var_b
var_d = 2
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
var_i = var_g + var_h
print(int(var_i))
Category: Comparison

Question (EN): Yuna has the 5th most pencils in her class, right after Eunji. What order does Eunji in when it comes to having the most pencils?
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): If a prism with two congruent and parallel bases has 21 edges, find the number of vertices.
Question (KO): 두 밑 면이 합동이고 평행한 어떤 각기둥의 모서리가 21개일 때, 꼭짓점의 개수는 몇 개인지 구하시오.

Answer: 14

Solution (Python):
var_a = 21
var_b = 3
var_c = var_a / var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): The number of ways going from school to the library is 2, and the number of ways going from the library to home is 3. Find the number of ways to go home from school via the library.
Question (KO): 학교에서 도서관까지 가는 경우의 수가 2가지, 도서관에서 집까지 가는 경우의 수가 3가지이다. 학교에서 도서관을 거쳐 집으로 가는 경우의 수를 구하시오.

Answer: 6

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

Question (EN): Jungkook collected 6 times 3 apples, and Yoongi collected 4 apples. Who has more apples?
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: Geometry

Question (EN): Mijin took a cube-shaped box with one edge 2 centimeters (cm) long and made a cube box with one edge 10 centimeters (cm) long. yellow colored paper was attached to all sides of the cube-shaped box that was created. How many small cube boxes with yellow confetti on one side?
Question (KO): 미진이는 한 모서리의 길이가 2센티미터(㎝)인 정육면체 모양의 상자를 가지고 한 모서리의 길이가 10센티미터(㎝)인 정육면체 상자를 만들었습니다. 만들어진 정육면체 모양의 상자의 모든 면에 노란색 색종이를 붙였습니다. 1개의 면에 노란색 색종이가 붙은 작은 정육면체 상자는 모두 몇 개입니까?

Answer: 54

Solution (Python):
var_a = 10
var_b = 2
var_c = var_a / var_b
var_d = 2
var_e = var_c - 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: Correspondence

Question (EN): When 1A+4B3=469 is true, what number should go in A?
Question (KO): 1A+4B3=469일 때, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 6

Solution (Python):
var_a = '1A+4B3=469'
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): During Chuseok, Minjun decided to stop by his mother's house first and then go to his father's side. It takes 10 kilometers (km) and 700 meters (m) from Minjun's house to his mother's house, and the distance from the mother's side to the father's side is 24 kilometers (km) and 900 meters (m). Find the distance between Minjun's house and the midpoint of the way from his mother's to his father's house in meters (m).
Question (KO): 민준이는 추석 때 외가에 먼저 들린 후 친가에 가기로 했습니다. 민준이네 집에서 외가까지는 10킬로미터(㎞) 700미터(m)이고, 외가에서 친가까지의 거리는 24킬로미터(㎞) 900미터(m)입니다. 민준이가 외가를 거쳐 친가까지 가는 거리의 중간 지점은 집에서부터 몇 미터(m)인지 구하시오.

Answer: 12450

Solution (Python):
var_a = 10
var_b = 1000
var_c = var_a * var_b
var_d = 700
var_e = var_c + var_d
var_f = 24
var_g = 1000
var_h = var_f * var_g
var_i = 900
var_j = var_h + var_i
var_k = 2
var_l = var_j / var_k
print(int(var_l))
Category: Arithmetic calculation

Question (EN): If animal (A) and animal (B) are added together, there are 17 animals. If there are 8 (B)s, how many (A)s are there?
Question (KO): (가) 동물과 (나) 동물을 합하면 17마리입니다. 그중에서 (나) 동물이 8마리라면 (가) 동물은 몇 마리입니까?

Answer: 9

Solution (Python):
var_a = 17
var_b = 8
var_c = var_a - var_b
print(int(var_c))
Category: Possibility

Question (EN): Eight teams will play basketball. The two teams play, the losing team is eliminated and the winning team advances to the next game. How many matches are played when the last team to win wins?
Question (KO): 8개의 팀이 농구 경기를 합니다. 두팀이 시합을 하여 진 팀은 떨어지고 이긴팀만 다음 경기를 진행합니다. 마지막에 이긴 팀이 우승을 할때 경기는 총 몇번 진행됩니까?

Answer: 7

Solution (Python):
var_a = 8
var_b = 2
var_c = var_a / var_b
var_d = 8
var_e = 2
var_f = var_d / var_e
var_g = 2
var_h = var_f / var_g
var_i = 8
var_j = 2
var_k = var_i / var_j
var_l = 2
var_m = var_k / var_l
var_n = 2
var_o = var_m / var_n
var_p = var_h + var_o
var_q = var_c + var_p
print(int(var_q))
Category: Correspondence

Question (EN): The equation 68A-3=684 holds. What number should be in A?
Question (KO): 등식 68A-3=684이 성립한다고 합니다. A에 들어가야 하는 숫자는 무엇인가요?

Answer: 7

Solution (Python):
var_a = '68A-3=684'
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))