philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Minyoung has 9 candies and Taehyung has 3. How many candies must Minyoung give to Taehyung so that Minyoung and Taehyung have the same number of candies?
Question (KO): 사탕을 민영이는 9개, 태형이는 3개 가지고 있습니다. 민영이와 태형이가 가지고 있는 사탕의 수가 같아지려면 민영이는 태형이에게 사탕을 몇 개 주어야 합니까?

Answer: 3

Solution (Python):
var_a = 9
var_b = 3
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Geometry

Question (EN): If the volume of 4 squares with side length 3 is equal to the volume of a circle, find the length of the radius of the circle. (Note that the pi is calculated as 3.1)
Question (KO): 한 변의 길이가 3인 정사각형 4개의 넓이가 어떤 원의 넓이와 같을 때, 원의 반지름의 길이를 구하시오. (단, 원주율은 3.1로 계산한다)

Answer: 3.41

Solution (Python):
var_a = 4
var_b = 3
var_c = 2
var_d = var_b ** var_c
var_e = var_a * var_d
var_f = 3.1
var_g = var_e / var_f
var_h = 0.5
var_i = var_g ** var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Geometry

Question (EN): I'm trying to make a square as small as possible by arranging rectangular tiles that are 12 centimeters (cm) wide and 15 centimeters (cm) tall without any overlap. How many tiles will you need in total?
Question (KO): 가로가 12센티미터(㎝), 세로가 15센티미터(㎝)인 직사각형 모양의 타일을 겹치지 않게 늘어놓아 최대한 작은 정사각형을 만들려고 합니다. 타일은 모두 몇 장 필요할까요?

Answer: 20

Solution (Python):
var_a = 12
var_b = 15
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
var_d = 2
var_e = var_c ** var_d
var_f = 12
var_g = 15
var_h = var_f * var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): How many numbers are there greater than 40 and less than 80 are multiples of 8?
Question (KO): 40 초과 80 미만인 수 중에서 8의 배수에 해당되는 수는 모두 몇 개입니까?

Answer: 4

Solution (Python):
var_a = 40
var_b = 1
var_c = var_a + var_b
var_d = 80
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 = 8
list_b = []
var_h = int(var_h)
for i in list_a:
    i = int(i)
    if i % var_h == 0:
        list_b.append(i)
var_i = len(list_b)
print(int(var_i))
Category: Correspondence

Question (EN): I have a single digit A. If division 9A5÷5<197, count all possible numbers that can be A.
Question (KO): 한 자리 수 A가 있습니다. 나눗셈 9A5÷5<197가 있을 때 A가 될 수 있는 수의 개수를 구하시오.

Answer: 8

Solution (Python):
var_a = '9A5÷5<197'
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] = []
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].append(int(c[i]))
list_a = list(set(ans_dict[var_b]))
var_c = len(list_a)
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There are 8 students in Minsu's class, and Jinho's class has one more student than Minsu's class. From 3.944 meters (m) of ribbon, 29.05 centimeters (cm) were divided to each student in Minsu's class. After that, if you cut and distribute the remaining ribbons equally to Jinho's classmates, find how many centimeters (cm) of ribbons Jinho received.
Question (KO): 민수네 반 학생은 8명이고, 진호네 반 학생은 민수네 반 보다 한 명이 많다. 길이가 3.944미터(m)인 리본에서 때어네 민수네 반 학생들에게 29.05센티미터(㎝)씩 나눠주었다. 그 이후 남은 리본을 진호네 반 학생들에게 동일하게 잘라서 나눠 주었다면, 진호가 받은 리본은 몇 센티미터(㎝)인지 구하시오.

Answer: 18

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

Question (EN): At school, you took exams in the order of Korean, Social, Mathematics, English, and Science. What subject did you take the test for the third time?
Question (KO): 학교에서 국어, 사회, 수학, 영어, 과학의 순서로 시험을 봤습니다. 3번째로 시험을 본 과목은 무엇입니까?

Answer: Mathematics

Solution (Python):
var_a = 'Korean'
var_b = 'Social'
var_c = 'Mathematics'
var_d = 'English'
var_e = 'Science'
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
var_g = list_a[var_f-1]
print(var_g)
Category: Arithmetic calculation

Question (EN): Moving a decimal point to the right by one place makes a some number to become 2.7 larger than it originally was. Find the original decimal number.
Question (KO): 어떤 소수의 소수점을 오른쪽으로 한 자리 옮기면 원래보다 2.7만큼 커집니다. 원래의 소수를 구하시오.

Answer: 0.3

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

Question (EN): The teacher gave candy to Yoongi, Jimin, and Taehyung. If Yoongi got more candies than Taehyung and Taehyung got more candies than Jimin, who got the fewest candies?
Question (KO): 선생님이 윤기, 지민, 태형이에게 사탕을 나눠줬습니다. 윤기는 태형이보다 많은 사탕을 받았고, 태형이는 지민이보다 많은 사탕을 받았다면 가장 적은 사탕을 받은 학생은 누구인가요?

Answer: Jimin

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

Question (EN): What number must be in B to make 1A+4B3=469?
Question (KO): 1A+4B3=469라는 식이 성립하려면, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 5

Solution (Python):
var_a = '1A+4B3=469'
var_b = 'B'
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): An elementary school has 1256 students. Of these, the difference between the number of students who like math and those who like other subjects is 408. How many students like math? (However, students who like math are fewer than 500.)
Question (KO): 어느 초등학교의 학생 수는 1256명입니다. 이 중에서 수학을 좋아하는 학생과 기타 과목을 좋아하는 학생 수의 차는 408명입니다. 수학을 좋아하는 학생은 몇 명입니까? (단, 수학을 좋아하는 학생은 500명보다 작습니다.)

Answer: 424

Solution (Python):
var_a = 1256
var_b = 408
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Comparison

Question (EN): You want to choose a figure with a longer perimeter. Given a square whose side is 3 centimeters (cm) and an equilateral-triangle whose side is 5 centimeters (cm), which shape has a longer perimeter?
Question (KO): 둘레의 길이가 더 긴 도형을 고르려고 합니다. 한 변의 길이가 3센티미터(cm)인 정사각형과 한 변의 길이가 5센티미터(cm)인 정삼각형이 있을 때 어떤 도형의 둘레가 더 깁니까?

Answer: equilateral-triangle

Solution (Python):
var_a = 'square'
var_b = 'equilateral-triangle'
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 = 3
var_d = 4
var_e = var_c * var_d
var_f = 5
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)
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: Geometry

Question (EN): If the sum of all the edges of a polyhedron made of 6 equal-sized squares is 144 centimeters (cm), what is the length of one side of the square in centimeters (cm)?
Question (KO): 같은 크기의 정사각형 6개로 이루어진 도형의 모든 모서리의 합이 144센티미터(㎝)라면, 정사각형의 한 변의 길이는 몇 센티미터(㎝)입니까?

Answer: 12

Solution (Python):
var_a = 144
var_b = 12
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Yuna gave 12 marbles to her younger brother and got 5 marbles to her sister. After that, Yuna gave half of the marbles to Namjoon and received 3 from Yoongi, so the number of marbles She currently have is 17. How many marbles did Yuna have in the first place?
Question (KO): 12개의 구슬을 동생에게 주고 언니에게는 5개의 구슬을 받았습니다. 이후 구슬의 절반을 남준이에게 주고 윤기에게 3개를 받았더니 현재 가지고 있는 구슬의 수가 17개가 되었습니다. 처음에 유나가 가지고 있던 구슬은 몇 개입니까?

Answer: 35

Solution (Python):
var_a = 17
var_b = 3
var_c = var_a - var_b
var_d = 2
var_e = var_c * var_d
var_f = 5
var_g = var_e - var_f
var_h = 12
var_i = var_g + var_h
print(int(var_i))
Category: Comparison

Question (EN): Yuri ate 6 plates of tteokbokki at the restaurant, and Jisoo ate 8 plates. Taehyung ate more than Yuri and less than Jisoo. How many plates of tteokbokki did Taehyung eat?
Question (KO): 유리는 식당에서 떡볶이 6접시를 먹었고, 지수는 8접시를 먹었습니다. 태형이는 유리보다는 많이 먹었고 지수보다는 적게 먹었습니다. 태형이는 떡볶이를 몇 접시 먹었겠습니까?

Answer: 7

Solution (Python):
var_a = 6
var_b = 8
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Hyunwoo's family uses 215 liters (L) of water a day. If they adjust the water pressure valve weakly, they can save as much as 0.32 times the usual amount. How many liters (L) of water can Hyunwoo's family save in a day when the water pressure valve is adjusted weakly?
Question (KO): 현우네 가족은 하루에 물을 215리터(L) 사용합니다. 수압 밸브를 약하게 조절하면 평소 사용량의 0.32 배만큼 아낄 수 있습니다. 수압 밸브를 약하게 조절했을 때 현우네 가족이 하루 동안 아낄 수 있는 물은 몇 리터(L) 입니까?

Answer: 68.8

Solution (Python):
var_a = 215
var_b = 0.32
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Correspondence

Question (EN): If you pack 6 or 9 candies, you will have nothing left, and if you pack 7 candies, you will have 1 candy left. If the number of candies is a natural number between 11 and 100, how many candies are there?
Question (KO): 사탕을 6개, 9개씩 포장하면 남는 것이 없고, 7개씩 포장하면 1개가 남는다. 사탕이 11이상 100이하의 자연수일때 사탕의 개수가 몇 개인지 구하시오.

Answer: 36

Solution (Python):
var_a = 10
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
var_e = 9
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
var_g = 0
list_b = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_a:
    i = int(i)
    if i%var_f == var_g:
        list_b.append(i)
var_h = 7
var_i = 1
list_c = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_b:
    i = int(i)
    if i%var_h == var_i:
        list_c.append(i)
var_j = 1
var_k = list_c[var_j-1]
print(int(var_k))
Category: Geometry

Question (EN): You drew diagonals from one vertex of an octagon. Find the number of triangles formed in this case.
Question (KO): 팔각형이 있을 때 한 꼭짓점에서 대각선을 그었습니다. 이때 생기는 모든 삼각형의 개수를 구하시오.

Answer: 6

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

Question (EN): How many natural numbers from 1 to 1000 have 3 in the tens place?
Question (KO): 1부터 1000까지의 자연수 중 십의 자리 숫자가 3인 수는 몇 개입니까?

Answer: 100

Solution (Python):
var_a = 1
var_b = 1000
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 10
var_e = 3
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
for i in list_a:
    i = int(i)
    if (i//var_d)%10 == var_e:
        list_b.append(i)
var_f = len(list_b)
print(int(var_f))
Category: Comparison

Question (EN): There are two numbers. When you add 30 to the smaller numbers and multiply it by 4, you get the larger number. If the difference between these two numbers is 480, what is the larger number?
Question (KO): 두 수 중 작은 수에 30을 더하고 4를 곱하면, 큰 수가 나옵니다. 이 두 수의 차는 480일 때, 큰 수는 얼마입니까?

Answer: 600

Solution (Python):
var_a = 480
var_b = 30
var_c = 4
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 4
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 30
var_k = var_i + var_j
var_l = 4
var_m = var_k * var_l
print(int(var_m))
Category: Correspondence

Question (EN): When 632-5AB=41, what number should be in B?
Question (KO): 632-5AB=41일 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 1

Solution (Python):
var_a = '632-5AB=41'
var_b = 'B'
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: Geometry

Question (EN): If four points B, C, D, and E of the five points A, B, C, D, and E are on a straight line, how many straight lines can be formed by connecting these two points?
Question (KO): 다섯 개의 점 A, B, C, D, E 중 네 점 B, C, D, E는 일직선에 위에 있을 때, 이 중 두 점을 연결하여 만들 수 있는 직선의 개수는?

Answer: 5

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

Question (EN): You want to create a five-digit number using the numbers 7, 2, 3, 4, and 9. How many five-digit numbers can you make? The same number can appear multiple times.
Question (KO): 숫자 7, 2, 3, 4, 9를 사용하여 다섯 자리 수를 만들려고 합니다. 만들 수 있는 다섯 자리 수는 모두 몇 개입니까? 같은 숫자는 여러 번 등장할 수 있습니다.

Answer: 3125

Solution (Python):
var_a = 7
var_b = 2
var_c = 3
var_d = 4
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 = 5
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=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: Possibility

Question (EN): How many three-digit integers can be made by drawing 3 cards from 1 through 4?
Question (KO): 1에서 4까지의 숫자가 각각 적힌 4장의 카드에서 3장을 뽑아 만들 수 있는 세 자리 정수의 개수는?

Answer: 24

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

Question (EN): You want to multiply 20 by some number. But you mistakenly divided a number by 10, and the result was 5. What is the correct calculation result?
Question (KO): 20에 어떤 수를 곱하려고 합니다. 잘못하여 10에 어떤 수를 나눴더니 결과는 5가 되었습니다. 바르게 계산한 결과는 얼마일까요?

Answer: 40

Solution (Python):
var_a = 20
var_b = 10
var_c = 5
var_d = var_b / var_c
var_e = var_a * var_d
print(int(var_e))
Category: Geometry

Question (EN): Find how many centimeters (cm) per side of a rhombus is 60 centimeters (cm) when the lengths of the four sides are added.
Question (KO): 네 변의 길이를 더했을 때 60센티미터(㎝)인 마름모의 한 변은 몇 센티미터(㎝)인지 구하시오.

Answer: 15

Solution (Python):
var_a = 60
var_b = 4
var_c = var_a / var_b
print(int(var_c))
Category: Possibility

Question (EN): You want to create a three-digit number by picking three of 1, 0, 7, 4, and 5 and using them only once. Find the difference between the second largest number and the third smallest number that can be made.
Question (KO): 1, 0, 7, 4, 5 중에서 3개를 뽑아 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 두 번째로 큰 수와 세 번째로 작은 수의 차를 구하시오.

Answer: 644

Solution (Python):
var_a = 1
var_b = 0
var_c = 7
var_d = 4
var_e = 5
list_a= []
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_g = 2
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = 3
list_d=list_b.copy()
list_d.sort()
var_j = list_d[var_i-1]
var_k = var_h - var_j
var_l = abs(var_k)
print(int(var_l))
Category: Geometry

Question (EN): The sum of the lengths of the sides of a rectangle with sides of 8 centimeters (cm) and 10 centimeters (cm) and a square is equal. How many centimeters (cm) is the length of one side of the square?
Question (KO): 두 변의 길이가 8 센티미터(㎝), 10 센티미터(㎝)인 직사각형과 정사각형의 네 변의 길이의 합은 같습니다. 정사각형의 한 변의 길이는 몇 센티미터(㎝)일까요?

Answer: 9

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

Question (EN): There is a box full of sand weighing 1 kilogram (kg) 780 grams (g) and a barrel weighing 2 kilograms (kg) 250 grams (g). If the box weighs 250 grams (g) and the barrel weighs 460 grams (g), which contains more sand, the box or the barrel?
Question (KO): 모래가 가득 들어있는 무게가 1킬로그램(㎏) 780그램(g)인 상자와 무게가 2킬로그램(㎏) 250그램(g)인 통이 있습니다. 상자의 무게는 250그램(g)이었으며, 통의 무게는 460그램(g)이었을 때, 상자와 통 중 어느 것에 들어 있는 모래가 더 무겁습니까?

Answer: barrel

Solution (Python):
var_a = 'box'
var_b = 'barrel'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 1
var_d = 1000
var_e = var_c * var_d
var_f = 780
var_g = var_e + var_f
var_h = 250
var_i = var_g - var_h
var_j = 2
var_k = 1000
var_l = var_j * var_k
var_m = 250
var_n = var_l + var_m
var_o = 460
var_p = var_n - var_o
list_b= []
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
list_b.reverse()
var_q = 1
list_c=list_b.copy()
list_c.sort()
var_r = list_c[-var_q]
var_s = list_b.index(var_r)+1
var_t = list_a[var_s-1]
print(var_t)
Category: Arithmetic calculation

Question (EN): You are trying to make a team of 6 people to play the game. How many teams can you make if there are 72 students in all?
Question (KO): 6명씩 팀을 만들어 게임을 하려고 합니다. 학생이 모두 72명이라면 몇 팀을 만들 수 있습니까?

Answer: 12

Solution (Python):
var_a = 72
var_b = 6
var_c = var_a // var_b
print(int(var_c))
Category: Correspondence

Question (EN): The number that is 204 less than C is A, and A is 520. Calculate B when adding 179 to B equals C.
Question (KO): C보다 204작은 수는 A이고 A는 520이다. B에 179를 더하면 C가 될때 B를 구하여라.

Answer: 545

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

Question (EN): The second-year students participated in the running competition, which is five times the number of students who participated in the running competition among the first-year students participated in the running competition. If eight of the first graders participated in the race, how many first and second graders participated in the race?
Question (KO): 1학년 중 달리기 시합에 참가한 학생 수의 5배 만큼 2학년 학생이 달리기 시합에 참가하였습니다. 1학년 중에서 8명이 달리기 시합에 참가하였다면 달리기 시합에 참가한 1학년과 2학년 학생은 모두 몇 명입니까?

Answer: 48

Solution (Python):
var_a = 8
var_b = 8
var_c = 5
var_d = var_b * var_c
var_e = var_a + var_d
print(int(var_e))
Category: Correspondence

Question (EN): The quotient of a number subtracted by 8 and then subtracted by 12 and then divided by 5 equals 7. Find the number.
Question (KO): 어떤 수에서 8을 빼고 12를 뺀 값을 5로 나눈 몫이 7이다. 어떤 수를 구하시오.

Answer: 55

Solution (Python):
var_a = 5
var_b = 7
var_c = var_a * var_b
var_d = 12
var_e = var_c + var_d
var_f = 8
var_g = var_e + var_f
print(int(var_g))