philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): I need to subtract 23 from a certain number, but I mistakenly took 32 away, so I got 25. Find the correctly calculated value.
Question (KO): 어떤 수에서 23을 빼야 하는데 잘못하여 32를 뺐더니 25가 되었습니다. 바르게 계산한 결과를 구하시오.

Answer: 34

Solution (Python):
var_a = 25
var_b = 32
var_c = var_a + var_b
var_d = 23
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): Find the perimeter in centimeters (cm) of a parallelogram with one side measuring 18 centimeters (cm) and the other side measuring 12 centimeters (cm).
Question (KO): 한 변의 길이가 18센티미터(㎝) 이고, 다른 한 변의 길이가 12센티미터(㎝) 인 평행사변형의 둘레는 몇 센티미터(㎝) 인지 구하시오.

Answer: 60

Solution (Python):
var_a = 18
var_b = 12
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): You have a piece of wire that is 2 meters (m) 80 centimeters (cm) long. If you cut all the 40 centimeters (cm) lengths of this wire, how many cuts will you have to make?
Question (KO): 길이가 2미터(m) 80센티미터(㎝)인 철사가 있습니다. 이 철사를 40센티미터(㎝) 길이로 모두 자른다면, 모두 몇 번 잘라야 합니까?

Answer: 6

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

Question (EN): Minha's hair grows at a rate of 0.39 millimeters (mm) per day. If Minha's hair was 32.8 centimeters (cm) today, find how many centimeters (cm) it will be in 30 days.
Question (KO): 민하의 머리카락은 하루에 0.39밀리미터(㎜)씩 자랍니다. 민하의 머리카락이 오늘 32.8센티미터(㎝)였다면 30일 후에는 몇 센티미터(㎝)가 되어있을지 구하시오.

Answer: 33.97

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

Question (EN): How many faces does a cube-shaped gift box have?
Question (KO): 정육면체의 모양의 선물 상자의 면의 개수는?

Answer: 6

Solution (Python):
var_a = 6
print(int(var_a))
Category: Arithmetic calculation

Question (EN): If you leave money with your mother, you get 300 won every day, and if you leave money with your father, you get 500 won every day. Kyu-won gave 8,000 won to her mother, and Seok-gi left 5,000 won to her father. If you want Kyu-won and Seok-gi to have the same amount of money when they each get their money back, how many days are needned?
Question (KO): 엄마에게 돈을 맡기면 매일 300원씩 주고, 아빠에게 돈을 맡기면 매일 500원씩 준다. 규원이는 엄마에게 8000원을 , 석기는 아빠에게 5000원을 맡겼다. 각자가 돈을 다시 돌려받을 때 규원이와 석기의 돈이 같으려면 며칠을 맡겨야 하는가?

Answer: 15

Solution (Python):
var_a = 8000
var_b = 5000
var_c = var_a - var_b
var_d = 500
var_e = 300
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There are 445 yellow fish and 38 more blue fish than yellow fish. How many yellow and blue fish are there?
Question (KO): 노란색 물고기가 445마리 있고, 파란색 물고기는 노란색 물고기보다 38마리 더 많습니다. 노란색 물고기와 파란색 물고기는 모두 몇 마리입니까?

Answer: 928

Solution (Python):
var_a = 445
var_b = 445
var_c = 38
var_d = var_b + var_c
var_e = var_a + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): You would like to distribute 3 liters (L) of cooking oil to three people: A, B, and C. If you gives A 200 milliliters (㎖) more than B, and B 200 milliliters (㎖) more than C, how many milliliters (㎖) of cooking oil should be given to B?
Question (KO): 식용유 3리터(L)를 갑, 을, 병 세 사람에게 나누어 주려고 합니다. 갑은 을보다 200밀리리터(㎖) 많게, 을은 병보다 200밀리리터(㎖) 많게 나누어 준다면, 을에게 몇 밀리리터(㎖)의 식용유를 나누어 주어야 합니까?

Answer: 1000

Solution (Python):
var_a = 3
var_b = 1000
var_c = var_a * var_b
var_d = 200
var_e = var_c + var_d
var_f = 200
var_g = var_e - var_f
var_h = 3
var_i = var_g / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Find the sum of even numbers from 1 to 200.
Question (KO): 1부터 200까지의 짝수의 합을 구하시오.

Answer: 10100

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

Question (EN): There is a rhombus with an area of 64/5 square centimeters (cm2). If one diagonal is 64/9 centimeters (cm), how long is the other diagonal in cm (cm)?
Question (KO): 넓이가 64/5제곱센티미터(㎠)인 마름모가 있습니다. 한 대각선이 64/9센티미터(㎝)일 때, 다른 대각선은 몇 센티미터(㎝)입니까?

Answer: 3.6

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

Question (EN): How many edges are there on a face of an icosahedron?
Question (KO): 정이십면체의 면에서 변은 몇 개 일까요?

Answer: 3

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

Question (EN): If the lengths of each diagonal of a rhombus are 14 centimeters (cm) and 24 centimeters (cm), what is the area of the rhombus?
Question (KO): 마름모의 각 대각선의 길이가 14센티미터(㎝), 24센티미터(㎝)라면, 마름모의 넓이는 얼마인가?

Answer: 168

Solution (Python):
var_a = 14
var_b = 24
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 is a three-digit number with 4 in the hundreds digit and 8 in the tens digit. The ones digit is called A, and any number from 0 to 9 can be used for A. What is the sum of the largest and smallest possible numbers?
Question (KO): 백의 자리 숫자가 4, 십의 자리 숫자가 8인 세 자리 수가 있다. 일의 자리 숫자를 A라고 하고, A에는 0에서 9까지의 숫자를 사용할 수 있다. 이 때 만들 수 있는 가장 큰 수와 작은 수의 합은 얼마인가?

Answer: 969

Solution (Python):
var_a = 4
var_b = 8
var_c = 'A'
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=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
ans_dict = dict()
var_d = str(var_d)
list_b = []
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] = 0
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]))
    if len(var_d) == len(str(int(temp))):
        new_elem = int(temp)
        list_b.append(new_elem)
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 1
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): If there is a pizza divided into 10 pieces, Minyoung and Yoojung plan to share it. If Minyoung eats 2 more pizzas than Yoojung, find how many slices of pizza Yoojung takes.
Question (KO): 10조각으로 나뉘어져 있는 피자를 민영이와 유정이가 나누어 먹으려고 합니다. 민영이가 유정이보다 2개 더 많이 먹는다면 유정이는 피자를 몇 조각 먹게 됩니까?

Answer: 4

Solution (Python):
var_a = 10
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): Find the number of faces of the regular octahedron.
Question (KO): 정팔면체의 면의 개수를 구하시오.

Answer: 8

Solution (Python):
var_a = 8
print(int(var_a))
Category: Arithmetic calculation

Question (EN): Minhyung's father walks 3.8 kilometers (km) an hour. How many kilometers (km) did Minhyeong's father walk for 2 hours and 45 minutes at a constant pace?
Question (KO): 민형이의 아버지는 한 시간에 3.8킬로미터(㎞) 를 걷습니다. 민형이의 아버지께서 일정한 빠르기로 2 시간 45 분 동안 걸은 거리는 몇 킬로미터(㎞)입니까?

Answer: 10.45

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

Question (EN): A is not a zero, and A and B are single digits. Given that AB40C is a multiple of 45, find the number of all possible numbers.
Question (KO): A는 0이 아니고, A와 B는 한 자리 수입니다. AB40C가 45의 배수라고 할 때, 가능한 모든 숫자의 개수를 구하시오.

Answer: 20

Solution (Python):
var_a = 'AB40C'
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 = 45
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 = len(list_b)
print(int(var_c))
Category: Geometry

Question (EN): There are 6 boxes containing 3 red balls, 2 blue balls and 5 yellow balls. What is the total number of yellow balls?
Question (KO): 빨간 공 3개, 파란 공 2개, 노란 공 5개가 담겨져 있는 상자가 6개 있습니다. 노란 공의 전체 개수는 몇 개 입니까?

Answer: 30

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

Question (EN): If the six-digit number A15B94 is a multiple of 99, find A.
Question (KO): 여섯 자리 수 A15B94가 99의 배수일 때, A를 구하시오

Answer: 5

Solution (Python):
var_a = 'A15B94'
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 = 99
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 = 'A15B94'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
var_e = 0
for elem in list_b:
    elem = str(elem)
    var_e = int(elem[unk_idx])
print(int(var_e))
Category: Arithmetic calculation

Question (EN): One mobile is made with 4 meters (m) of wire. How many mobiles of the same size can be made with 105.8 meters (m) of wire?
Question (KO): 철사 4미터(m)로 모빌을 1개 만들 수 있습니다. 철사 105.8미터(m)로 같은 크기의 모빌을 몇 개 만들 수 있는지 구하시오.

Answer: 26

Solution (Python):
var_a = 105.8
var_b = 4
var_c = var_a // var_b
print(int(var_c))
Category: Correspondence

Question (EN): When you add 17 to a number and divide it by 5, you get 25. Find the value of the number divided by 6.
Question (KO): 어떤 수에 17을 더한 수를 5로 나누었더니 25가 되었습니다. 어떤 수를 6으로 나눈 값을 구하시오.

Answer: 18

Solution (Python):
var_a = 25
var_b = 5
var_c = var_a * var_b
var_d = 17
var_e = var_c - var_d
var_f = 6
var_g = var_e / var_f
print(int(var_g))
Category: Correspondence

Question (EN): 159 is a number you can get when you subtract 45 from a number multiplied by 3. Find the value of adding 32 to this number and multiplying it by 12. 
Question (KO): 어떤 수에 3을 곱하여 45를 뺀 수가 159입니다. 어떤 수에 32를 더하고 12를 곱한 값을 구하시오.

Answer: 1200

Solution (Python):
var_a = 159
var_b = 45
var_c = var_a + var_b
var_d = 3
var_e = var_c / var_d
var_f = 32
var_g = var_e + var_f
var_h = 12
var_i = var_g * var_h
print(int(var_i))
Category: Geometry

Question (EN): 60 centimeters (cm) long wire was used to make a square with a side of 9 centimeters (cm). How many centimeters (cm) is the length of the remaining wire?
Question (KO): 길이가 60센티미터(㎝)인 철사를 사용하여 한 변이 9센티미터(㎝)인 정사각형을 만들었습니다. 남은 철사의 길이는 몇 센티미터(㎝)입니까?

Answer: 24

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

Question (EN): I am going to distribute 12 basketballs to 3 students, Jungkook, Jimin, and Hoseok. If each student receives at least one ball, how many different ways can the balls be distributed?
Question (KO): 정국, 지민, 호석 3명의 학생들에게 농구공 12개를 나누어 주려고 한다. 각 학생들은 모두 1개 이상의 공을 받는다면 공을 나누어 줄 수 있는 방법은 총 몇 가지인가?

Answer: 55

Solution (Python):
var_a = 3
var_b = 12
var_c = var_a + var_b
var_d = 3
var_e = 1
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 1
var_i = var_g - var_h
var_j = 12
var_k = 3
var_l = 1
var_m = var_k * var_l
var_n = var_j - var_m
var_o = 1
var_i = int(var_i)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
    var_o = var_o * (var_i-i)
for i, elem in enumerate(range(var_n)):
    var_o = var_o / (i+1)
print(int(var_o))
Category: Arithmetic calculation

Question (EN): There were 35 people on the bus. At this stop, 18 people got off and 15 got on. How many fewer people are on the bus now than at the beginning?
Question (KO): 버스 안에 사람이 35명 있었습니다. 이번 정류장에서 18명이 내리고 15명이 탔습니다. 지금 버스 안에 있는 사람은 처음보다 몇 명 줄었습니까?

Answer: 3

Solution (Python):
var_a = 35
var_b = 35
var_c = 18
var_d = var_b - var_c
var_e = 15
var_f = var_d + var_e
var_g = var_a - var_f
print(int(var_g))
Category: Geometry

Question (EN): You have a cookie in the shape of a circle with a radius of 3 centimeters (cm). You are going to place this cookie on a rectangular piece of paper measuring 30 centimeters (cm) wide by 24 centimeters (cm) long. If you want to stack as many cookies as possible without overlapping, how many can you stack?
Question (KO): 반지름이 3센티미터(㎝)인 원 모양의 쿠키가 있습니다. 이 쿠키를 가로 30센티미터(㎝), 세로 24센티미터(㎝) 크기를 갖는 직사각형 모양의 종이 위에 올려두려고 합니다. 쿠키를 겹치지 않게 최대한 많이 올려두려고 한다면, 몇 개까지 올려둘 수 있습니까?

Answer: 20

Solution (Python):
var_a = 30
var_b = 3
var_c = 2
var_d = var_b * var_c
var_e = var_a / var_d
var_f = 24
var_g = 3
var_h = 2
var_i = var_g * var_h
var_j = var_f / var_i
var_k = var_e * var_j
print(int(var_k))
Category: Geometry

Question (EN): The name tag of Hanuel's elementary school is in a square with one side measuring 11 centimeters (cm). What is the area of one name tag?
Question (KO): 하늘이네 초등학교의 이름표는 한 변의 길이가 11센티미터(㎝)인 정사각형 모양이라고 합니다. 이름표 하나의 넓이는 얼마입니까?

Answer: 121

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

Question (EN): If A45+27B=418 is true, what number should go in B?
Question (KO): A45+27B=418일 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 3

Solution (Python):
var_a = 'A45+27B=418'
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): Find the number greater than or equal to 1.1 among the five numbers 1.4, 9/10, 1.2, 0.5, 13/10, and find the number of those numbers.
Question (KO): 수 5개 1.4, 9/10, 1.2, 0.5, 13/10 중 1.1보다 크거나 같은 숫자를 구하고, 그 숫자들의 개수를 구하세요.

Answer: 3

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

Question (EN): It is said that the snail at the bottom of the well climbs 25 centimeters (cm) during the day and slides 3 centimeters (cm) at night. On day 64, find the depth of the well when the snail crawled 25 centimeters (cm) out of the well during the day.
Question (KO): 우물 바닥의 달팽이가 낮에 25센티미터(㎝)만큼 기어올라오고 밤에 3센티미터(㎝)만큼 미끄러진다고 한다. 64일째 낮에 달팽이가 25센티미터(cm)를 기어 우물 밖으로 나왔을 때, 우물의 깊이를 구하시오.

Answer: 1411

Solution (Python):
var_a = 25
var_b = 64
var_c = var_a * var_b
var_d = 3
var_e = 64
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_c - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): If you add 6 marbles in the drawer and the marbles on the desk, you have 8 marbles in all. How many marbles are on the desk?
Question (KO): 서랍 안에 있는 구슬 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): You are trying to find a three-digit number that is divisible by 3 and 4 and dividing by 5 gives a remainder of 4. How many three-digit numbers can you make?
Question (KO): 3과 4로 나누어떨어지고 5로 나누면 나머지가 4인 세 자리 수를 찾으려고 합니다. 만들 수 있는 세 자리 수는 모두 몇 개입니까?

Answer: 15

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 = 3
var_e = 4
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
list_b = []
var_f = int(var_f)
for i in list_a:
    i = int(i)
    if i % var_f == 0:
        list_b.append(i)
var_g = 5
var_h = 4
list_c = [] 
var_g = int(var_g)
var_h = int(var_h)
if var_h < 0:
    var_h = var_h + var_g
for i in list_b:
    i = int(i)
    if i%var_g == var_h:
        list_c.append(i)
var_i = len(list_c)
print(int(var_i))
Category: Geometry

Question (EN): Nine people are standing in a line, in order from shortest to tallest. Hoseok is the fourth shortest person. If they were to line up again in order from tallest to shortest, where would Hoseok be standing from the back?
Question (KO): 키가 작은 사람부터 순서대로 9명이 한 줄로 서 있습니다. 호석이는 4번째로 키가 작습니다. 키가 큰 사람부터 순서대로 다시 줄을 서면 호석이는 뒤에서부터 몇 번째에 서게 됩니까?

Answer: 4

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

Question (EN): Two were removed from a basket containing one each of apple, peach, pear, and melon. How many cases of fruit are left in the basket?
Question (KO): 사과, 복숭아, 배, 참외가 각각 하나씩 있는 바구니에서 2개를 뺐습니다. 바구니에 남아있는 과일의 경우의 수는 모두 몇 가지입니까?

Answer: 6

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)
for i, elem in enumerate(range(var_f)):
    var_g = var_g / (i+1)
print(int(var_g))
Category: Correspondence

Question (EN): When A is divided by 3, the quotient is 8 and the remainder is 2. A is a natural number. What is A?
Question (KO): A를 3으로 나눴을 때 몫이 8, 나머지가 2 였습니다. A는 자연수입니다. 이 때 A는 무엇인가요?

Answer: 26

Solution (Python):
var_a = 3
var_b = 8
var_c = var_a * var_b
var_d = 2
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): Cheolsu bought 230 milliliters (ml) of cooking oil, and Jimin bought 123 milliliters (ml). Who bought more cooking oil?
Question (KO): 철수는 식용유를 230밀리리터(㎖), 지민이는 123밀리리터(㎖) 구입했습니다. 누가 더 식용유를 많이 샀습니까?

Answer: Cheolsu

Solution (Python):
var_a = 'Cheolsu'
var_b = 'Jimin'
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 = 230
var_d = 123
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: Correspondence

Question (EN): When you divide a number by 9, you get a result of 8. What do you get from adding 11 to the number?
Question (KO): 어떤 수에서 9를 나누었더니 8의 결과값을 얻었습니다. 어떤 수에 11을 더하면?

Answer: 83

Solution (Python):
var_a = 8
var_b = 9
var_c = var_a * var_b
var_d = 11
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are 32 dogs in the zoo. Among them, males make up 5/8 of the total. Among males, Chihuahuas account for 3/4 of all males. Of the total dogs in the zoo, how many are non-Chihuahua males?
Question (KO): 동물원에 있는 개는 32마리 입니다. 그중에서 수컷은 전체의 5/8입니다. 수컷 중에서 치와와는 수컷 전체의 3/4입니다. 동물원에 있는 전체 개 중에서 치와와가 아닌 수컷은 몇 마리입니까?

Answer: 5

Solution (Python):
var_a = 32
var_b = 0.625
var_c = var_a * var_b
var_d = 1
var_e = 0.75
var_f = var_d - var_e
var_g = var_c * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Yuna went to the stationery store. She bought a notebook with half of the money she took, and she spent half of the remaining money on a pencil. If the remaining money is 800 won, how much money did Yuna take at the beginning?
Question (KO): 유나는 문구점에 갔습니다. 가지고 간 돈의 절반으로 공책을 사고, 연필을 사는데 나머지 돈의 절반을 썼습니다. 남은 돈이 800원이라면 처음에 유나가 가지고 간 돈은 얼마입니까?

Answer: 3200

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

Question (EN): How many four-digit numbers can be formed by using even numbers less than 10 once?
Question (KO): 10미만 짝수들을 한 번씩 이용하여 만들 수 있는 네 자리 수 중 3의 배수는 모두 몇 개인가?

Answer: 36

Solution (Python):
var_a = 0
var_b = 10
var_c = 1
var_d = var_b - var_c
list_a = []
if var_a%2!=0:
    for i in range(var_a+1, var_d+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_d+1, 2):
        list_a.append(i)
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 = []
var_f = int(var_f)
for i in list_b:
    i = int(i)
    if i % var_f == 0:
        list_c.append(i)
var_g = len(list_c)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): A ball dropped from 3.05 meters (m) bounces 0.7 of its height. Find how many meters (m) the ball moves until it hits the ground for the third time.
Question (KO): 3.05미터(m)에서 떨어진 공은 높이의 0.7만큼 튀어오릅니다. 이 공이 세번째로 땅에 닿을때까지 움직인 거리는 몇 미터(m)입니까?

Answer: 10.31

Solution (Python):
var_a = 3.05
var_b = 3.05
var_c = 0.7
var_d = var_b * var_c
var_e = 2
var_f = var_d * var_e
var_g = var_a + var_f
var_h = 3.05
var_i = 0.7
var_j = 2
var_k = var_i ** var_j
var_l = var_h * var_k
var_m = 2
var_n = var_l * var_m
var_o = var_g + var_n
print('{:.2f}'.format(round(var_o+1e-10,2)))
Category: Arithmetic calculation

Question (EN): There are five numbers 10, 11, 12, 13, and 14. Which number is the second largest?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중 2번째로 큰 수는 무엇입니까?

Answer: 13

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 = 2
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
print(int(var_g))