philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): There are 5 boxes A, B, C, D, and E. Box B is larger than box C and smaller than box E. Box A is smaller than box D. Box A is larger than box E. Which box is the largest?
Question (KO): (가), (나), (다), (라), (마) 5개의 상자가 있습니다. (나) 상자는 (다) 상자보다 크고 (마) 상자보다 작습니다. (가) 상자는 (라) 상자보다 작습니다. (가) 상자는 (마) 상자보다 큽니다. 가장 큰 상자는 어느 상자입니까?

Answer: D

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
var_e = 'E'
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 = 'B'
var_g = 'C'
var_h = '>'
var_i = 'B'
var_j = 'E'
var_k = '<'
var_l = 'A'
var_m = 'D'
var_n = '<'
var_o = 'A'
var_p = 'E'
var_q = '>'
list_b= []
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
    var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
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)
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_r = 1
var_s = list_c[var_r-1]
print(var_s)
Category: Comparison

Question (EN): The numbers 2.23, 3.12, 9.434, and 2.453 are placed in ascending order. What should come first?
Question (KO): 2.23, 3.12, 9.434, 2.453을 작은 순서대로 늘어 놓았습니다. 첫 번째로 올 수는 무엇입니까?

Answer: 2.23

Solution (Python):
var_a = 2.23
var_b = 3.12
var_c = 9.434
var_d = 2.453
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[var_e-1]
print('{:.2f}'.format(round(var_f+1e-10,2)))
Category: Arithmetic calculation

Question (EN): The climbing speed was 15 kilometers (km) per hour and the descending speed was 10 kilometers (km) per hour. If the difference between the two times is 30 minutes, how hours did it take to go down the mountain?
Question (KO): 등산 할 때 오르는 속도는 시속 15킬로미터(㎞)였고 내려가는 속도는 시속 10킬로미터(㎞)였다. 두 시간의 차이가 30분이 났다면, 산을 내려갈 때 걸린 시간은 얼마인가?

Answer: 1.5

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

Question (EN): You add 7/5 to a number by mistake instead of taking it away, and you get 81/20. Find the value correctly calculated.
Question (KO): 어떤 수에 7/5을 빼어야 할 것을 잘못하여 더했더니 81/20이 되었습니다. 바르게 계산한 값을 구하시오.

Answer: 1.25

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

Question (EN): If you add a number twice to 0.46, you get 0.72. What number is it?
Question (KO): 0.46 에 어떤 수를 두 번 더했더니 0.72 가 되었습니다. 어떤 수는 얼마입니까?

Answer: 0.2

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

Question (EN): 3A1+2B=327. What is B?
Question (KO): 3A1+2B=327이 성립합니다. B는 무엇인가요?

Answer: 6

Solution (Python):
var_a = '3A1+2B=327'
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: Correspondence

Question (EN): You had to subtract 19 from a certain number and add 27 but you accidentally subtract 27 and add 19 and you get 84. Find the correct result.
Question (KO): 어떤 수에서 19를 빼고 27을 더해야 하는데 잘못하여 27을 빼고 19를 더했더니 84가 되었습니다. 바르게 계산한 결과를 구하시오.

Answer: 100

Solution (Python):
var_a = 84
var_b = 19
var_c = var_a - var_b
var_d = 27
var_e = var_c + var_d
var_f = 19
var_g = var_e - var_f
var_h = 27
var_i = var_g + var_h
print(int(var_i))
Category: Correspondence

Question (EN): There is a three-digit number that has a hundreds digit of 5, a tens digit of A, and a ones digit of 5. If we round down this number to the tens place, we get 500. If A is a single digit number, find the sum of the numbers that can be written for A.
Question (KO): 백의 자리 수가 5, 십의 자리 수가 A, 일의 자리 수가 5인 세 자리 수가 있습니다. 이 수를 십의 자리에서 버림하면 500이 됩니다. A가 한 자리 수일 때 A에 쓸 수 있는 수들의 합을 구하시오.

Answer: 45

Solution (Python):
var_a = 5
var_b = 'A'
var_c = 5
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=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
ans_dict = dict()
var_d = str(var_d)
list_b = []
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_d):
    if v in variable_candi:
        ans_dict[v] = 0
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_d
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    if len(var_d) == len(str(int(temp))):
        new_elem = int(temp)
        list_b.append(new_elem)
var_e = 600
list_c = []
for i in list_b:
    if i <= var_e:
        list_c.append(i)
var_f = 'A'
var_d = str(var_d)
var_f = str(var_f)
unk_idx = var_d.index(var_f)
list_d = []
for elem in list_c:
    elem = str(elem)
    list_d.append(int(elem[unk_idx]))
list_d = list(set(list_d))
list_d = [float(i) for i in list_d]
var_g = sum(list_d)
print(int(var_g))
Category: Geometry

Question (EN): How many centimeters (cm) is the side of the largest equilateral triangle that can be made with a wire of 78 centimeters (cm)?
Question (KO): 길이가 78센티미터(㎝)인 철사로 만들 수 있는 가장 큰 정삼각형의 한 변은 몇 센티미터(㎝)입니까?

Answer: 26

Solution (Python):
var_a = 78
var_b = 3
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): Jinho spent half of his money and 300 won at the first store, then half of his money and 400 won at the second store, and he had no money left. Find how much money Jinho had at the beginning.
Question (KO): 진호는 첫 번째 가게에서 가지고 있던 돈의 절반과 300원을 쓰고, 두 번째 가게에서 남은 돈의 절반과 400원을 썼더니 남은 돈이 없었습니다. 진호가 처음에 가지고 있던 돈은 얼마인지 구하시오.

Answer: 2200

Solution (Python):
var_a = 0
var_b = 400
var_c = var_a + var_b
var_d = 1
var_e = 0.5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 300
var_i = var_g + var_h
var_j = 1
var_k = 0.5
var_l = var_j - var_k
var_m = var_i / var_l
print(int(var_m))
Category: Comparison

Question (EN): (A) is a cube with an edge length of 7 centimeters (cm), (B) is a cube with an edge length of 11 centimeters (cm), and (C) is a cube with an edge length of 9 centimeters (cm). Which cube has the largest surface area among (A), (B), and (C)?
Question (KO): (가)는 한 모서리의 길이가 7센티미터(㎝)인 정육면체이고, (나)는 한 모서리의 길이가 11센티미터(㎝)인 정육면체이고, (다)는 한 모서리의 길이가 9센티미터(㎝)인 정육면체입니다. (가), (나), (다) 중 겉넓이가 가장 넓은 정육면체는 어느 것입니까?

Answer: (B)

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

Question (EN): A is a single digit number. Find A from the multiplication formula AA×AA=5929 between two digit numbers.
Question (KO): A는 한 자리 수입니다. 두 자리 수끼리의 곱셈식 AA×AA=5929에서 A를 구하시오.

Answer: 7

Solution (Python):
var_a = 'AA×AA=5929'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_a
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    term_list = []
    op_list = []
    temp_c = ''
    for tc in temp:
        if tc not in '+-*/=><().':
            temp_c += tc
        else:
            op_list.append(tc)
            term_list.append(temp_c)
            temp_c = ''
    term_list.append(temp_c)
    new_eq = ''
    for i in range(len(op_list)):
        new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    if len(new_eq) == len(var_a):
        new_eq=new_eq.replace('=', '==')
        new_eq=new_eq.replace('>==', '>=')
        new_eq=new_eq.replace('<==', '<=')
        eval_result = False
        try:
            eval_result = eval(new_eq)
        except:
            pass
        if eval_result:
            for i, (k, _) in enumerate(ans_dict.items()):
                ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c))
Category: Correspondence

Question (EN): Chocolate and candies go into a gift set at a confectionery store at the same time. Chocolate is 69 pieces and candy is 86 pieces. When chocolates and candies are divided equally into a gift set, there are 5 chocolates left and 6 candies left. Find the maximum number of gift sets that can be made.
Question (KO): 과자가게에 있는 한 선물세트에 초콜릿과 사탕이 동시에 들어간다. 초콜릿은 69개이고 사탕은 86개이다. 초콜릿과 사탕을 선물세트에 동일하게 나누어 담았을때 초콜릿은 5개가 남고 사탕은 6개가 남는다. 최대로 만들 수 있는 선물세트의 개수는 몇 개인지 구하시오.

Answer: 16

Solution (Python):
var_a = 69
var_b = 5
var_c = var_a - var_b
var_d = 86
var_e = 6
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
print(int(var_g))
Category: Comparison

Question (EN): Youngsik and Mingi shared 1000 apples. Youngsik took 50 more than Mingi, and while Mingi was carrying apples, he met Nogi and shared them with him. Mingi's apples were 35 more than Nogi's. If Mingi wants to sell her apples in 17 boxes, how many apples are in one box?
Question (KO): 1000개의 사과를 영식씨와 민기씨가 나눠 가졌습니다. 영식씨는 민기씨보다 50개를 더 많이 가져갔고, 민기씨는 사과를 가지고 가던 중 노기씨를 만나 사과를 나누어 주었습니다. 민기씨의 사과가 노기씨의 사과보다 35개 더 많았습니다. 민기씨가 자신의 사과를 17개의 박스에 넣어 팔려고 할 때, 한 박스에 들어간 사과는 몇 개입니까?

Answer: 15

Solution (Python):
var_a = 1000
var_b = 50
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 35
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
var_j = 35
var_k = var_i + var_j
var_l = 17
var_m = var_k / var_l
print(int(var_m))
Category: Arithmetic calculation

Question (EN): The lottery winning numbers for this week are 11, 25, 42, 15, 28, and 39. Find the difference between the largest number and the second largest number.
Question (KO): 이번 주 복권 당첨 번호는 11, 25, 42, 15, 28, 39이다. 이 중 가장 큰 수와 두 번째로 큰 수의 차를 구하시오.

Answer: 3

Solution (Python):
var_a = 11
var_b = 25
var_c = 42
var_d = 15
var_e = 28
var_f = 39
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 = 1
list_b=list_a.copy()
list_b.sort()
var_h = list_b[-var_g]
var_i = 2
list_c=list_a.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = var_h - var_j
print(int(var_k))
Category: Comparison

Question (EN): Choa can jump 1.1 meters (m), and Junga can jump 20/22 meters (m). Who can jump higher?
Question (KO): 초아는 1.1미터(m)를 점프할 수 있고, 정아는 20/22미터(m)를 점프할 수 있습니다. 누가 더 높이 점프할 수 있습니까?

Answer: Choa

Solution (Python):
var_a = 'Choa'
var_b = 'Junga'
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.1
var_d = 0.9090909090909091
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): If 5 people shake each other's hands once, how many handshakes will they all do?
Question (KO): 5명이 서로 한번씩 악수를 한다고 할 때, 모두 몇 번의 악수를 하게 되는지 구하시오.

Answer: 10

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)
for i, elem in enumerate(range(var_b)):
    var_c = var_c / (i+1)
print(int(var_c))
Category: Correspondence

Question (EN): A three-digit number with 3 in the hundreds is divisible when divided by 4. How many three-digit numbers that meet this condition are there? 
Question (KO): 백의 자리 숫자가 3인 세 자리 수를 4로 나누면 나누어떨어집니다. 이런 세 자리 수는 모두 몇 개입니까?

Answer: 25

Solution (Python):
var_a = 3
var_b = 100
var_c = var_a * var_b
var_d = 3
var_e = 100
var_f = var_d * var_e
var_g = 99
var_h = var_f + var_g
var_i = 1
list_a = [i for i in range(var_c, var_h + 1, var_i)]
var_j = 4
list_b = []
var_j = int(var_j)
for i in list_a:
    i = int(i)
    if i % var_j == 0:
        list_b.append(i)
var_k = len(list_b)
print(int(var_k))
Category: Comparison

Question (EN): Jungkook did 81 jump ropes. Yuna did 26 jump ropes each in the first and second times. At least how many times should Yuna jump rope more than Jungkook in the third?
Question (KO): 정국이는 줄넘기를 81번 했습니다. 유나는 줄넘기를 1번째와 2번째에 각각 26번씩 했습니다. 유나가 정국이보다 줄넘기를 더 많이 하려면 3번째에는 적어도 몇 번을 해야 합니까?

Answer: 30

Solution (Python):
var_a = 81
var_b = 26
var_c = 26
var_d = var_b + var_c
var_e = var_a - var_d
var_f = 1
var_g = var_e + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): You can make one mobile with 4 meters (m) of wire. After making multiple mobiles of the same size with 117.6 meters (m) of wire, how many meters (m) of wire is left?
Question (KO): 철사 4미터(m)로 모빌을 1개 만들 수 있습니다. 철사 117.6미터(m)로 같은 크기의 모빌을 여러개 만든 후 남은 철사는 몇 미터(m)입니까?

Answer: 1.6

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

Question (EN): Jinho's number has 4 digits for 1, 2 digits for 0.1, 0.01 digits for 0, and 7 digits for 0.001. Younghee has a number that is 100 times as large as Jinho's, and the Jungsoo have a number that is 0.05 larger than Younghee's. What number does Jungsoo have?
Question (KO): 진호가 가진 수는 1의 자리가 4, 0.1의 자리가 2, 0.01의 자리가 0, 0.001의 자리가 7입니다. 영희는 진호의 100배인 수를 가지고 있고, 정수는 영희보다 0.05 더 큰 수를 가지고 있습니다. 정수는 얼마의 수를 가지고 있습니까?

Answer: 420.75

Solution (Python):
var_a = 1
var_b = 4
var_c = var_a * var_b
var_d = 0.1
var_e = 2
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 0.001
var_i = 7
var_j = var_h * var_i
var_k = var_g + var_j
var_l = 100
var_m = var_k * var_l
var_n = 0.05
var_o = var_m + var_n
print('{:.2f}'.format(round(var_o+1e-10,2)))
Category: Correspondence

Question (EN): When you multiply a number by 4, you get 166.08. Divide a number by 4 and add 0.48 to find the value.
Question (KO): 어떤 수에 4를 곱하였더니 166.08이 되었습니다. 어떤 수를 4로 나눈 뒤 0.48을 더한 값을 구하시오.

Answer: 10.86

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

Question (EN): What is the largest five-digit number divisible by 8?
Question (KO): 8으로 나누어 떨어질 수 있는 다섯 자리 수 중 가장 큰 수는?

Answer: 99992

Solution (Python):
var_a = 10000
var_b = 99999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 8
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f))
Category: Comparison

Question (EN): Yoojeong drank 7/10 liters (L) of milk. Eunji drank 0.5 liters (L) of milk. Yuna drank 6/10 liters (L) of milk. Who drank the most milk?
Question (KO): 유정이는 우유를 7/10리터(L) 마셨습니다. 은지는 우유를 0.5리터(L) 마셨습니다. 유나는 우유를 6/10리터(L) 마셨습니다. 우유를 가장 많이 마신 사람은 누구입니까?

Answer: Yoojeong

Solution (Python):
var_a = 'Yoojeong'
var_b = 'Eunji'
var_c = 'Yuna'
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 = 7
var_e = 10
var_f = var_d / var_e
var_g = 0.5
var_h = 6
var_i = 10
var_j = var_h / var_i
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
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)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Possibility

Question (EN): Two fruits were taken out from a basket containing one apple, one peach, one pear, one melon, and a strawberry. How many ways are there for the selected fruit?
Question (KO): 사과, 복숭아, 배, 참외, 딸기가 각각 하나씩 있는 바구니에서 2개를 뺐습니다. 선택된 과일의 경우의 수는 모두 몇 가지입니까?

Answer: 10

Solution (Python):
var_a = 'apple'
var_b = 'peach'
var_c = 'pear'
var_d = 'melon'
var_e = 'strawberry'
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 = len(list_a)
var_g = 2
var_h = 1
var_f = int(var_f)
var_g = int(var_g)
for i, elem in enumerate(range(var_g)):
    var_h = var_h * (var_f-i)
for i, elem in enumerate(range(var_g)):
    var_h = var_h / (i+1)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): Minyoung's 5th graders have 30 students in class (a), 27 students in class (b), and 28 students in class (c). I'm going to give out 4 notebooks to every 5th grader. If there are 400 notebooks, find how many notebooks would be left after giving them to all 5th graders.
Question (KO): 민영이네 학교 5학년은 (가) 반이 30명, (나) 반이 27명, (다) 반이 28명입니다. 5학년 학생 모두에게 공책을 4권씩 나누어 주려고 합니다. 공책이 400권 있다면 5학년 학생들에게 나누어 주고 남은 공책은 몇 권인지 구하시오.

Answer: 60

Solution (Python):
var_a = 400
var_b = 30
var_c = 27
var_d = var_b + var_c
var_e = 28
var_f = var_d + var_e
var_g = 4
var_h = var_f * var_g
var_i = var_a - var_h
print(int(var_i))
Category: Geometry

Question (EN): A large square was created by placing 10 square-shaped tiles, both horizontally and vertically, without gaps. If the tiles on the perimeter are blue and the tiles on the inside are yellow, how many yellow tiles are there?
Question (KO): 정사각형 모양의 타일을 가로와 세로 모두 10장씩 빈틈없이 놓아서 큰 정사각형을 만들었습니다. 둘레에 놓인 타일은 파란색이고, 안쪽에 놓인 타일은 노란색일 때, 노란색 타일은 모두 몇 장입니까?

Answer: 64

Solution (Python):
var_a = 10
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = var_c ** var_d
print(int(var_e))
Category: Correspondence

Question (EN): A number is first divided by 8, and then added by 8. When the result is subtracted by 30 and then multiplied by 6 to get 12, what is the number?
Question (KO): 어떤 수를 먼저 8로 나눠주고, 다시 8만큼 더했습니다. 결과에 30을 빼고 6을 곱했더니 12가 되었다면, 어떤 수는 무엇입니까?

Answer: 192

Solution (Python):
var_a = 12
var_b = 6
var_c = var_a / var_b
var_d = 30
var_e = var_c + var_d
var_f = 8
var_g = var_e - var_f
var_h = 8
var_i = var_g * var_h
print(int(var_i))
Category: Possibility

Question (EN): There are 15 cards, 5 each of yellow, blue, and red cards, representing a natural number from 1 to 5. If 4 cards are selected from 15 cards, in how many ways can 2 cards with the same number be selected?
Question (KO): 1부터 5까지의 자연수가 각각 하나씩 적힌 노란색, 파란색, 빨간색 카드가 각각 5장씩 15장 있다. 이 15장의 카드에서 4장의 카드를 택할 때, 같은 숫자가 적힌 카드를 각각 2장씩 택하는 경우의 수는?

Answer: 30

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)
for i, elem in enumerate(range(var_b)):
    var_c = var_c / (i+1)
var_d = 3
var_e = 2
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
    var_f = var_f * (var_d-i)
for i, elem in enumerate(range(var_e)):
    var_f = var_f / (i+1)
var_g = var_c * var_f
print(int(var_g))