philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): Find the number of ways to put C and D next to each other when 6 people A, B, C, D, E and F are lined up in a line.
Question (KO): A, B, C, D, E, F 6명을 한 줄로 세울 때, C, D를 서로 이웃하게 하여 세우는 경우의 수를 구하시오.

Answer: 240

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
var_e = 'E'
var_f = 'F'
list_a= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_g = 'A'
list_b= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_h = len(list_c)
var_i = len(list_c)
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
    var_j = var_j * (var_h-i)
var_k = 'C'
var_l = 'D'
list_d= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_d.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_d.append(var_k)
list_d.reverse()
var_m = len(list_d)
var_n = len(list_d)
var_o = 1
var_m = int(var_m)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
    var_o = var_o * (var_m-i)
var_p = var_j * var_o
print(int(var_p))
Category: Geometry

Question (EN): Find the difference between the number of diagonals in the octagon and the number of diagonals in the heptagon.
Question (KO): 팔각형에서 그을 수 있는 모든 대각선의 개수와 칠각형에서 그을 수 있는 모든 대각선의 개수의 차를 구하시오.

Answer: 6

Solution (Python):
var_a = 8
var_b = 8
var_c = 3
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
var_h = 7
var_i = 7
var_j = 3
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(int(var_o))
Category: Geometry

Question (EN): The shape of the blackboard in Seongho's classroom is a rectangle with a width of 5.4 meters (m) and a height of 2.5 meters (m). What is the area of this blackboard in square meters (m2)?
Question (KO): 성호네 교실의 칠판은 가로가 5.4미터(m), 세로가 2.5미터(m)인 직사각형 모양입니다. 이 칠판의 넓이는 몇 제곱미터(㎡)입니까?

Answer: 13.5

Solution (Python):
var_a = 5.4
var_b = 2.5
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Correspondence

Question (EN): When A5+2B=68, what number should go into B?
Question (KO): A5+2B=68이 성립할 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 3

Solution (Python):
var_a = 'A5+2B=68'
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: Correspondence

Question (EN): The product of 3.6 and a number is 10.08. Find the value multiplied by 15.
Question (KO): 3.6과 어떤 수의 곱은 10.08입니다. 어떤 수에 15를 곱한값을 구하시오.

Answer: 42

Solution (Python):
var_a = 10.08
var_b = 3.6
var_c = var_a / var_b
var_d = 15
var_e = var_c * var_d
print(int(var_e))
Category: Comparison

Question (EN): Yoojung and Eunji live in the same apartment. Yoojung lives on the 17th floor and Eunji lives on the 25th floor. Who lives on the higher floor?
Question (KO): 유정이와 은지는 같은 아파트에 삽니다. 유정이는 17층에 살고 은지는 25층에 삽니다. 누가 더 높은 층에 삽니까?

Answer: Eunji

Solution (Python):
var_a = 'Yoojung'
var_b = 'Eunji'
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 = 17
var_d = 25
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: Comparison

Question (EN): I planted cabbage on 2/7 of the field, and eggplant on 3/8. Which part is wider, cabbage or eggplant?
Question (KO): 밭의 2/7에는 배추, 3/8에는 가지를 심었습니다. 배추와 가지 중 어느 부분이 더 넓습니까?

Answer: eggplant

Solution (Python):
var_a = 'cabbage'
var_b = 'eggplant'
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 = 2
var_d = 7
var_e = var_c / var_d
var_f = 3
var_g = 8
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)
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): A basket containing 12 apples of the same weight weighed 11.48 kilograms (kg). I took four appes out of the basket and ate them, and the basket weighed 8.12 kilograms (kg) this time. Find the weight in kilograms (kg) of the empty basket.
Question (KO): 무게가 똑같은 사과가 12개 들어있는 바구니의 무게를 재어 보니 11.48킬로그램(㎏)이었습니다. 바구니에서 사과를 4개 꺼내어 먹은 후 다시 무게를 재었더니 8.12킬로그램(㎏)이 되었습니다. 빈 바구니의 무게는 몇 킬로그램(㎏)인지 구하시오.

Answer: 1.4

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

Question (EN): You want to plant trees at intervals of 6 meters (m) from start to finish on one side of a road that is 156 meters (m) long. Find how many trees you need in all.
Question (KO): 길이가 156미터(m)인 도로의 한쪽에 처음부터 끝까지 6미터(m) 간격으로 나무를 심으려고 합니다. 필요한 나무는 모두 몇 그루인지 구해 보시오.

Answer: 27

Solution (Python):
var_a = 156
var_b = 6
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): There are two different numbers A and B. Find the value of A-B from the two-digit addition formula 2A+B2=89.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 두 자리 수끼리의 덧셈식 2A+B2=89에서 A-B의 값을 구하시오.

Answer: 1

Solution (Python):
var_a = '2A+B2=89'
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]
var_d = '2A+B2=89'
var_e = 'B'
ans_dict = dict()
var_d = var_d.replace('×','*')
var_d = var_d.replace('x','*')
var_d = var_d.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_d):
    if v in variable_candi:
        ans_dict[v] = 1
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]))
    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_d):
        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_f = ans_dict[var_e]
var_g = var_c - var_f
print(int(var_g))
Category: Geometry

Question (EN): A diamond made of colored paper is 16 centimeters (cm) long with an area of 80 square cm (cm2). What is the length of the other diagonal of the rhombus created by Junseo in centimeters (cm)?
Question (KO): 준서는 색도화지로 만든 마름는 한 대각선의 길이가 16 센티미터(㎝)이며, 넓이가 80제곱센티미터(㎠)입니다. 준서가 만든 마름모의 다른 대각선의 길이는 몇 센티미터(㎝)일까요?

Answer: 10

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

Question (EN): How many numbers between 10 and 40 has 1, 3, 8, and 7 in them?
Question (KO): 10이상 40이하의 수 중 1, 3, 8, 7로 이루어진 수는 몇 개인지 구하시오.

Answer: 6

Solution (Python):
var_a = 1
var_b = 3
var_c = 7
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 = 40
list_c = []
for i in list_b:
    if i <= var_f:
        list_c.append(i)
var_g = len(list_c)
print(int(var_g))
Category: Comparison

Question (EN): How many two-digit natural numbers have the unit digit equal to 7 and are less than 50?
Question (KO): 두자리 자연수들 중 일의 자리수가 7이고 50보다 작은 값들은 모두 몇 개 인지 구하시오.

Answer: 4

Solution (Python):
var_a = 10
var_b = 99
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 1
var_e = 7
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
for i in list_a:
    i = int(i)
    if (i//var_d)%10 == var_e:
        list_b.append(i)
var_f = 50
list_c = []
for i in list_b:
    if i < var_f:
        list_c.append(i)
var_g = len(list_c)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): When you tried to divide 328 marbles equally among 15 students, a few marbles were in short. Find at least how many more marbles are needed to distribute all the marbles equally.
Question (KO): 구슬 328개를 15명의 학생에게 똑같이 나누어 주려고 하였더니 몇 개가 모자랐습니다. 구슬을 남김없이 똑같이 나누어 주려면 구슬은 적어도 몇 개 더 필요한지 구해 보시오.

Answer: 2

Solution (Python):
var_a = 15
var_b = 328
var_c = 15
var_d = var_b % var_c
var_e = var_a - var_d
print(int(var_e))
Category: Correspondence

Question (EN): You want to divide 68 toys equally, 5 each among 14 people. How many more toys do you need to keep them from running out?
Question (KO): 장난감 68개를 14명에게 5개씩 똑같이 나누어 주려고 합니다. 장난감이 모자라지 않도록 하려면 장난감은 몇 개가 더 필요합니까?

Answer: 2

Solution (Python):
var_a = 14
var_b = 5
var_c = var_a * var_b
var_d = 68
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): What is the difference between the second largest and the third smallest four-digit numbers that can be formed by using one time of all even numbers less than 10?
Question (KO): 10미만의 짝수들을 모두 한 번씩 이용하여 만들 수 있는 네 자리 수 중 두 번째로 큰 것과 세 번째로 작은 것의 차는?

Answer: 6576

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 = 2
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 3
list_d=list_b.copy()
list_d.sort()
var_i = list_d[var_h-1]
var_j = var_g - var_i
print(int(var_j))
Category: Correspondence

Question (EN): Jeonghoon's monthly evaluation paper is torn, so he can't find out his math score. The scores for other subjects are 82 points for ethics, 90 points for Korean language, 88 points for science, and 84 points for social studies. What is his math score when the average score is 88?
Question (KO): 정훈이의 월말평가 시험지가 찢어져 수학 점수를 알 수가 없다. 다른 과목들의 성적은 도덕 82점, 국어 90점, 과학 88점, 사회 84점이다. 평균점수는 88점일때 수학 성적은 몇 점입니까?

Answer: 96

Solution (Python):
var_a = 88
var_b = 5
var_c = var_a * var_b
var_d = 82
var_e = var_c - var_d
var_f = 90
var_g = var_e - var_f
var_h = 88
var_i = var_g - var_h
var_j = 84
var_k = var_i - var_j
print(int(var_k))
Category: Comparison

Question (EN): Car A travels at a constant speed of 2.1 kilometers (km) in 1 minute, and car B travels at 10.5 kilometers (km) in 4 minutes. Find out which car to take to get to your destination faster.
Question (KO): 일정한 빠르기로 1분에 2.1킬로미터(㎞)를 달리는 자동차 A와 4분에 10.5킬로미터(㎞)를 달리는 자동차 B가 있습니다. 목적지까지 빨리 도착하기 위해선 어느 자동차를 타야 하는지 구하시오.

Answer: B

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 = 2.1
var_d = 1
var_e = var_c / var_d
var_f = 10.5
var_g = 4
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)
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: Geometry

Question (EN): The area of the rectangle (a) is equal to the area of the square (b). If the lengths of the two sides of the rectangle (a) are 9 centimeters (cm) and 16 centimeters (cm) respectively, how many centimeters (cm) is the length of one side of the square (b)?
Question (KO): 직사각형 가와 정사각형 나의 넓이는 같습니다. 직사각형의 두 변의 길이가 각각 9센티미터(㎝), 16센티미터(㎝)일 때, 정사각형 나의 한 변의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 12

Solution (Python):
var_a = 9
var_b = 16
var_c = var_a * var_b
var_d = 0.5
var_e = var_c ** var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Jungkook and Seokjin each had 28 books. If Jungkook bought 18 more books and Seokjin bought 11 more books, how many more books does Jungkook have than Seokjin?
Question (KO): 정국이와 석진이는 책을 각각 28권씩 가지고 있었습니다. 정국이는 책을 18권 더 사고 석진이는 책을 11권 더 샀다면, 정국이가 가진 책은 석진이보다 몇 권 더 많습니까?

Answer: 7

Solution (Python):
var_a = 28
var_b = 18
var_c = var_a + var_b
var_d = 28
var_e = 11
var_f = var_d + var_e
var_g = var_c - var_f
print(int(var_g))
Category: Comparison

Question (EN): 21 is the smallest number that is divisible by any two numbers. Find the sum of the numbers between the 8th largest and 12th largest common multiples of the two numbers.
Question (KO): 어떤 두 수로 모두 나누어 떨어지는 수 중에서 21이 가장 작습니다. 두 수의 공배수 중 8번째로 큰 수와 12번째로 큰 수 사이에 있는 수들의 합을 구하시오.

Answer: 630

Solution (Python):
var_a = 21
var_b = 8
var_c = 1
var_d = var_b + var_c
var_e = var_a * var_d
var_f = 21
var_g = 12
var_h = -1
var_i = var_g + var_h
var_j = var_f * var_i
var_k = 21
list_a = [i for i in range(var_e, var_j + 1, var_k)]
list_a = [float(i) for i in list_a]
var_l = sum(list_a)
print(int(var_l))
Category: Arithmetic calculation

Question (EN): Five numbers 10, 11, 12, 13, and 14 are given. What is the remainder if the second largest number is divided by the smallest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 2번째로 큰 수와 가장 작은 수로 나눈 나머지는 얼마입니까?

Answer: 3

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]
var_h = 1
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g % var_i
print(int(var_j))
Category: Comparison

Question (EN): The height of the seven students in Doyeon's class is 161.5 centimeters (cm), 154.3 centimeters (cm), 143.7 centimeters (cm), 160.1 centimeters (cm), 158.0 centimeters (cm), 153.5 centimeters (cm), 147.8 centimeters (cm). Find the height of the tallest student among the students who are taller than the average.
Question (KO): 도연이네 반 학생 7명의 키가 161.5센티미터(㎝), 154.3센티미터(㎝), 143.7센티미터(㎝), 160.1센티미터(㎝), 158.0센티미터(㎝), 153.5센티미터(㎝), 147.8센티미터(㎝)일 때, 이 중에서 평균보다 큰 학생 중 가장 작은 학생의 키를 구하시오.

Answer: 154.3

Solution (Python):
var_a = 161.5
var_b = 154.3
var_c = 143.7
var_d = 160.1
var_e = 158
var_f = 153.5
var_g = 147.8
list_a= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_a.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
list_a = [float(i) for i in list_a]
var_h = sum(list_a)/len(list_a)
list_b = []
for i in list_a:
    if i > var_h:
        list_b.append(i)
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[var_i-1]
print('{:.2f}'.format(round(var_j+1e-10,2)))
Category: Possibility

Question (EN): There are 3 ways to walk from Seojin's house to the soccer field, and 4 ways to drive. Find the number of ways to get from your house to the soccer field.
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 three-digit natural numbers can be formed by drawing three out of five different number cards? Each number card has the numbers 2, 4, 6, 7, and 9 written on it.
Question (KO): 서로 다른 다섯 장의 숫자 카드 중 3장을 뽑아 만들 수 있는 세 자리 자연수의 개수는 얼마입니까? 각 숫자 카드에는 2, 4, 6, 7, 9 가 적혀 있습니다.

Answer: 60

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

Question (EN): There are some squares and rectangles. Consider a square has a side of 8 centimeters (cm), and a rectangle has a side of 10 centimeters (cm) and 5 centimeters (cm). What is the difference between the area of this square and the rectangle in square centimeters (cm2)?
Question (KO): 어떤 정사각형과 직사각형이 있습니다. 정사각형의 한 변의 길이는 8센티미터(㎝)이고, 직사각형은 한 변의 길이가 10센티미터(㎝), 나머지 한 변의 길이가 5센티미터(㎝)입니다. 이 정사각형과 직사각형의 넓이의 차는 몇 제곱센티미터(㎠)입니까?

Answer: 14

Solution (Python):
var_a = 8
var_b = 2
var_c = var_a ** var_b
var_d = 10
var_e = 5
var_f = var_d * var_e
var_g = var_c - var_f
var_h = abs(var_g)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): In a bicycle course with a total length of 10.5 kilometers (km), if Yoongi goes 1.5 kilometers (km) and then goes another 3730 meters (m), how many meters (m) of the course remains?
Question (KO): 총 길이가 10.5킬로미터(㎞)인 자전거 코스에서 윤기가 1.5킬로미터(㎞)를 간 후, 3730미터(m)를 또 간다면 남은 코스의 길이는 몇 미터(m)입니까?

Answer: 5270

Solution (Python):
var_a = 10.5
var_b = 1000
var_c = var_a * var_b
var_d = 1.5
var_e = 1000
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 3730
var_i = var_g - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): How many natural numbers less than or equal to 30 are multiples of 5 or even?
Question (KO): 30이하의 자연수 중에서 5의 배수이거나 짝수인 수는 모두 몇 개인지 구하시오.

Answer: 18

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

Question (EN): You were able to draw four adjacent circles within a square with a circumference of 56 centimeters (cm). Of the squares that can be drawn in the same way, 441 circles of the same size as this circle, what is the circumference in centimeters (cm) of the smallest square?
Question (KO): 둘레가 56센티미터(㎝)인 정사각형 안에 원 4개를 맞닿게 그릴 수 있었습니다. 이와 같은 방법으로 이 원과 크기가 같은 원 441개를 그릴 수 있는 정사각형 중 가장 작은 정사각형의 둘레는 몇 센티미터(㎝)입니까?

Answer: 588

Solution (Python):
var_a = 56
var_b = 4
var_c = var_a / var_b
var_d = 4
var_e = 0.5
var_f = var_d ** var_e
var_g = var_c / var_f
var_h = 441
var_i = 0.5
var_j = var_h ** var_i
var_k = var_g * var_j
var_l = 4
var_m = var_k * var_l
print(int(var_m))