philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): The remainder when a certain three-digit number is divided by 20 is the same as the remainder when divided by 25. If the remainder is 7, what is the possible largest number of the certain number?
Question (KO): 어떤 세 자리 수를 20으로 나누었을 때의 나머지와 25로 나누었을 때의 나머지는 같습니다. 나머지가 7이라고 한다면, 어떤 수가 될 수 있는 수 중 가장 큰 수는 얼마입니까?

Answer: 907

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 = 20
var_e = 7
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 25
var_g = 7
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 1
list_d=list_c.copy()
list_d.sort()
var_i = list_d[-var_h]
print(int(var_i))
Category: Comparison

Question (EN): 9 people are standing in a line in order from the shortest to the tallest. Hoseok is standing in the middle. If you line them up again in order from the tallest to the shortest, what number will Hoseok stand from the back?
Question (KO): 키가 작은 사람부터 순서대로 9명이 한 줄로 서 있습니다. 호석이는 중간에 서 있습니다. 키가 큰 사람부터 순서대로 다시 줄을 서면 호석이는 뒤에서부터 몇 번째에 서게 됩니까?

Answer: 5

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

Question (EN): After 6 years, the father's age plus the son's age is 68 years old. This year, the father ages six times the son does. How old is the son this year?
Question (KO): 6년 후에 아버지의 나이와 아들의 나이의 합은 68살입니다. 올해는 아버지가 아들 나의의 6배입니다. 올해 아들의 나이는 몇 살입니까?

Answer: 8

Solution (Python):
var_a = 68
var_b = 6
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 1
var_g = 6
var_h = var_f + var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): A dozen of pencils means 12 pencils. Taehyung bought 2 dozen pencils and shared them with Namjoon, but Namjoon got 4 more than Taehyung. How many pencils does Namjoon have?
Question (KO): 연필 1타는 12자루입니다. 태형이는 연필을 2타 사서 남준이와 나누어 가졌는데 남준이가 태형이보다 4자루 더 많이 가졌습니다. 남준이가 가진 연필은 몇 자루입니까?

Answer: 14

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

Question (EN): Hyeonsoo's car travels 17.28 kilometers (km) in 16 minutes at a constant speed, and Yejun's car travels 8.52 kilometers (km) in 6 minutes at a constant speed. If Hyeonsoo and Yejun started from the same place by car, who is further away 15 minutes later?
Question (KO): 현수가 탄 자동차는 일정한 빠르기로 16분 동안 17.28킬로미터(㎞)를 가고, 예준이가 탄 자동차는 일정한 빠르기로 6분 동안 8.52킬로미터(㎞)를 갑니다. 현수와 예준이가 같은 곳에서 자동차를 타고 출발하였다면 15분 후에 더 멀리 있는 사람은 누구입니까?

Answer: Yejun

Solution (Python):
var_a = 'Hyeonsoo'
var_b = 'Yejun'
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 = 17.28
var_d = 16
var_e = var_c / var_d
var_f = 15
var_g = var_e * var_f
var_h = 8.52
var_i = 6
var_j = var_h / var_i
var_k = 15
var_l = var_j * var_k
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p)
Category: Geometry

Question (EN): You are trying to draw a diagonal from one vertex of an icosahedron. How many diagonal lines can you draw?
Question (KO): 이십각형의 한 꼭짓점에서 대각선을 그으려고 합니다. 몇 개의 대각선을 그을 수 있을까요?

Answer: 17

Solution (Python):
var_a = 20
var_b = 3
var_c = var_a - var_b
print(int(var_c))
Category: Geometry

Question (EN): Dice with an edge of 2 centimeters (cm) are stacked to form a cube with an edge of 10 centimeters (cm). I put confetti on all sides of the cube. How many dices have confetti on one side?
Question (KO): 한 모서리의 길이가 2센티미터(㎝)인 주사위를 쌓아 한 모서리가 10센티미터(㎝)인 정육면체를 만들었습니다. 정육면체의 모든 면에 색종이를 붙였습니다. 1개의 면에 색종이가 붙은 주사위는 모두 몇 개일까요?

Answer: 54

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 = 6
var_i = var_g * var_h
print(int(var_i))
Category: Geometry

Question (EN): If a triangle is divided in two by a median line of the base from one vertex, and the area of a divided triangle is 7 square centimeters (cm2), find the area of the entire triangle.
Question (KO): 삼각형의 한 꼭지점에서 밑변의 중선을 그었을 때 나뉘어진 삼각형의 넓이가 7제곱센티미터(㎠)인 경우, 전체 삼각형의 넓이를 구하시오.

Answer: 14

Solution (Python):
var_a = 7
var_b = 2
var_c = var_a * var_b
print(int(var_c))
Category: Comparison

Question (EN): There are numbers 0.8, 1/2, 0.9, 0.2 and 1/3. Find the sum of all numbers less than 0.3.
Question (KO): 0.2, 0.8, 1/2, 0.9, 1/3의 숫자가 있다. 이 중 0.3보다 작은 숫자들의 합을 구하시오.

Answer: 0.2

Solution (Python):
var_a = 0.2
var_b = 0.8
var_c = 0.5
var_d = 0.9
var_e = 0.3333333333333333
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 = 0.3
list_b = []
for i in list_a:
    if i < var_f:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Arithmetic calculation

Question (EN): At a constant speed, a bus travels a distance of 17.28 kilometers (km) in 16 minutes, and a car travels a distance of 8.52 kilometers (km) in 6 minutes. If a bus and a car start at the same time from the same place, which one and how farther will it go after 15 minutes?
Question (KO): 일정한 빠르기로 버스는 17.28킬로미터(㎞)의 거리를 16분 동안에 가고, 승용차는 8.52킬로미터(㎞)의 거리를 6분 동안에 갑니다. 버스와 승용차가 같은 곳에서 동시에 출발한다면 15분 후에는 어느 것이 얼마나 더 멀리 가겠습니까?

Answer: 5.1

Solution (Python):
var_a = 17.28
var_b = 16
var_c = var_a / var_b
var_d = 15
var_e = var_c * var_d
var_f = 8.52
var_g = 6
var_h = var_f / var_g
var_i = 15
var_j = var_h * var_i
var_k = var_e - var_j
var_l = abs(var_k)
print('{:.2f}'.format(round(var_l+1e-10,2)))
Category: Comparison

Question (EN): Taehyung is heavier than Yoojung. Yoojung is heavier than Jimin. Taehyung is lighter than Hoseok. Which of the 4 is the lightest?
Question (KO): 태형이는 유정이보다 무겁습니다. 유정이는 지민이보다 무겁습니다. 태형이는 호석이보다 가볍습니다. 4명 중 가장 가벼운 사람은 누구입니까?

Answer: Jimin

Solution (Python):
var_a = 'Taehyung'
var_b = 'Yoojung'
var_c = 'Jimin'
var_d = 'Hoseok'
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 = 'Taehyung'
var_f = 'Yoojung'
var_g = '>'
var_h = 'Yoojung'
var_i = 'Jimin'
var_j = '>'
var_k = 'Taehyung'
var_l = 'Hoseok'
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): If there are 9 number cards written from 1 to 9, how many ways can you make the sum of cards as 17 by drawing 3 of them?
Question (KO): 1부터 9까지의 숫자가 적힌 숫자 카드가 9장 있는데, 그 중에서 3장을 뽑아서 합이 17이 되도록 하는 방법은 모두 몇 가지입니까?

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: Comparison

Question (EN): There are 9/10 liters (L) of milk. Suyeon drank 1/3 of the total, and Hyunwoo drank 4/9 of the total. Who drank more milk, Suyeon or Hyunwoo?
Question (KO): 우유가 9/10리터(L) 있습니다. 수연이가 전체의 1/3을 마셨고, 현우가 전체의 4/9를 마셨습니다. 수연이와 현우 중에서 누가 우유를 더 많이 마셨습니까?

Answer: Hyunwoo

Solution (Python):
var_a = 'Suyeon'
var_b = 'Hyunwoo'
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.3333333333333333
var_d = 0.4444444444444444
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: Comparison

Question (EN): You are trying to find the three letters (a), (b), and (c) in the dictionary. When (b) is behind (a) and (b) is behind (c), what is the last letter in the dictionary?
Question (KO): 사전에서 갑, 을, 병 세글자를 찾으려고 한다. 갑보다는 을이 뒤에 있고, 병보다 을이 뒤에 있을 때, 사전에서 가장 뒤에 있는 글자는 무엇인지 구하시오.

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 = '(a)'
var_e = '(b)'
var_f = '<'
var_g = '(c)'
var_h = '(b)'
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 = 1
var_k = list_c[var_j-1]
print(var_k)
Category: Comparison

Question (EN): There are 4 animals A, B, C and D. D animals are smaller than A animals and larger than B animals. Which animal is the largest when C animals are larger than A animals?
Question (KO): 4마리의 동물 (가), (나), (다), (라)가 있습니다. (라) 동물은 (가) 동물보다 작고 (나) 동물보다 큽니다. (다) 동물은 (가) 동물보다 클 때 가장 큰 동물은 무엇입니까?

Answer: C

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
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 = 'A'
var_f = 'C'
var_g = '<'
var_h = 'D'
var_i = 'B'
var_j = '>'
var_k = 'D'
var_l = 'A'
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 = 1
var_o = list_c[var_n-1]
print(var_o)
Category: Correspondence

Question (EN): You subtracted 7 from a number and got 9. What is the value of the number multiplied by 5?
Question (KO): 어떤 수에서 7을 빼 결과값 9를 얻었습니다. 어떤 수에 5를 곱하면 얼마입니까?

Answer: 80

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

Question (EN): A two-digit decimal 3.A7 is greater than 3.27. Write how many numbers can fit in A. However, A can contain any number from 0 to 9.
Question (KO): 두 자리 소수 3.A7은 3.A7>3.27를 만족합니다. A에 들어갈 수 있는 숫자의 개수를 쓰시오. 단, A에는 0부터 9까지의 수를 쓸 수 있습니다.

Answer: 7

Solution (Python):
var_a = '3.A7>3.27'
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): We want to distribute 43 baseballs equally among 6 classes, with the fewest remaining baseballs. How many baseballs should be left?
Question (KO): 야구공 43개를 6개의 반에 똑같이 나누어 주고, 남는 야구공이 가장 적게 하려고 합니다. 이 때 남는 야구공은 몇 개입니까?

Answer: 1

Solution (Python):
var_a = 43
var_b = 6
var_c = var_a % var_b
print(int(var_c))
Category: Possibility

Question (EN): A can contain natural numbers from 1 to 9. If 44×A<55×4, find the sum of all the numbers that can be A.
Question (KO): A에는 1부터 9까지의 자연수가 들어갈 수 있습니다. 44×A<55×4일 때, 가능한 A의 합을 구하시오.

Answer: 10

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 = 55
var_e = 4
var_f = var_d * var_e
var_g = 44
var_h = var_f / var_g
list_b = []
for i in list_a:
    if i < var_h:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_i = sum(list_b)
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Minji spends 0.6 hours cleaning her room every day. Find how many hours Minji spent cleaning her room in 3 weeks.
Question (KO): 민지는 매일 방 청소를 하기 위해 0.6시간을 씁니다. 민지가 3주 동안 방 청소를 위해 쓴 시간은 몇 시간인지 구하시오.

Answer: 12.6

Solution (Python):
var_a = 0.6
var_b = 7
var_c = var_a * var_b
var_d = 3
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Arithmetic calculation

Question (EN): How many three-digit numbers are common multiples of 6, 5, 8, and 9?
Question (KO): 세 자리 수 중 6, 5, 8, 9의 공배수인 수는 모두 몇 개 입니까?

Answer: 2

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 = 6
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 = 8
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 = 9
list_e = []
var_g = int(var_g)
for i in list_d:
    i = int(i)
    if i % var_g == 0:
        list_e.append(i)
var_h = len(list_e)
print(int(var_h))
Category: Geometry

Question (EN): Minjin made a square shape with one side length of 80 centimeters (cm) using wire. If you use the same length of wire to make a rectangular shape with a vertical length of 100 centimeters (cm), find the horizontal length of this rectangle.
Question (KO): 민진이는 철사를 이용해서 한 변의 길이가 80센티미터(㎝)인 정사각형 모양을 만들었습니다. 동일한 길이의 철사를 사용하여 세로 길이가 100센티미터(㎝)인 직사각형 모양을 만들었다고 한다면, 이 직사각형의 가로 길이를 구하시오.

Answer: 60

Solution (Python):
var_a = 80
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
var_f = 100
var_g = var_e - var_f
print(int(var_g))
Category: Possibility

Question (EN): You want to buy 2 different school supplies: a notebook, a pencil, and an eraser. If you choose different ones, how many ways are there?
Question (KO): 공책, 연필, 지우개 중 서로 다른 2가지 학용품을 사려고 합니다. 서로 다른 학용품을 선택할 경우의 수는 몇 개 인가요?

Answer: 3

Solution (Python):
var_a = 'notebook'
var_b = 'pencil'
var_c = 'eraser'
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)
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)
print(int(var_f))
Category: Geometry

Question (EN): How many faces does a pentahedron have?
Question (KO): 오면체의 면의 개수는?

Answer: 5

Solution (Python):
var_a = 5
print(int(var_a))
Category: Geometry

Question (EN): I doubled the length of each corner of a cube-shaped box. How many times bigger will the surface area of this box become?
Question (KO): 정육면체 모양의 상자의 각 모서리의 길이를 2배로 늘렸습니다. 이 상자의 겉넓이는 몇 배가 될까요?

Answer: 4

Solution (Python):
var_a = 2
var_b = 2
var_c = var_a ** var_b
print(int(var_c))
Category: Correspondence

Question (EN): A number divided by 4 is 12. Hoseok wants to divide a number by 3. What is the expected result value?
Question (KO): 어떤 수를 4로 나누면 12가 됩니다. 호석이는 어떤 수를 3으로 나누고자 합니다. 기대하는 결과 값은 무엇입니까?

Answer: 16

Solution (Python):
var_a = 12
var_b = 4
var_c = var_a * var_b
var_d = 3
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): If 5A8-21B=364, what number should go in B?
Question (KO): 5A8-21B=364일 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 4

Solution (Python):
var_a = '5A8-21B=364'
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))