philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): If there are 5 members A, B, C, D, and E, find the number of cases in which one president, one vice president, and one manager are selected.
Question (KO): A, B, C, D, E 5명이 있을 때, 회장 1명, 부회장 1명, 총무 1명을 뽑는 경우의 수를 구하시오.

Answer: 60

Solution (Python):
var_a = 5
var_b = 1
var_c = 1
var_d = var_b + var_c
var_e = 1
var_f = var_d + var_e
var_g = 1
var_a = int(var_a)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_a-i)
print(int(var_g))
Category: Possibility

Question (EN): Using 3 of 4, 8, 1, 2, what is the largest number with a ones digit of 2?
Question (KO): 4, 8, 1, 2 중 3개를 사용하여 일의 자리 숫자가 2인 수들 중에 가장 큰 수는 무엇입니까?

Answer: 842

Solution (Python):
var_a = 4
var_b = 8
var_c = 1
var_d = 2
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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
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_f = 1
var_g = 2
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
for i in list_b:
    i = int(i)
    if (i//var_f)%10 == 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): At the cinema, guests were seated in rows. If there are 30 chairs between the guest sitting on the far left and the guest sitting on the far right, how many chairs are occupied with guests?
Question (KO): 영화관에 손님들이 일렬로 나열된 의자에 차례대로 앉았습니다. 맨 왼쪽에 앉은 손님과 맨 오른쪽에 앉은 손님 사이에 30 명이 의자에 앉아 있다면 손님들이 앉은 의자의 개수는 모두 몇 개 입니까?

Answer: 32

Solution (Python):
var_a = 30
var_b = 2
var_c = var_a + var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Nine weights of the same weight weigh a total of 4.5 kilograms (kg). Two of these weights and several pencil cases that weigh 850 grams (g) each were placed on one side of a pan balance scale, and five dictionaries that weigh 1050 grams (g) each were placed on the other side, and they were level. How many pencil cases are there?
Question (KO): 무게가 같은 9개의 추의 무게가 4.5킬로그램(㎏)입니다. 이 추 2개와 무게가 850그램(g)인 필통 몇 개를 양팔 저울의 한쪽에 올려놓고, 다른 쪽에는 무게가 1050그램(g)인 사전을 5권 올려놓았더니 수평을 이루었습니다. 올려놓은 필통은 몇 개입니까?

Answer: 5

Solution (Python):
var_a = 1050
var_b = 5
var_c = var_a * var_b
var_d = 4.5
var_e = 1000
var_f = var_d * var_e
var_g = 9
var_h = var_f / var_g
var_i = 2
var_j = var_h * var_i
var_k = var_c - var_j
var_l = 850
var_m = var_k / var_l
print(int(var_m))
Category: Arithmetic calculation

Question (EN): The sum of 39 consecutive odd numbers is 1989. Write the largest odd number among these.
Question (KO): 39개의 연속된 홀수의 합이 1989입니다. 이 중 가장 큰 홀수를 쓰시오.

Answer: 89

Solution (Python):
var_a = 1989
var_b = 39
var_c = var_a / var_b
var_d = 39
var_e = 2
var_f = var_d // var_e
var_g = 2
var_h = var_f * var_g
var_i = var_c + var_h
print(int(var_i))
Category: Correspondence

Question (EN): I'm going to repack the chocolate that was packaged two by four. If you have eight packaged chocolates, find how many bundles come out when repackaged.
Question (KO): 2개씩 포장되어있던 초콜릿을 4개씩 다시 포장하려한다. 8개의 포장된 초콜릿이 있다면 다시 포장했을때 몇 묶음이 나오는지 구하시오.

Answer: 4

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

Question (EN): Taehyung divided 21/11 kilograms (kg) of wooden sticks in each box by 7/11 kilograms (kg), and Hoseok puts 8/17 kilograms (kg) of wooden sticks in each box by 2/17 kilograms (kg). If they are trying to distribute all wooden sticks into boxes without any remains, how many boxes will be needed?
Question (KO): 태형이는 나무막대 21/11킬로그램(㎏)를 한 상자에 7/11킬로그램(㎏)씩 나누어 담고, 호석이는 나무막대 8/17킬로그램(㎏)를 한 상자에 2/17킬로그램(㎏)씩 나누어 담으려고 합니다. 태형이와 호석이가 각자 가지고 있는 나무막대를 남김없이 상자에 나누어 담으려면 상자는 모두 몇 개 필요합니까?

Answer: 7

Solution (Python):
var_a = 1.9090909090909092
var_b = 0.6363636363636364
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 = 0.47058823529411764
var_g = 0.11764705882352941
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: Arithmetic calculation

Question (EN): Minji cleans the house for 0.6 hours every day. How many total hours did Minji spend cleaning the house 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): When Yuna surveyed her classmates, 27 students said they liked math, but 28 students said they liked Korean. When 22 of the friends who said they liked math said they also liked Korean, how many students answered Yuna's question?
Question (KO): 유나가 같은 반 학생들을 대상으로 조사를 했을 때, 수학을 좋아한다고 말한 학생은 27명이었지만 국어를 좋아한다고 말한 학생은 28명이었습니다. 수학을 좋아한다고 했던 친구들 중 22명이 국어도 좋아한다고 말했을 때, 유나의 물음에 답한 학생은 모두 몇 명입니까?

Answer: 33

Solution (Python):
var_a = 28
var_b = 27
var_c = var_a + var_b
var_d = 22
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): What is the 2nd smallest of 5, 8, 4, 3, and 7?
Question (KO): 5, 8, 4, 3, 7중 2번째로 작은 숫자는 무엇입니까?

Answer: 4

Solution (Python):
var_a = 5
var_b = 8
var_c = 4
var_d = 3
var_e = 7
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 = 2
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
print(int(var_g))
Category: Possibility

Question (EN): How many numbers greater than 100 and less than 1000 consist of only numbers 2 and 3?
Question (KO): 100보다 크고 1000보다 작은 수 중 2와 3으로만 이루어진 수는 몇 개입니까?

Answer: 8

Solution (Python):
var_a = 2
var_b = 3
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
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_c))
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_d = len(list_b)
print(int(var_d))
Category: Comparison

Question (EN): Choose the smallest of 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: Correspondence

Question (EN): There are two different numbers A and B. Find the value of B-A from the 4-digit and 3-digit subtraction formula: 2A32-BBB=1BBB.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 네 자리 수와 세 자리 수의 뺄셈식 2A32-BBB=1BBB에서 B-A의 값을 구하시오.

Answer: 3

Solution (Python):
var_a = '2A32-BBB=1BBB'
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]
var_d = '2A32-BBB=1BBB'
var_e = 'A'
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: Arithmetic calculation

Question (EN): I spent 22,000 won on buying 15 apples that cost 1,000 won each and peaches that cost 2,000 won each. Find how many peaches were bought.
Question (KO): 한 개에 1000원인 사과와 한 개에 2000원인 복숭아를 합하여 모두 15개를 사는 데 22000원을 썼다. 복숭아를 몇 개 샀는지 구하시오.

Answer: 7

Solution (Python):
var_a = 22000
var_b = 1000
var_c = 15
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 2000
var_g = 1000
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Correspondence

Question (EN): There is a broken calculator. This calculator divides when you press the multiply button, and multiplies when you press the divide button. Jiwoo didn't know that the calculator was broken, so he multiplied a number by 2, and he got 0.5 with the calculator. What is the answer Jiwoo was originally trying to find?
Question (KO): 고장난 계산기가 있다. 이 계산기는 곱하기 버튼을 누르면 나누고, 나누기 버튼을 누르면 곱한다고 한다. 지우가 이 계산기가 고장난줄 모르고 어떤 수에 1.36을 곱하여 계산했을때 0.5가 나왔다고 한다. 지우가 원래 구하려던 답은 얼마입니까?

Answer: 2

Solution (Python):
var_a = 0.5
var_b = 2
var_c = var_a * var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e))
Category: Geometry

Question (EN): You have a trapezoid with an upper side of 15 centimeters (cm), a lower side of 9 centimeters (cm), and a height of 12 centimeters (cm). How many centimeters (cm) is the side of a square with the same area as the trapezoid?
Question (KO): 윗변이 15센티미터(㎝), 아랫변이 9센티미터(㎝), 높이가 12센티미터(㎝)인 사다리꼴이 있습니다. 이 사다리꼴과 넓이가 같은 정사각형의 한 변의 길이는 몇 센티미터(㎝)입니까?

Answer: 12

Solution (Python):
var_a = 15
var_b = 9
var_c = var_a + var_b
var_d = 12
var_e = var_c * var_d
var_f = 2
var_g = var_e / var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11, and 12. What is the sum of the smallest number and the next smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 작은 수와 그 다음으로 작은 수의 합은 얼마입니까?

Answer: 21

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 = 1
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: Possibility

Question (EN): When two of the number cards 1, 7, and 0 are used once to form the largest two-digit number, what is the unused number?
Question (KO): 숫자 카드 1, 7, 0 중 2 장을 한 번씩 사용하여 가장 큰 두 자리 수를 만들 때, 사용하지 않는 카드의 숫자는 무엇입니까?

Answer: 0

Solution (Python):
var_a = 1
var_b = 7
var_c = 0
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 = [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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
list_d = []
var_f = int(var_f)
while var_f//10 > 0:
    list_d.append(var_f%10)
    var_f = var_f//10
list_d.append(var_f%10)
list_d = list_d[::-1]
list_e = list(set(list_a) - set(list_d))
var_g = 1
var_h = list_e[var_g-1]
print(int(var_h))
Category: Possibility

Question (EN): When reordering the number magnet 586 to create another three-digit number, what is the largest number that can be made?
Question (KO): 숫자 자석 586의 순서를 바꾸어가며 다른 세 자리 수를 만들 때, 가장 큰 수는 무엇입니까?

Answer: 865

Solution (Python):
var_a = 586
list_a = []
var_a = int(var_a)
while var_a//10 > 0:
    list_a.append(var_a%10)
    var_a = var_a//10
list_a.append(var_a%10)
list_a = list_a[::-1]
var_b = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_b))
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_c = 1
list_c=list_b.copy()
list_c.sort()
var_d = list_c[-var_c]
print(int(var_d))
Category: Arithmetic calculation

Question (EN): There are four numbers 10, 11, 12, and 13. What is the difference between the smallest number and the second smallest number?
Question (KO): 4개의 수 10, 11, 12, 13이 있습니다. 그 중에서 가장 작은 수와 2번째로 작은 수의 차는 얼마입니까?

Answer: -1

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
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]
var_g = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): To go to her grandmother's house, Kyunghwan took a bus for 1/3 of the distance and the subway for 1/2 of the distance. If the remaining distance was walked, how many times the total distance he traveled on public transportation?
Question (KO): 경환이는 할머니 집에 가기 위해 전체 거리의 1/3은 버스를 탔고, 1/2는 지하철을 탔습니다. 남은 거리는 걸어갔다면, 경환이가 대중교통을 타고 간 거리는 전체 거리의 몇 배입니까?

Answer: 0.83

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

Question (EN): There are single digits A, B, and C. A47BC is divided by 4, 5, and 9. Find all the number of numbers that can fit in A.
Question (KO): 한 자리 수 A, B, C가 있습니다. A47BC가 4, 5, 9로 나누어 떨어집니다. A에 들어갈 수 있는 숫자의 개수를 모두 구하시오.

Answer: 5

Solution (Python):
var_a = 'A47BC'
ans_dict = dict()
var_a = str(var_a)
list_a = []
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] = 0
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]))
    if len(var_a) == len(str(int(temp))):
        new_elem = int(temp)
        list_a.append(new_elem)
var_b = 4
list_b = []
var_b = int(var_b)
for i in list_a:
    i = int(i)
    if i % var_b == 0:
        list_b.append(i)
var_c = 5
list_c = []
var_c = int(var_c)
for i in list_b:
    i = int(i)
    if i % var_c == 0:
        list_c.append(i)
var_d = 9
list_d = []
var_d = int(var_d)
for i in list_c:
    i = int(i)
    if i % var_d == 0:
        list_d.append(i)
var_e = 'A47BC'
var_f = 'A'
var_e = str(var_e)
var_f = str(var_f)
unk_idx = var_e.index(var_f)
list_e = []
for elem in list_d:
    elem = str(elem)
    list_e.append(int(elem[unk_idx]))
list_e = list(set(list_e))
var_g = len(list_e)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Sangheon is 1.56 meters (m) tall. Chiho is 0.14meters (m) shorter than Sangheon, and Nara is 0.27meters (m) taller than Chiho. How tall is Nara in meters (m)?
Question (KO): 상헌이의 키는 1.56미터(m) 입니다. 치호는 상헌이보다 0.14미터(m) 작고 나라는 치호보다 0.27미터(m) 크다고 합니 다. 나라의 키는 몇 미터(m)입니까?

Answer: 1.69

Solution (Python):
var_a = 1.56
var_b = 0.14
var_c = var_a - var_b
var_d = 0.27
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Geometry

Question (EN): The square-shaped fabric was buttoned regularly without gaps. If the number of buttons on the perimeter is 84, how many buttons are on one outermost side?
Question (KO): 정사각형 모양의 천에 단추를 빈틈없이 규칙적으로 달았습니다. 둘레에 있는 단추의 개수가 84개라면, 가장 바깥쪽의 한 변에 있는 단추의 개수는 몇 개인지 구하시오.

Answer: 22

Solution (Python):
var_a = 84
var_b = 4
var_c = var_a - var_b
var_d = 4
var_e = var_c / var_d
var_f = 2
var_g = var_e + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): How many multiples of 8 are there in a five-digit number?
Question (KO): 다섯 자리 수 중 8의 배수는 모두 몇 개 있습니까?

Answer: 11250

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 = len(list_b)
print(int(var_e))
Category: Comparison

Question (EN): Hoseok is standing at the 4th from the front. Consider that there are 5 students between Yoongi and Hoseok, where is Yoongi at counting from the front?
Question (KO): 호석이는 앞에서 4번째에 서 있습니다. 윤기와 호석이 사이에 5명의 학생이 있다면, 윤기는 앞에서 몇 번째에 서 있습니까?

Answer: 10

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

Question (EN): In a cube-shaped box with one edge measuring 12 centimeters (cm), 54 pieces of colored paper in the shape of a square of a certain size were attached without overlapping and then there was no empty space. How many centimeters (cm) is one edge of this piece of colored paper?
Question (KO): 한 모서리가 12센티미터(㎝) 인 정육면체 모양의 상자에 크기가 일정한 정사각형 모양의 색종이를 겹치지 않게 54 장 붙였더니 빈틈없이 붙일 수 있었습니다. 이 색종이의 한 변은 몇 센티미터(㎝) 입니까?

Answer: 4

Solution (Python):
var_a = 12
var_b = 2
var_c = var_a ** var_b
var_d = 6
var_e = var_c * var_d
var_f = 54
var_g = var_e / var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i))
Category: Geometry

Question (EN): The length of the promenade near Hyeyoung's house is 6 kilometers (km). While Hyeyoung walked from the starting point to the halfway point of the trail, and Hyeyoung's younger brother walked from the starting point to the half of where Hyeyoung stopped, find how many kilometers (km) Hyeyoung walked.
Question (KO): 혜영이네 집 근처 산책로의 길이는 6킬로미터(㎞)입니다. 혜영이는 산책로의 시작점부터 절반 지점까지 걸어갔고, 혜영이의 동생은 시작점부터 혜영이가 걸어간 곳까지의 절반 지점까지 걸어갔을 때, 혜영이가 걸은 거리는 몇 킬로미터(㎞)인지 구하시오.

Answer: 3

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

Question (EN): There are 6 consecutive natural numbers between 9 and a certain number. What is a certain number when it is greater than 9?
Question (KO): 9와 어떤 자연수 사이에는 연속된 자연수가 6개 있습니다. 어떤 수는 9보다 클 때 어떤 수는 얼마입니까?

Answer: 16

Solution (Python):
var_a = 9
var_b = 6
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): When 10+AB=64 is correct, what number should go in A?
Question (KO): 10+AB=64일 때, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 5

Solution (Python):
var_a = '10+AB=64'
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: Arithmetic calculation

Question (EN): Thirty flags were planted every 3 meters (m) on the straight track of the playground. Find the total length of the straight track. (However, flags are also planted at the beginning and the end of straight tracks.)
Question (KO): 운동장의 직선 주로의 한쪽에 3미터(m) 간격으로 깃발을 30개 꽂았습니다. 직선 주로의 총 길이를 구하시오. (단, 직선 주로의 처음과 끝에도 깃발을 꽂습니다.)

Answer: 87

Solution (Python):
var_a = 3
var_b = 30
var_c = 1
var_d = var_b - var_c
var_e = var_a * var_d
print(int(var_e))
Category: Geometry

Question (EN): Find the edge of a cube whose volume is 3375 cubic centimeters (cm3).
Question (KO): 부피가 3375세제곱센티미터(㎤)인 정육면체의 한 모서리를 구하시오

Answer: 15

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

Question (EN): During the experiment, Hyungjun threw away 200 milliliters (ml) of the liquid from the beaker and added 1000 milliliters (ml) of the new liquid. If the current solution in the beaker is 2000 milliliters (ml), find the amount of the solution in milliliters (ml) that was initially contained in the beaker.
Question (KO): 형준이가 실험을 하면서 비커에 있던 액체를 200밀리리터(㎖) 버리고 새로운 액체 1000밀리리터(㎖)를 받았다. 현재 비커에 담긴 용액이 2000밀리리터(㎖)일때 비커에 처음 담겨 있던 용액을 몇 밀리리터(㎖)인지 구하시오.

Answer: 1200

Solution (Python):
var_a = 2000
var_b = 1000
var_c = var_a - var_b
var_d = 200
var_e = var_c + var_d
print(int(var_e))