philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): 5 students measured their heights. Seokjin is shorter than Myeonghyeon, and Juri is shorter than Jungkook. If Jungwoo is taller than Myeonghyeon, who is the tallest?
Question (KO): 5명의 친구가 키를 쟀습니다. 석진이는 명현이보다 작고 주리는 정국이보다 작습니다. 정우는 명현이보다 클 때, 키가 가장 큰 사람은?

Answer: Jungkook

Solution (Python):
var_a = 'Juri'
var_b = 'Jungwoo'
var_c = 'Myeonghyeon'
var_d = 'Seokjin'
var_e = 'Jungkook'
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 = 'Juri'
var_g = 'Jungwoo'
var_h = '>'
var_i = 'Myeonghyeon'
var_j = 'Seokjin'
var_k = '>'
var_l = 'Juri'
var_m = 'Jungkook'
var_n = '<'
var_o = 'Myeonghyeon'
var_p = 'Jungwoo'
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: Arithmetic calculation

Question (EN): Find the sum of the largest and smallest divisors of 15 excluding 1 and itself.
Question (KO): 15의 약수 중 1과 자기 자신을 제외하고 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 8

Solution (Python):
var_a = 15
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
    if var_a % i == 0:
        list_a.append(i)
        list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = 2
list_b=list_a.copy()
list_b.sort()
var_c = list_b[-var_b]
var_d = 2
list_c=list_a.copy()
list_c.sort()
var_e = list_c[var_d-1]
var_f = var_c + var_e
print(int(var_f))
Category: Arithmetic calculation

Question (EN): Yuna solved 8 English problems a day. How many English questions did Yuna solve in one week?
Question (KO): 유나는 영어 문제를 하루에 8문제씩 풀었습니다. 유나가 1주일 동안 푼 영어 문제는 모두 몇 문제입니까?

Answer: 56

Solution (Python):
var_a = 7
var_b = 8
var_c = var_a * var_b
print(int(var_c))
Category: Possibility

Question (EN): Find the difference between the second smallest number and third smallest number from three digit numbers that can be made by using all three cards with the numbers 1, 7, and 3 written once.
Question (KO): 1, 7, 3이 적힌 카드 세 장을 모두 한 번씩 이용하여 만들 수 있는 세 자리 수 중 두 번째로 작은 수와 세 번째로 작은 수의 차를 구하시오.

Answer: 144

Solution (Python):
var_a = 1
var_b = 7
var_c = 3
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 = 2
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = 3
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f - var_h
var_j = abs(var_i)
print(int(var_j))
Category: Arithmetic calculation

Question (EN): Seongmin rode a bicycle for 1 hour and 24 minutes at a constant speed of 10.8 kilometers (km) per hour. At this time, find the total distance traveled by Seongmin in kilometers (km).
Question (KO): 성민이는 1시간에 10.8킬로미터(㎞)를 이동하는 일정한 속력으로 1시간 24분 동안 자전거를 탔습니다. 이때 성민이가 이동한 전체 거리는 몇 킬로미터(㎞)인지 구하시오.

Answer: 15.12

Solution (Python):
var_a = 10.8
var_b = 1
var_c = 24
var_d = 60
var_e = var_c / var_d
var_f = var_b + var_e
var_g = var_a * var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Correspondence

Question (EN): Subtract 254 from a number and add 329 to get 695. Find the number.
Question (KO): 어떤 수에 254를 뺀 후 329를 더하면 695가 됩니다. 어떤 수를 구하시오.

Answer: 620

Solution (Python):
var_a = 695
var_b = 329
var_c = var_a - var_b
var_d = 254
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): There are two cuboids with the same base. The base is 44 centimeters (cm) long and 35 centimeters (cm) wide. When the heights of the two cuboids are 7 centimeters (cm) and 3 centimeters (cm), find the sum of the volumes of the two cuboids.
Question (KO): 밑면이 같은 두 직육면체가 있다. 밑면은 가로가 44센티미터(㎝), 세로가 35센티미터(㎝)이다. 두 직육면체의 높이가 각각 7센티미터(㎝), 3센티미터(㎝)일 때, 두 직육면체의 부피의 합을 구하시오.

Answer: 15400

Solution (Python):
var_a = 44
var_b = 35
var_c = var_a * var_b
var_d = 7
var_e = 3
var_f = var_d + var_e
var_g = var_c * var_f
print(int(var_g))
Category: Comparison

Question (EN): In a garden, there are more roses than tulips, more tulips than cosmoses, and more cosmoses than sunflowers. If you are trying to equal the number of flowers per type by planting more flowers in the garden, which flower should be planted the most?
Question (KO): 어느 공원 화단에는 장미가 튤립보다 많고, 튤립이 코스모스보다 많으며, 코스모스가 해바라기보다 많습니다. 화단에 꽃을 더 심어서 종류별로 꽃의 수를 맞추려고 할 때, 가장 많이 심어야 하는 꽃은 무엇입니까?

Answer: sunflowers

Solution (Python):
var_a = 'roses'
var_b = 'tulips'
var_c = 'cosmoses'
var_d = 'sunflowers'
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 = 'roses'
var_f = 'tulips'
var_g = '>'
var_h = 'tulips'
var_i = 'cosmoses'
var_j = '>'
var_k = 'cosmoses'
var_l = 'sunflowers'
var_m = '>'
list_b= []
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
    if cond_ in ("<", ">", "="):
        operand_right = temp_stack.pop()
        operand_left = temp_stack.pop()
        if cond_ == "=":
            cond_ = "=="
        conditions.append(f"{operand_left} {cond_} {operand_right}")
    else:
        if not cond_.isdigit():
            cond_ = "{" + cond_ + "}"
        temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
    item_name_index_dict = dict(zip(items_name_list, perm))
    formatted_conditions = \
        [condition.format_map(item_name_index_dict) for condition in conditions]
    if all(map(eval, formatted_conditions)):
        break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_n = len(list_c)
var_o = list_c[var_n-1]
print(var_o)
Category: Possibility

Question (EN): You want to create a six-digit number by using 1, 4, and 0 twice. What is the difference between the largest number and the smallest possible number possible?
Question (KO): 1, 4, 0을 두 번씩 사용하여 여섯자리 수를 만드려고 합니다. 만들 수 있는 숫자 중에서 가장 큰수에서 가장 작은 수를 빼면 얼마가 됩니까?

Answer: 340956

Solution (Python):
var_a = 1
var_b = 1
var_c = 4
var_d = 4
var_e = 0
var_f = 0
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 = 6
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_g))
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_h = 1
list_c=list_b.copy()
list_c.sort()
var_i = list_c[-var_h]
var_j = 1
list_d=list_b.copy()
list_d.sort()
var_k = list_d[var_j-1]
var_l = var_i - var_k
print(int(var_l))
Category: Arithmetic calculation

Question (EN): Truck A can carry a crate weighing 63.45 kg (kg), and truck B can load a crate weighing 13.6 kg (kg). If there are 20 trucks each, find how many kilograms (kg) each truck can carry.
Question (KO): 트럭 (가)는 63.45킬로그램(㎏)의 무게의 상자를 실을 수 있고, 트럭 (나)는 13.6킬로그램(㎏)의 무게 상자를 실을 수 있습니다. 각 트럭이 20대씩 있으면 모두 몇 킬로그램(㎏)의 상자를 실을 수 있는지 구하시오.

Answer: 1541

Solution (Python):
var_a = 63.45
var_b = 20
var_c = var_a * var_b
var_d = 13.6
var_e = 20
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): I turned on the tap that produces 200 milliliters (ml) of water per hour for 24 hours. How many milliliters (ml) of water overflows if you fill this water in a 4000 milliliter (ml) water tank?
Question (KO): 물이 시간당 200밀리리터(㎖) 나오는 수도를 24시간 틀어놓았습니다. 4000밀리리터(㎖)의 물탱크에 담는다고 할 때 흘러넘친 물의 양은 몇 밀리리터(㎖)입니까?

Answer: 800

Solution (Python):
var_a = 200
var_b = 24
var_c = var_a * var_b
var_d = 4000
var_e = var_c - var_d
var_f = abs(var_e)
print(int(var_f))
Category: Geometry

Question (EN): There is a planar figure of a rectangular parallelepiped measuring 8 centimeters (cm) wide, 5 centimeters (cm) long, and 10 centimeters (cm) high. What is the area, in square centimeters (cm2), of the planar figure of the cuboid?
Question (KO): 가로가 8센티미터(㎝), 세로가 5센티미터(㎝), 높이가 10센티미터(㎝)인 직육면체의 전개도를 그렸습니다. 직육면체의 전개도의 넓이는 몇 제곱센티미터입니까?

Answer: 340

Solution (Python):
var_a = 8
var_b = 5
var_c = var_a * var_b
var_d = 8
var_e = 10
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 5
var_i = 10
var_j = var_h * var_i
var_k = var_g + var_j
var_l = 2
var_m = var_k * var_l
print(int(var_m))
Category: Correspondence

Question (EN): When 72 and 48 were divided by a certain number, there was no remainder. What is the largest possible number?
Question (KO): 72와 48을 각각 어떤 수로 나누었더니 모두 나누어떨어졌습니다. 어떤 수가 될 수 있는 수 중에서 가장 큰 수는 얼마입니까?

Answer: 24

Solution (Python):
var_a = 72
var_b = 48
var_c = math.gcd(int(var_b), int(var_a))
print(int(var_c))
Category: Correspondence

Question (EN): There is a three-digit and two-digit number subtraction equation 9A6 - BB=BBB. If A and B are two different numbers, find the value of A+B
Question (KO): 세 자리 수와 두 자리 수의 뺄셈식 9A6-BB=BBB이 나옵니다. A, B가 서로 다른 두 수일 때, A+B의 값을 구하시오

Answer: 15

Solution (Python):
var_a = '9A6-BB=BBB'
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 = '9A6-BB=BBB'
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: Correspondence

Question (EN): Jihyae bought school supplies by the amount that is 200 won more than half of the money she had, saved 300 won more than half of the rest, and was left with 350 won. How much money did Jihyae have at first?
Question (KO): 지혜는 가지고 있던 돈의 반보다 200원 많은 돈으로 학용품을 사고, 그 나머지 돈의 반보다 300원 많은 돈을 저축하였더니 350원이 남았습니다. 지혜가 처음에 가지고 있던 돈은 얼마입니까?

Answer: 3000

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

Question (EN): When you divide a number by 9 what should be multiplied, the quotient is 25 and the remainder is 7. How much do you get when you calculate correctly?
Question (KO): 어떤 수에 9를 곱해야 할 것을 나누었더니 몫이 25이고 나머지가 7이었습니다. 바르게 계산하면 얼마가 됩니까?

Answer: 2088

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

Question (EN): There was a mistake in the calculation, multiplying the number by 5 and then adding 7 instead of multiplying the sum of the number and 5 by 7. Then, the wrong result came out as 27. Find the correct calculated value.
Question (KO): 어떤 수와 5와의 합에 7을 곱해야 하는 것을 잘못하여 어떤 수와 5의 곱에 7을 더하였더니 27이 되었습니다. 바르게 계산한 값을 구하시오.

Answer: 63

Solution (Python):
var_a = 27
var_b = 7
var_c = var_a - var_b
var_d = 5
var_e = var_c / var_d
var_f = 5
var_g = var_e + var_f
var_h = 7
var_i = var_g * var_h
print(int(var_i))
Category: Geometry

Question (EN): Find the sum of the vertices of a pentagonal prism and a hexagonal prism.
Question (KO): 오각기둥과 육각기둥의 꼭지점의 합은 몇 개인지 구하시오.

Answer: 22

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a * var_b
var_d = 6
var_e = 2
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g))
Category: Geometry

Question (EN): I took several coins of the same size and lined them up so that there were 8 coins on each side, making a square. If you place coins around the perimeter of this square to make a square with a side 1 greater, how many more coins are needed?
Question (KO): 크키가 같은 동전 몇 개를 가지고 한 변이 8개가 되도록 빈틈없이 늘어놓아 정사각형을 만들었습니다. 이 정사각형의 둘레에 동전을 놓아 한 변의 길이가 1 더 큰 정사각형을 만들 때, 동전은 몇 개가 더 필요합니까?

Answer: 17

Solution (Python):
var_a = 8
var_b = 2
var_c = var_a * var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Possibility

Question (EN): Among the numbers 1, 3, and 7, how many are three digits which each digit is different and between 150 and 700?
Question (KO): 1, 3, 7로 이루어져 있는 수 중 세 자리이고 각 자리의 숫자가 다르며, 150이상 700이하의 수는 총 몇 개인가?

Answer: 3

Solution (Python):
var_a = 1
var_b = 3
var_c = 7
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 = len(list_a)
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 = 150
list_c = []
for i in list_b:
    if i >= var_e:
        list_c.append(i)
var_f = 700
list_d = []
for i in list_c:
    if i <= var_f:
        list_d.append(i)
var_g = len(list_d)
print(int(var_g))
Category: Arithmetic calculation

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

Answer: 11

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 = 2
list_b=list_a.copy()
list_b.sort()
var_e = list_b[-var_d]
print(int(var_e))
Category: Comparison

Question (EN): There are a total of 4 numbers: 0.8, 1/2, 0.5, 1/3. What is the smallest number or the number that is equal to 0.1 out of numbers that are greater than or equal to 0.1?
Question (KO): 총 4개의 숫자 0.8, 1/2, 0.5, 1/3이 있습니다. 이 중 0.1보다 크거나 같은 수 중 가장 작거나 같은 수를 구하면 무엇인가요?

Answer: 0.33

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.5
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.1
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-1]
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Correspondence

Question (EN): When you multiply a particular number by 6, you get 72. Find the result of adding 8 to that particular number.
Question (KO): 6을 어떤 수에 곱했더니 72가 되었습니다. 어떤 수에 8을 더한 결과를 구하시오.

Answer: 20

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

Question (EN): What is the third largest number in 1231, 2311, 2131, 1312, 1123, 3112?
Question (KO): 1231, 2311, 2131, 1312, 1123, 3112에서 3번째로 큰 수는 무엇입니까?

Answer: 2131

Solution (Python):
var_a = 1231
var_b = 2311
var_c = 2131
var_d = 1312
var_e = 1123
var_f = 3112
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 = 3
list_b=list_a.copy()
list_b.sort()
var_h = list_b[-var_g]
print(int(var_h))
Category: Geometry

Question (EN): There are 45 streetlights on one side of the road, spaced at 60 meters (m) intervals. What is the distance in kilometers (km) from the first street lamp to the last lamp?
Question (KO): 길 한쪽에 60미터(m) 간격으로 가로등이 45개 서 있습니다. 처음 가로등에서 마지막 가로등까지의 거리는 몇 킬로미터(㎞)입니까?

Answer: 2.64

Solution (Python):
var_a = 60
var_b = 1000
var_c = var_a / var_b
var_d = 45
var_e = 1
var_f = var_d - var_e
var_g = var_c * var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Correspondence

Question (EN): Subtracting 10 from a number resulted in 15. What is the result when the number is added by 5?
Question (KO): 10을 어떤 수에서 뺐더니 결과값으로 15를 얻었습니다. 어떤 수에 5를 더하면 얼마입니까?

Answer: 30

Solution (Python):
var_a = 15
var_b = 10
var_c = var_a + var_b
var_d = 5
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): How many three-digit decimal numbers exist that are greater than 3.006 and less than 3.01?
Question (KO): 3.006보다 크고 3.01보다 작은 소수 세 자리 수는 모두 몇 개 입니까?

Answer: 3

Solution (Python):
var_a = 0
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
list_b = []
for i in list_a:
    if i > var_d:
        list_b.append(i)
var_e = len(list_b)
print(int(var_e))
Category: Arithmetic calculation

Question (EN): How many three-digit numbers are divisible by the numbers 5, 8, and 2?
Question (KO): 숫자 5, 8, 2로 나누어 떨어질 수 있는 세 자리 수는 모두 몇 개 있습니까?

Answer: 22

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 = 5
list_b = []
var_d = int(var_d)
for i in list_a:
    i = int(i)
    if i % var_d == 0:
        list_b.append(i)
var_e = 8
list_c = []
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i % var_e == 0:
        list_c.append(i)
var_f = 2
list_d = []
var_f = int(var_f)
for i in list_c:
    i = int(i)
    if i % var_f == 0:
        list_d.append(i)
var_g = len(list_d)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): A toy train takes 3 minutes to travel 5 meters (m). A toy car can travel the same distance in 2 minutes. If the start line of the toy car is 20 meters (m) behind the train and both toys start at the same time, how many minutes will it be before the two toys meet?
Question (KO): 장난감 기차는 5미터(m)를 가는데 3분이 걸립니다. 장난감 자동차는 같은 거리를 2분에 갈 수 있습니다. 장난감 자동차의 출발선이 기차보다 20미터(m) 뒤에 있고 동시에 두 장난감을 출발시킨다면 두 장난감이 만나게 되는 시간은 몇 분 후 인지 구하세요.

Answer: 24

Solution (Python):
var_a = 20
var_b = 5
var_c = 2
var_d = var_b / var_c
var_e = 5
var_f = 3
var_g = var_e / var_f
var_h = var_d - var_g
var_i = var_a / var_h
print(int(eval('{:.2f}'.format(round(var_i+1e-10,2)))))