philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): Yesterday, Wonhee slept 10 hours and 9/10 hours, and Dong-il slept 102/10 hours. Find out who slept the longest.
Question (KO): 어제 원희는 10시간과 9/10시간, 동일은 102/10시간을 잤다. 누가 가장 오래 잤는지 구하세요.

Answer: Wonhee

Solution (Python):
var_a = 'Wonhee'
var_b = 'Dong-il'
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 = 10
var_d = 0.9
var_e = var_c + var_d
var_f = 10.2
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
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): There are hexagonal prisms and quadrangular pyramids with the same length of one edge. The sum of the lengths of all edges of a hexagonal prism is 81 meters (m), and all edges are the same length. Find the sum of the lengths of all the edges of the quadrangular pyramid, in meters (m), when all the edges of the quadrangular pyramid are the same length.
Question (KO): 한 모서리의 길이가 같은 육각기둥과 사각뿔이 있습니다. 육각기둥의 모든 모서리의 길이의 합은 81미터(m) 이고 모든 모서리의 길이가 같습니다. 사각뿔의 모든 모서리의 길이가 같을 때 사각뿔의 모든 모서리의 길이의 합은 몇 미터(m) 인지 구하시오.

Answer: 36

Solution (Python):
var_a = 81
var_b = 6
var_c = 3
var_d = var_b * var_c
var_e = var_a / var_d
var_f = 4
var_g = 2
var_h = var_f * var_g
var_i = var_e * var_h
print(int(var_i))
Category: Possibility

Question (EN): In a situation where 6 people including Kihoon and Sangwoo are lined up, find the number of cases in which Kihoon and Sangwoo are lined up next to each other.
Question (KO): 기훈과 상우를 포함한 6명을 일렬로 세울 때, 기훈과 상우가 이웃하도록 일렬로 세우는 경우의 수를 구하시오.

Answer: 240

Solution (Python):
var_a = 6
var_b = 'Kihoon'
var_c = 'Sangwoo'
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)
list_a.reverse()
var_d = len(list_a)
var_e = 1
var_f = var_d - var_e
var_g = var_a - var_f
var_h = 6
var_i = len(list_a)
var_j = 1
var_k = var_i - var_j
var_l = var_h - var_k
var_m = 1
var_g = int(var_g)
var_l = int(var_l)
for i, elem in enumerate(range(var_l)):
    var_m = var_m * (var_g-i)
var_n = len(list_a)
var_o = len(list_a)
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_m * var_p
print(int(var_q))
Category: Correspondence

Question (EN): The math average of the Woojoo's class was 42, but when the Woojoo's score was re-scored and raised to 50, the class average was 44. If there are 10 students in Woojoo's classes, what Woojoo initially received?
Question (KO): 우주네 반 수학평균은 42점이었는데 우주의 점수가 다시 채점되어 50으로 오르자 반 평균이 44가 되었다. 우주네 반 학생이 모두 10명일 때,우주가 처음 받은 성적은 얼마인지 구하여라

Answer: 30

Solution (Python):
var_a = 50
var_b = 44
var_c = 42
var_d = var_b - var_c
var_e = 10
var_f = var_d * var_e
var_g = var_a - var_f
print(int(var_g))
Category: Comparison

Question (EN): Hohyeon, Seulgi, and Hyunjeong are playing darts. Hohyeon scored 23 points in the first and 28 points in the second. Hyunjeong and Seulgi scored 32 and 27 points in the first round, respectively. If Hyeonjeong's 2nd score is 17 points, how many points does Seulgi need to score 2nd in order to win first alone?
Question (KO): 호현, 슬기, 현정이가 다트 게임을 하고 있습니다. 호현이는 1번째에 23점, 2번째에 28점을 얻었습니다. 현정와 슬기는 각각 1번째에 32점과 27점을 얻었습니다. 현정이가 2번째에 얻은 점수가 17점일 때, 슬기가 단독 1등을 하기 위해서는 2번째에 적어도 몇 점을 얻어야 합니까?

Answer: 25

Solution (Python):
var_a = 'Hohyeon'
var_b = 'Seulgi'
var_c = 'Hyunjeong'
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 = 23
var_e = 28
var_f = var_d + var_e
var_g = 32
var_h = 17
var_i = var_g + var_h
var_j = 27
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = 1
list_d=list_b.copy()
list_d.sort()
var_n = list_d[var_m-1]
var_o = var_l - var_n
var_p = 1
var_q = var_o + var_p
print(int(var_q))
Category: Possibility

Question (EN): Try to create a three-digit number using the number cards 2, 4, 6, and 8. Assuming you can use the same number card multiple times, find the sum of all possible numbers.
Question (KO): 숫자 카드 2, 4, 6, 8을 사용하여 세 자리 수를 만들려고 한다. 같은 숫자 카드를 여러 번 사용해도 된다고 할 때, 만들 수 있는 모든 수들의 합을 구하여라.

Answer: 35520

Solution (Python):
var_a = 2
var_b = 4
var_c = 6
var_d = 8
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=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]
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): You want to divide 72 sweets and 56 candies equally among four people. Find the total number of sweets and candies that each person gets.
Question (KO): 과자 72개와 사탕 56개를 각각 네 사람에게 똑같이 나누어 주려고 합니다. 한 사람이 가지는 과자와 사탕은 모두 몇 개인지 구하시오.

Answer: 32

Solution (Python):
var_a = 72
var_b = 4
var_c = var_a / var_b
var_d = 56
var_e = 4
var_f = var_d / var_e
var_g = var_c + var_f
print(int(var_g))
Category: Possibility

Question (EN): There are 2 white stones and 1 black stone. How many different ways can you place 3 stones in a row, given that same color stones are indistinguishable from each other?
Question (KO): 흰색 바둑돌 2개와 검은색 바둑돌 1개가 있습니다. 같은 색의 바둑돌은 각각 구별이 되지 않는다고 할 때, 바둑돌 3개를 서로 다르게 한 줄로 놓는 방법은 모두 몇 가지입니까?

Answer: 3

Solution (Python):
var_a = 1
var_b = 2
var_c = var_a + var_b
var_d = 1
var_e = 2
var_f = var_d + var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_c-i)
var_h = 2
var_i = 2
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 = var_g / var_j
print(int(var_k))
Category: Comparison

Question (EN): Suppose you fill in candies of the same size into a red rectangular cuboid-shaped box with a base area of 8 cubic centimeters (cm2) and a height of 7 centimeters (cm), and a blue cube-shaped box with a side length of 8 centimeters (cm). Find which box will contain more candies.
Question (KO): 밑면의 넓이가 8제곱센티미터(㎠)이고 높이가 7센티미터(㎝)인 직육면체 모양의 빨간색 상자와 한 변의 길이가 8센티미터(㎝)인 정육면체 모양의 파란색 상자에 크기가 같은 사탕을 채워 넣는다고 하면 어느 상자에 사탕이 더 많이 담길지 구하시오.

Answer: blue

Solution (Python):
var_a = 'red'
var_b = 'blue'
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 = 8
var_d = 7
var_e = var_c * var_d
var_f = 8
var_g = 8
var_h = var_f * var_g
var_i = 8
var_j = var_h * var_i
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Geometry

Question (EN): Twelve jellies, each 18 centimeters (cm) long, were overlapped the same amount to form a round ring. If its circumference is 210 centimeters (cm), how many millimeters (mm) is the overlapping portion of jelly?
Question (KO): 길이 18센티미터(㎝)인 젤리 12개를, 겹치는 길이가 같도록 하여 겹쳐서 둥근 고리 모양으로 만들었다. 그 둘레가 210센티미터(㎝)일 때, 젤리의 겹쳐진 부분은 총 몇 밀리미터(㎜)인가?

Answer: 60

Solution (Python):
var_a = 18
var_b = 12
var_c = var_a * var_b
var_d = 210
var_e = var_c - var_d
var_f = 10
var_g = var_e * var_f
print(int(var_g))
Category: Correspondence

Question (EN): Divide the number of go stones by 7, add 40 and multiply by 5 to get 555. Of these, if there are 55 black go stones, how many white go stones?
Question (KO): 바둑알의 개수를 7로 나눈 뒤 40을 더하여 5를 곱한 수가 555이다. 이 중, 검은 바둑돌이 55개이면 흰 바둑돌의 개수는 얼마인가?

Answer: 442

Solution (Python):
var_a = 555
var_b = 5
var_c = var_a / var_b
var_d = 40
var_e = var_c - var_d
var_f = 7
var_g = var_e * var_f
var_h = 55
var_i = var_g - var_h
print(int(var_i))
Category: Correspondence

Question (EN): A three-digit number 2AB is divisible by both 2 and 3. How many possible A's are there?
Question (KO): 세 자리 수 2AB는 2와 3으로 나누어 떨어진다. 가능한 A는 모두 몇 가지입니까?

Answer: 10

Solution (Python):
var_a = '2AB'
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 = 2
var_c = 3
var_d = var_c * var_b / math.gcd(int(var_c), int(var_b))
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 = '2AB'
var_f = 'A'
var_e = str(var_e)
var_f = str(var_f)
unk_idx = var_e.index(var_f)
list_c = []
for elem in list_b:
    elem = str(elem)
    list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_g = len(list_c)
print(int(var_g))
Category: Comparison

Question (EN): Yeseul exercised 13/10 hours today, and Youngjun did 22/15 hours. Among Yeseul and Youngjun, who exercised longer?
Question (KO): 오늘 운동을 예슬이는 13/10시간, 영준이는 22/15시간 동안 하였습니다. 예슬이와 영준이 중에서 운동을 더 오랫동안 한 사람은 누구입니까?

Answer: Youngjun

Solution (Python):
var_a = 'Yeseul'
var_b = 'Youngjun'
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 = 1.3
var_d = 1.4666666666666666
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Arithmetic calculation

Question (EN): How many trees are needed to plant trees on both sides of a 100-meter (m) road at 10-meter (m) intervals from start to finish?
Question (KO): 10미터(m)간격으로 100미터(m)도로 양쪽에 처음부터 끝까지 나무를 심으려고 할때 몇 그루의 나무가 필요합니까?

Answer: 22

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

Question (EN): You have a square with a perimeter of 52 centimeters (cm). What is the area of this square in square centimeters (cm2)?
Question (KO): 둘레가 52센티미터(㎝)인 정사각형이 있습니다. 이 정사각형의 넓이는 몇 제곱센티미터(㎠)일까요?

Answer: 169

Solution (Python):
var_a = 52
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
print(int(var_e))
Category: Comparison

Question (EN): Younghee's weight is 55.6 kilograms (kg), and Cheolsu's weight is 88.2 kilograms (kg). Who is lighter between Younghee and Cheolsu?
Question (KO): 영희의 몸무게는 55.6킬로그램(㎏)이고, 철수의 몸무게는 88.2킬로그램(㎏)입니다. 영희와 철수 중 더 가벼운 사람은 누구입니까?

Answer: Younghee

Solution (Python):
var_a = 'Younghee'
var_b = 'Cheolsu'
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 = 55.6
var_d = 88.2
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Arithmetic calculation

Question (EN): Find the number of even numbers from 1 to 10.
Question (KO): 1부터 10까지의 수 중 짝수는 몇 개인지 구하시오.

Answer: 5

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 = len(list_a)
print(int(var_c))
Category: Comparison

Question (EN): There are 28 identical shelves in the warehouse. Each shelf has 6 spaces with the same number of books in it. If 19 books are on one shelf, what is a total number of books on the shelf in the warehouse?
Question (KO): 창고에 똑같은 선반이 28개 있습니다. 각 선반은 6칸이고, 각 칸마다 꽂혀 있는 책의 수는 같습니다. 어느 선반의 한 칸에 19개의 책이 꽂혀 있습니다. 창고의 선반에 꽂혀 있는 책은 모두 몇 권입니까?

Answer: 3192

Solution (Python):
var_a = 28
var_b = 6
var_c = var_a * var_b
var_d = 19
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): When 2 female students and 3 male students are lined up in a line, find the number of cases in which the male students must be next to each other.
Question (KO): 여학생 2명, 남학생 3명을 한 줄로 세울 때, 남학생끼리는 반드시 이웃하게 세우는 경우의 수를 구하시오.

Answer: 36

Solution (Python):
var_a = 2
var_b = 1
var_c = var_a + var_b
var_d = 2
var_e = 1
var_f = var_d + var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_c-i)
var_h = 3
var_i = 3
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 = var_g * var_j
print(int(var_k))
Category: Geometry

Question (EN): Fifteen sheets of colored tape, each 25 centimeters (cm) long, were joined together overlapping each other by 0.5 centimeters (cm). How many meters (m) is the total length of the attached color tape?
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): There are 25, 41, 13, and 32. Find the sum of the largest and smallest numbers.
Question (KO): 25, 41, 13, 32가 있습니다. 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 54

Solution (Python):
var_a = 25
var_b = 41
var_c = 13
var_d = 32
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 = 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: Arithmetic calculation

Question (EN): If Jimin eats 150 centimeters (cm) and Taehyung eats 1.65 m (m) of the 30 m (m) bread, how many meters (m) are left over?
Question (KO): 30미터(m) 짜리 빵에서 지민이가 150센티미터(㎝)를 먹고, 태형이가 1.65미터(m)를 먹었을 때, 남은 빵의 길이는 몇 미터(m)인가요?

Answer: 26.85

Solution (Python):
var_a = 30
var_b = 150
var_c = 100
var_d = var_b / var_c
var_e = var_a - var_d
var_f = 1.65
var_g = var_e - var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Correspondence

Question (EN): If you mistakenly add 10 to a number that should be multiplied by 10, the result is 21. How much do you get when you calculate correctly?
Question (KO): 어떤 수에 10을 곱해야 할 것을 잘못하여 더했더니 그 결과가 21입니다. 바르게 계산하면 얼마입니까?

Answer: 110

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

Question (EN): While adding the two-digit and three-digit numbers, Yoongi mistook the two-digit number's units digit 9 for 6, and changed the units and hundreds digits of the three-digit number to make it 253. At this time, if the sum obtained by Yoongi is 299, what is the two-digit number?
Question (KO): 윤기는 두 자리 수와 세 자리 수를 더하던 중, 윤기는 두 자리 수의 일의 자리 숫자 9를 6으로 잘못 보았고, 세 자리 수의 일의 자리 숫자와 백의 자리 숫자를 바꾸어 253이라고 잘못 보았습니다. 이때, 윤기가 구한 합이 299라고 하면, 두 자리 수는 무엇인가요?

Answer: 49

Solution (Python):
var_a = 299
var_b = 253
var_c = var_a - var_b
var_d = 6
var_e = 9
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Taehoon sleeps 1/3 of the day, spends the remaining 3/4 at school, and goes to the piano academy for the remaining 1/4. Find the amount of time Taehoon spends at the piano academy during the day.
Question (KO): 태훈이는 하루의 1/3은 잠을 자고 그 나머지의 3/4는 학교에서 시간을 보내고 그 나머지의 1/4는 피아노 학원을 갑나다. 태훈이가 하루 중 피아노 학원에서 보내는 시간을 구하시오.

Answer: 1

Solution (Python):
var_a = 24
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.75
var_h = var_f - var_g
var_i = var_e * var_h
var_j = 0.25
var_k = var_i * var_j
print(int(var_k))
Category: Possibility

Question (EN): How many three-digit numbers can be made using 0, 2, and 9? You can use the same number multiple times.
Question (KO): 0, 2, 9를 이용하여 만들 수 있는 세 자리 수는 총 몇 개인가? 같은 숫자를 여러 번 써도 된다.

Answer: 18

Solution (Python):
var_a = 0
var_b = 2
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.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]
var_e = len(list_b)
print(int(var_e))
Category: Comparison

Question (EN): As a result of the examination, the average height of the three people is 143 centimeters (cm). The average height of B and C is equal to A's height plus 4.5 centimeters (cm). If B is 3 centimeters (cm) taller than C, what is the height of C?
Question (KO): 검사 결과, 세 사람의 평균 키는 143센티미터(㎝)이다. B와 C의 평균 키는 A의 키에 4.5센티미터(㎝)를 더한 값과 같다. B가 C보다 3센티미터(㎝)더 클 때, C의 키는 얼마인지 구하시오.

Answer: 143

Solution (Python):
var_a = 143
var_b = 3
var_c = var_a * var_b
var_d = 4.5
var_e = var_c + var_d
var_f = 3
var_g = var_e / var_f
var_h = 2
var_i = var_g * var_h
var_j = 3
var_k = var_i - var_j
var_l = 2
var_m = var_k / var_l
print(int(var_m))
Category: Possibility

Question (EN): Yoongi's class is preparing for the relay race. How many ways are there to determine the running order of 3 out of 5 candidates?
Question (KO): 윤기네 반에서 이어달리기 시합을 준비하려고 합니다. 5명의 후보 중 3명을 선택해 달리는 순서를 정하는 방법은 모두 몇 가지입니까?

Answer: 60

Solution (Python):
var_a = 5
var_b = 3
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
    var_c = var_c * (var_a-i)
print(int(var_c))
Category: Comparison

Question (EN): The truck is loaded with (a) and (b) two boxes. (a) box is smaller than (b) box. If you arrive at your destination and the larger of the two boxes is missing, what is the missing box?
Question (KO): 트럭에 (가), (나) 2개의 상자를 실었습니다. (가) 상자는 (나) 상자보다 작습니다. 목적지에 도착하였더니, 두 상자 중 큰 상자가 분실되었다면 분실된 상자는 무엇입니까?

Answer: (b)

Solution (Python):
var_a = '(a)'
var_b = '(b)'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = '(a)'
var_d = '(b)'
var_e = '<'
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)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
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_f = 1
var_g = list_c[var_f-1]
print(var_g)
Category: Possibility

Question (EN): Find the difference between the 2nd largest number and the 3rd smallest number when selecting 3 different numbers from 5, 0, 8, 6, 2 to make a 3-digit number.
Question (KO): 5, 0, 8, 6, 2 중 서로 다른 3개의 숫자를 뽑아 세자리 수를 만들 때, 2번째로 큰 수와 3번째로 작은 수의 차는 몇인지 구하시오.

Answer: 654

Solution (Python):
var_a = 5
var_b = 0
var_c = 8
var_d = 6
var_e = 2
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 = 2
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = 3
list_d=list_b.copy()
list_d.sort()
var_j = list_d[var_i-1]
var_k = var_h - var_j
print(int(var_k))
Category: Comparison

Question (EN): There are two numbers A and B. A is 3 groups of 10 and 7 units. B is one less than 40. Which number is smaller?
Question (KO): 두 수 A, B가 있습니다. A는 10개씩 3묶음과 낱개 7개인 수입니다. B는 40보다 1 작은 수입니다. 더 작은 수는 어느 것입니까?

Answer: A

Solution (Python):
var_a = 'A'
var_b = 'B'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 10
var_d = 3
var_e = var_c * var_d
var_f = 7
var_g = var_e + var_f
var_h = 40
var_i = 1
var_j = var_h - var_i
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[var_k-1]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Arithmetic calculation

Question (EN): Find the largest odd number between 1 and 7.
Question (KO): 1부터 7 사이의 홀수 중 가장 큰 수를 구하시오.

Answer: 7

Solution (Python):
var_a = 1
var_b = 7
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]
print(int(var_d))
Category: Correspondence

Question (EN): A is 520. A is less than C by 204. C is greater than B by 179. Find out B.
Question (KO): A는 520입니다. A는 C보다 204만큼 작습니다. C는 B보다 179만큼 큽니다. B를 구하시오.

Answer: 545

Solution (Python):
var_a = 520
var_b = 204
var_c = var_a + var_b
var_d = 179
var_e = var_c - var_d
print(int(var_e))