philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): A school has 210 first-year students and 473 non-first-year students. How many lines will there be if all students are lined up in line with 100 students in a row? (However, only the line where all 100 students are standing counts.)
Question (KO): 어느 학교에 1학년이 210명, 1학년이 아닌 학생이 473명이다. 전교생을 100명씩 한 줄로 세우면 몇 줄이 생기는가?(단, 100명이 온전히 다 서있는 줄만 샌다)

Answer: 6

Solution (Python):
var_a = 210
var_b = 473
var_c = var_a + var_b
var_d = 100
var_e = var_c // var_d
print(int(var_e))
Category: Correspondence

Question (EN): The equation of three-digit number and two-digit number is A82+3B=216. How much is B?
Question (KO): A82+3B=216입니다. B는 얼마인가요?

Answer: 4

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

Question (EN): Hyejeong wants to replace two products among TV, refrigerator, washing-machine, and computer. How many number of cases are there when Hyejeong chooses two products to change?
Question (KO): 혜정이는 TV, 냉장고, 세탁기, 컴퓨터 중에서 두 가지 제품을 교체하려고 한다. 혜정이가 교체할 수 있는 두 가지 제품을 선택하는 경우의 수는?

Answer: 6

Solution (Python):
var_a = 'TV'
var_b = 'refrigerator'
var_c = 'washing-machine'
var_d = 'computer'
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 = len(list_a)
var_f = 2
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_e-i)
for i, elem in enumerate(range(var_f)):
    var_g = var_g / (i+1)
print(int(var_g))
Category: Possibility

Question (EN): The numbers 1 through 9 are used only once to form a nine-digit number. When this number is divisible by 55, find the smallest 9-digit number.
Question (KO): 1부터 9까지의 숫자를 딱 한 번씩 사용하여 아홉 자리 수를 만들었다. 이 수가 55로 나누어 떨어질 때, 가장 작은 아홉자리 수를 구하여라.

Answer: 126374985

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 = 9
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 = 55
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-1]
print(int(var_g))
Category: Correspondence

Question (EN): When A is divided by 7, the quotient is B and the remainder is C. In here, A, B, and C are natural numbers. What is the largest possible B number when the quotient and remainder are equal?
Question (KO): A를 7로 나눴더니 몫이 B가 되었고, 나머지는 C가 되었습니다. A, B, C는 자연수 입니다. 몫과 나머지가 같을 때, 가능한 B 중 가장 큰 수는 무엇인가요?

Answer: 6

Solution (Python):
var_a = 7
var_b = 1
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Jihee's group of 6 students went to the reference room with computers to take a social performance assessment. If there are only 4 computers left in the data room and they decide to use the computers in turn, if the total time taken for the performance evaluation is 3 hours and 12 minutes, find out how many minutes each person used the computer on average.
Question (KO): 지희네 모둠 학생 6명이 사회 수행평가를 하기 위해 컴퓨터가 있는 자료실에 갔습니다. 자료실에 남은 컴퓨터가 4대밖에 없어서 돌아가면서 컴퓨터를 시용하기로 했을 때, 수행평가를 하는 데 총 걸린 시간이 3시간 12분이라면 한 사람당 평균 몇 분씩 컴퓨터를 사용하였을지 구하시오.

Answer: 128

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

Question (EN): Lee-seo used 1/2 meter (m) of ribbon tape in art class, and Won-young used 2/3 meter (m) of ribbon tape. Which of the two friends used more ribbon tape?
Question (KO): 이서는 미술 시간에 1/2미터(m)의 리본 테이프를 사용하였고, 원영이는 2/3미터(m)의 리본 테이프를 사용하였습니다. 두 친구 중 리본 테이프를 더 많이 사용한 친구는 누구입니까?

Answer: Won-young

Solution (Python):
var_a = 'Lee-seo'
var_b = 'Won-young'
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.5
var_d = 0.6666666666666666
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 1 yellow marble, 1 white marble, 1 red marble, 1 purple marble, 1 green marble and 1 blue marble. How many different ways can there be to pick 2 different marbles?
Question (KO): 노란색 구슬, 흰색 구슬, 빨간색 구슬, 보라색 구슬, 초록색 구슬, 파란색 구슬이 1개씩 있습니다. 이 구슬 중 서로 다른 2개의 구슬을 고르는 방법은 모두 몇 가지입니까?

Answer: 15

Solution (Python):
var_a = 'yellow'
var_b = 'white'
var_c = 'red'
var_d = 'purple'
var_e = 'green'
var_f = 'blue'
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 = len(list_a)
var_h = 2
var_i = 1
var_g = int(var_g)
var_h = int(var_h)
for i, elem in enumerate(range(var_h)):
    var_i = var_i * (var_g-i)
for i, elem in enumerate(range(var_h)):
    var_i = var_i / (i+1)
print(int(var_i))
Category: Arithmetic calculation

Question (EN): The lengths of the five tapes are 35 centimeters (cm), 29 centimeters (cm), 35.5 centimeters (cm), 36 centimeters (cm), and 30.5 centimeters (cm) respectively. What is the average length of these 5 tapes in centimeters (cm)? Include the decimal point in your answer.
Question (KO): 테이프 5개의 길이가 각각 35센티미터(㎝), 29센티미터(㎝), 35.5센티미터(㎝), 36센티미터(㎝), 30.5센티미터(㎝)라고 합니다. 이 테이프 5개의 평균 길이는 몇 센티미터(㎝)인지 소수점을 포함하여 답을 구하시오.

Answer: 33.2

Solution (Python):
var_a = 35
var_b = 29
var_c = 35.5
var_d = 36
var_e = 30.5
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()
list_a = [float(i) for i in list_a]
var_f = sum(list_a)/len(list_a)
print('{:.2f}'.format(round(var_f+1e-10,2)))
Category: Correspondence

Question (EN): What is 17 divided by 10 and multiplied by 1/100?
Question (KO): 17을 10으로 나누고 1/100을 곱하면 얼마인지 구하시오.

Answer: 0.02

Solution (Python):
var_a = 17
var_b = 10
var_c = var_a / var_b
var_d = 0.01
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Comparison

Question (EN): Among the five numbers 1.4, 9/10, 1.2, 0.5, and 13/10, what is the number greater than or equal to 1.1 and the least or equal to it?
Question (KO): 수 5개 1.4, 9/10, 1.2, 0.5, 13/10 중 1.1보다 크거나 같은 숫자를 구하고, 그 중에서 가장 작거나 같은 숫자를 구하면 무엇입니까?

Answer: 1.2

Solution (Python):
var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
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 = 1.1
list_b = []
for i in list_a:
    if i >= var_f:
        list_b.append(i)
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
print('{:.2f}'.format(round(var_h+1e-10,2)))
Category: Arithmetic calculation

Question (EN): What is the third largest four-digit number that can be formed by using all four numbers 3, 5, 7, and 2 at least once?
Question (KO): 4개의 숫자 3, 5, 7, 2를 한 번씩 모두 사용하여 만들 수 있는 네 자리 수 중 세 번째로 큰 것은 무엇인가?

Answer: 7352

Solution (Python):
var_a = 3
var_b = 5
var_c = 7
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 = 4
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 = 3
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
print(int(var_g))
Category: Geometry

Question (EN): Given a cube with an edge length of 15 centimeters (cm), find the sum of the lengths of all edges of the cube.
Question (KO): 어떤 한 모서리의 길이가 15센티미터(㎝)인 정육면체가 있을 때, 이 정육면체의 모든 모서리의 길이의 합을 구하시오.

Answer: 180

Solution (Python):
var_a = 15
var_b = 4
var_c = 3
var_d = var_b * var_c
var_e = var_a * var_d
print(int(var_e))
Category: Possibility

Question (EN): At the clothing store, there are 5 types of hoodies and 4 types of sweatshirts, 3 types of jeans, and 5 types of slacks for pants. Find the number of ways to choose one top and one bottom.
Question (KO): 옷 가게에 상의는 후드가 5종류, 맨투맨이 4종류가 있고, 바지는 청바지가 3종류, 슬랙스가 5종류가 있다. 상의와 하의를 하나씩 고르는 경우의 수를 구하시오.

Answer: 72

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

Question (EN): Hyeonjoo stood on the 2nd prize podium with a height of 53 centimeters (cm) and 7 millimeters (mm) and measured his height from the floor, and it was 190 centimeters (cm). She stood on the 1st prize podium and measured his height from the floor, and it was 232 centimeters (cm) and 5 millimeters (mm). Find the height in centimeters (cm) of the first-place podium.
Question (KO): 현주가 높이 53센티미터(㎝) 7밀리미터(㎜)인 2등 시상대에 올라서서 바닥에서부터 키를 재었더니 190센티미터(㎝)였고, 1등 시상대 위에 올라서서 바닥에서부터 키를 재었더니 232센티미터(㎝) 5밀리미터(㎜)였습니다. 1등 시상대의 높이는 몇 센티미터(㎝)인지 구하시오.

Answer: 96.2

Solution (Python):
var_a = 232
var_b = 5
var_c = 10
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 190
var_g = var_e - var_f
var_h = 53
var_i = 7
var_j = 10
var_k = var_i / var_j
var_l = var_h + var_k
var_m = var_g + var_l
print('{:.2f}'.format(round(var_m+1e-10,2)))
Category: Possibility

Question (EN): I'm going to hand out 15 pieces of colored paper to Jungkook and Eunji. Jungkook and Eunji will receive at least one piece of colored paper. How many ways are there to distribute the paper?
Question (KO): 색종이 15장을 정국이와 은지에게 나누어 주려고 합니다. 정국이와 은지는 적어도 색종이 1장을 받습니다. 색종이를 나누어 주는 방법은 모두 몇 가지입니까?

Answer: 14

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

Question (EN): You should have added 3, but mistakenly added 6 to a certain number, and ended up with 8. What number is this?
Question (KO): 3을 더했어야하는데 6을 어떤 수에 잘 못더하여 8이 됐습니다. 이때 어떤 수는 얼마인가?

Answer: 2

Solution (Python):
var_a = 8
var_b = 6
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): A dozen of pencils means 12 pencils, and it weighs 182.88 grams (g). Write down the process and find how many grams (g) a pencil weighs.
Question (KO): 연필 한 타는 12자루이고, 게는 182.88그램(g)입니다. 연필 한 자루의 무게는 몇 그램(g)인지 풀이 과정을 쓰고 답을 구해 보세요.

Answer: 15.24

Solution (Python):
var_a = 182.88
var_b = 12
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Possibility

Question (EN): If 5 family members, including their parents, stand side by side and try to take a picture, in how many ways will their parents stand at either end?
Question (KO): 부모를 포함하여 가족 5명이 나란히 서서 사진을 찍으려고 할 때, 부모가 양 끝에 서게 되는 경우의 수는?

Answer: 12

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

Question (EN): Yuna and Hoseok want to share 8 candies. Find possible ways to divide the candies given that each person gets at least one.
Question (KO): 유나와 호석이가 사탕 8개를 나누어 가지려고 합니다. 각자 최소 1개씩은 가지도록 할 때, 사탕을 나누어 가지는 방법은 모두 몇 가지인지 구하시오.

Answer: 7

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: Arithmetic calculation

Question (EN): Hoseok solves 4 pages of math workbook every day and has solved a total of 48 pages until today. How many days did Hoseok solve the workbook?
Question (KO): 호석이는 매일 4장씩 수학문제집을 풀어 오늘까지 모두 48장을 풀었습니다. 호석이는 며칠 동안 수학 문제집을 풀었습니까?

Answer: 12

Solution (Python):
var_a = 48
var_b = 4
var_c = var_a / var_b
print(int(var_c))
Category: Possibility

Question (EN): You have 2 chances to pick from a basket. If you pick a fruit from a basket with one apple, one peach, one pear, and one melon in the basket minding the order, how many possible cases are there?
Question (KO): 바구니에서 뽑을 수 있는 기회는 2번입니다. 바구니 속에 사과, 복숭아, 배, 참외가 각각 1개씩 들어가있는 바구니에서 차례를 고려하여 과일을 뽑는다면, 가능한 경우의 수는 몇 가지입니까?

Answer: 12

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

Question (EN): The apples in both baskets (a) and (b) are 72 kilograms (kg). If (a) the apples in the basket weigh 42 kilograms (kg), how many kilograms (kg) are the apples in (b) lighter than the apples in the basket (a)?
Question (KO): 두 바구니 (가), (나)에 담겨 있는 사과는 모두 72킬로그램(㎏)입니다. (가) 바구니에 담긴 사과의 무게가 42킬로그램(㎏)일 때, (나) 바구니에 담긴 사과는 (가) 바구니에 담긴 사과보다 몇 킬로그램(㎏) 더 가볍습니까?

Answer: 12

Solution (Python):
var_a = 42
var_b = 72
var_c = 42
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11 and 12. What is the product of the largest number and the second smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 큰 수와 2번째로 작은 수의 곱은 얼마입니까?

Answer: 132

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]
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: Correspondence

Question (EN): When 32+A7B=705, where A7B is three-digit number. Find A.
Question (KO): 32+A7B=705일 때, A를 구하시오.

Answer: 6

Solution (Python):
var_a = '32+A7B=705'
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: Geometry

Question (EN): What is the surface area of a tetrahedron with a side of 7 centimeters (cm)?
Question (KO): 한변의 길이가 7센티미터(㎝)인 정사면체의 겉넓이는?

Answer: 84.87

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

Question (EN): A number plus 2 plus 8 is equal to 3 times that number. Find the number.
Question (KO): 어떤 수에 2를 더하고 8을 더한 값은 어떤 수의 3배와 같다. 어떤 수를 구하시오.

Answer: 5

Solution (Python):
var_a = 2
var_b = 8
var_c = var_a + var_b
var_d = 3
var_e = 1
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g))
Category: Correspondence

Question (EN): Say that the equation 5A8-B14=364 holds. What number should be in B?
Question (KO): 등식 5A8-B14=364이 성립한다고 합니다. B에 들어가야 하는 숫자는 무엇인가요?

Answer: 2

Solution (Python):
var_a = '5A8-B14=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))
Category: Comparison

Question (EN): The five students, Yoongi, Jungkook, Yuna, Yoojeong, and Taehyung, each have the numbers 7, 6, 9, 8, and 10. Who has the 2nd smallest number?
Question (KO): 다섯 명의 학생 윤기, 정국, 유나, 유정, 태형은 각각 7, 6, 9, 8, 10만큼의 숫자를 가지고 있습니다. 2번째로 작은 숫자를 가진 사람은 누구입니까?

Answer: Yoongi

Solution (Python):
var_a = 'Yoongi'
var_b = 'Jungkook'
var_c = 'Yuna'
var_d = 'Yoojeong'
var_e = 'Taehyung'
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 = 7
var_g = 6
var_h = 9
var_i = 8
var_j = 10
list_b= []
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()
var_k = 2
list_c=list_b.copy()
list_c.sort()
var_l = list_c[var_k-1]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Comparison

Question (EN): 20 students lined up in a single line. Jungkook is standing in front of Yoongi, and there are 5 students between Yoongi and Jungkook. There are 6 students standing behind Jungkook. How many students are standing in front of Yoongi?
Question (KO): 20명의 학생들이 한 줄로 줄을 섰습니다. 정국이는 윤기보다 앞에 서 있고, 윤기와 정국이 사이에는 5명의 학생이 있습니다. 정국의 뒤에는 6명의 학생들이 서 있습니다. 윤기의 앞에 서 있는 학생은 몇 명입니까?

Answer: 17

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

Question (EN): Sixteen students stood in a circle with arms spread 10.4 centimeters (cm) apart and overlapping each other by 3.5 centimeters (cm). How many centimeters (cm) is the length of this circle?
Question (KO): 16명의 학생들이 10.4센티미터(㎝)씩 팔을 벌려 3.5센티미터(㎝)씩 겹치게 하여 원 모양으로 이어 섰습니다. 이렇게 만든 원의 길이는 몇 센티미터(㎝)인가요?

Answer: 110.4

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

Question (EN): Hyunjoo drinks milk every day. She drank 250 milliliters (ml) per day for 20 days and then 600 milliliters (ml) per day for 13 days. Find how many liters (L) of milk Hyeonjoo drank for 33 days.
Question (KO): 현주는 매일 우유를 마십니다. 20일 동안은 하루에 250밀리리터(㎖)씩 마셨고 그 후 13일 동안은 600밀리리터(㎖)씩 마셨습니다. 33일 동안 현주가 마신 우유는 몇 리터(L)인지 구하시오.

Answer: 12.8

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

Question (EN): When you multiply a number by 11, you get 103.95. What number is it?
Question (KO): 어떤 수에 11을 곱했더니 103.95가 되었습니다. 어떤 수는 얼마입니까?

Answer: 9.45

Solution (Python):
var_a = 103.95
var_b = 11
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Seokjin had 32 apples. After eating the same number of apples every day for a week, there are 4 left. How many apples did Seokjin eat a day?
Question (KO): 석진이는 사과를 32개 가지고 있었습니다. 일주일 동안 매일 같은 개수씩 사과를 먹었더니 4개가 남았습니다. 석진이는 하루에 사과를 몇 개씩 먹었습니까?

Answer: 4

Solution (Python):
var_a = 32
var_b = 4
var_c = var_a - var_b
var_d = 7
var_e = var_c / var_d
print(int(var_e))