philschmid/DMath huggingface dataset:
Category: Geometry

Question (EN): On Minho's desk, there is a triangular ruler with a base of 15 centimeters (cm) and a height of 20 centimeters (cm). What is the area of this triangle in square centimeters?
Question (KO): 민호의 책상 위에는 밑변이 15센티미터(㎝), 높이가 20센티미터(㎝)인 삼각형 모양의 삼각자가 있습니다. 이 삼각자의 넓이는 몇 제곱센티미터입니까?

Answer: 150

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

Question (EN): What is the sum of the numbers less than or equal to 1.1 among five numbers 1.4, 9/10, 1.2, 0.5, and 13/10?
Question (KO): 5가지 숫자 1.4, 9/10, 1.2, 0.5, 13/10 중에서 1.1보다 작거나 같은 수들의 합을 구하면 얼마입니까?

Answer: 1.4

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

Question (EN): Which three-digit number is the greatest common multiple of 3 and 5?
Question (KO): 세 자리 수 중 3과 5의 공배수 중 가장 큰 수는?

Answer: 990

Solution (Python):
var_a = 100
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
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 = 5
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 = 1
list_d=list_c.copy()
list_d.sort()
var_g = list_d[-var_f]
print(int(var_g))
Category: Comparison

Question (EN): How many of 0.8, 1/2, 0.9, and 1/3 are greater than or equal to 0.4?
Question (KO): 0.8, 1/2, 0.9, 1/3 중에서 0.4보다 크거나 같은 수는 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.9
var_d = 0.3333333333333333
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 0.4
list_b = []
for i in list_a:
    if i >= var_e:
        list_b.append(i)
var_f = len(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): Machine A takes 4 hours to complete the job by itself and Machine B takes 12 hours to complete the job by itself. How many hours would it take for A and B to do this at the same time?
Question (KO): 어떤 기계 A 혼자서 일을 끝 마치는데 4시간이 걸리고 기계 B가 혼자서 일을 끝 마치는데 12시간이 걸린다. A, B가 동시에 이 일을 하면 몇 시간이 걸리는지 구하시오.

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: Arithmetic calculation

Question (EN): Find the average of the numbers less than or equal to 6, among the odd numbers that are not less than 1 and not greater than 10.
Question (KO): 1이상 10이하의 홀수 중 6이하의 수의 평균을 구하시오.

Answer: 3

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 = 6
list_b = []
for i in list_a:
    if i <= var_c:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_d = sum(list_b)/len(list_b)
print(int(var_d))
Category: Comparison

Question (EN): Wansoo has 9/25 liter (L) of chocolate milk, and Yugyeong has 0.41 liter (L) of chocolate milk. Who has more chocolate milk?
Question (KO): 완수는 9/25리터(L)의 초코우유를 가지고 있고, 유경이는 0.41리터(L)의 초코우유를 가지고 있습니다. 초코우유를 더 많이 가지고 있는 사람은 누구입니까?

Answer: Yugyeong

Solution (Python):
var_a = 'Wansoo'
var_b = 'Yugyeong'
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.36
var_d = 0.41
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): Siwoo finished some work in 3 hours. What is the total amount of work Siwoo did in one hour?
Question (KO): 시우가 어떤 일은 3시간 만에 끝 마쳤다. 시우가 1시간 동안 한 일의 양은 전체의 얼마인가?

Answer: 0.33

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

Question (EN): When students are lined up, Hoseok stands at the right of Yoongi, and there are five other students between them. When there are 9 people on the right side of Hoseok, and 6 people on the left side of Yoongi, how many students are there?
Question (KO): 학생들이 한 줄로 서 있습니다. 호석이는 윤기보다 오른쪽에 있고 그 사이에는 다른 학생 5명이 서 있습니다. 호석이의 오른쪽에는 9명이 서 있고, 윤기의 왼쪽에는 6명이 서 있습니다. 줄에 서 있는 학생은 모두 몇 명입니까?

Answer: 22

Solution (Python):
var_a = 1
var_b = 1
var_c = var_a + var_b
var_d = 5
var_e = var_c + var_d
var_f = 9
var_g = var_e + var_f
var_h = 6
var_i = var_g + var_h
print(int(var_i))
Category: Geometry

Question (EN): What is the area in square centimeters (cm2) of a rectangle whose short side is 11 centimeters (cm) and its perimeter is 52 centimeters (cm)?
Question (KO): 짧은 변의 길이가 11센티미터(㎝)이고, 둘레의 길이는 52센티미터(㎝)인 직사각형의 넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 165

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

Question (EN): There are 6 candies. How many candies can Taehyung eat if Seokjin eats 4 of them?
Question (KO): 사탕이 6개 있습니다. 그중에서 석진이가 4개를 먹으면 태형이가 먹을 수 있는 사탕은 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 6
var_b = 4
var_c = var_a - var_b
print(int(var_c))
Category: Possibility

Question (EN): Find the number of natural numbers greater than 200 when making a three-digit natural number by drawing three of the following number cards: 0, 1, 3, 5, and 6.
Question (KO): 다음 숫자 카드 0, 1, 3, 5, 6 중 3장을 뽑아 세 자리 자연수를 만들 때, 200보다 큰 자연수의 개수를 구하시오.

Answer: 36

Solution (Python):
var_a = 0
var_b = 1
var_c = 3
var_d = 5
var_e = 6
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 = 200
list_c = []
for i in list_b:
    if i > var_g:
        list_c.append(i)
var_h = len(list_c)
print(int(var_h))
Category: Correspondence

Question (EN): Taehyung wants to multiply a number by 8. But when he accidentally divided it by 5, the result was 30. Find the correct calculation result.
Question (KO): 태형이는 어떤 수에 8을 곱하려고 합니다. 하지만 실수로 5를 나누었더니 결과는 30이 되었습니다. 바르게 계산한 결과를 구하세요.

Answer: 1200

Solution (Python):
var_a = 30
var_b = 5
var_c = var_a * var_b
var_d = 8
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): It is said that it takes 6.1 liters (l) of paint to paint a wall. How many walls can be painted with 333.4 liters (l) of paint?
Question (KO): 담을 칠하는 데 페인트 6.1리터(L)가 필요하다고 합니다. 페인트 333.4리터(L)로 칠할 수 있는 담은 모두 몇 개입니까?

Answer: 54

Solution (Python):
var_a = 333.4
var_b = 6.1
var_c = var_a // var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Among Eunji’s classmates, 24 students can play instrument (a), 17 students can play instrument (b), and 8 students can play both instruments. If there is no student who cannot play either (a) or (b), how many students are in Eunji's class?
Question (KO): 은지네 반 학생 중 (가) 악기를 칠 수 있는 학생은 24명이고, (나) 악기를 칠 수 있는 학생은 17명이고, (가), (나) 두 악기 모두 칠 수 있는 학생은 8명입니다. (가) 악기와 (나) 악기를 모두 칠 수 없는 학생이 한 명도 없을 때, 은지네 반 학생은 모두 몇 명입니까?

Answer: 33

Solution (Python):
var_a = 24
var_b = 17
var_c = var_a + var_b
var_d = 8
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): How many can you make in total when you make two digits by choosing two of the natural numbers 0, 2, 4, 5, and 8 so that they do not overlap?
Question (KO): 자연수 0, 2, 4, 5, 8 중 겹치지 않게 두 개를 뽑아 두 자리 수를 만들 때, 총 몇 개를 만들 수 있는가?

Answer: 16

Solution (Python):
var_a = 0
var_b = 2
var_c = 4
var_d = 5
var_e = 8
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 = 2
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 = len(list_b)
print(int(var_g))
Category: Geometry

Question (EN): A ring with a radius of 15 centimeters (cm) has a circumference of 90 centimeters (cm). How many times is the ring's circumference longer than the ring's diameter?
Question (KO): 반지름이 15센티미터(㎝)인 고리의 둘레는 90센티미터(㎝)입니다. 고리의 둘레는 지름의 몇 배입니까?

Answer: 3

Solution (Python):
var_a = 90
var_b = 15
var_c = 2
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e))
Category: Possibility

Question (EN): There are 5 people A, B, C, D, and E. Find the number of ways to pick 2 people out of 5 and line them up.
Question (KO): A, B, C, D, E 5명이 있다. 5명 중 2명을 뽑아 일렬로 세우는 경우의 수를 구하시오.

Answer: 20

Solution (Python):
var_a = 5
var_b = 2
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: Arithmetic calculation

Question (EN): There are five numbers 10, 11, 12, 13, and 14. What is the sum of the largest number and the next largest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 가장 큰 수와 그 다음으로 큰 수의 합은 얼마입니까?

Answer: 27

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

Question (EN): Yoongi collected 4 apples, Yuna collected 5 apples, and Jungkook collected 6 times 3 apples. Who has the fewest apples?
Question (KO): 윤기는 4개, 유나는 5개, 정국에는 6 곱하기 3만큼 사과를 모았습니다. 누가 가장 적은 사과를 가지고 있습니까?

Answer: Yoongi

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): There is a A box and a B box. You compared the two boxes. If A box is larger than B box, which of the two boxes is smaller?
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 = len(list_c)
var_g = list_c[var_f-1]
print(var_g)
Category: Correspondence

Question (EN): When you needed to add 293 to a number, but mistakenly added 392, it became 541. Find the result of the correct calculation.
Question (KO): 어떤 수에 293을 더해야 하는데 잘못하여 392를 더했더니 541이 되었습니다. 바르게 계산한 결과를 구하시오.

Answer: 442

Solution (Python):
var_a = 541
var_b = 392
var_c = var_a - var_b
var_d = 293
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): There is a square made by arranging 12 pieces of colored paper of the same size, which has 12 pieces in each side. How many pieces of colored paper are on one side?
Question (KO): 크기가 같은 색종이를 가로 12개씩, 세로 12개씩 빈틈없이 늘어놓아 정사각형을 만들었습니다. 가장 바깥쪽의 한 변에 놓인 색종이의 개수는 몇 개일까요?

Answer: 12

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

Question (EN): When you multiply a number by 15, you get 45. Find the result of subtracting 1 from this number.
Question (KO): 어떤 수에 15를 곱하였더니 45가 되었습니다. 어떤 수에서 1을 뺀 결과를 구하시오.

Answer: 2

Solution (Python):
var_a = 45
var_b = 15
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): Four students, Jimin, Yoongi, Taehyung, and Namjoon, are lining up. When Jimin is in front of Yoongi, Taehyung is behind Namjoon, and Yoongi is in front of Namjoon, who is the most behind?
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: Comparison

Question (EN): Find the number of numbers greater than or equal to 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: Geometry

Question (EN): There is a box in the shape of a rectangular cuboid. If the surface area is 442 square centimeters (cm2) and the length and width are 7 centimeters (cm) and 8 centimeters (cm) respectively, what is the height of this box in centimeters (cm)?
Question (KO): 어느 직육면체 모양의 상자가 있습니다. 겉넓이가 442제곱센티미터(㎠) 이며, 가로와 세로의 길이가 각각 7센티미터(㎝), 8센티미터(㎝)이라면 이 상자의 높이는 몇 센티미터(㎝)입니까?

Answer: 11

Solution (Python):
var_a = 442
var_b = 2
var_c = var_a / var_b
var_d = 7
var_e = 8
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 7
var_i = 8
var_j = var_h + var_i
var_k = var_g / var_j
print(int(var_k))
Category: Possibility

Question (EN): A bag contains 2 red balls each with a different number and 4 blue balls each with a different number. Find the number of ways in which one ball is selected.
Question (KO): 주머니에 서로 다른 숫자가 적힌 빨간공 2개와 서로 다른 숫자가 적힌 파란공 4개가 들어있습니다. 이 중에서 공 하나를 선택하는 경우의 수를 구하세요.

Answer: 6

Solution (Python):
var_a = 2
var_b = 4
var_c = var_a + var_b
var_d = 1
var_e = 1
var_c = int(var_c)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
    var_e = var_e * (var_c-i)
for i, elem in enumerate(range(var_d)):
    var_e = var_e / (i+1)
print(int(var_e))
Category: Geometry

Question (EN): How many edges does a cube have?
Question (KO): 정육면체의 모서리의 개수는?

Answer: 12

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

Question (EN): Students stand in a line. 4 people are standing in front of Seokjin, and 7 people are standing behind Jimin. When Jimin is behind Seokjin, three people stand between Seokjin and Jimin. How many students are standing in line?
Question (KO): 학생들이 한 줄로 서 있습니다. 석진이의 앞에는 4명이 서 있고, 지민이의 뒤에는 7명이 서 있습니다. 지민이가 석진이보다 뒤에 있을 때, 석진이와 지민이 사이에는 3명이 서 있습니다. 줄을 서 있는 학생은 모두 몇 명입니까?

Answer: 16

Solution (Python):
var_a = 4
var_b = 7
var_c = var_a + var_b
var_d = 3
var_e = var_c + var_d
var_f = 2
var_g = var_e + var_f
print(int(var_g))
Category: Geometry

Question (EN): After selecting a point inside a polygon and drawing lines connecting it to the rest of the vertices, 20 triangles were created. Find the number of diagonals of this polygon.
Question (KO): 어떤 다각형 내부의 한 점을 선택한 후 나머지 꼭짓점들과 연결하는 선을 그었더니 스무 개의 삼각형이 생겼습니다. 이 다각형의 대각선의 개수를 구하시오.

Answer: 170

Solution (Python):
var_a = 20
var_b = 20
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: Arithmetic calculation

Question (EN): After school, I rode my bike quickly to the academy, and it measured 15 kilometers (km) per hour. I rode at 10 kilometers (km) per hour to get back to school to pick up books after the academy, and it took another 30 minutes longer. How many kilometers (km) is the distance between the school and the academy?
Question (KO): 학교가 마친 후 학원까지 빠르게 자전거를 탔더니 시속 15킬로미터(㎞)가 나왔다. 학원이 끝나고 학교에 책을 가지러 돌아갈 때는 시속 10킬로미터(㎞)로 달렸더니, 30분이 더 걸렸다. 학교와 학원 사이의 거리는 몇 킬로미터(㎞)인가?

Answer: 15

Solution (Python):
var_a = 30
var_b = 60
var_c = var_a / var_b
var_d = 1
var_e = 10
var_f = var_d / var_e
var_g = 1
var_h = 15
var_i = var_g / var_h
var_j = var_f - var_i
var_k = var_c / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2)))))
Category: Comparison

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

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 = 0.4
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: Possibility

Question (EN): You want to divide 20 apples into 2 different baskets. There should be at least 1 apple in the basket. How many ways are possible to divide apples?
Question (KO): 사과 20개를 서로 다른 2개의 바구니에 나누어 담으려고 합니다. 바구니에는 적어도 사과 1개를 담습니다. 사과를 나누어 담는 방법은 모두 몇 가지입니까?

Answer: 19

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

Question (EN): Find the area in square centimeters (cm2) of a rectangle with a perimeter of 56 centimeters (cm) and a width of 16 centimeters (cm).
Question (KO): 둘레가 56센티미터(㎝)이고, 가로가 16센티미터(㎝)인 직사각형의 넓이는 몇 제곱센티미터(㎠)인지 구하시오.

Answer: 192

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

Question (EN): The rabbit and tortoise had a race. During the same amount of time, the rabbit ran one hundredth of 10.2 kilometers (km), and the tortoise ran 100 meters (m). Who ran more?
Question (KO): 토끼와 거북이 경주. 같은 시간 동안 토끼는 10.2킬로미터(㎞)의 100분의 1을 달렸고, 거북이는 100미터(m)를 달렸다. 누가 더 많이 달렸습니까?

Answer: rabbit

Solution (Python):
var_a = 'rabbit'
var_b = 'tortoise'
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.2
var_d = 1000
var_e = var_c * var_d
var_f = 100
var_g = var_e / var_f
var_h = 100
list_b= []
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)
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)