philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): There are two different numbers A and B. Find the sum of A and B given the two-digit subtraction equation 8A-B2=45.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 두 자리 수끼리의 뺄셈식 8A-B2=45에서 A와 B의 합을 구하시오.

Answer: 11

Solution (Python):
var_a = '8A-B2=45'
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]
var_d = '8A-B2=45'
var_e = 'B'
ans_dict = dict()
var_d = var_d.replace('×','*')
var_d = var_d.replace('x','*')
var_d = var_d.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_d):
    if v in variable_candi:
        ans_dict[v] = 1
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]))
    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_d):
        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_f = ans_dict[var_e]
var_g = var_c + var_f
print(int(var_g))
Category: Comparison

Question (EN): There are three different numbers A, B, and C. A is equal to 95 minus 35. B is 12 more than A. C is B minus 19. Which of A, B, and C is the greatest?
Question (KO): 서로 다른 세 수 A, B, C가 있습니다. A는 95에서 35를 뺀 것과 같습니다. B는 A보다 12 큽니다. C는 B에서 19를 뺀 수입니다. A, B, C 중 가장 큰 수는 무엇입니까?

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 = 95
var_e = 35
var_f = var_d - var_e
var_g = 95
var_h = 35
var_i = var_g - var_h
var_j = 12
var_k = var_i + var_j
var_l = 95
var_m = 35
var_n = var_l - var_m
var_o = 12
var_p = var_n + var_o
var_q = 19
var_r = var_p - var_q
list_b= []
if "/" in str(var_r):
    var_r = eval(str(var_r))
list_b.append(var_r)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
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: Geometry

Question (EN): The length of the radius of the smallest circle enclosing a rhombus was 10 centimeters (cm). What is the area of the smaller rhombus drawn through the midpoints of all four sides of the rhombus?
Question (KO): 어떤 마름모를 둘러싸고 있는 가장 작은 원의 반지름의 길이가 10센티미터(㎝)였다. 이 마름모의 네 변의 중앙을 모두 이어서 그린 작은 마름모의 넓이는 얼마입니까?

Answer: 100

Solution (Python):
var_a = 10
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
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): What is the largest three-digit number divisible by two numbers, 4 and 5?
Question (KO): 2개의 수 4, 5로 나누어 떨어질 수 있는 수 중 가장 큰 세 자리 수는?

Answer: 980

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 = 4
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): I have two puppies, an apple and a tangerine. The weight of an apple is 3/5 kilograms (kg), and the weight of a tangerine is 0.49 kilograms (kg). Which of the two is the heavier dog?
Question (KO): 두 강아지, 사과와 귤이 있습니다. 사과의 몸무게는 3/5킬로그램(㎏), 귤의 몸무게는 0.49킬로그램(㎏)입니다. 둘 중 더 무거운 강아지는 무엇입니까?

Answer: apple

Solution (Python):
var_a = 'apple'
var_b = 'tangerine'
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.6
var_d = 0.49
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: Correspondence

Question (EN): When 14 is divided by A, the quotient is 3 and the remainder is 2. A is a natural number. Find A.
Question (KO): 14를 A로 나누면 몫은 3이고 나머지는 2가 됩니다. A는 자연수입니다. 이 때 A를 구하시오.

Answer: 4

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

Question (EN): The distance from the house to the school is 11/4 kilometers (km), and the distance from the house to the stationery store is 2.89 kilometers (km). Which is farther from home, the school or the stationery store?
Question (KO): 집에서 학교까지의 거리는 11/4킬로미터(㎞), 집에서 문구점까지의 거리는 2.89킬로미터(㎞)입니다. 학교와 문구점 중 집에서 더 먼 곳은 어디입니까?

Answer: stationery

Solution (Python):
var_a = 'school'
var_b = 'stationery'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 2.75
var_d = 2.89
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: Correspondence

Question (EN): I am trying to write odd numbers from 1 to 100. How many times should the number 9 be written in all?
Question (KO): 1부터 100까지 홀수를 쓰려고 합니다. 숫자 9는 모두 몇 번 써야 합니까?

Answer: 15

Solution (Python):
var_a = 1
var_b = 100
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=""
for i in list_a:
    i = str(i)
    var_c = var_c + i
list_b = []
var_c = int(var_c)
while var_c//10 > 0:
    list_b.append(var_c%10)
    var_c = var_c//10
list_b.append(var_c%10)
list_b = list_b[::-1]
var_d = 9
var_e = 0
var_d = int(var_d)
for i in list_b:
    i = int(i)
    if i == var_d:
        var_e = var_e + 1
print(int(var_e))
Category: Arithmetic calculation

Question (EN): What is the sum of the natural numbers from 1 to 5?
Question (KO): 1부터 5까지 자연수들의 합은 얼마입니까?

Answer: 15

Solution (Python):
var_a = 1
var_b = 5
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
list_a = [float(i) for i in list_a]
var_d = sum(list_a)
print(int(var_d))
Category: Comparison

Question (EN): The heights of the A and B boxes are 3 centimeters (cm) and 3.5 centimeters (cm), respectively. When Taehyung stacked 16 A boxes and Yoongi stacked 14 B boxes, who stacked them higher?
Question (KO): (가) 상자는 높이가 3센티미터(㎝)이고, (나) 상자는 높이가 3.5센티미터(㎝)입니다. 태형이는 (가) 상자를 16층으로 쌓았고, 윤기는 (나) 상자를 14층으로 쌓았습니다. 상자를 더 높이 쌓은 사람은 누구입니까?

Answer: Yoongi

Solution (Python):
var_a = 'Taehyung'
var_b = 'Yoongi'
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 = 16
var_e = var_c * var_d
var_f = 3.5
var_g = 14
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: Comparison

Question (EN): The factory in Busan produced 127,000 kilograms (kg) of products. How many more trucks are needed to transport these products to Seoul by 5000 kilograms (kg) truck than by 8000 kilograms (kg) truck?
Question (KO): 부산에 있는 공장에서 127000킬로그램(㎏)의 제품을 완성하였습니다. 이 제품을 서울까지 5000킬로그램(㎏) 트럭으로 운반하려면 8000킬로그램(㎏) 트럭으로 운반하는 것보다 몇 대가 더 필요합니까?

Answer: 10

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

var_f = 127000
var_g = 8000
var_h = var_f / var_g
var_i = 1
var_j=int(((var_h+9*10**(var_i-2))//(10**(var_i-1)))*10**(var_i-1))

var_k = var_e - var_j
print(int(var_k))
Category: Comparison

Question (EN): You planted sunplant in 2/7 and snapweed in 3/8 of the flower garden. Which flower planted area is larger?
Question (KO): 꽃밭의 2/7에는 채송화, 3/8에는 봉선화를 심었습니다. 어느 꽃을 심은 부분이 더 넓습니까?

Answer: snapweed

Solution (Python):
var_a = 'sunplant'
var_b = 'snapweed'
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.2857142857142857
var_d = 0.375
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): There are 9 number cards with the numbers 1 through 9 written on them. How many ways exist in order to draw 3 cards and make their sum 17?
Question (KO): 1부터 9까지의 숫자가 적힌 9장의 숫자 카드가 있습니다. 합이 17이 되도록 3장의 카드를 뽑는 방법은 몇 가지입니까?

Answer: 42

Solution (Python):
var_a = 1
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
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_e = 0
    i = int(i)
    while i//10 > 0:
        var_e = var_e + i%10
        i = i//10
    var_e = var_e + i%10
    list_c.append(var_e)
var_f = 17
var_g = 0
var_f = int(var_f)
for i in list_c:
    i = int(i)
    if i == var_f:
        var_g = var_g + 1
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Eunji's house has 52 ducks and 78 chickens. There are 12 fewer chickens than the number of ducks and rabbits combined. How many rabbits are there in Eunji's house?
Question (KO): 은지네 집에는 오리 52마리와 닭 78마리가 있습니다. 닭은 오리와 토끼의 수를 합한 것보다 12마리 더 적게 있습니다. 은지네 집에 있는 토끼는 몇 마리입니까?

Answer: 38

Solution (Python):
var_a = 78
var_b = 52
var_c = var_a - var_b
var_d = 12
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Find the sum of odd numbers from 1 to 200.
Question (KO): 1부터 200까지의 홀수의 합을 구하시오.

Answer: 10000

Solution (Python):
var_a = 1
var_b = 200
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)
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11, and 12. What is the quotient of the 3rd smallest number divided by the 2nd smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 3번째로 작은 수와 2번째로 작은 수로 나눈 몫은 얼마입니까?

Answer: 1

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 = 3
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
var_f = 2
list_c=list_a.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = var_e // var_g
print(int(var_h))
Category: Comparison

Question (EN): The book Yerim bought was 0.65 kilograms (kg), and the book Chanwoo bought was 0.645 kilograms (kg). Who bought the heavier books?
Question (KO): 예림이가 구입한 책은 0.65킬로그램(㎏)였고, 찬우가 구입한 책은 0.645킬로그램(㎏)였습니다. 더 무거운 책을 구매한 사람은 누구인가요?

Answer: Yerim

Solution (Python):
var_a = 'Yerim'
var_b = 'Chanwoo'
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.65
var_d = 0.645
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: Geometry

Question (EN): You are trying to make a square fence with 5 stakes per side. Find how many stakes you will need.
Question (KO): 한 변에 말뚝 5개가 박혀있는 정사각형의 울타리를 만드려고 한다. 말뚝이 몇 개 필요할지 구하시오.

Answer: 16

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

Question (EN): What is the perimeter in centimeters (cm) of a figure made by enclosing 8 sides that are 12 centimeters (cm) long each?
Question (KO): 12센티미터(㎝)인 변이 8개가 둘러싸여 만들어진 도형의 둘레는 몇 센티미터(㎝)입니까?

Answer: 96

Solution (Python):
var_a = 12
var_b = 8
var_c = var_a * var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Jinwoo divided the cake into 3 equal pieces and ate one piece. Areum divided a cake of the same size into 12 equal pieces. How many pieces should she eat to eat the same amount as Jinwoo?
Question (KO): 진우는 케이크를 똑같이 3조각으로 나누어 한 조각을 먹었습니다. 아름이는 같은 크기의 케이크를 똑같이 12조각으로 나누었습니다. 진우와 같은 양을 먹으려면 아름이는 몇 조각을 먹어야 합니까?

Answer: 4

Solution (Python):
var_a = 12
var_b = 3
var_c = var_a / var_b
print(int(var_c))
Category: Comparison

Question (EN): What is the smallest number among the three numbers 5, 8, and 4?
Question (KO): 3개의 숫자 5, 8, 4 중 가장 작은 숫자는 무엇입니까?

Answer: 4

Solution (Python):
var_a = 5
var_b = 8
var_c = 4
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-1]
print(int(var_e))
Category: Arithmetic calculation

Question (EN): The two barrels contain 10 liters (L) and 8 liters (L) of juice, respectively. When 3 liters (L) of the juice contained in 8 liters (L) is poured into a juice container containing 10 liters (L), find the difference in the amount of juice held in the two juice containers.
Question (KO): 두 통에 주스가 각각 10리터(L), 8리터(L)가 담겨있습니다. 8리터(L)가 담겨 있던 주스 중 3리터(L)를 10리터(L)가 담긴 주스 통에 따랐을 때, 두 주스 통에 담겨 있는 주스의 양은 얼마나 차이 나는지 구하시오.

Answer: 8

Solution (Python):
var_a = 10
var_b = 3
var_c = var_a + var_b
var_d = 8
var_e = 3
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g))
Category: Comparison

Question (EN): The distance from the house to the library is 2+13/40 kilometers (km), and the distance from the house to the bank is 2.56 kilometers (km). Which is farther, from the house to the library or from the house to the bank?
Question (KO): 집에서 도서관까지의 거리는 2+13/40킬로미터(㎞)이고 집에서 은행까지의 거리는 2.56킬로미터(㎞)입니다. 집에서 도서관까지 혹은 집에서 은행까지 중 어느 것이 더 멀까요?

Answer: bank

Solution (Python):
var_a = 'library'
var_b = 'bank'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 2
var_d = 13
var_e = 40
var_f = var_d / var_e
var_g = var_c + var_f
var_h = 2.56
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)
Category: Arithmetic calculation

Question (EN): Each bookshelf in the library has 6 slots, and each slot can hold 8 books. Of the 16 bookshelves in the library, there are 5 slots without books, only one slot has 6 books, and all other slots have 8 books. Find how many books there are in the library.
Question (KO): 도서관에 있는 책꽂이 한 개에는 6칸이 있고, 각 칸에는 책을 8권씩 꽂을 수 있습니다. 도서관에 있는 책꽂이 16개 중에서 책이 꽂혀 있지 않은 칸은 5칸이고, 한 칸에만 책이 6권 꽂혀 있고, 나머지 칸에는 모두 책이 8권씩 꽂혀 있습니다. 도서관에 있는 책은 모두 몇 권인지 구해보시오.

Answer: 726

Solution (Python):
var_a = 16
var_b = 6
var_c = var_a * var_b
var_d = 5
var_e = var_c - var_d
var_f = 1
var_g = var_e - var_f
var_h = 8
var_i = var_g * var_h
var_j = 6
var_k = var_i + var_j
print(int(var_k))
Category: Possibility

Question (EN): When all 4, 5, and 8 number cards are used once, find the number of three-digit numbers not greater than 550.
Question (KO): 4, 5, 8 숫자카드를 한 번씩 모두 사용하였을 때, 550보다 크지 않은 세 자리 수의 개수를 구하시오.

Answer: 3

Solution (Python):
var_a = 4
var_b = 5
var_c = 8
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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
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_e = 550
list_c = []
for i in list_b:
    if i <= var_e:
        list_c.append(i)
var_f = len(list_c)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): After eating 15 out of the candies I had, there are 13 left. How many candies were there initially?
Question (KO): 가지고 있던 사탕 중에 15개를 먹었더니 13개가 남았습니다. 처음에 있던 사탕의 수는 몇 개입니까?

Answer: 28

Solution (Python):
var_a = 15
var_b = 13
var_c = var_a + var_b
print(int(var_c))
Category: Comparison

Question (EN): Among 0.8, 1/2, 0.9, and 1/3, find the largest number which is less than or equal to 0.7.
Question (KO): 0.8, 1/2, 0.9, 1/3 중에서 0.7보다 작거나 같은 수 중 가장 큰 수는 무엇인가요?

Answer: 0.5

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.7
list_b = []
for i in list_a:
    if i <= var_e:
        list_b.append(i)
var_f = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Comparison

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

Answer: 18

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

Question (EN): I should have divided a certain number by 3 and then add 14 to it and then multiply it by 2, but I mistakingly multiplied 3 by that certain number and added 14, and then multiplied it by 2, which resulted in 946. Find the correct calculated value.
Question (KO): 어떤 수를 3으로 나눈 후 14를 더하고 2를 곱해야 할 것을 잘못하여 어떤 수에 3을 곱한 후 14를 더하고 2를 곱한 값이 946이 되었습니다. 바르게 계산한 값을 구하시오.

Answer: 130

Solution (Python):
var_a = 946
var_b = 2
var_c = var_a / var_b
var_d = 14
var_e = var_c - var_d
var_f = 3
var_g = var_e / var_f
var_h = 3
var_i = var_g / var_h
var_j = 14
var_k = var_i + var_j
var_l = 2
var_m = var_k * var_l
print(int(var_m))
Category: Arithmetic calculation

Question (EN): Bokyung is raising 3 puppies and 7 chicks. What is the total number of legs of Bokyung's animals?
Question (KO): 보경이는 강아지 3마리와 병아리 7마리를 키우고 있습니다. 보경이가 키우는 동물들의 다리 수를 모두 합하면 몇 개입니까?

Answer: 26

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

Question (EN): When you mistakenly divide a number by 21, not by 12, it is divisible by 4. Find the value when 4 is added to the correct quotient.
Question (KO): 어떤 수를 12로 나누어야 할 것을 잘못하여 21로 나누었더니 4로 나누어 떨어졌습니다. 바르게 계산했을 때의 몫에서 4를 더하면 얼마인지 구하시오.

Answer: 11

Solution (Python):
var_a = 4
var_b = 21
var_c = var_a * var_b
var_d = 12
var_e = var_c // var_d
var_f = 4
var_g = var_e + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): You want to plant trees at intervals of 10 meters (m) on a 100-meter (m) long road. Supposing that trees are planted at the beginning and end of the road as well, how many trees are needed if they are planted on only one side of the road?
Question (KO): 100미터(m) 길이의 도로에 10미터(m) 간격으로 나무를 심으려고 합니다. 도로의 처음과 끝에도 나무를 심는다고 할 때, 도로 한쪽에만 심는다면 몇 그루가 필요합니까?

Answer: 11

Solution (Python):
var_a = 100
var_b = 10
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): The bike shop has four-wheeled bikes and two-wheeled bikes. The total number of wheels on all bicycles in the shop is 48, and there are 9 four-wheeled bikes. How many two-wheeled bicycles are there?
Question (KO): 자전거 가게에 네발 자전거와 두발 자전거가 있습니다. 가게 안의 모든 자전거의 바퀴 수를 합치면 48개이고, 네발 자전거는 9대가 있습니다. 두 발 자전거는 몇 대가 있습니까?

Answer: 6

Solution (Python):
var_a = 48
var_b = 4
var_c = 9
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))