philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): I want to choose 15 fruits from 4 types of fruits: apples, persimmons, pears, and tangerines. When I am trying to choose at least two from each type of fruit, how many ways can i choose?
Question (KO): 사과, 감, 배, 귤 4종류의 과일 중 15개를 선택하려고 한다. 각 과일을 2개 이상 선택한다고 할 때 과일을 선택하는 총 가지 수를 구하시오.

Answer: 120

Solution (Python):
var_a = 4
var_b = 15
var_c = var_a + var_b
var_d = 4
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 1
var_i = var_g - var_h
var_j = 15
var_k = 4
var_l = 2
var_m = var_k * var_l
var_n = var_j - var_m
var_o = 1
var_i = int(var_i)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
    var_o = var_o * (var_i-i)
for i, elem in enumerate(range(var_n)):
    var_o = var_o / (i+1)
print(int(var_o))
Category: Geometry

Question (EN): If there is a quadrangular pyramid, what is the number of faces?
Question (KO): 사각뿔이 있을 때, 면의 개수는?

Answer: 5

Solution (Python):
var_a = 4
var_b = 1
var_c = var_a + var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There are 16, 22, 30, 26, 18, and 20 candies each of the 6 members of the Si-gyeong's group have. On average, how many candies does Si-gyeong's group have?
Question (KO): 시경이네 모둠 6명이 가지고 있는 사탕 수는 16, 22, 30, 26, 18, 20개 입니다. 시경이네 모둠이 가진 사탕은 평균 몇 개인가?

Answer: 22

Solution (Python):
var_a = 16
var_b = 22
var_c = 30
var_d = 26
var_e = 18
var_f = 20
list_a= []
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()
list_a = [float(i) for i in list_a]
var_g = sum(list_a)/len(list_a)
print(int(var_g))
Category: Comparison

Question (EN): Students are standing in a line to get tested for corona. Yeonji stands right behind Jeongsu, Jeongsu stands 24th from the back, and Yeonji stands 18th from the front. Find how many students are in line.
Question (KO): 학생들이 코로나 검사를 받기 위해 한 줄로 서 있습니다. 정수 바로 뒤에는 연지가 서 있고 정수는 뒤에서 24번째에 서 있고 연지는 앞에서 18번째에 서 있습니다. 몇 명의 학생들이 줄을 서 있는지 구하시오.

Answer: 42

Solution (Python):
var_a = 18
var_b = 24
var_c = var_a + var_b
print(int(var_c))
Category: Comparison

Question (EN): 20 students were lined up, and Jungkook took the first place in the line. Yoongi stood right behind Jungkook. Find the number of students standing behind Yoongi.
Question (KO): 20명의 학생들이 한줄로 섰습니다. 정국이는 1등으로 줄을 섰고, 윤기는 정국이 바로 뒤에 섰습니다. 윤기 뒤에 서 있는 학생은 몇 명입니까?

Answer: 18

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

Question (EN): There are eight 15-story buildings in Joa's apartment complex. Half of these buildings have four families per floor, and the rest have five families per floor. If each household has two emergency flashlights installed, find out how many emergency flashlights are installed in Joa's apartment complex.
Question (KO): 주아네 아파트 단지에는 15층짜리 건물이 8동 있습니다. 이 건물 중 절반은 한 층에 4가구씩 살고 있고, 나머지는 한 층에 5가구씩 살고 있습니다. 한 가구에 비상 손전등이 2개씩 설치되어 있다고 할 때 주아네 아파트 단지에 설치되어 있는 비상 손전등은 모두 몇 개인지 구해 보시오.

Answer: 1080

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

Question (EN): There are 28 identical bookcases in the library. Each bookcase has 6 shelves, and the number of books on each shelf is the same at 19. How many books are there in the library?
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: Geometry

Question (EN): We are trying to divide red beans filled in a rectangular parallelepiped container with two side lengths of the bottom each 6 meters (m) 40 centimeters (cm) and 9 meters (m) into several boxes whose volume is 1 cubic meter (m3).  Find at least how many boxes you need.
Question (KO): 밑면의 두 변의 길이가 각각 6미터(m) 40센티미터(㎝), 9미터(m)이고 높이가 5미터(m) 20센티미터(㎝)인 직육면체 모양의 통에 가득 들어 있는 팥을 부피가 1세제곱미터(㎥)인 상자 여러 개에 모두 나누어 담으려고 합니다. 상자는 적어도 몇 개 필요한지 구해보시오.

Answer: 300

Solution (Python):
var_a = 6
var_b = 40
var_c = 100
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 9
var_g = var_e * var_f
var_h = 5
var_i = 20
var_j = 100
var_k = var_i / var_j
var_l = var_h + var_k
var_m = var_g * var_l
var_n = 1
var_o = var_m / var_n
var_p = 1
var_q=int(((var_o+9*10**(var_p-2))//(10**(var_p-1)))*10**(var_p-1))

print(int(var_q))
Category: Correspondence

Question (EN): There are 82 apples, 90 pears, 88 tangerines, and 84 melons at the fruit store, and the number of watermelons is unknown. If you divide the total number of fruits in the fruit store by 88, the quotient is 5 with no remainder. Find the number of watermelons.
Question (KO): 과일가게에 사과가 82개, 배가 90개, 귤이 88개, 참외가 84개가 있으며 수박은 몇 개가 있는지 모릅니다. 과일가게에 있는 과일의 총 개수를 88로 나누면 몫이 5로 나누어떨어진다. 수박의 개수를 구하시오.

Answer: 96

Solution (Python):
var_a = 88
var_b = 5
var_c = var_a * var_b
var_d = 82
var_e = var_c - var_d
var_f = 90
var_g = var_e - var_f
var_h = 88
var_i = var_g - var_h
var_j = 84
var_k = var_i - var_j
print(int(var_k))
Category: Geometry

Question (EN): I have a picture frame in the shape of a rectangle measuring 59.6 square centimeters (cm²). When four photos of the same size are inserted into this frame without overlapping, find the maximum size in square centimeters (cm2) of one photo.
Question (KO): 넓이가 59.6제곱센티미터(㎠)인 직사각형 모양의 액자가 있습니다. 이 액자에 크기가 같은 사진 4장을 겹치지 않고 끼워 넣을 때, 한 장의 크기는 최대 몇 제곱센티미터(㎠)가 될 수 있는지 구하시오.

Answer: 14.9

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

Question (EN): 20 students were lined up. Eleven students are standing in front of Yoongi, and Hoseok is standing right in front of Yoongi. How many students are standing behind Hoseok?
Question (KO): 20명의 학생들이 한 줄로 줄을 섰습니다. 윤기의 앞에는 11명의 학생들이 서 있고, 호석이는 윤기 바로 앞에 서 있습니다. 호석이 뒤에 서 있는 학생은 몇 명입니까?

Answer: 10

Solution (Python):
var_a = 20
var_b = 11
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Possibility

Question (EN): What is the value of the smallest subtracted from the largest two-digit number that can be formed by drawing two different numbers from 1, 4, 7, and 9?
Question (KO): 1, 4, 7, 9 중에서 서로 다른 숫자 2개를 뽑아 만들 수 있는 두 자리 수 중에서 가장 큰 수에서 가장 작은 수를 뺀 값은 얼마입니까?

Answer: 83

Solution (Python):
var_a = 1
var_b = 4
var_c = 7
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 = 2
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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 1
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: Correspondence

Question (EN): A number that is multiplied by 7 and subtracted 14 was 115.15. How much is it when this number is divided by 7?
Question (KO): 어떤 수에 7을 곱하고 14를 뺀 값이 115.15였습니다. 어떤 수를 7로 나누면 얼마입니까?

Answer: 2.64

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

Question (EN): How many out of 18, 15, 11, 19, and 10 are less than 15?
Question (KO): 18, 15, 11, 19, 10중에서 15보다 작은 수는 모두 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 18
var_b = 15
var_c = 11
var_d = 19
var_e = 10
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 = 15
list_b = []
for i in list_a:
    if i < var_f:
        list_b.append(i)
var_g = len(list_b)
print(int(var_g))
Category: Geometry

Question (EN): A quadrilateral has a pair of parallel sides. If the length of one of the two parallel sides is 23 centimeters (cm), the distance between the two sides is 12 centimeters (cm), and the area of this rectangle is 222 square cm (cm2), how many centimeters (cm) is the length of the other side?
Question (KO): 한 쌍의 변이 평행한 사각형이 있습니다. 평행한 두 변 중 한 변의 길이가 23센티미터(㎝)이고, 두 변 사이의 거리가 12센티미터(㎝)이며, 이 사각형의 넓이가 222제곱센티미터(㎠)일 때, 나머지 한 변의 길이는 몇 센티미터(㎝)일지 구하시오.

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

Question (EN): What is the volume of the largest cube that can be made by cutting a cuboid measuring 4 centimeters (cm) wide by 6 centimeters (cm) long by 5 centimeters (cm) high?
Question (KO): 가로 4센티미터(㎝), 세로 6센티미터(㎝), 높이 5센티미터(㎝)인 직육면체를 잘라서 만들 수 있는 가장 큰 정육면체의 부피는 얼마인가?

Answer: 64

Solution (Python):
var_a = 4
var_b = 6
var_c = 4
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
var_f = 1
list_c=list_a.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = 3
var_i = var_g ** var_h
print(int(var_i))
Category: Correspondence

Question (EN): Seojun misunderstood the teacher's words to bring a 7/3 pizza from the next class and gave the 7/3 pizza to the next class. After giving the pizza, Seojun now has 3/2 pizza. If Seojun did the teacher's errand correctly, how many pizzas should Seojun have?
Question (KO): 서준이는 옆반에서 피자 7/3판을 받아오라는 선생님의 말을 잘못 알아듣고 옆반에 피자 7/3판을 줬더니 현재 서준이가 가진 피자는 3/2판이다. 서준이가 선생님의 심부름을 제대로 했다면 서준이가 가진 피자는 몇 판이어야 하는가?

Answer: 6.17

Solution (Python):
var_a = 1.5
var_b = 2.3333333333333335
var_c = var_a + var_b
var_d = 2.3333333333333335
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Arithmetic calculation

Question (EN): There are 3 kilograms (kg) and 300 grams (g) of strawberries. How many grams (g) of strawberries will be left if you give 1 kg (kg) and 900 grams (g) to your friend?
Question (KO): 딸기 3킬로그램(㎏) 300그램(g) 있습니다. 그중에서 1킬로그램(㎏) 900그램(g)을 친구에게 주었을 시 남은 딸기는 몇 그램(g)일까요?

Answer: 1400

Solution (Python):
var_a = 3
var_b = 1000
var_c = var_a * var_b
var_d = 300
var_e = var_c + var_d
var_f = 1
var_g = 1000
var_h = var_f * var_g
var_i = 900
var_j = var_h + var_i
var_k = var_e - var_j
print(int(var_k))
Category: Correspondence

Question (EN): You were supposed to divide a certain number by 8 and add 7, but you mistakenly multiply by 8 and add 8, and you get 56. If you calculate correctly, find a value indicating the number to two decimal places.
Question (KO): 어떤 수를 8로 나누고 7을 더해야하는데 잘못하여 8을 곱하고 8을 더했더니 56이 되었습니다. 바르게 계산하면 얼마인지 소수점 둘째자리까지 나타내시오.

Answer: 7.75

Solution (Python):
var_a = 56
var_b = 8
var_c = var_a - var_b
var_d = 8
var_e = var_c / var_d
var_f = 8
var_g = var_e / var_f
var_h = 7
var_i = var_g + var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Arithmetic calculation

Question (EN): If an elevator starts at 120 meters (m) above the ground and descends at a speed of 4 meters (m) per second without stopping once, find the height of the elevator 20 seconds after starting in meters (m).
Question (KO): 어떤 엘리베이터가 지상 120미터(m)에서 출발하여, 한 번도 멈추지 않고 초속 4미터(m)의 속도로 내려올 때, 출발한 지 20초 후 엘리베이터의 높이는 지상 몇 미터(m)인지 구하시오.

Answer: 40

Solution (Python):
var_a = 120
var_b = 4
var_c = 20
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e))
Category: Geometry

Question (EN): You drew a right triangle on drawing paper. If the length of one non-hypotenuse is 5 and the length of the other non-hypotenuse is 12, how much would the hypotenuse's length be?
Question (KO): 도화지에 직각삼각형을 그렸습니다. 빗변이 아닌 한 변의 길이를 5로, 나머지 빗변이 아닌 한 변의 길이를 12로 그렸을 때 빗변은 얼마로 그렸을까요?

Answer: 13

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

Question (EN): A number added to 9/7 is 13/5. What do you get when 13/5 is added to the number?
Question (KO): 9/7에 어떤 수를 더하면 13/5이다 어떤 수에 13/5를 더하면 얼마입니까?

Answer: 3.91

Solution (Python):
var_a = 2.6
var_b = 1.2857142857142858
var_c = var_a - var_b
var_d = 2.6
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Arithmetic calculation

Question (EN): A total of 55 students participated in the game, and when counted the number of students who participated in A and B game, there were 38 and 42 students respectively. Find how many students participated in both A and B game.
Question (KO): 총 55명의 학생이 모두 경기를 참여하였는데, (가) 경기와 (나) 경기에 각각 참여한 학생 수를 세어보니 38명, 42명이었습니다. (가) 시합과 (나) 시합에 모두 참가한 학생은 몇 명인지 구하세요.

Answer: 25

Solution (Python):
var_a = 38
var_b = 42
var_c = var_a + var_b
var_d = 55
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

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

Answer: 21

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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[var_e-1]
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: Correspondence

Question (EN): What is the largest multiple of 12, a three-digit number with 5 in the hundreds place?
Question (KO): 백의 자리 숫자가 5인 세 자리 수이면서 12의 배수 중 가장 큰 수는 얼마입니까?

Answer: 588

Solution (Python):
var_a = 5
var_b = 100
var_c = var_a * var_b
var_d = 5
var_e = 1
var_f = var_d + var_e
var_g = 100
var_h = var_f * var_g
var_i = 1
var_j = var_h - var_i
var_k = 1
list_a = [i for i in range(var_c, var_j + 1, var_k)]
var_l = 12
list_b = []
var_l = int(var_l)
for i in list_a:
    i = int(i)
    if i % var_l == 0:
        list_b.append(i)
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
print(int(var_n))
Category: Arithmetic calculation

Question (EN): There are 52 hens on the farm. Hens are 16 fewer than roosters. How many chickens are there on the farm?
Question (KO): 농장에서 암탉 52마리를 기릅니다. 암탉은 수탉보다 16마리 적습니다. 농장에 있는 닭은 모두 몇 마리입니까?

Answer: 120

Solution (Python):
var_a = 52
var_b = 52
var_c = 16
var_d = var_b + var_c
var_e = var_a + var_d
print(int(var_e))
Category: Geometry

Question (EN): When a cuboid-shaped block of wood measuring 18 centimeters (cm) wide, 6 centimeters (cm) long, and 6 cm (height) is cut into three cubes with a side of 6 centimeters (cm) long,  How many the surface area cm2 does it increase?
Question (KO): 가로가 18센티미터(㎝), 세로가 6센티미터(㎝), 높이가 6센티미터(㎝)인 직육면체 모양의 나무토막을 한 모서리의 길이가 6센티미터(㎝)인 정육면체 3개로 잘랐을 때, 겉넓이는 몇 c㎡ 늘어납니까?

Answer: 288

Solution (Python):
var_a = 3
var_b = 6
var_c = 3
var_d = var_b ** var_c
var_e = var_a * var_d
var_f = 18
var_g = 6
var_h = var_f * var_g
var_i = 6
var_j = 6
var_k = var_i * var_j
var_l = var_h + var_k
var_m = 6
var_n = 6
var_o = var_m * var_n
var_p = var_l + var_o
var_q = 2
var_r = var_p * var_q
var_s = var_e - var_r
print(int(var_s))
Category: Geometry

Question (EN): You built a cuboid-shaped pond with a length of 18 meters (m), a width of 10 meters (m), and a height of 2 meters (m). If you are going to paint the inner side of the pond, how many square meters (㎡) of the pond could be painted?
Question (KO): 가로가 18미터(m), 세로가 10미터(m), 높이가 2미터(m)인 직육면체 모양의 연못을 만들었습니다. 연못 안쪽 전체를 페인트로 칠하려고 할 때, 색을 칠할 부분의 넓이는 몇 ㎡입니까?

Answer: 292

Solution (Python):
var_a = 18
var_b = 10
var_c = var_a * var_b
var_d = 10
var_e = 2
var_f = var_d * var_e
var_g = 2
var_h = 18
var_i = var_g * var_h
var_j = var_f + var_i
var_k = 2
var_l = var_j * var_k
var_m = var_c + var_l
print(int(var_m))
Category: Comparison

Question (EN): Jungkook puts 4 and 4 together. Jimin puts 3 and 6 together. Who has the greater number?
Question (KO): 정국이는 4와 4를 모았습니다. 지민이는 3과 6을 모았습니다. 누가 모은 수가 더 큽니까?

Answer: Jimin

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

Question (EN): Joo-hee and Jun-seong want to share 25 chocolates. Find how many chocolates Joo-hee ate when Joo-hee ate 1 more chocolate than twice Jun-seong ate.
Question (KO): 주희와 준성이는 25개의 초콜릿을 나누어 먹으려고 합니다. 주희가 준성이가 먹는 초콜릿의 2배보다 1개 더 먹었을 때 주희는 몇 개의 초콜릿을 먹었는지 구하시오.

Answer: 17

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

Question (EN): The diamond-shaped roof drawn by Jaewoong has a diagonal of 16 centimeters (cm) and an area of 80 square centimeters (cm2). How many centimeters (cm) is the length of the other diagonal of this roof?
Question (KO): 재웅이가 그린 마름모 모양의 지붕은 한 대각선의 길이가 16 센티미터(㎝)이고, 넓이가 80제곱센티미터(㎠)입니다. 이 지붕의 다른 대각선의 길이는 몇 센티미터(㎝)일까요?

Answer: 10

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

Question (EN): How many two-digit numbers are less than 36 and greater than 29?
Question (KO): 두 자리 수 중 36보다 작고 29보다 큰 수는 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 29
var_b = 1
var_c = var_a + var_b
var_d = 36
var_e = 1
var_f = var_d - var_e
var_g = 1
list_a = [i for i in range(var_c, var_f + 1, var_g)]
var_h = len(list_a)
print(int(var_h))
Category: Correspondence

Question (EN): A is a single-digit number. Find A when the multiplication of single-digit numbers A×A×A is the same as 21A.
Question (KO): A는 한 자리 수입니다. 한 자리 수끼리의 곱셈식 A×A×A=21A 을 만족할 때 A를 구하시오.

Answer: 6

Solution (Python):
var_a = 'A×A×A=21A'
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 194 men and 235 women in the museum, and 68 of them got free admission. Find how many more people paid for admission to the museum than those who got free admission.
Question (KO): 박물관에 남자가 194명, 여자가 235명 관람 중이고, 그중에서 무료입장한 사람이 68명입니다. 박물관에 유료입장한 사람은 무료입장한 사람보다 몇 명 더 많은지 구하시오.

Answer: 293

Solution (Python):
var_a = 194
var_b = 235
var_c = var_a + var_b
var_d = 68
var_e = var_c - var_d
var_f = 68
var_g = var_e - var_f
print(int(var_g))
Category: Comparison

Question (EN): Find the number of numbers greater than 0.4 among 0.8, 1/2, 0.3, and 1/3.
Question (KO): 0.8, 1/2, 0.3, 1/3 중 0.4보다 큰 수의 개수를 구하시오.

Answer: 2

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.3
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)
var_f = len(list_b)
print(int(var_f))
Category: Possibility

Question (EN): There are 3 blue balls and 5 red balls in the box. When 2 red balls are placed inside the box, how many blue balls are in the box?
Question (KO): 상자 안에는 파란 공 3개와 빨간 공 5개가 있습니다. 2개의 빨간 공을 넣었을 때, 상자 안의 파란 공의 개수는?

Answer: 3

Solution (Python):
var_a = 3
print(int(var_a))
Category: Correspondence

Question (EN): Yeongsoo gave Hyogeun 200 won, Hyogeun gave Woong 500 won, and Woong gave Yeongsoo 1000 won. As a result, they have 2000 won respectively. How much money did Yeongsoo have at first?
Question (KO): 영수가 효근이에게 200원, 효근이가 웅이에게 500원, 웅이가 영수에게 1000원을 차례대로 주었더니, 세 사람이 갖게 된 돈은 각각 2000원입니다. 영수가 처음에 갖고 있던 돈은 얼마입니까?

Answer: 1200

Solution (Python):
var_a = 2000
var_b = 1000
var_c = var_a - var_b
var_d = 200
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): Given a map with a scale of 1/250000, find the distance in centimeters (cm) on the map of two points whose actual distance is 5 kilometers (km).
Question (KO): 축척이 1/250000인 지도가 있을 때, 실제 거리가 5 킬로미터(㎞)인 두 지점의 지도에서의 거리(센티미터(㎝))를 구하시오.

Answer: 2

Solution (Python):
var_a = 5
var_b = 100
var_c = 1000
var_d = var_b * var_c
var_e = var_a * var_d
var_f = 4e-06
var_g = var_e * var_f
print(int(var_g))
Category: Geometry

Question (EN): If you multiply a number by 2 and divide it by 16, the quotient is 25. Find what the number is.
Question (KO): 어떤 수에 2를 곱한 값을 16으로 나누면 몫이 25이다. 어떤 수를 구하시오.

Answer: 200

Solution (Python):
var_a = 25
var_b = 16
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Geometry

Question (EN): There is a rectangular farm. The length of the long side is 1 kilometer (km), and the length of the short side is 2/8 km (km) shorter than the length of the long side. How many kilometers (km) will you have to walk if you walk around the farm once?
Question (KO): 직사각형 모양의 농장이 있습니다. 긴 변의 길이는 1킬로미터(㎞)이고, 짧은 변의 길이는 긴 변의 길이보다 2/8킬로미터(㎞) 짧습니다. 농장 둘레를 따라 한 바퀴 걷는다면 몇 킬로미터(㎞)를 걸어야 합니까?

Answer: 3.5

Solution (Python):
var_a = 1
var_b = 1
var_c = 0.25
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 2
var_g = var_e * var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))