philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Kyuhyung and Hanbyeol shared the 15,000 won allowance that their mother gave them. If Kyuhyung got 2400 won less than Hanbyeol, how much did Kyuhyung get?
Question (KO): 어머니께서 주신 용돈 15000원을 규형이와 한별이가 나누어 가졌습니다. 규형이가 한별이보다 2400원 덜 가졌다면 규형이는 얼마를 가졌습니까?

Answer: 6300

Solution (Python):
var_a = 15000
var_b = 2400
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Yumi counted a number by reducing 10 for 4 times. If the original number was 320, what is the value of Yumi counted?
Question (KO): 유미가 기존에 있는 숫자를 10씩 작아지도록 4번 뛰어서 셌습니다. 처음 숫자가 320이었다면 유미가 센 수는 얼마입니까?

Answer: 280

Solution (Python):
var_a = 320
var_b = 10
var_c = 4
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e))
Category: Possibility

Question (EN): Try to make a signal by throwing a coin 3 times. How many possible signals are there in all?
Question (KO): 동전을 3번 던져서 신호를 만드려고 합니다. 가능한 신호는 모두 몇 가지입니까?

Answer: 8

Solution (Python):
var_a = 2
var_b = 3
var_c = var_a ** var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Find the sum of odd numbers in the sequence from 1 to 200.
Question (KO): 1부터 200까지의 수열에서 홀수의 합을 구하시오.

Answer: 10000

Solution (Python):
var_a = 1
var_b = 200
list_a = []
if var_a%2==0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
print(int(var_c))
Category: Comparison

Question (EN): 25 students stand in a line. When 9 students are standing behind Yuna, how many students are standing in front of Yuna?
Question (KO): 25명의 학생이 한 줄로 서 있습니다. 유나의 뒤에 9명이 서 있을 때, 유나의 앞에는 몇 명의 학생이 서 있습니까?

Answer: 15

Solution (Python):
var_a = 25
var_b = 9
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): The sum of the vertices, faces, and edges of a certain prism is 44. How many edges does this prism have?
Question (KO): 어떤 각기둥에서 꼭짓점, 면, 모서리의 수의 합은 44개입니다. 이 각기둥의 모서리의 수는?

Answer: 21

Solution (Python):
var_a = 44
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = 1
var_f = var_d + var_e
var_g = 3
var_h = var_f + var_g
var_i = var_c / var_h
var_j = 3
var_k = var_i * var_j
print(int(var_k))
Category: Comparison

Question (EN): Each Dongkyun, Youngtak, and Seunghwan have cookies. If Dongkyun has more cookies than Youngtak, and Seunghwan has more cookies than Dongkyun, who has the most cookies?
Question (KO): 동균, 영탁, 승환은 각자 쿠키를 가지고 있습니다. 동균이가 영탁보다 많고 승환이가 동균보다 많다면 누가 쿠키를 가장 많이 가지고 있을까?

Answer: Seunghwan

Solution (Python):
var_a = 'Dongkyun'
var_b = 'Youngtak'
var_c = 'Seunghwan'
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 = 'Dongkyun'
var_e = 'Youngtak'
var_f = '>'
var_g = 'Seunghwan'
var_h = 'Dongkyun'
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: Correspondence

Question (EN): Rounding down 6A76 to the hundreds place gives 6800. Find A.
Question (KO): 6A76을 버림하여 백의 자리까지 나타내면 6800이 됩니다. A를 구하시오.

Answer: 8

Solution (Python):
var_a = '6A76'
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 = 6800
list_b = []
for i in list_a:
    if i >= var_b:
        list_b.append(i)
var_c = 6800
var_d = 100
var_e = var_c + var_d
list_c = []
for i in list_b:
    if i < var_e:
        list_c.append(i)
var_f = '6A76'
var_g = 'A'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_c:
    elem = str(elem)
    var_h = int(elem[unk_idx])
print(int(var_h))
Category: Geometry

Question (EN): A circular plate with a radius of 15 centimeters (cm) has a circumference of 90 centimeters (cm). How many times is the plate's circumference longer than its diameter?
Question (KO): 반지름이 15센티미터(㎝)인 원 모양의 접시의 둘레는 90센티미터(㎝)입니다. 접시의 둘레는 지름의 몇 배입니까?

Answer: 3

Solution (Python):
var_a = 90
var_b = 15
var_c = 2
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e))
Category: Correspondence

Question (EN): Ye-seul gave Ga-yeong 10 more than 1/4 of the colored papers she had, gave Sang-yeon 5 less than 3/5 of the remaining papers, and used 12 of the remaining papers to make an art piece. There are 13 papers left. How many colored papers did Ye-seul have at first?
Question (KO): 예슬이는 가지고 있던 색종이 수의 1/4보다 10장 많게 가영이에게 주고, 나머지 색종이의 3/5보다 5장 적게 상연이에게 주고, 그 나머지 색종이에서 12장을 미술 작품을 만드는 데 사용하고 나니 13장이 남았습니다. 예슬이는 처음에 색종이를 몇 장 가지고 있었습니까?

Answer: 80

Solution (Python):
var_a = 13
var_b = 12
var_c = var_a + var_b
var_d = 5
var_e = var_c - var_d
var_f = 1
var_g = 0.6
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 10
var_k = var_i + var_j
var_l = 1
var_m = 0.25
var_n = var_l - var_m
var_o = var_k / var_n
print(int(var_o))
Category: Geometry

Question (EN): There are two water bottles with a capacity of 4 liters (L) and 436 milliliters (ml) and two water bottles with a capacity of 1999 milliliters (ml). Find the weight in kilograms (kg) of these bottles when they are full of water.
Question (KO): 용량이 4리터(L) 436밀리리터(㎖)인 물통 2개와 용량이 1999밀리리터(㎖)인 물통 2개가 있다. 이 물통들에 물을 꽉 담았을때 무게는 몇 킬로그램(㎏)인지 구하시오.

Answer: 12.87

Solution (Python):
var_a = 4
var_b = 436
var_c = 1000
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 1999
var_g = 1000
var_h = var_f / var_g
var_i = var_e + var_h
var_j = 2
var_k = var_i * var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Arithmetic calculation

Question (EN): I am about to read the book in 4 days. I read 1/2 of the book on the first day and 1/4 of the book on the second day. Then on the third day, I read 1/6 of the entire book and on the fourth day, I had 20 pages left. Find how many pages are in the entire book.
Question (KO): 책을 4일 안에 읽으려고 합니다. 첫번째 날에 전체의 1/2를 읽고 두 번째 날에 책 전체의 1/4를 읽었습니다. 그리고 세 번째 날에는 책 전체의 1/6을 읽었고 네 번째 날에는 20쪽이 남았습니다. 전체 책은 몇 쪽인지 구하세요.

Answer: 240

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

Question (EN): When you divide a number by 11 and add 156, you get 178. Find the number.
Question (KO): 어떤 수를 11로 나눈 값에 156을 더했더니 178이 되었습니다. 어떤 수를 구하시오.

Answer: 242

Solution (Python):
var_a = 178
var_b = 156
var_c = var_a - var_b
var_d = 11
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): If the numbers 1, 5, 9 and 4 are each used once to make a number, what is the third largest three-digit number with a tens digit of 5?
Question (KO): 숫자 1, 5, 9, 4를 한 번씩 사용하여 수를 만들 때, 십의 자리 숫자가 5인 수 중 세 번째로 큰 세 자리수는 얼마입니까?

Answer: 459

Solution (Python):
var_a = 1
var_b = 5
var_c = 9
var_d = 4
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 = 10
var_g = 5
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 = 3
list_d=list_c.copy()
list_d.sort()
var_i = list_d[-var_h]
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Haechan ran at a speed of 150 meters (m) in 20 seconds. How many meters (m) did Haechan run in 1 minute?
Question (KO): 해찬이는 20초에 150미터(m)를 달리는 빠르기로 달렸다. 1분 동안 해찬이가 달린 거리는 몇 미터(m)인가?

Answer: 450

Solution (Python):
var_a = 1
var_b = 60
var_c = var_a * var_b
var_d = 20
var_e = var_c / var_d
var_f = 150
var_g = var_e * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): A swimming pool was filled with only 7 liters (L) and 200 milliliters (㎖) of water, which was supposed to have 15 liters (L) of water in it. If the water hose can fill the pool at a rate of 600 milliliters (ml) per second, how many seconds does it take to fill it with all 15 liters (L)?
Question (KO): 15리터(L)를 채워야 하는 수영장에 물이 7리터(L) 200밀리리터(㎖)만 채워져 있습니다. 여러 개의 호수로 물을 넣을 때 1초에 600밀리리터(㎖)씩 채워진다면, 15리터(L)를 모두 채우기 위해서는 최소 몇 초가 걸립니까?

Answer: 13

Solution (Python):
var_a = 15
var_b = 1000
var_c = var_a * var_b
var_d = 7
var_e = 1000
var_f = var_d * var_e
var_g = 200
var_h = var_f + var_g
var_i = var_c - var_h
var_j = 600
var_k = var_i / var_j
var_l = 1
var_m=int(((var_k+9*10**(var_l-2))//(10**(var_l-1)))*10**(var_l-1))

print(int(var_m))
Category: Comparison

Question (EN): Jimin got (a) box and (b) box for presents. When a (a) box is lighter than a (b) box, which box is a lighter box?
Question (KO): 지민이는 (가) 상자와 (나) 상자를 선물받았습니다. (나) 상자보다 (가) 상자가 가벼울 때 가벼운 상자는 무엇인가요?

Answer: (a)

Solution (Python):
var_a = '(a)'
var_b = '(b)'
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 = '(a)'
var_d = '(b)'
var_e = '<'
list_b= []
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)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
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_f = len(list_c)
var_g = list_c[var_f-1]
print(var_g)
Category: Comparison

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

Answer: 5

Solution (Python):
var_a = 9
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): You want to plant trees at intervals of 3.1 meters (m) in a circular garden with a circumference of 27.9 meters (m). Find how many trees you can plant.
Question (KO): 둘레가 27.9 미터(m) 인 원 모양의 텃밭에 3.1 미터(m) 간격으로 나무를 심으려고 합니다. 나무를 몇 그루 심을 수 있는 지 구하시오.

Answer: 9

Solution (Python):
var_a = 27.9
var_b = 3.1
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): 10 rows of marbles are placed. 8 of them were placed in 9 rows, and 4 were placed in the other row. How many marbles are there in all?
Question (KO): 구슬을 10줄 놓았습니다. 그중에서 9개 줄에는 8개씩 놓았고, 나머지 1줄에는 4개를 놓았습니다. 구슬은 모두 몇 개입니까?

Answer: 76

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

Question (EN): How many triangles are formed by drawing a diagonal from one vertex of an octagon?
Question (KO): 팔각형의 한 꼭지점에서 대각선을 그을 때 생기는 삼각형의 개수는?

Answer: 6

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

Question (EN): Eunhee is about to clean the classroom with her five friends. When she has to select 2 people to be in charge of the classroom floor and 1 person to be in charge of the window, find the number of cases where Eunhee becomes in charge of the classroom floor.
Question (KO): 은희는 5명의 친구들과 함께 교실 청소를 하려 한다. 교실 바닥 담당 2명, 창문 담당 1명을 뽑는다고 할 때, 은희가 교실 바닥 담당이 되는 경우의 수를 구하시오.

Answer: 12

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

Question (EN): Seohyun donates to a total of two places. If she had donated 1 million won 25 times to one place and 8 times to the other by 100,000 won, how much money has Seohyun donated so far?
Question (KO): 서현이는 총 두 곳에 기부를 합니다. 한 곳에는 100만 원씩 25번을 기부하였고, 다른 한 곳에는 10만 원씩 8번을 기부하였다면, 서현이가 지금까지 기부한 돈은 총 얼마입니까?

Answer: 25800000

Solution (Python):
var_a = 100
var_b = 10000
var_c = var_a * var_b
var_d = 25
var_e = var_c * var_d
var_f = 10
var_g = 10000
var_h = var_f * var_g
var_i = 8
var_j = var_h * var_i
var_k = var_e + var_j
print(int(var_k))
Category: Correspondence

Question (EN): Suppose Jimin wanted to do the addition of a certain number and 34. But she made a mistake by subtracting a number from 20 and got 60. Find the value that Jimin actually wanted to get.
Question (KO): 지민이는 34에 어떤 수를 더하려고 합니다. 실수로 20에 어떤 수를 뺐을 때의 결과가 60이라면 바르게 계산한 결과를 구하세요.

Answer: -6

Solution (Python):
var_a = 34
var_b = 20
var_c = 60
var_d = var_b - var_c
var_e = var_a + var_d
print(int(var_e))
Category: Correspondence

Question (EN): If you add 2 to a number before subtracting 3, you get 7. What number is this?
Question (KO): 어떤 수에 3을 빼기 전에 2를 더해주었더니 7입니다. 어떤 수를 구하시오.

Answer: 8

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

Question (EN): 36 is the result adding 12 to a number divided by 7. Find the value of this number divided by 4.
Question (KO): 어떤 수를 7로 나누고 12를 더한 값이 36입니다. 어떤 수를 4로 나눈 값을 구하시오.

Answer: 42

Solution (Python):
var_a = 36
var_b = 12
var_c = var_a - var_b
var_d = 7
var_e = var_c * var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g))
Category: Correspondence

Question (EN): 29 is subtracted from and 64 added to this number. What number is required for the result of this to be 76?
Question (KO): 어떤 수에서 29를 뺐다가 64를 더했습니다. 결과가 76이 되기 위한 어떤 수는 얼마입니까?

Answer: 41

Solution (Python):
var_a = 76
var_b = 64
var_c = var_a - var_b
var_d = 29
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): When 27 is divided by a number, the quotient is 5 and the remainder is 7. Find the value that is divisible by the sum of the number and 5, and has a quotient of 7.
Question (KO): 27을 어떤 수로 나눈 몫이 5이고 나머지가 7이다. 어떤 수와 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: Arithmetic calculation

Question (EN): Heungbu and his family decided to fetch 10 liters (l) of water from the village well for farming. Heungbu scooped up the water three times with a 1 liter (L) and 500 milliliter (㎖) bowl, and Heungbu's wife scooped up the water once with a 1 liter (L) and 750 milliliters (㎖) bowl. When Heungbu's son decided to fetch all the remaining water, how many times did he have to visit the well if he had a bowl of 1 liter (L) and 250 milliliters (㎖)?
Question (KO): 흥부는 농사를 짓기 위해 가족들과 함께 마을 우물에서 물을 10리터(L) 길어오기로 했습니다. 흥부는 1리터(L) 500밀리리터(㎖)의 바가지로 3번 떠왔고 흥부의 아내는 1리터(L) 750밀리리터(㎖)의 바가지로 한 번 떠왔습니다. 남은 물은 흥부의 아들이 떠오기로 했을 때 아들이 가진 바가지가 1리터(L) 250밀리리터(㎖) 짜리라면 아들은 우물에 몇 번 다녀와야 합니까?

Answer: 3

Solution (Python):
var_a = 10
var_b = 1000
var_c = var_a * var_b
var_d = 1
var_e = 1000
var_f = var_d * var_e
var_g = 500
var_h = var_f + var_g
var_i = 3
var_j = var_h * var_i
var_k = var_c - var_j
var_l = 1
var_m = 1000
var_n = var_l * var_m
var_o = 750
var_p = var_n + var_o
var_q = var_k - var_p
var_r = 1
var_s = 1000
var_t = var_r * var_s
var_u = 250
var_v = var_t + var_u
var_w = var_q / var_v
print(int(var_w))
Category: Arithmetic calculation

Question (EN): The size of six box (C) equals the size of box (B), and the size of four box (B) equals the size of box (A). How many box (C) should you put in box (A) to make it full?
Question (KO): (다) 상자 6개의 크기는 (나) 상자 크기와 같고, (나) 상자 4개의 크기는 (가) 상자 크기와 같습니다. (가) 상자는 (다) 상자를 몇 개 넣으면 꽉 찹니까?

Answer: 24

Solution (Python):
var_a = 4
var_b = 6
var_c = var_a * var_b
var_d = 1
var_e = var_c * var_d
print(int(var_e))
Category: Comparison

Question (EN): To fill the bathtub with water, you need to pour 7 times using the red bucket, 8 times of the blue bucket, and 5 times of the green bucket. Which color of the bucket will contain the most water when each of them is filled up with water?
Question (KO): 욕조에 물을 가득 채우기 위해서는 빨간색 물통으로는 7번, 파란색 물통으로는 8번, 초록색 물통으로는 5번 물을 부어야 합니다. 각 병에 물을 채웠을 때 가장 많은 양이 담기는 병의 색깔은 무엇입니까?

Answer: green

Solution (Python):
var_a = 'red'
var_b = 'blue'
var_c = 'green'
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
var_e = 7
var_f = var_d / var_e
var_g = 1
var_h = 8
var_i = var_g / var_h
var_j = 1
var_k = 5
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_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
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: Comparison

Question (EN): During PE class, students lined up in a single line in order of height from the tallest. Jungkook is the 7th and Minyoung is the 5th. Taehyung is taller than Minyoung but shorter than Jungkook. What number is Taehyung?
Question (KO): 체육시간에 학생들이 키가 큰 순서대로 한 줄로 나란히 섰습니다. 정국이는 7번째이고 민영이는 5번째입니다. 태형이는 민영이보다 키가 크지만 정국이보다는 작습니다. 태형이는 몇번째입니까?

Answer: 6

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

Question (EN): There are five numbers 10, 11, 12, 13, and 14. Divide the smallest number by the second smallest number.
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 가장 작은 수와 2번째로 작은 수로 나눈 값은 얼마입니까?

Answer: 0.91

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
var_e = 14
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=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g / var_i
print('{:.2f}'.format(round(var_j+1e-10,2)))
Category: Arithmetic calculation

Question (EN): If you want to put 2135 candies in a box with 100 candies each, how many boxes are needed at least?
Question (KO): 2135개의 사탕을 한 상자에 100개씩 담으려고 할 때, 상자는 최소 몇 개 필요합니까?

Answer: 22

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

print(int(var_e))
Category: Arithmetic calculation

Question (EN): How many trips are needed to transport 48 crates weighing 1 kg (kg) using 6 carts that can carry up to 4 kg (kg) at the same time?
Question (KO): 1킬로그램(㎏)짜리 상자 48개를 4킬로그램(㎏)까지 실을 수 있는 수레 6개를 동시에 사용해 나른다면 몇 번의 이동이 필요합니까?

Answer: 2

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

Question (EN): Five digit number A375B is a multiple of 24. Find the number of single digit numbers that fit in A.
Question (KO): 다섯 자리 수 A375B는 24의 배수입니다. A에 알맞은 숫자의 개수를 구하시오.

Answer: 3

Solution (Python):
var_a = 'A375B'
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 = 24
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 = 'A375B'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
    elem = str(elem)
    list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_e = len(list_c)
print(int(var_e))
Category: Comparison

Question (EN): Eunji got on the train in 10th place. 11 more people got on the train following Eunji, and then Yuna got on the train. When did Yuna get on the train? Answer in ordinal number.
Question (KO): 은지는 기차에 10번째로 탔고, 유나는 은지 다음으로 11명이 더 탄 뒤에 기차에 탔습니다. 유나는 몇 번째로 기차에 탔습니까?

Answer: 22

Solution (Python):
var_a = 10
var_b = 11
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))