philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): In order to find the sum of three numbers, when three different numbers less than 10 are drawn, how many ways are there that the value is equal to 12?
Question (KO): 3개의 수의 합을 구하기 위해서 10보다 작은 서로 다른 3개의 수를 뽑았을 때, 값이 12와 동일한 경우는 모두 몇 가지인지 구하시오.

Answer: 42

Solution (Python):
var_a = 1
var_b = 10
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
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]
list_c=[]
for i in list_b:
    var_g = 0
    i = int(i)
    while i//10 > 0:
        var_g = var_g + i%10
        i = i//10
    var_g = var_g + i%10
    list_c.append(var_g)
var_h = 12
list_d = []
for i in list_c:
    if i <= var_h:
        list_d.append(i)
var_i = 12
list_e = []
for i in list_d:
    if i >= var_i:
        list_e.append(i)
var_j = len(list_e)
print(int(var_j))
Category: Arithmetic calculation

Question (EN): Jimin's school uses 7000 liters (l) of water per day. Find how many days it will take for the water used at Jimin's school to reach 100000 liters (l).
Question (KO): 지민이네 학교는 하루에 물 7000리터(L)를 사용합니다. 지민이네 학교에서 사용한 물이 100000리터(L)가 되려면 며칠이 걸리는 지 구하세요.

Answer: 15

Solution (Python):
var_a = 100000
var_b = 7000
var_c = var_a / var_b
var_d = 1
var_e=int(((var_c+9*10**(var_d-2))//(10**(var_d-1)))*10**(var_d-1))

print(int(var_e))
Category: Arithmetic calculation

Question (EN): Heejin received scores of 80, 90, 80, 80, 100, and 70 in six subjects on this test. How many subjects did she get 80 points on?
Question (KO): 희진이는 이번 시험에서 여섯 과목의 점수를 80, 90, 80, 80, 100, 70으로 받았습니다. 80점 받은 과목은 몇 과목 있는지 구하시오.

Answer: 3

Solution (Python):
var_a = 80
var_b = 90
var_c = 80
var_d = 80
var_e = 100
var_f = 70
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()
var_g = 80
var_h = 0
var_g = int(var_g)
for i in list_a:
    i = int(i)
    if i == var_g:
        var_h = var_h + 1
print(int(var_h))
Category: Correspondence

Question (EN): When 28 is divided by 3, the quotient is 9 and the remainder is A. What is A in this case?
Question (KO): 28을 3으로 나눴을 때 몫이 9, 나머지가 A 였습니다. 이 때 A는 무엇인가요?

Answer: 1

Solution (Python):
var_a = 28
var_b = 3
var_c = 9
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11, and 12. Which number is the largest?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중 가장 큰 수는 무엇입니까?

Answer: 12

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]
print(int(var_e))
Category: Geometry

Question (EN): How many times the volume of a cube with an edge of 1 meter (m) is the volume of a cuboid with a width of 50 centimeters (cm), a length of 50 centimeters (cm) and a height of 20 centimeters (cm)?
Question (KO): 한 모서리가 1미터(m)인 정육면체의 부피는 가로 50센티미터(㎝), 세로 50센티미터(㎝), 높이 20센티미터(㎝)인 직육면체 부피의 몇 배인가?

Answer: 20

Solution (Python):
var_a = 1
var_b = 100
var_c = var_a * var_b
var_d = 3
var_e = var_c ** var_d
var_f = 50
var_g = 50
var_h = var_f * var_g
var_i = 20
var_j = var_h * var_i
var_k = var_e / var_j
print(int(var_k))
Category: Comparison

Question (EN): My mother bought 10 liters (L) of strawberry juice and 5 liters (L) of grape juice. Which of the two did she buy more of?
Question (KO): 어머니가 딸기주스 10리터(L), 포도주스를 5리터(L) 구매하셨습니다. 둘 중에 어느 것을 더 많이 샀습니까?

Answer: strawberry

Solution (Python):
var_a = 'strawberry'
var_b = 'grape'
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 = 5
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: Possibility

Question (EN): I am trying to place 4 indistinguishable blue pencils and 1 red pencil in a row differently. How many ways are there to put them in a row?
Question (KO): 구별이 되지 않는 파란색 연필 4자루와 빨간색 연풀 1자루를 서로 다르게 한줄로 놓으려 한다. 한줄로 놓는 방법은 몇 가지인가?

Answer: 5

Solution (Python):
var_a = 1
var_b = 4
var_c = var_a + var_b
var_d = 1
var_e = 4
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 = 4
var_i = 4
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): Rectangle A is 6 centimeters (cm) wide and 9 centimeters (cm) long, and square B is 8 centimeters (cm) wide and 8 centimeters (cm) long. Which one has a longer perimeter?
Question (KO): 가로 6센티미터(㎝), 세로 9센티미터(㎝)인 직사각형 A와, 가로 8센티미터(㎝), 세로 8센티미터(㎝)인 정사각형 B가 있다. 어느 것의 둘레가 더 긴가?

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 = 6
var_d = 9
var_e = var_c + var_d
var_f = 8
var_g = 8
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: Arithmetic calculation

Question (EN): When Yuna opened the book, the sum of the two pages was 125. Write what larger page of the two pages is.
Question (KO): 유나가 책을 펼쳤는데 두 쪽수의 합이 125이었습니다. 유나가 펼친 두 쪽수 중 큰 수를 쓰시오.

Answer: 63

Solution (Python):
var_a = 125
var_b = 1
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 1
var_g = var_e + var_f
print(int(var_g))
Category: Correspondence

Question (EN): You wrongly multiply a number by 7 instead of divide by 7, and it resulted 115.15. What would be the answer of the correct calculation?
Question (KO): 어떤 수를 7로 나누어야 할 것을 잘못하여 곱하였더니 115.15였습니다. 바르게 계산한 값은 얼마입니까?

Answer: 2.35

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

Question (EN): There are three numbers 10, 11, and 12. What is the largest number divided by the smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 큰 수를 가장 작은 수로 나눈 값은 얼마입니까?

Answer: 1.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('{:.2f}'.format(round(var_h+1e-10,2)))
Category: Geometry

Question (EN): A small square is made by dividing a square with a side of 20 centimeters (cm) into thirds. Find the area of the newly created small square in square centimeters (cm2), rounded to two decimal places.
Question (KO): 한 변이 20센티미터(㎝)인 정사각형의 각 변의 길이를 3등분하여 작은 정사각형을 만들었습니다. 새로 만들어진 작은 정사각형 1개의 넓이는 몇 제곱센티미터(㎠)인지 반올림하여 소수 둘째 자리까지 구하시오.

Answer: 44.44

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

Question (EN): There are three numbers 0.8, 1/2, and 0.9. What is the sum of numbers less than 2?
Question (KO): 3개의 숫자 0.8, 1/2, 0.9가 있습니다. 2보다 작은 수의 합은 얼마인가요?

Answer: 2.2

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.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 = 2
list_b = []
for i in list_a:
    if i < var_d:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Geometry

Question (EN): The area of a rectangle divided by a diagonal is 576 square centimeters (cm2). If the width of the rectangle is 32 centimeters (cm), what is the height in centimeters (cm)?
Question (KO): 어떤 직사각형에 대각선을 그어 나눈 영역의 넓이가 576제곱센티미터(㎠)이다. 직사각형의 가로의 길이가 32센티미터(㎝)라면 높이는 몇 센티미터(㎝)입니까?

Answer: 36

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

Question (EN): Yoongi had 4 apples, Yuna had 5, and Jungkook had 6, but he ate 3 of them. Who has the fewest apples?
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-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Comparison

Question (EN): 20 students stood in a line. Jungkook is the last in line, and there are 5 students between Yoongi and Jungkook. How many students are standing in front of Yoongi?
Question (KO): 20명의 학생들이 한줄로 섰습니다. 정국이는 꼴지로 줄을 섰고, 윤기와 정국이 사이에는 5명의 학생이 있습니다. 윤기 앞에 서 있는 학생은 몇 명입니까?

Answer: 13

Solution (Python):
var_a = 20
var_b = 1
var_c = var_a - var_b
var_d = 5
var_e = var_c - var_d
var_f = 1
var_g = var_e - var_f
print(int(var_g))
Category: Comparison

Question (EN): Jimin, Yoongi, Taehyung, and Namjoon all live in the same apartment. When Jimin's house is higher than Yoongi's, Taehyung's is lower than Namjoon's, and Yoongi's is higher than Namjoon's, who lives on the lowest floor?
Question (KO): 지민, 윤기, 태형, 남준이는 모두 같은 아파트에 살고 있습니다. 지민이네 집은 윤기보다 높고, 태형이는 남준이보다 낮고, 윤기는 남준이보다 높을 때, 가장 낮은 층에 살고 있는 사람은 누구입니까?

Answer: Taehyung

Solution (Python):
var_a = 'Jimin'
var_b = 'Yoongi'
var_c = 'Taehyung'
var_d = 'Namjoon'
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 = 'Jimin'
var_f = 'Yoongi'
var_g = '>'
var_h = 'Taehyung'
var_i = 'Namjoon'
var_j = '<'
var_k = 'Yoongi'
var_l = 'Namjoon'
var_m = '>'
list_b= []
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
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_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
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)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
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_n = len(list_c)
var_o = list_c[var_n-1]
print(var_o)
Category: Possibility

Question (EN): Find the second largest four-digit number that can be made by using the digits 2, 3, 7, and 9 without duplication.
Question (KO): 2, 3, 7, 9의 숫자를 한 번씩 사용하여 얻을 수 있는 네 자리 수 중에서 두 번째로 큰 수를 구하시오

Answer: 9723

Solution (Python):
var_a = 2
var_b = 3
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 = 4
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 = 2
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
print(int(var_g))
Category: Comparison

Question (EN): Students attended the event held in the school auditorium. When every nine people sat on per bench, there was one student who could not sit down. So we made every ten people sit on per bench, and on each bench, 10 people sat, except one where no one sat. Find how many students attend the event.
Question (KO): 학교 강당에서 열린 행사에 학생들이 참석하였습니다. 긴 의자 하나에 9명씩 앉았더니 앉지 못하는 학생이 한 명 있었습니다. 그래서 긴 의자 하나에 10명씩 앉혔더니 아무도 앉지 않은 긴 의자 한 개를 제외한 모든 긴 의자에 10명씩 앉았습니다. 이때 행사에 참석한 학생은 모두 몇 명인지 구하시오.

Answer: 100

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

Question (EN): 3 of 4, 3, 1, 7, and 9 were used once to form a three-digit number. What is the second greatest number with the unit digit 3?
Question (KO): 4, 3, 1, 7, 9 중 3개를 사용하여 일의 자리 숫자가 3인 두 번째 큰 수는 무엇입니까?

Answer: 943

Solution (Python):
var_a = 4
var_b = 3
var_c = 1
var_d = 7
var_e = 9
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 = 1
var_h = 3
list_c = [] 
var_g = int(var_g)
var_h = int(var_h)
for i in list_b:
    i = int(i)
    if (i//var_g)%10 == var_h:
        list_c.append(i)
var_i = 2
list_d=list_c.copy()
list_d.sort()
var_j = list_d[-var_i]
print(int(var_j))
Category: Arithmetic calculation

Question (EN): I'm trying to put 9 toys in 1 box. How many boxes are needed to fit all 81 toys in the box?
Question (KO): 1상자에 장난감을 9개씩 담으려고 합니다. 장난감 81개를 상자에 모두 담으려면 상자는 몇 개 필요합니까?

Answer: 9

Solution (Python):
var_a = 81
var_b = 9
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): There are two natural numbers A and B. When A is divided by B, the quotient is 28 and the remainder is 4. Find A when A is the smallest in this equation.
Question (KO): 두 자연수 A, B가 있습니다. A를 B로 나누면 몫은 28이고 나머지는 4가 됩니다. 이 식에서 A가 가장 작을 때 A를 구하시오.

Answer: 144

Solution (Python):
var_a = 5
var_b = 28
var_c = var_a * var_b
var_d = 4
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): Find the number of all diagonals in a heptagon.
Question (KO): 칠각형의 모든 대각선의 개수를 구하시오.

Answer: 14

Solution (Python):
var_a = 7
var_b = 7
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))
Category: Correspondence

Question (EN): A number that should be divided by 4 is mistakenly divided by 8, so the quotient is 6 and the remainder is 4. What would be the correct answer?
Question (KO): 어떤 수를 4로 나누어야 할 것은 잘못하여 8로 나누었더니 몫이 6이고, 나머지가 4가 되었습니다. 바르게 계산한 답은 얼마가 되겠습니까?

Answer: 13

Solution (Python):
var_a = 6
var_b = 8
var_c = var_a * var_b
var_d = 4
var_e = var_c + var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g))
Category: Correspondence

Question (EN): If you add -5/12 and subtract -5/2 from a number, it becomes 1/3. What is the number?
Question (KO): 어떤 수에 -5/12를 더하고 다시 -5/2를 빼면 1/3일 때, 어떤 수를 구하시오.

Answer: -1.75

Solution (Python):
var_a = 0.3333333333333333
var_b = -2.5
var_c = var_a + var_b
var_d = -0.4166666666666667
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Correspondence

Question (EN): A number minus 24 is a multiple of 25, and a number is greater than 300. Find the smallest of all possible numbers.
Question (KO): 어떤 수에 24를 빼면 25의 배수이고 어떤 수는 300보다 크다. 가능한 어떤 수들 중 가장 작은 값을 구하시오.

Answer: 301

Solution (Python):
var_a = 300
var_b = 25
var_c = var_a + var_b
var_d = 24
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): Thirty-six people on the soccer team equally shared 252 milliliters (ml) of the beverage. Find the amount of water consumed by one member of the soccer team.
Question (KO): 축구부 36명이 252밀리리터(㎖)의 음료수를 똑같이 나눠마셨습니다. 축구부원 1명이 마신 음료수의 양은 얼마인지 구하시오.

Answer: 7

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

Question (EN): When you move the decimal point of a prime number to the right by one place, it increases 5.4 more compared to the original number. Find the original prime number.
Question (KO): 어떤 소수의 소수점을 오른쪽으로 한 자리 옮기면 원래의 소수보다 5.4만큼 커집니다. 원래의 소수를 구하시오.

Answer: 0.6

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

Question (EN): What is the surface area in square centimeters (cm2) of a cube whose lengths add up to 180 centimeters (cm)?
Question (KO): 모든 모서리의 길이의 합이 180센티미터(㎝)인 정육면체의 겉넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 1350

Solution (Python):
var_a = 180
var_b = 12
var_c = var_a / var_b
var_d = 180
var_e = 12
var_f = var_d / var_e
var_g = var_c * var_f
var_h = 6
var_i = var_g * var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): The faucet is filling the water tank at the speed of 36.6 liters (l) per minute, but there is a hole in the bottom of the tank, so that water leaks out of the tank at the speed of 2.4 liters (l) per minute. If the water tank contained 10 liters (l) of water initially, how many liters (l) of water is in the water tank after 7 minutes 45 seconds?
Question (KO): 1분에 36.6리터(L)의 물이 나오는 수도로 수조에 물을 받는데 수조 바닥에 구멍이 나서 1분에 2.4리터(L)의 물이 샌다고 합니다. 수조에 처음 10리터(L)의 물이 들어 있었다면 7분 45초 후에 수조에 담겨 있는 물은 몇 리터(L)입니까?

Answer: 275.05

Solution (Python):
var_a = 10
var_b = 36.6
var_c = 2.4
var_d = var_b - var_c
var_e = 7
var_f = 45
var_g = 60
var_h = var_f / var_g
var_i = var_e + var_h
var_j = var_d * var_i
var_k = var_a + var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Geometry

Question (EN): You have a rectangle with a perimeter of 48 centimeters (cm). If the length of this rectangle is 2 centimeters (cm) longer than its width, how long is its width in centimeters (cm)?
Question (KO): 둘레가 48센티미터(㎝) 인 직사각형이 있습니다. 이 직사각형의 세로가 가로보다 2센티미터(㎝) 더 길다면, 가로는 몇 센티미터(㎝) 입니까?

Answer: 11

Solution (Python):
var_a = 48
var_b = 2
var_c = var_a / var_b
var_d = 2
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g))
Category: Geometry

Question (EN): If the area of a triangle is 24 square centimeters (cm2) and its height is 8 centimeters (cm), what is the length of the base in centimeters (cm)?
Question (KO): 삼각형의 넓이가 24제곱센티미터(㎠)이고 높이가 8센티미터(㎝)일 때, 밑변의 길이는 몇 센티미터(㎝)입니까?

Answer: 6

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

Question (EN): It is 0.76 kilometers (km) from Yongchan's house to Minju's house, and it is 17/25 kilometers (km) to Jiwon's house. Find which friend's house is closer to Yongchan's house.
Question (KO): 용찬이네 집에서 민주네 집까지는 0.76킬로미터(㎞)이며 지원이네 집까지는 17/25킬로미터(㎞)입니다. 용찬이네 집에서 어느 친구네 집까지가 더 가까운지 구하시오.

Answer: Jiwon

Solution (Python):
var_a = 'Minju'
var_b = 'Jiwon'
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 = 0.76
var_d = 0.68
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): How many four-digit numbers are there if they can be divided by 5, 6, and 2 without any remainder?
Question (KO): 숫자 5, 6, 2로 나누어 떨어질 수 있는 네 자리 수는 모두 몇 개 있습니까?

Answer: 300

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 = 5
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 = 6
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 = 2
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 = len(list_d)
print(int(var_g))
Category: Possibility

Question (EN): How many four-digit numbers can be formed by using 1, 3, 6, and 8 only once?
Question (KO): 1, 3, 6, 8을 한 번 씩만 사용하여 만들 수 있는 네 자리 수는 모두 몇 개인지 구하시오.

Answer: 24

Solution (Python):
var_a = 1
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 = 4
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 = len(list_b)
print(int(var_f))