philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): If there are 5 people A, B, C, D, E, find the number of ways to make A, C, and E stand next to each other.
Question (KO): A, B, C, D, E 5명이 있을 때, A, C, E를 이웃하여 세우는 경우의 수를 구하시오.

Answer: 36

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

Question (EN): The seven digits 0, 1, 2, 3, 4, 5, and 6 are used once to form a seven-digit number. When this number is a multiple of 55, find the second largest number.
Question (KO): 일곱 개의 숫자 0, 1, 2, 3, 4, 5, 6을 한 번씩 사용하여 일곱 자리 수를 만들었다. 이 수가 55의 배수일 때, 두 번째로 큰 수를 구하여라.

Answer: 6430215

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
var_f = 5
var_g = 6
list_a= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_a.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
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_h = 7
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_h))
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_i = 55
list_c = []
var_i = int(var_i)
for i in list_b:
    i = int(i)
    if i % var_i == 0:
        list_c.append(i)
var_j = 2
list_d=list_c.copy()
list_d.sort()
var_k = list_d[-var_j]
print(int(var_k))
Category: Arithmetic calculation

Question (EN): Find how many common multiples of 12 and 36 are less than or equal to 150.
Question (KO): 두 수 12, 36의 공배수 중에서 150보다 작거나 같은 수는 모두 몇 개인지 구하세요.

Answer: 4

Solution (Python):
var_a = 1
var_b = 150
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 12
var_e = 36
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
list_b = []
var_f = int(var_f)
for i in list_a:
    i = int(i)
    if i % var_f == 0:
        list_b.append(i)
var_g = len(list_b)
print(int(var_g))
Category: Comparison

Question (EN): What is the sum of numbers which are all greater than 0.4 among 0.8, 1/2, 0.9, and 1/3?
Question (KO): 0.8, 1/2, 0.9, 1/3 중에서 0.4보다 큰 수를 모두 더하면 얼마일까요?

Answer: 2.2

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.9
var_d = 0.3333333333333333
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 0.4
list_b = []
for i in list_a:
    if i > var_e:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print('{:.2f}'.format(round(var_f+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Out of odd numbers up to 10, find the sum of those that are not multiples of 3.
Question (KO): 10 이하의 홀수 중 3의 배수가 아닌 수들의 합을 구하시오.

Answer: 13

Solution (Python):
var_a = 1
var_b = 10
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 = 3
list_b = []
var_c = int(var_c)
for i in list_a:
    i = int(i)
    if i % var_c == 0:
        list_b.append(i)
list_c = list(set(list_a) - set(list_b))
list_c = [float(i) for i in list_c]
var_d = sum(list_c)
print(int(var_d))
Category: Geometry

Question (EN): There are eight rectangular-shaped playgrounds with the same length of 300 meters (m) and the same area. If the sum of the areas of the playgrounds is 0.6 square kilometers (km2), how many meters (m) are the width of the playground?
Question (KO): 세로의 길이가 300미터(m)로 같고 넓이도 같은 직사각형 모양의 운동장이 여덟 개 있습니다. 운동장들의 넓이의 합이 0.6제곱킬로미터(㎢)일 때, 운동장의 가로 길이는 몇 미터(m)인지 구하시오.

Answer: 250

Solution (Python):
var_a = 0.6
var_b = 1000
var_c = 1000
var_d = var_b * var_c
var_e = var_a * var_d
var_f = 8
var_g = var_e / var_f
var_h = 300
var_i = var_g / var_h
print(int(var_i))
Category: Geometry

Question (EN): A 94 centimeters (cm) piece of tape is folded as the middle to be overlapped in order to make a 68 centimeters (cm) piece. Find the length of the overlapping part.
Question (KO): 94센티미터(㎝)의 테이프를 중간이 겹치도록 접어 68센티미터(㎝)로 만들었습니다. 겹쳐진 부분의 길이를 구하시오.

Answer: 13

Solution (Python):
var_a = 94
var_b = 68
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Convert 22/8 to a decimal number.
Question (KO): 8분의 22를 소수로 나타내시오.

Answer: 2.75

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

Question (EN): Minjeong wants to paint the fence. Originally, he tried to take 4.372 milliliters (ml) from the paint canister, but accidentally took out 43.72 milliliters (ml), leaving 16.398 milliliters (ml) in the paint canister. If it was taken out as original, find how many milliliters (ml) are left in the paint canister.
Question (KO): 민정이는 울타리에 페인트를 칠하려고 합니다. 원래 페인트 통에서 4.372밀리리터(㎖)를 덜어내려고 했는데 실수로 43.72밀리리터(㎖)를 덜어내어 16.398밀리리터(㎖)가 페인트 통에 남았다고 한다. 원래대로 덜어내었다면 페인트 통에 몇 밀리리터(㎖)가 남았는지 구하시오.

Answer: 55.75

Solution (Python):
var_a = 16.398
var_b = 43.72
var_c = var_a + var_b
var_d = 4.372
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Comparison

Question (EN): Students stand in a line. Taehyung is standing in the front. Eight people are standing behind Namjoon. There are three people standing between Taehyung and Namjoon. How many students are in line?
Question (KO): 학생들이 한 줄로 서 있습니다. 태형이는 맨 앞에 서 있습니다. 남준이의 뒤에는 8명이 서 있습니다. 태형이와 남준이 사이에는 3명이 서 있습니다. 줄을 서 있는 학생은 모두 몇 명입니까?

Answer: 13

Solution (Python):
var_a = 1
var_b = 3
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
var_f = 8
var_g = var_e + var_f
print(int(var_g))
Category: Correspondence

Question (EN): A and B are single-digit numbers. Subtracting 2 from A is B, and the number 3 greater than 5 is A. Find A+B.
Question (KO): A, B는 한 자리 수이다. A에서 2를 빼면 B이고 5보다 3 큰 숫자는 A이다. 이때 A+B를 구하여라.

Answer: 14

Solution (Python):
var_a = 5
var_b = 3
var_c = var_a + var_b
var_d = 5
var_e = 3
var_f = var_d + var_e
var_g = 2
var_h = var_f - var_g
var_i = var_c + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): When writing the numbers 1 through 125 on the board, how many times is the number 2 used?
Question (KO): 1부터 125까지 수를 칠판에 적을 때, 숫자 2는 모두 몇 번 사용되는지 구하시오.

Answer: 29

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

Question (EN): There are four numbers: 10, 11, 12, and 13. What is the product of the second largest number and the smallest number?
Question (KO): 4개의 수 10, 11, 12, 13이 있습니다. 그 중에서 2번째로 큰 수와 가장 작은 수의 곱은 얼마입니까?

Answer: 120

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

Question (EN): There are fifteen pieces of square-shaped colored paper with a side length of 25 centimeters (cm) glued together. Given that they were overlapped by 0.5 centimeters (cm) to connect them having a maximum length of one side of the paper, find its length in meters (m).
Question (KO): 한 변의 길이가 25센티미터(㎝)인 정사각형 모양의 색종이 15장을 0.5센티미터(㎝)씩 겹치게 이어 붙였습니다. 이렇게 만들어진 색종이의 한 변의 길이가 최대가 될 때, 그 길이는 몇 미터(m)일지 구하시오.

Answer: 3.68

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

Question (EN): If the elements of set A are 1, 3, and 5, and the elements of set B are 2 and 5, find the number of elements in the intersection of sets A and B.
Question (KO): 집합 A의 원소는 1, 3, 5이고, 집합 B의 원소는 2, 5일 때 집합 A와 B의 교집합의 원소의 개수를 구하시오.

Answer: 1

Solution (Python):
var_a = 1
var_b = 3
var_c = 5
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 = 2
var_e = 5
list_b= []
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()
list_c = list(set(list_a) & set(list_b))
var_f = len(list_c)
print(int(var_f))
Category: Comparison

Question (EN): The conch-shaped bread is 250 grams (g) and I made two boxes with 12 each. The Red-bean bread is 200 grams (g) and is made into three boxes with 16 each. Which bread is in the box that weighs more than other boxes?
Question (KO): 소라빵은 250그램(g)이고 12개씩 담아서 2개의 상자를 만들었습니다. 단팥빵은 200그램(g)이고 16개씩 담아서 3개의 상자로 만들었습니다. 한 상자의 무게가 더 무거운 상자에 들어 있는 빵은 무엇입니까?

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: Correspondence

Question (EN): Subtracting 27 from a number gives 49. Find a number.
Question (KO): 어떤 수에서 27을 뺐더니 49가 되었습니다. 어떤 수를 구하시오.

Answer: 76

Solution (Python):
var_a = 49
var_b = 27
var_c = var_a + var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Jimin's social studies score is 6 points higher than his science score. The science score is 87. If the average score for science, social studies, and English is 92, what is his English score?
Question (KO): 지민이의 사회 점수는 과학 점수보다 6점 높다. 과학 점수가 87점이다. 과학, 사회, 영어의 평균 점수가 92점이라면 영어 점수는 몇 점인가?

Answer: 96

Solution (Python):
var_a = 92
var_b = 3
var_c = var_a * var_b
var_d = 87
var_e = 87
var_f = 6
var_g = var_e + var_f
var_h = var_d + var_g
var_i = var_c - var_h
print(int(var_i))
Category: Comparison

Question (EN): After Jisoo washed the dishes, she put the plate on the cupboard 2nd from the top, 4th from the bottom, 1st from the left, and 7th from the right. How many slots are there on the cupboard?
Question (KO): 지수가 설거지를 하고난 후 접시를 선반의 위에서 2번째 칸, 아래에서 4번째 칸, 왼쪽에서 1번째 칸, 오른쪽에서 7번째 칸에 놓았습니다. 선반의 모든 칸의 개수는 몇 칸입니까?

Answer: 35

Solution (Python):
var_a = 2
var_b = 4
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 1
var_g = 7
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
print(int(var_k))
Category: Geometry

Question (EN): There is a rectangle that is smaller than a rectangle measuring 108 square centimeters (cm2) with a width ratio of 8:7 and a height ratio of 9:4. What is the area of this rectangle in square centimeters (cm2)?
Question (KO): 어떤 직사각형은 넓이가 108제곱센티미터(㎠)인 직사각형보다 작으면서 가로의 비가 8:7이고 세로의 비가 9:4입니다. 이 직사각형의 넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 42

Solution (Python):
var_a = 108
var_b = 8
var_c = var_a / var_b
var_d = 7
var_e = var_c * var_d
var_f = 9
var_g = var_e / var_f
var_h = 4
var_i = var_g * var_h
print(int(var_i))
Category: Geometry

Question (EN): There is a trapezoid with an area of 222 square centimeters (cm2). If the length of the upper side of this trapezoid is 23 centimeters (cm) and the height is 12 centimeters (cm), how many centimeters (cm) is the length of the base of the trapezoid?
Question (KO): 넓이가 222제곱센티미터(㎠)인 사다리꼴이 있습니다. 이 사다리꼴의 윗변의 길이가 23센티미터(㎝)이고, 높이가 12센티미터(㎝)라면, 밑변의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 14

Solution (Python):
var_a = 222
var_b = 2
var_c = var_a * var_b
var_d = 12
var_e = var_c / var_d
var_f = 23
var_g = var_e - var_f
print(int(var_g))
Category: Comparison

Question (EN): Yoongi collected 4, and Jungkook collected 6 minus 3. Whose number is smaller?
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: Arithmetic calculation

Question (EN): Seonho wants to cut 1 large cube of wood into several small cubes of wood. The length of a side of a small block of wood is 1/4 of the length of a side of a block of large wood. Find the number of small wooden blocks that can be made at this time.
Question (KO): 선호는 큰 정육면체 나무도막 1개를 잘라서 여러개의 작은 정육면체 나무도막을 만들려고 합니다. 작은 나무도막의 한 변의 길이는 큰 나무도막의 한 변의 길이의 1/4입니다. 이 때 만들 수 있는 작은 나무도막의 개수를 구하세요.

Answer: 64

Solution (Python):
var_a = 1
var_b = 0.25
var_c = 3
var_d = var_b ** var_c
var_e = var_a / var_d
print(int(var_e))
Category: Correspondence

Question (EN): A and B are different numbers. When 8AA4-BBB=BBBB, find the result of A plus B.
Question (KO): A,B는 서로 다른 수입니다. 8AA4-BBB=BBBB일 때 A와 B를 더한 결과를 구하시오.

Answer: 12

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

Question (EN): The base of the prism is a regular hexagon, which has the length of one side as 6 centimeters (cm), and the height of the prism is 11 centimeters (cm). Find the sum of the lengths of all the edges of this prism.
Question (KO): 각기둥의 밑면이 정육각형이며, 정육각형의 한 변의 길이는 6센티미터(㎝), 각기둥의 높이는 11센티미터(㎝)이다. 이 각기둥의 모든 모서리의 길이의 합을 구하시오

Answer: 138

Solution (Python):
var_a = 6
var_b = 6
var_c = var_a * var_b
var_d = 2
var_e = var_c * var_d
var_f = 11
var_g = 6
var_h = var_f * var_g
var_i = var_e + var_h
print(int(var_i))
Category: Correspondence

Question (EN): Multiplying a number by 13 and subtracting 272 gives you 105. Find the number.
Question (KO): 어떤 수를 13배 한 수에서 272를 뺐더니 105가 되었습니다. 어떤 수를 구하시오.

Answer: 29

Solution (Python):
var_a = 105
var_b = 272
var_c = var_a + var_b
var_d = 13
var_e = var_c / var_d
print(int(var_e))
Category: Geometry

Question (EN): A quadrilateral has two pairs of opposite sides parallel to each other. If the base of this rectangle is 9.51 centimeters (cm) and the height is 4.8 centimeters (cm), what is the area?
Question (KO): 마주 보는 두 쌍의 변이 서로 평행인 사각형이 있습니다. 이 사각형의 밑변이 9.51센티미터(㎝), 높이가 4.8센티미터(㎝)라면 넓이는 얼마입니까?

Answer: 45.65

Solution (Python):
var_a = 9.51
var_b = 4.8
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Possibility

Question (EN): Dohun is about to roll balls with numbers 3, 6, and 9 one by one on top of the mountain. When the results differ depending on the rolling order, how many total results can Dohun see?
Question (KO): 도훈이는 3, 6, 9가 써진 공을 산 위에서 한 개씩 굴리려고 합니다. 굴리는 순서에 따라 결과가 다를 때, 도훈이는 총 몇 가지의 결과를 볼 수 있습니까?

Answer: 6

Solution (Python):
var_a = 3
var_b = 6
var_c = 9
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 = len(list_b)
print(int(var_e))
Category: Correspondence

Question (EN): A and B are single digit numbers. If 7ABABA is divisible by 6, find all possible number of cases that can be 7ABABA.
Question (KO): A, B는 한 자리 수입니다. 7ABABA가 6으로 나누어 떨어진다고 할 때, 7ABABA가 될 수 있는 모든 수의 개수를 구하시오.

Answer: 15

Solution (Python):
var_a = '7ABABA'
ans_dict = dict()
var_a = str(var_a)
list_a = []
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 0
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_a
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    if len(var_a) == len(str(int(temp))):
        new_elem = int(temp)
        list_a.append(new_elem)
var_b = 6
list_b = []
var_b = int(var_b)
for i in list_a:
    i = int(i)
    if i % var_b == 0:
        list_b.append(i)
var_c = len(list_b)
print(int(var_c))
Category: Correspondence

Question (EN): We have the expression 5A8-B14=364. Find the number that goes into A.
Question (KO): 식 5A8-B14=364이 있습니다. A에 들어가야 하는 숫자를 구하시오.

Answer: 7

Solution (Python):
var_a = '5A8-B14=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): There are five numbers 10, 11, 12, 13, and 14. What is the remainder when divided by the smallest number and the second smallest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 가장 작은 수를 2번째로 작은 수로 나눈 나머지는 얼마입니까?

Answer: 10

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-1]
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(int(var_j))