philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): Yoongi collected 4 and Yuna collected 5. If Jungkook collects a sum of 6 and 3, who has the largest number?
Question (KO): 윤기는 4, 유나는 5를 모았습니다. 정국이는 6에서 3을 합한 수만큼 모았다면 누가 가장 큰 수를 가지고 있나요?

Answer: Jungkook

Solution (Python):
var_a = 'Yoongi'
var_b = 'Yuna'
var_c = 'Jungkook'
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 = 4
var_e = 5
var_f = 6
var_g = 3
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)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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): Moving some decimal places to the left equals the original value minus 1.782. If you moved the decimal point by two places, what was the original decimal?
Question (KO): 어떤 소수의 소수점을 왼쪽으로 옮겼더니 원래의 값에서 1.782를 뺀 것과 같아졌습니다. 소수점을 두 자리 옮겼다고 한다면, 원래 소수는 무엇이었는지 구하시오.

Answer: 1.8

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

Question (EN): When the weight of 7 students in Geontak’s class is 35.1 kilograms (kg), 41.3 kilograms (kg), 38.6 kilograms (kg), 40.2 kilograms (kg), 39.0 kilograms (kg), 43.7 kilograms (kg), and 38.4 kilograms (kg), find the average weight of students who weighed more than or equal to 39 kilograms (kg).
Question (KO): 건탁이네 반 학생 7명의 몸무게가 35.1킬로그램(㎏), 41.3킬로그램(㎏), 38.6킬로그램(㎏), 40.2킬로그램(㎏), 39.0킬로그램(㎏), 43.7킬로그램(㎏), 38.4킬로그램(㎏)일 때 39킬로그램(㎏) 이상인 학생들의 평균 몸무게를 구하시오.

Answer: 41.05

Solution (Python):
var_a = 35.1
var_b = 41.3
var_c = 38.6
var_d = 40.2
var_e = 39
var_f = 43.7
var_g = 38.4
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 = 39
list_b = []
for i in list_a:
    if i >= var_h:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_i = sum(list_b)/len(list_b)
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Arithmetic calculation

Question (EN): What is the smallest four-digit number divisible by 2, 3, 8, and 9?
Question (KO): 숫자 2, 3, 8, 9로 나누어 떨어질 수 있는 네 자리 수 중 가장 작은 수는?

Answer: 1008

Solution (Python):
var_a = 1000
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 2
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 = 3
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-1]
print(int(var_i))
Category: Geometry

Question (EN): If one side of the base of a regular hexagonal prism is 6 centimeters (cm) long, and the prism is 11 centimeters (cm) high, how many centimeters (cm) is the sum of the lengths of all the edges?
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: Arithmetic calculation

Question (EN): Seojun and his friends picked 100 apples from the orchard. If Seojun takes 11 of them, how many apples does Seojun have compared to entire apples as a decimal number?
Question (KO): 서준이와 친구들은 과수원에서 사과를 100개 땄습니다. 그중에서 서준이가 11개를 가졌다면 서준이가 가진 사과는 전체 사과의 얼마인지 소수로 나타내시오.

Answer: 0.11

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

Question (EN): There is 1 liter (L) of water. The mother drank 0.1 liters (L), and the father drank 0.2 liters (L) more than the mother. If your sister drank 0.3 liters (L) at this time, how many liters (L) of water is left?
Question (KO): 1리터(L)짜리 물이 있습니다. 엄마가 0.1리터(L) 마셨고, 아빠는 엄마보다 0.2리터(L)를 더 마셨습니다. 이때 누나가 0.3리터(L)를 마셨다면, 남은 물은 몇 리터(L)입니까?

Answer: 0.3

Solution (Python):
var_a = 1
var_b = 0.1
var_c = var_a - var_b
var_d = 0.1
var_e = 0.2
var_f = var_d + var_e
var_g = var_c - var_f
var_h = 0.3
var_i = var_g - var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Correspondence

Question (EN): A sheet of paper, yellow on the front and green on the back, lies on the floor. At this time, it is said that the students flipped 152 pieces of paper that showed yellow and turned them over to show green. At this time, if there are 346 more yellow papers than green papers, what is the difference before flipping?
Question (KO): 앞면은 노란색 뒷면은 초록색인 종이가 바닥에 놓여 있다. 이때 학생들이 노란색이 보이는 종이 152개를 뒤집어 초록색이 보이도록 뒤집었다고 한다. 이때 노란색 종이가 초록색 종이보다 346개 많았다면 뒤집기전에는 차이가 얼마였는지 구하시오.

Answer: 650

Solution (Python):
var_a = 346
var_b = 152
var_c = var_a + var_b
var_d = 152
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): Multiply 2.5 to a particular number and subtract 2.49, and it becomes 22.01. Find the value if you divide the number by 2.5 and add 2.49 and 22.01.
Question (KO): 어떤 수에 2.5를 곱한 다음 2.49를 뺐더니 22.01이 되었습니다. 어떤 수를 2.5로 나눈 다음 2.49를 더하고 22.01을 더한 값을 구하시오.

Answer: 28.42

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

Question (EN): Find the difference between the quotients of two divisions 32.5 / 1.3 and 60.8 / 7.6.
Question (KO): 두 나눗셈 32.5 / 1.3, 60.8 / 7.6의 몫의 차를 구해보세요

Answer: 17

Solution (Python):
var_a = 32.5
var_b = 1.3
var_c = var_a / var_b
var_d = 60.8
var_e = 7.6
var_f = var_d / var_e
var_g = var_c - var_f
var_h = abs(var_g)
print(int(var_h))
Category: Possibility

Question (EN): I want to choose three of the natural numbers 5, 3, 6, and 8, and use all of them to create a three-digit number. Choose the 10th smallest possible number.
Question (KO): 자연수 5, 3, 6, 8 중 3개를 고르고, 고른 수를 모두 사용하여 세 자리 수를 만들고 싶습니다. 만들 수 있는 수 중 10번째로 작은 수를 고르시오.

Answer: 568

Solution (Python):
var_a = 5
var_b = 3
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.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 = 10
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Find the largest number from all natural numbers less than or equal to 100, which become common multiples of 7 and 8 if 2 is subtracted.
Question (KO): 100 이하의 자연수 중 2를 빼면 7과 8의 공배수인 수들 중 가장 큰 수를 구하시오.

Answer: 58

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

Question (EN): It is said that it takes four days for the older brother and 12 days for the younger to complete a certain task. If the older brother and the younger brother do this together, find how many days it will take to complete the job.
Question (KO): 어떤 일을 완성하는 데 형은 4일, 동생은 12일이 걸린다고 한다. 형과 동생이 함께 이 일을 한다면 일을 완성하는 데 며칠이 걸리는지 구하여라

Answer: 3

Solution (Python):
var_a = 1
var_b = 1
var_c = 4
var_d = var_b / var_c
var_e = 1
var_f = 12
var_g = var_e / var_f
var_h = var_d + var_g
var_i = var_a / var_h
print(int(var_i))
Category: Comparison

Question (EN): There are four numbers A, B, C, and D. A is 27. B is 7 greater than A. C is 9 less than B. D is twice the number of C. Which number is the largest?
Question (KO): 네 수 A, B, C, D가 있습니다. A는 27입니다. B는 A보다 7 큰 수입니다. C는 B보다 9 작은 수입니다. D는 C의 2배인 수입니다. 가장 큰 수는 어느 것입니까?

Answer: D

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
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 = 27
var_f = 27
var_g = 7
var_h = var_f + var_g
var_i = 27
var_j = 7
var_k = var_i + var_j
var_l = 9
var_m = var_k - var_l
var_n = 27
var_o = 7
var_p = var_n + var_o
var_q = 9
var_r = var_p - var_q
var_s = 2
var_t = var_r * var_s
list_b= []
if "/" in str(var_t):
    var_t = eval(str(var_t))
list_b.append(var_t)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
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_u = 1
list_c=list_b.copy()
list_c.sort()
var_v = list_c[-var_u]
var_w = list_b.index(var_v)+1
var_x = list_a[var_w-1]
print(var_x)
Category: Correspondence

Question (EN): When a number is divided by 4, it is 12. Find the result of dividing the number by 3.
Question (KO): 4를 어떤 수에서 나누었더니 12가 되었습니다. 어떤 수에 3을 나눈 결과를 구하시오.

Answer: 16

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

Question (EN): You want to make the largest square out of a piece of string that is 32 centimeters (cm) long. How many centimeters (cm) is the length of one side of the square?
Question (KO): 길이가 32센티미터(㎝) 인 끈으로 가장 큰 정사각형을 만들려고 합니다. 정사각형 한 변의 길이는 몇 센티미터(㎝) 입니까?

Answer: 8

Solution (Python):
var_a = 32
var_b = 4
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): 122 is the result of mistakenly subtracting 64 from a number. We need to subtract 46 from it. Calculate correctly.
Question (KO): 122는 어떤 수에서 46을 빼야 하는데 실수로 64를 빼서 나온 결과입니다. 바르게 계산하시오.

Answer: 140

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

Question (EN): There are 10 balls in a big box. How many small boxes are needed to if you put 5 balls in each of the small box?
Question (KO): 큰 상자 안에는 10개의 공이 있습니다. 작은 상자에 공을 5개씩 나누어 담을 때, 필요한 작은 상자의 개수는 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 10
var_b = 5
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): You're trying to move 48 one-metric ton (m/t) objects. How many trips would it take to move 6 trucks that can load up to 4-metric ton (m/t) at a time?
Question (KO): 1톤짜리 물건 48개를 옮기려고 합니다. 4톤까지 실을 수 있는 트럭에 물건을 가득 채워 6대씩 한 번에 이동하여 물건을 나르려면, 모두 몇 번 날라야 합니까?

Answer: 2

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

Question (EN): There is a square with a side of 5 centimeters (cm). What is the sum of the lengths of the four sides of this square in centimeters (cm)?
Question (KO): 한 변이 5센티미터(㎝) 정사각형이 있습니다. 이 정사각형의 네 변의 길이의 합은 몇 센티미터(㎝)입니까?

Answer: 20

Solution (Python):
var_a = 5
var_b = 4
var_c = var_a * var_b
print(int(var_c))
Category: Comparison

Question (EN): Kiyoung's classroom is placed in a square shape with the same number of desks in each row. Kiyoung's seat is 2nd from the front, 4th from the back, and 3rd from the right. Karam's seat is right next to Kiyoung's left and is second from the left. How many desks are there in Kiyoung's classroom?
Question (KO): 기영이네 교실에는 가로, 세로 각 줄의 책상 수가 같게 사각형 모양으로 놓여 있습니다. 기영이의 자리는 앞에서 2번째, 뒤에서 4번째, 오른쪽에서 3번째에 있습니다. 가람이의 자리는 기영이의 바로 왼쪽 옆에 있고 왼쪽에서 2번째에 있습니다. 기영이네 교실의 책상은 모두 몇 개입니까?

Answer: 25

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 = 3
var_g = 2
var_h = var_f + var_g
var_i = var_e * var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): From the 0.35 kilometer (km) point to the 0.37 kilometer (km) point of a certain road, it was decided to divide it into 4 equal sections and plant street trees from beginning to end. How many kilometers (km) is the location of the street tree planted at the fourth point using a decimal number?
Question (KO): 어떤 도로의 0.35킬로미터(㎞) 지점에서 0.37킬로미터(㎞) 지점까지 똑같이 4구간으로 나누어 처음부터 끝까지 가로수를 심기로 하였습니다. 네 번째 지점에 심는 가로수의 위치는 몇 킬로미터(㎞) 지점인지 소수로 나타내시오.

Answer: 0.37

Solution (Python):
var_a = 0.35
var_b = 0.37
var_c = 0.35
var_d = var_b - var_c
var_e = 4
var_f = var_d / var_e
var_g = 4
var_h = 1
var_i = var_g - var_h
var_j = var_f * var_i
var_k = var_a + var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Correspondence

Question (EN): 225 is the result of adding 20 to a number and multiplying it by 5 by mistake, when it was supposed to be adding 20 and dividing it by 5. How much is it if you calculate it correctly?
Question (KO): 225는 어떤수에 20를 더한 뒤 5로 나눠야했던 거를 실수로 20을 더한 뒤 5를 곱하여 나온 결과입니다. 바르게 계산한다면 얼마입니까?

Answer: 9

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

Question (EN): Sora, Heesu, and Jiyeon are playing a game of collecting number cards. Sora picked up cards with 4 and 6 written on them, Heesu picked up cards with 7 and 5 written on them, and Jiyeon collected cards with 3 and 8 written on them. Find who has the greatest sum of the numbers written on all the cards.
Question (KO): 소라, 희수, 지연이는 숫자 카드 모으기 놀이를 하고 있습니다. 소라는 4와 6이 쓰여있는 카드를 집었고, 희수는 7과 5가 쓰여있는 카드를, 지연이는 3과 8이 적혀있는 카드를 모았습니다. 모든 카드에 적혀있는 수의 합이 가장 큰 사람은 누구인지 구하세요.

Answer: Heesu

Solution (Python):
var_a = 'Sora'
var_b = 'Heesu'
var_c = 'Jiyeon'
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 = 4
var_e = 6
var_f = var_d + var_e
var_g = 7
var_h = 5
var_i = var_g + var_h
var_j = 3
var_k = 8
var_l = var_j + var_k
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
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_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p)
Category: Arithmetic calculation

Question (EN): Junyoung has 11 dozen pencils. Of these, 4 dozen were given to Taesoo and 9 were given to Jongsoo. How many pencils are left to Junyoung?
Question (KO): 준영이는 연필 11타를 가지고 있습니다. 이 중에서 4타를 태수에게 주고, 9자루를 종수에게 주었습니다. 준영이에게 남아 있는 연필은 몇 자루 입니까?

Answer: 75

Solution (Python):
var_a = 11
var_b = 4
var_c = var_a - var_b
var_d = 12
var_e = var_c * var_d
var_f = 9
var_g = var_e - var_f
print(int(var_g))
Category: Comparison

Question (EN): Basket containing 5 apples of the same weight weighs 2.9 kilograms (kg), and a basket containing 3 melons of the same weight weighs 2.51 kilograms (kg). If the empty basket weighs 0.2 kilograms (kg), find out which of the apples or melons is heavier.
Question (KO): 무게가 같은 사과 5개를 담은 바구니의 무게는 2.9킬로그램(㎏) 이고, 무게가 같은 메론 3개를 담은 바구니의 무게는 2.51킬로그램(㎏) 입니다. 빈 바구니의 무게가 0.2킬로그램(㎏) 일 때 사과 한 개와 메론 한 개 중 어느 것이 더 무거운지 구해보시오.

Answer: melons

Solution (Python):
var_a = 'apples'
var_b = 'melons'
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 = 2.9
var_d = 0.2
var_e = var_c - var_d
var_f = 5
var_g = var_e / var_f
var_h = 2.51
var_i = 0.2
var_j = var_h - var_i
var_k = 3
var_l = var_j / var_k
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p)
Category: Comparison

Question (EN): Mijoo's house is on the 1st from the left, the 7th from the right, the 2nd from the top floor, and the 4th from the bottom floor of the apartment. If the number of houses in each row is the same and there are 3 households in each house, how many households live in this apartment?
Question (KO): 미주의 집은 아파트의 집들 중 왼쪽에서 1번째, 오른쪽에서 7번째, 위에서 2번째 층, 아래에서 4번째 층에 있습니다. 각 줄마다 있는 집의 수가 같고 한 집 당 3가구가 살 때, 이 아파트는 모두 몇 가구가 삽니까?

Answer: 105

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

Question (EN): The width of the wall was measured with a string measuring 1 meter (m) and 70 centimeters (cm) in length. If the width of the wall is 80 centimeters (cm) greater than 5 times the length of the string, what is the width of this wall in centimeters (cm)?
Question (KO): 길이가 1미터(m) 70센티미터(㎝)인 끈으로 벽의 가로의 길이를 재었습니다. 벽의 가로의 길이가 끈의 길이의 5배보다 80센티미터(㎝) 더 길다면, 이 벽의 가로 길이는 몇 센티미터(㎝)입니까?

Answer: 930

Solution (Python):
var_a = 1
var_b = 100
var_c = var_a * var_b
var_d = 70
var_e = var_c + var_d
var_f = 5
var_g = var_e * var_f
var_h = 80
var_i = var_g + var_h
print(int(var_i))
Category: Possibility

Question (EN): I am trying to make a three digit number by picking 3 times out of 0, 3, 5, 6. What is the smallest number that can be made?
Question (KO): 세자리 수를 0, 3, 5, 6 중에서 3번 뽑아 만들려 합니다. 만들어진 수 중에서 가장 작은 수는 무엇인가요?

Answer: 305

Solution (Python):
var_a = 0
var_b = 3
var_c = 5
var_d = 6
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There are 156 pigs and 267 cows in the barn. If 115 of them were sold today, how many are left in the barn?
Question (KO): 축사에 돼지 156마리, 소 267마리가 있다. 이 중 115마리가 오늘 팔려 나갔다고 한다면 축사에는 몇 마리가 남아있는지 구하시오.

Answer: 308

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

Question (EN): You have a rectangular-shaped notebook with a circumference of 46 centimeters (cm) and a length of 9 centimeters (cm). How many centimeters (cm) is the width of this notebook?
Question (KO): 둘레가 46센티미터(㎝) 이고 세로가 9센티미터(㎝) 인 직사각형 모양의 수첩이 있습니다. 이 수첩의 가로는 몇 센티미터(㎝) 입니까?

Answer: 14

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

Question (EN): There are three numbers 10, 11, and 12. What is the difference between the largest number and the smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 큰 수와 가장 작은 수의 차는 얼마입니까?

Answer: 2

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
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]
var_f = 1
list_c=list_a.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = var_e - var_g
print(int(var_h))
Category: Correspondence

Question (EN): There are four numbers A, B, C, and D. Find C from the four-digit addition formula 4A5B+C2D7=8070.
Question (KO): 네 수 A, B, C, D가 있습니다. 네 자리 수끼리의 덧셈식 4A5B+C2D7=8070에서 C를 구하시오.

Answer: 3

Solution (Python):
var_a = '4A5B+C2D7=8070'
var_b = 'C'
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: Correspondence

Question (EN): When we divide the product of 4 and a number by 7 and add 12, we get 36. Find this number
Question (KO): 4와 어떤 수의 곱을 7로 나누고 12를 더했더니 36이 되었습니다. 어떤 수를 구하세요.

Answer: 42

Solution (Python):
var_a = 36
var_b = 12
var_c = var_a - var_b
var_d = 7
var_e = var_c * var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g))
Category: Geometry

Question (EN): How many diagonals are there in a figure bounded by 11 sides?
Question (KO): 11개의 변으로 둘러싸인 도형의 대각선의 개수는 몇 개입니까?

Answer: 44

Solution (Python):
var_a = 11
var_b = 11
var_c = 3
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g))