philschmid/DMath huggingface dataset:
Category: Geometry

Question (EN): There is a pencil case in the shape of a square prism. Its height is 8 centimeters (cm) and the sum of the lengths of all edges is 104 centimeters (cm). If you are going to decorate all the sides of this pencil case with square stickers measuring 4 centimeters (cm) on each side, without any overlaps, how many stickers are needed?
Question (KO): 높이가 8센티미터(㎝)이고, 모든 모서리의 길이의 합이 104센티미터(㎝)인 사각기둥 모양의 연필꽂이가 있습니다. 이 연필꽂이의 모든 옆면에 한 변의 길이가 4센티미터(㎝)인 정사각형 모양의 스티커를 겹치지 않게 빈틈없이 붙여 꾸미려고 한다면, 스티커는 모두 몇 장이 필요합니까?

Answer: 18

Solution (Python):
var_a = 104
var_b = 8
var_c = 4
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 4
var_g = 2
var_h = var_f * var_g
var_i = var_e / var_h
var_j = 8
var_k = var_i * var_j
var_l = 4
var_m = var_k * var_l
var_n = 4
var_o = 2
var_p = var_n ** var_o
var_q = var_m / var_p
print(int(var_q))
Category: Geometry

Question (EN): If a rectangle has an area of 28 square centimeters (cm2) and a width of 4 centimeters (cm), how many centimeters (cm) is its length?
Question (KO): 어떤 직사각형의 넓이가 28제곱센티미터(㎠) 이고 가로가 4센티미터(㎝)이면 세로가 몇 센티미터(㎝)입니까?

Answer: 7

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

Question (EN): I mistakenly subtracted 32 from a certain number, when I needed to subtract 23, and I got 25. Find the result of the correct calculation.
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: Correspondence

Question (EN): You subtracted 4.3 when you should have added 4.3 to a number, resulting in 8.8. Find the correct value.
Question (KO): 어떤 수에 4.3을 더해야 할 것을 잘못하여 뺐더니 8.8이 되었습니다. 바르게 계산한 값을 구해 보시오.

Answer: 17.4

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

Question (EN): You want to share 7 apples with 2 monkeys. In this case, if the monkeys get at least one apple, how many ways can monkeys share the apple?
Question (KO): 2마리의 원숭이에게 사과 7개를 나누어 주려고 합니다. 이 때, 원숭이들은 적어도 사과 1개를 받는다고 할 때, 사과를 나누어 주는 방법은 모두 몇 가지입니까?

Answer: 6

Solution (Python):
var_a = 2
var_b = 7
var_c = var_a + var_b
var_d = 2
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 = 7
var_k = 2
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): The average score for the Korean language of 10 male students in Kyungho's class was 83.1 points, and the average Korean language score of 8 female students was 84 points. What is the average Korean language score for this class as a whole?
Question (KO): 경호네 반 남학생 10명의 평균 국어 성적은 83.1점, 여학생 8명의 평균 국어 성적은 84점입니다. 이 학급 전체의 국어 성적 평균은 몇 점입니까?

Answer: 83.5

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

Question (EN): Each pack of dolls contains 12 dolls. How many dolls are left if 11 students took 3 dolls each from 3 packs of dolls?
Question (KO): 인형 한 묶음에는 12개의 인형이 들어있습니다. 11명의 학생이 인형 3 묶음을 가져가서 3개씩 가져갔다고 할 때 남은 인형은 몇 개 입니까?

Answer: 3

Solution (Python):
var_a = 12
var_b = 3
var_c = var_a * var_b
var_d = 11
var_e = 3
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): I want to mark 58 dots at equal intervals on both sides of a 191.8 centimeters (cm) desk. If you place a dot at both the beginning and end of the desk, how many centimeters (cm) is the distance between the dots?
Question (KO): 191.8센티미터(㎝)의 책상 양끝에 같은 간격으로 58개의 점을 찍으려고 합니다. 책상의 처음과 끝에 모두 점을 찍는다면 점과 점 사이의 거리는 몇 센티미터(㎝)입니까?

Answer: 6.85

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

Question (EN): I made the largest square using a piece of wire that is 28 centimeters (cm) long. How many centimeters (cm) is one side of the square?
Question (KO): 길이가 28센티미터(㎝)인 철사를 사용하여 가장 큰 정사각형을 만들었습니다. 정사각형의 한 변은 몇 센티미터(㎝)입니까?

Answer: 7

Solution (Python):
var_a = 28
var_b = 4
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There is a myelin that reproduces twice as much as the first every month. At first, the sum of the weight of 100 myelin leaves in the bowl and bowl was 23.97 grams (g), and after 5 months, the sum of the weight of the bowl and the myelin leaves in the bowl was 155.1 grams (g). How many grams (g) are 10000 cloned myelin leaves?
Question (KO): 1달마다 처음의 2배로 복제되는 수초가 있습니다. 처음에 그릇과 그릇에 담긴 수초 100잎의 무게의 합은 23.97그램(g)이었고, 5달 후 그릇과 그릇에 담긴 수초의 무게의 합은 155.1그램(g)이었습니다. 복제된 수초 10000잎은 몇 그램(g)일까요?

Answer: 423

Solution (Python):
var_a = 155.1
var_b = 23.97
var_c = var_a - var_b
var_d = 100
var_e = 2
var_f = 5
var_g = var_e ** var_f
var_h = var_d * var_g
var_i = 100
var_j = var_h - var_i
var_k = var_c / var_j
var_l = 10000
var_m = var_k * var_l
print(int(var_m))
Category: Correspondence

Question (EN): 15 consecutive natural numbers lie between a certain natural number and 81. What is this natural number when it is less than 81?
Question (KO): 연속된 자연수 15개는 어떤 자연수와 81사이에 있다. 어떤 수가 81보다 작으면 어떤 수는 얼마인가?

Answer: 66

Solution (Python):
var_a = 81
var_b = 15
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): You want to multiply 20 by some number. However, you mistakenly added some number to 40, and the result was 52. What is the correct calculation result?
Question (KO): 20에 어떤 수를 곱하려고 합니다. 잘못하여 40에 어떤 수를 더했더니 결과는 52가 되었습니다. 바르게 계산한 결과는 얼마일까요?

Answer: 240

Solution (Python):
var_a = 20
var_b = 52
var_c = 40
var_d = var_b - var_c
var_e = var_a * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): The distance from the house to the bank is 800 meters (m), from the bank to the pharmacy is 1 kilometer (km) and 300 meters (m), and from the pharmacy to the school is 1700 meters (m). How many meters (m) is the distance from your house to the pharmacy through the bank greater than the distance from the pharmacy to the school?
Question (KO): 집에서 은행까지의 거리는 800미터(m)이고, 은행에서 약국까지의 거리는 1킬로미터(㎞) 300미터(m), 약국에서 학교까지의 거리는 1700미터(m)입니다. 집에서 은행을 거쳐 약국까지의 거리는 약국에서 학교까지의 거리보다 몇 미터(m) 더 멉니까?

Answer: 400

Solution (Python):
var_a = 800
var_b = 1
var_c = 1000
var_d = var_b * var_c
var_e = 300
var_f = var_d + var_e
var_g = var_a + var_f
var_h = 1700
var_i = var_g - var_h
print(int(var_i))
Category: Correspondence

Question (EN): There are two natural numbers A and B. If the quotient of A divided by B is 9 and the remainder is 13, what is the remainder when A is divided by 9?
Question (KO): 두 자연수 A, B가 있습니다. A를 B로 나누었을 때 몫이 9이고, 나머지가 13이었다면, A를 9로 나누었을 때의 나머지는 얼마입니까?

Answer: 4

Solution (Python):
var_a = 13
var_b = 9
var_c = var_a % var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There are a total 12 of 10-won, 50-won, and 100-won coins. I checked the total amount and it was 500 won. If the number of 10-won and 50-won coins is the same, how many 100-won coins are there?
Question (KO): 10원짜리, 50원짜리, 100원짜리 동전이 모두 12개 있습니다. 총 금액을 조사하였더니 500원이었습니다. 10원짜리와 50원짜리의 개수는 같다고 할 때, 100원짜리 동전의 개수는 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 12
var_b = 500
var_c = 100
var_d = 12
var_e = var_c * var_d
var_f = var_b - var_e
var_g = 10
var_h = 50
var_i = var_g + var_h
var_j = 100
var_k = 2
var_l = var_j * var_k
var_m = var_i - var_l
var_n = var_f / var_m
var_o = 2
var_p = var_n * var_o
var_q = var_a - var_p
print(int(var_q))
Category: Geometry

Question (EN): What is the circumference of a square with an area of 324 square meters (m2) in meters (m)?
Question (KO): 넓이가 324제곱미터(㎡)인 정사각형의 둘레는 몇 미터(m)인가요?

Answer: 72

Solution (Python):
var_a = 324
var_b = 0.5
var_c = var_a ** var_b
var_d = 4
var_e = var_c * var_d
print(int(var_e))
Category: Correspondence

Question (EN): We add 1.4 to a number before dividing it by 3. If you subtract 0.7 from this result and multiply it by 9, and get 5.4. What is the number?
Question (KO): 어떤 수를 3으로 나누기 전 1.4를 더해주었습니다. 이 결과에 0.7을 빼고 9를 곱했더니 5.4가 되었다면 어떤 수는 얼마입니까?

Answer: 2.5

Solution (Python):
var_a = 5.4
var_b = 9
var_c = var_a / var_b
var_d = 0.7
var_e = var_c + var_d
var_f = 3
var_g = var_e * var_f
var_h = 1.4
var_i = var_g - var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Arithmetic calculation

Question (EN): In the bathhouse, a bathtub that can be filled with water up to 10 liters (L) is filled with water for the guests. 3 guests used 1 liter (L) and 500 milliliters (㎖) of water from this bathtub, and 1 guest used 1 liter (L) and 750 milliliters (㎖) of water. If the remaining guests each use 1 liter (L) and 250 milliliters (㎖) of water, how many people can take shower?
Question (KO): 목욕탕에서 손님들을 위해 물을 10리터(L)까지 채울 수 있는 욕조에 물을 가득 받아두었습니다. 3명의 손님이 이 욕조에서 1리터(L) 500밀리리터(㎖)의 물을 덜어 사용하였고, 1명의 손님이 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): Given that a pencil case with 14 identical pencils weighs 11.14 kilograms (kg). When the empty pencil case weighs 0.5 kilograms (kg), how many kilograms (kg) does one pencil weigh?
Question (KO): 똑같은 연필 14 자루가 들어 있는 필통의 무게는 11.14킬로그램(㎏) 입니다. 빈 필통의 무게가 0.5킬로그램(㎏) 이라면 연필 한 자루의 무게는 몇 킬로그램(㎏)입니까?

Answer: 0.76

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

Question (EN): Minyoung, Yujeong, and Eunji each have marbles. Minyoung has 4 marbles, Yujeong has 2, and Minyoung has 1 less marble than Eunji. Who has the largest number of marbles?
Question (KO): 민영, 유정, 은지가 각자 구슬을 가지고 있습니다. 민영이는 4개, 유정이는 2개 가지고 있고, 민영이는 은지보다 구슬을 1개 더 적게 가지고 있습니다. 가장 많은 구슬을 가지고 있는 사람은 누구입니까?

Answer: Eunji

Solution (Python):
var_a = 'Minyoung'
var_b = 'Yujeong'
var_c = 'Eunji'
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 = 4
var_e = 2
var_f = 4
var_g = 1
var_h = var_f + var_g
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
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()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Arithmetic calculation

Question (EN): Taehyung is 17 years younger than Taehyung's uncle. Four years later, the sum of the ages of uncle and Taehyung is 43. How old is Taehyung this year?
Question (KO): 태형이의 삼촌은 태형이보다 17살 더 많습니다. 4년 후 삼촌과 태형이의 나이를 합하면 43이 됩니다. 올해 태형이는 몇 살입니까?

Answer: 9

Solution (Python):
var_a = 43
var_b = 4
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 17
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Comparison

Question (EN): There are numbers 0.1, 0.8, 1/2, and 0.9. Find the sum of all numbers less than or equal to 0.3.
Question (KO): 0.1, 0.8, 1/2, 0.9의 숫자가 있다. 이 중 0.3보다 작거나 같은 숫자들의 합을 구하시오.

Answer: 0.1

Solution (Python):
var_a = 0.1
var_b = 0.8
var_c = 0.5
var_d = 0.9
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 = 0.3
list_b = []
for i in list_a:
    if i <= var_e:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print('{:.2f}'.format(round(var_f+1e-10,2)))
Category: Possibility

Question (EN): There are 5 interviewers. How many possible situations are there if you choose 3 of them to pass?
Question (KO): 면접자 5명이 있다. 이 중 3명을 골라 합격시키려고 할 때, 가능한 상황은 몇 가지인가?

Answer: 10

Solution (Python):
var_a = 5
var_b = 3
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
    var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
    var_c = var_c / (i+1)
print(int(var_c))
Category: Correspondence

Question (EN): 193 is a result of a particular number plus 71. What will the result be when you subtract 108 from that particular number?
Question (KO): 193은 어떤 수와 71을 더한 값이다. 어떤 수에서 108을 빼면 얼마가 되는가?

Answer: 14

Solution (Python):
var_a = 193
var_b = 71
var_c = var_a - var_b
var_d = 108
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Find the largest 4-digit number that is a common multiple of 3 and 5.
Question (KO): 네 자리 수 중 3과 5의 공배수 중 가장 큰 수는?

Answer: 9990

Solution (Python):
var_a = 1000
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
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 = 1
list_d=list_c.copy()
list_d.sort()
var_g = list_d[-var_f]
print(int(var_g))
Category: Correspondence

Question (EN): A4+B82=216. What number is A, where A is one-digit number?
Question (KO): A4+B82=216입니다. A는 얼마인가요?

Answer: 3

Solution (Python):
var_a = 'A4+B82=216'
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: Possibility

Question (EN): There is a four-digit number that can be formed using four different numbers from the five numbers 5, 0, 1, 8, and 7. If this number is the 3rd smallest number, what is this number?
Question (KO): 다섯 개의 수 5, 0, 1, 8, 7 중에서 서로 다른 4개의 수를 사용하여 만들 수 있는 네 자리 수가 있습니다. 이 수가 3번째로 작은 수라면, 이 수는 무엇입니까?

Answer: 1075

Solution (Python):
var_a = 5
var_b = 0
var_c = 1
var_d = 8
var_e = 7
list_a= []
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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_g = 3
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
print(int(var_h))
Category: Possibility

Question (EN): Find the number of ways to put three people A, B, and C in a line.
Question (KO): A, B, C 세 사람을 한 줄로 세우는 경우의 수를 구하시오.

Answer: 6

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
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 = len(list_a)
var_e = len(list_a)
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
    var_f = var_f * (var_d-i)
print(int(var_f))
Category: Geometry

Question (EN): The circumference of a square CD case is 60 centimeters (cm). Find the length of one side of the CD case.
Question (KO): 정사각형 모양의 시디 케이스의 둘레는 60센티미터(㎝)입니다. 시디 케이스의 한 변의 길이를 구하시오.

Answer: 15

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

Question (EN): Jungkook has 2 boxes with 3 balls in each. How many balls does Jungkook have?
Question (KO): 공이 3개 들어 있는 상자 2개를 정국이는 가지고 있습니다. 정국이가 가지고 있는 전체 공의 개수는?

Answer: 6

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

Question (EN): There are 3 cups of juice and 4 cups of milk on the table. How many cups are on the table in total?
Question (KO): 식탁에 주스가 3컵, 우유가 4컵 있습니다. 식탁에 있는 컵은 총 몇 컵인가요?

Answer: 7

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

Question (EN): How many two-digit numbers can be formed by choosing two different numbers from 4, 5, 6, 7, or 8?
Question (KO): 서로 다른 숫자 2개를 4, 5, 6, 7, 8 중에서 뽑아 만들 수 있는 두 자리 수는 총 몇 개인지 구하시오.

Answer: 20

Solution (Python):
var_a = 4
var_b = 5
var_c = 6
var_d = 7
var_e = 8
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 = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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_g = len(list_b)
print(int(var_g))
Category: Correspondence

Question (EN): Hyeji has a ribbon of 6 meters (m) and 30 centimeters (cm). Of these, 3 meters (m) and 7 centimeters (cm) were used in art class, and 84 centimeters (cm) were given to a friend. Find the length of the remaining ribbon in meters (m).
Question (KO): 혜지는 리본이 6미터(m) 30센티미터(㎝)만큼 있다. 이 중 3미터(m) 7센티미터(㎝)는 미술시간에 사용하였고, 84센티미터(㎝) 만큼은 친구에게 주었다. 남은 리본의 길이는 몇 미터(m)인지 구하시오.

Answer: 239

Solution (Python):
var_a = 6
var_b = 100
var_c = var_a * var_b
var_d = 30
var_e = var_c + var_d
var_f = 84
var_g = var_e - var_f
var_h = 3
var_i = 100
var_j = var_h * var_i
var_k = 7
var_l = var_j + var_k
var_m = var_g - var_l
print(int(var_m))
Category: Possibility

Question (EN): There are 4 types of fruit on sale. If you could only choose 3 to buy, how many combinations could there be?
Question (KO): 판매하고 있는 과일이 4종류 입니다. 3가지만 골라서 산다면, 조합할 수 있는 경우는 모두 몇 가지입니까?

Answer: 4

Solution (Python):
var_a = 4
var_b = 3
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
    var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
    var_c = var_c / (i+1)
print(int(var_c))
Category: Possibility

Question (EN): There are five number cards 1, 3, 5, 7, and 9. What is the average of the 3-digit natural numbers that can be made using this card that are greater than 500? (However, the card can be used repeatedly.)
Question (KO): 1, 3, 5, 7, 9 다섯 장의 숫자카드가 있다. 이 카드를 사용하여 만들 수 있는 3자리 자연수 중 500초과인 수의 평균은 얼마인지 구하시오. (단, 카드는 중복사용 가능하다.)

Answer: 755

Solution (Python):
var_a = 1
var_b = 3
var_c = 5
var_d = 7
var_e = 9
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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_f))
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_g = 500
list_c = []
for i in list_b:
    if i > var_g:
        list_c.append(i)
list_c = [float(i) for i in list_c]
var_h = sum(list_c)/len(list_c)
print(int(var_h))
Category: Comparison

Question (EN): Dongkyun is taller than Jungkook, and Dongwook is taller than Jungkook. Comparing the heights of Dongwook and Dongkyun, if Dongwook is shorter, who is the tallest?
Question (KO): 동균은 정국보다 키가 크고, 동욱은 정국보다 키가 크다. 동국과 동균의 키를 비교했을 때, 동국이 키가 작다면 누구의 키가 가장 큽니까?

Answer: Dongkyun

Solution (Python):
var_a = 'Dongkyun'
var_b = 'Jungkook'
var_c = 'Dongwook'
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 = 'Jungkook'
var_f = '>'
var_g = 'Dongwook'
var_h = 'Jungkook'
var_i = '>'
var_j = 'Dongwook'
var_k = 'Dongkyun'
var_l = '<'
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
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)
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_m = 1
var_n = list_c[var_m-1]
print(var_n)