philschmid/DMath huggingface dataset:
Category: Correspondence

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

Answer: 1

Solution (Python):
var_a = '8B-A3=38'
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): There were 17 fewer children than adults on the train at the first station. At the next station, 57 adults and 18 children got on and 44 got off. If there are 502 people on the train right now, how many adults got on the train at the first station?
Question (KO): 첫 번째 역에서 기차를 탄 어린이는 어른보다 17명이 적었습니다. 다음 역에서 어른 57명과 어린이 18명이 타고 44명이 내렸습니다. 지금 기차를 타고 있는 사람이 502명이라면 첫 번째 역에서 기차를 탄 어른은 몇 명인지 구하시오.

Answer: 244

Solution (Python):
var_a = 502
var_b = 18
var_c = 57
var_d = var_b + var_c
var_e = 44
var_f = var_d - var_e
var_g = var_a - var_f
var_h = 17
var_i = var_g + var_h
var_j = 2
var_k = var_i / var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): There are 44 students in A class. B class has 2 more studemts than A class, and C class has 1 less stuendt than B class. How many students are in C class?
Question (KO): (가) 반 학생은 모두 44명입니다. (나) 반은 (가) 반보다 2명 더 많고, (다) 반은 (나) 반보다 1명 더 적습니다. (다) 반 학생은 모두 몇 명입니까?

Answer: 45

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

Question (EN): On a road measuring 6 meters (m) wide and 4 meters (m) long, we are going to attach rectangular bricks 60 centimeters (cm) wide and 20 centimeters (cm) tall without overlapping. How many bricks are needed to fill the road?
Question (KO): 가로가 6미터(m), 세로가 4미터(m)인 도로에 가로가 60센티미터(㎝), 세로가 20센티미터(㎝)인 직사각형 모양의 벽돌을 빈틈없이 겹치지 않게 붙이려고 합니다. 도로를 메우기 위해 필요한 벽돌의 개수는 몇 개입니까?

Answer: 200

Solution (Python):
var_a = 6
var_b = 100
var_c = var_a * var_b
var_d = 4
var_e = 100
var_f = var_d * var_e
var_g = var_c * var_f
var_h = 60
var_i = 20
var_j = var_h * var_i
var_k = var_g / var_j
print(int(var_k))
Category: Correspondence

Question (EN): What is B when 1/4×1/8=1/(4×A)=1/B?
Question (KO): 1/4×1/8=1/(4×A)=1/B 일때 B는 무엇인가?

Answer: 32

Solution (Python):
var_a = '1/4×1/8=1/(4×A)=1/B'
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] = 0
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, 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)):
        if term_list[i] == '':
            new_eq += str(term_list[i])+op_list[i]
        else:
            new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    new_eq=new_eq.replace('=', '==')
    new_eq=new_eq.replace('>==', '>=')
    new_eq=new_eq.replace('<==', '<=')
    eval_result = False
    try:
        if '=' in new_eq and '>' not in new_eq and '<' not in new_eq:
            new_eq=new_eq.replace('==','=')
            new_eq=new_eq.replace('>','')
            new_eq=new_eq.replace('<','')
            new_eq=new_eq.split('=')
            for i in range(len(new_eq)-1):
                eval_result = math.isclose(eval(new_eq[i]), eval(new_eq[i+1]))
                if not eval_result:
                    break
        else:
            eval_result = eval(new_eq)
    except:
        eval_result = False
        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): Minyoung, Yoojung, and Eunji decided to divide marbles they have. Minyoung first brought 27 more marbles than Yoojung brought and if Minyoung gives Eunji 9 marbles, Minyoung and Eunji have 45 marbles each, how many marbles do the three people have in total? 
Question (KO): 민영, 유정, 은지 세 사람이 모여 구슬을 나누기로 했습니다. 처음 민영이가 가지고 온 구슬은 유정이가 가지고 온 구슬보다 27개 많고 민영이가 은지에게 구슬 9개를 주면 민영이와 은지가 가지고 있는 구슬이 45개로 같아진다고 할 때, 세 사람이 가지고 있는 구슬의 총 개수는 몇 개입니까?

Answer: 117

Solution (Python):
var_a = 45
var_b = 27
var_c = var_a - var_b
var_d = 9
var_e = var_c + var_d
var_f = 27
var_g = var_e + var_f
var_h = 45
var_i = 27
var_j = var_h - var_i
var_k = 9
var_l = var_j + var_k
var_m = var_g + var_l
var_n = 45
var_o = 9
var_p = var_n - var_o
var_q = var_m + var_p
print(int(var_q))
Category: Correspondence

Question (EN): When you move the decimal point of a prime number two places to the right, it becomes 138.6 more than the original prime number. Find the original prime number.
Question (KO): 어떤 소수의 소수점을 오른쪽으로 두 자리 옮기면 원래의 소수보다 138.6만큼 커집니다. 원래의 소수를 구하시오.

Answer: 1.4

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

Question (EN): 15 balls of different weights are placed in a row in order of weight from the lightest. The ball (a) is placed eighth from the front. If you place the balls again, in a row in order of weight from the heaviest, at what position will the ball (A) be placed from the front?
Question (KO): 각각의 무게가 다른 공 15개를 무게가 가벼운 것부터 순서대로 한 줄로 놓았습니다. 공 (가)는 앞에서 8번째에 놓여 있습니다. 무게가 무거운 것부터 순서대로 다시 한 줄로 놓으면 공 (가)는 앞에서 몇 번째에 놓이게 됩니까?

Answer: 8

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

Question (EN): 27 minus 7 equals the multiplication of one number and 5. What is the product of 7 and the sum of the number and 5?
Question (KO): 27에서 7을 뺀 값은 어떤 수와 5를 곱한 값과 같다. 어떤 수와 5의 합에 7을 곱하면 얼마인지 구하시오.

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

Question (EN): The weight of one biography is 0.3 kilograms (kg), and the weight of one fairy-tale book is 0.27 kilograms (kg). Which one is heavier, the biography or the fairy tale book?
Question (KO): 위인전 한 권의 무게는 0.3킬로그램(㎏)이고, 동화책 한 권의 무게는 0.27킬로그램(㎏)입니다. 위인전과 동화책 중에서 어느 것이 더 무겁습니까?

Answer: biography

Solution (Python):
var_a = 'biography'
var_b = 'fairy-tale'
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.3
var_d = 0.27
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: Arithmetic calculation

Question (EN): What is the largest three-digit number divisible by the numbers 6, 5, 8, and 9?
Question (KO): 숫자 6, 5, 8, 9로 나누어 떨어질 수 있는 세 자리 수 중 가장 큰 수는 무엇입니까?

Answer: 720

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 = 1
list_f=list_e.copy()
list_f.sort()
var_i = list_f[-var_h]
print(int(var_i))
Category: Correspondence

Question (EN): It is said that there are 468 more white Go stones than black Go stones. There are 954 white stones. Find the numbers of all Go stones.
Question (KO): 검은 바둑돌보다 흰 바둑돌이 468개 더 많다고 한다. 954개의 흰색 돌이 있습니다. 바둑돌의 수를 모두 구하십시오.

Answer: 1440

Solution (Python):
var_a = 954
var_b = 468
var_c = var_a - var_b
var_d = 954
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

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

Answer: 23

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 = 2
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
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: Possibility

Question (EN): There are cards each with the numbers 1, 3, 0, and 5 on it. When making a four-digit number using the cards once, what is the 6th largest number?
Question (KO): 1, 3, 0, 5가 적힌 카드가 각각 한 장씩 있습니다. 카드를 한번씩만 사용해서 네 자리 수를 만들 때, 6번째로 큰 수는 무엇입니까?

Answer: 5013

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

Question (EN): 25 students stand in a line. Thirteen students are standing behind Seokjin. How many students are standing in front of Seokjin?
Question (KO): 학생 25명이 한 줄로 서 있습니다. 석진이의 뒤에 13명의 학생들이 서 있습니다. 석진이의 앞에 서 있는 학생은 몇 명입니까?

Answer: 11

Solution (Python):
var_a = 25
var_b = 13
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

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

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

Question (EN): Students are sitting on the playground. Yujeong is seated in the 12th row from the left, 11th row from the right, 18th row from the front, and 8th row from the back. How many students are sitting on the playground, assuming the same number of students are in each row?
Question (KO): 운동장에 학생들이 앉아 있습니다. 유정이는 왼쪽에서 12번째 열, 오른쪽에서 11번째 열, 앞에서 18번째 줄, 뒤에서 8번째 줄에 앉아 있습니다. 각 줄마다 학생의 수가 같다고 할 때, 운동장에 앉아 있는 학생은 모두 몇 명입니까?

Answer: 550

Solution (Python):
var_a = 12
var_b = 11
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 18
var_g = 8
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
print(int(var_k))
Category: Correspondence

Question (EN): When a number is divided by 9, the quotient is divisible by 25. What do you get when the number is added to 7 and multiplied by 9?
Question (KO): 어떤 수를 9로 나누었더니 몫이 25로 나누어떨어졌습니다. 어떤 수에 7을 더하고 9를 곱한 값은 얼마입니까?

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

Question (EN): Yoojung bought 2 motorcycles and 5 bicycles. How many motorcycles and bicycles did Yoojung buy?
Question (KO): 유정이는 오토바이 2대와 자전거 5대를 구매하였습니다. 유정이가 구매한 오토바이와 자전거는 몇 대 인가요?

Answer: 7

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

Question (EN): It is said that one person needs 155.2 liters (l) of water to live for 53 days, and the amount of water in one bucket is 2 liters (l). If a person lives 17 days, how many buckets of water does a person need?
Question (KO): 한 사람이 53일을 사는 데 155.2리터(L)의 물이 필요하다고 하고, 한 물통에 들어있는 물의 양은 2리터(L)입니다. 만약 사람이 17일을 산다고 한다면 사람에게 필요한 물통은 모두 몇 개입니까?

Answer: 25

Solution (Python):
var_a = 155.2
var_b = 53
var_c = var_a / var_b
var_d = 17
var_e = var_c * var_d
var_f = 2
var_g = var_e / var_f
var_h = 1
var_i=int(((var_g+9*10**(var_h-2))//(10**(var_h-1)))*10**(var_h-1))

print(int(var_i))
Category: Arithmetic calculation

Question (EN): Jungkook has 3 red balls and 2 yellow balls. When Jungkook gives Yoongi 1 red ball, how many yellow balls does Jungkook have?
Question (KO): 정국이는 빨간 공 3개와 노란 공 2개를 가지고 있습니다. 정국이가 윤기에게 빨간 공 1개를 주었을 때, 정국이가 가지고 있는 노란 공의 개수는?

Answer: 2

Solution (Python):
var_a = 2
print(int(var_a))
Category: Possibility

Question (EN): Dongwi is going to go to another school to see the festival. If only one school is allowed to go to play, and there are 4 boys' high schools and 3 girls' high schools, find the number of cases in which Dongwi go to play.
Question (KO): 동위는 축제를 보기 위해 다른 학교에 놀러가려고 합니다. 하나의 학교에만 놀러갈 수 있고, 남고가 4개, 여고가 3개 있을 때 동위가 놀러가는 경우의 수를 구하시오.

Answer: 7

Solution (Python):
var_a = 4
var_b = 3
var_c = var_a + var_b
print(int(var_c))
Category: Correspondence

Question (EN): Multiply a number by 5 to get 100. What is the value of the number when divided by 10?
Question (KO): 어떤 수에 5를 곱해 결과로 100을 얻었습니다. 10으로 어떤 수를 나누면 얼마입니까?

Answer: 2

Solution (Python):
var_a = 100
var_b = 5
var_c = var_a / var_b
var_d = 10
var_e = var_c / var_d
print(int(var_e))
Category: Possibility

Question (EN): Of the two digits that can be created by taking two different numbers out of 1, 0, 5, and 8, what is the largest minus the second largest?
Question (KO): 1, 0, 5, 8 중에서 서로 다른 숫자 2개를 뽑아 만들 수 있는 두 자리 수 중 가장 큰 수에서 2번째로 큰 수를 뺀 값은 얼마입니까?

Answer: 4

Solution (Python):
var_a = 1
var_b = 0
var_c = 5
var_d = 8
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 = 2
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
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 2
list_d=list_b.copy()
list_d.sort()
var_i = list_d[-var_h]
var_j = var_g - var_i
print(int(var_j))
Category: Geometry

Question (EN): A regular hexagon with an area of 21.12 square centimeters (cm2) is divided into 6 equal parts. What is the area of the divided part?
Question (KO): 넓이가 21.12제곱센티미터(㎠)인 정육각형을 6등분하였습니다. 한 등분의 넓이는 얼마입니까?

Answer: 3.52

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

Question (EN): Namjoon has 3 sets of 7 marbles. He is going to make these marbles into 6 groups of 6 each. How many more marbles does he need?
Question (KO): 남준이는 구슬을 7개씩 3묶음 가지고 있습니다. 이 구슬을 6개씩 6묶음으로 만들려고 합니다. 몇 개의 구슬이 더 필요합니까?

Answer: 15

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

Question (EN): A figure has a perimeter of 49 centimeters (cm) and a side length of 7 centimeters (cm). How many sides are there in total?
Question (KO): 도형의 둘레가 49센티미터(㎝)이며 한 변의 길이가 7센티미터(㎝)인 도형이 있습니다. 총 몇 개의 변이 있습니까?

Answer: 7

Solution (Python):
var_a = 49
var_b = 7
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): I am trying to put 7 posters on a wall that is 20 meters (m) wide. The posters were pasted at equal intervals, starting at 1 meter (m) apart from each end of the wall. Find the space between the posters.
Question (KO): 가로가 20미터(m)인 벽에 7개의 포스터를 붙히려고 한다. 벽의 양쪽 끝에서 1미터(m)씩 떨어뜨려서 붙이기 시작하여 같은 간격으로 포스터를 붙혔다. 포스터 사이의 간격을 구하시오

Answer: 3

Solution (Python):
var_a = 20
var_b = 1
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 7
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Comparison

Question (EN): How many of the following numbers are less than 1? 1/10, 8, 0.9, 7/10, 5.
Question (KO): 다음 중 1보다 작은 수는 몇 개인지 고르시오. 1/10, 8, 0.9, 7/10, 5.

Answer: 3

Solution (Python):
var_a = 0.1
var_b = 8
var_c = 0.9
var_d = 0.7
var_e = 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()
var_f = 1
list_b = []
for i in list_a:
    if i < var_f:
        list_b.append(i)
var_g = len(list_b)
print(int(var_g))
Category: Correspondence

Question (EN): A number needs to be divided by 5, but when it was accidentally divided by 8, the quotient was 156 and the remainder 2. Find the value that comes out when the calculation is done correctly.
Question (KO): 어떤 수를 5로 나누어야 하는데 실수로 8로 나누었더니 몫이 156이고 나머지가 2였습니다. 계산을 제대로 했을 때 나오는 값을 구하시오.

Answer: 250

Solution (Python):
var_a = 156
var_b = 8
var_c = var_a * var_b
var_d = 2
var_e = var_c + var_d
var_f = 5
var_g = var_e / var_f
print(int(var_g))
Category: Comparison

Question (EN): At the first stop, there were 17 men fewer than women that took the subway. At the next station, 57 women and 18 men got on and 44 people got off. If there are 502 people on the subway right now, how many men got on the subway at the first stop?
Question (KO): 첫 번째 정류장에서 지하철을 탄 남자는 여자보다 17명이 적었습니다. 다음 역에서 여자 57명과 남자 18명이 타고 44명이 내렸습니다. 지금 지하철을 타고 있는 사람이 502명이라면 첫 번째 정류장에서 지하철 탄 남자는 몇 명인지 구하시오

Answer: 227

Solution (Python):
var_a = 502
var_b = 18
var_c = 57
var_d = var_b + var_c
var_e = 44
var_f = var_d - var_e
var_g = var_a - var_f
var_h = 17
var_i = var_g - var_h
var_j = 2
var_k = var_i / var_j
print(int(var_k))
Category: Correspondence

Question (EN): I was supposed to divide a certain number by 3 and add 12 to it, but I multiplied this number by 3, subtracted 12 and then divided it by 6 accidentally, getting 60 as a result. How much will I get if I calculate correctly?
Question (KO): 어떤 수를 3 으로 나눈 다음 12 를 더해야 할 것을 잘못하여 3 을 곱한 다음 12 를 빼고나서 6으로 나눴더니 60 이 되었습니다. 바르게 계산하면 얼마입니까?

Answer: 53.33

Solution (Python):
var_a = 60
var_b = 6
var_c = var_a * var_b
var_d = 12
var_e = var_c + var_d
var_f = 3
var_g = var_e / var_f
var_h = 3
var_i = var_g / var_h
var_j = 12
var_k = var_i + var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Possibility

Question (EN): Find the sum of the largest and third largest three-digit numbers with different digits that can be made with the natural numbers 8, 1, and 6.
Question (KO): 자연수 8, 1, 6으로 만들 수 있는, 각 자릿수가 모두 다른 세 자리 수 중 가장 큰 것과 세 번째로 큰 것의 합을 구하시오.

Answer: 1542

Solution (Python):
var_a = 8
var_b = 1
var_c = 6
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 3
list_d=list_b.copy()
list_d.sort()
var_h = list_d[-var_g]
var_i = var_f + var_h
print(int(var_i))
Category: Correspondence

Question (EN): Each of the two beakers contains a liquid. The sum of the solutions contained in the two beakers is 9.28 milliliters (ml). If one beaker contains 2.95 milliliters (ml), what is the difference in milliliters (ml) between the two beakers?
Question (KO): 두 개의 비커 안에 각각 액체가 담겨있다. 두 비커안에 담겨있는 용액의 합이 9.28밀리리터(㎖)이다. 한 비커에 2.95밀리리터(㎖)가 들어있을 때, 두 비커에 들어있는 용액의 차는 몇 밀리리터(㎖)인지 구하시오.

Answer: 3.38

Solution (Python):
var_a = 9.28
var_b = 2.95
var_c = var_a - var_b
var_d = 2.95
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))