philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): You are given two different numbers, A and B. Find the sum of A and B in the two-digit addition equation 4A+B4=86.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 두 자리 수끼리의 덧셈식 4A+B4=86에서 A와 B의 합을 구하시오.

Answer: 6

Solution (Python):
var_a = '4A+B4=86'
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 = '4A+B4=86'
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: Comparison

Question (EN): While running, Yoongi was in 7th place and passed 4 others students. When 9 students are running in total , how many students are behind Yoongi?
Question (KO): 달리기를 하던 중 윤기가 7등으로 달리다가 4명을 앞질렀습니다. 9명의 학생이 달리기 시합을 하고 있을 때, 윤기 뒤에 학생의 수는 몇 명입니까?

Answer: 6

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

Question (EN): I'm going to give 7 scissors to Yoongi and Hoseok. Yoongi and Hoseok take at least one pair of scissors. How many ways are there to distribute scissors?
Question (KO): 가위 7개를 윤기와 호석이에게 나누어 주려고 합니다. 윤기와 호석이는 적어도 1개의 가위를 받습니다. 가위를 나누어주는 방법은 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 7
var_b = 2
var_c = 1
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 1
var_g = var_e + var_f
print(int(var_g))
Category: Geometry

Question (EN): The perimeter of one side of the cube is 24 centimeters (cm). What is the surface area of this cube in square centimeters?
Question (KO): 정육면체의 한 면의 둘레는 24센티미터(㎝)입니다. 이 정육면체의 겉넓이는 몇 제곱센티미터입니까?

Answer: 216

Solution (Python):
var_a = 24
var_b = 4
var_c = var_a / var_b
var_d = 24
var_e = 4
var_f = var_d / var_e
var_g = var_c * var_f
var_h = 6
var_i = var_g * var_h
print(int(var_i))
Category: Correspondence

Question (EN): Bitna Elementary School decided to hand out 11 pencils to all students. If Bitna Elementary School purchased 10395 pencils and distributed them to students, how many students would there be in Bitna Elementary School?
Question (KO): 빛나초등학교에서 모든 학생들에게 연필을 11자루씩 나눠 주기로했다. 빛나초등학교에서 모두 10395개의 연필을 구매해서 학생들에게 나누어주었다면 빛나초등학교의 학생들은 모두 몇 명인가?

Answer: 945

Solution (Python):
var_a = 10395
var_b = 11
var_c = var_a / var_b
print(int(var_c))
Category: Geometry

Question (EN): There is a rectangle with a length of 10 centimeters (cm) and a width of 8 centimeters (cm). We want to draw a square with the same perimeter as this rectangle. How many centimeters (cm) should be the length of one side of the square?
Question (KO): 가로가 10센티미터(㎝)이고 세로가 8센티미터(㎝)인 직사각형이 있습니다. 이 직사각형과 둘레가 같은 정사각형을 그리려고 합니다. 정사각형의 한 변의 길이는 몇 센티미터(㎝)로 해야 합니까?

Answer: 9

Solution (Python):
var_a = 10
var_b = 8
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Find the greatest divisor of 28.
Question (KO): 28의 약수 중 가장 큰 수는 무엇인지 구하세요

Answer: 28

Solution (Python):
var_a = 28
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
    if var_a % i == 0:
        list_a.append(i)
        list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = 1
list_b=list_a.copy()
list_b.sort()
var_c = list_b[-var_b]
print(int(var_c))
Category: Possibility

Question (EN): Find the number of ways to draw an odd number of two cards out of nine cards numbered 1 through 9.
Question (KO): 1부터 9까지의 숫자가 있는 9장의 카드 중에서 두 장의 카드의 합이 홀수가 되도록 뽑는 방법의 수를 구하십시오.

Answer: 40

Solution (Python):
var_a = 1
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
list_c=[]
for i in list_b:
    var_e = 0
    i = int(i)
    while i//10 > 0:
        var_e = var_e + i%10
        i = i//10
    var_e = var_e + i%10
    list_c.append(var_e)
var_f = 2
var_g = 1
list_d = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_c:
    i = int(i)
    if i%var_f == var_g:
        list_d.append(i)
var_h = len(list_d)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): Suhyeon's one step is 0.75 meters (m). If it takes Suhyeon 70 steps to go to the convenience store from home, find the total distance in meters (m) Suhyeon walked when she went to the convenience store 13 times.
Question (KO): 수현이의 한 걸음은 0.75미터(m)입니다. 수현이가 집에서 출발해 편의점을 다녀오는 데 70걸음이 걸린다면, 편의점을 13번 다녀왔을 때 수현이가 걸은 거리는 모두 몇 미터(m)인지 구하시오.

Answer: 682.5

Solution (Python):
var_a = 0.75
var_b = 70
var_c = var_a * var_b
var_d = 13
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Gyeong-hun climbed the mountain, walking at 3 kilometers per hour (km) when going up, and walking at 4 kilometers (km) per hour when going down, taking a 2 kilometers (km) longer route when going down, for a total of 4 hours. How long distance did Gyeong-hun climb?
Question (KO): 경훈이가 등산을 하는데 올라갈 때는 시속 3 킬로미터(㎞)로 걷고, 내려올 때는 올라갈 때보다 2 킬로미터(㎞) 더 먼 길을 택하여 시속 4 킬로미터(㎞)로 걸어서 총 4시간이 걸렸다고 한다. 경훈이가 올라간 거리는?

Answer: 6

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

Question (EN): Keun-bae decided to jump rope 15 times on the first day, twice the first day on the second day, and twice the second day on the third day. If Keun-bae jumps rope in the same pattern, how many times will he have to do on the fourth day?
Question (KO): 근배는 줄넘기를 첫째 날에는 15번을 하고, 둘째 날에는 첫째 날의 2배, 셋째 날에는 둘째 날의 2배를 하기로 했습니다. 근배가 같은 방법으로 줄넘기를 한다면 넷째 날에는 모두 몇 번 해야 하는지 구해보시오.

Answer: 120

Solution (Python):
var_a = 15
var_b = 2
var_c = 4
var_d = 1
var_e = var_c - var_d
var_f = var_b ** var_e
var_g = var_a * var_f
print(int(var_g))
Category: Correspondence

Question (EN): Subtracting 29 from a number gives you 63. What is the number obtained when 47 is subtracted from the number?
Question (KO): 어떤 수에서 29를 뺐더니 63이 되었습니다. 어떤 수에서 47을 빼면 얼마가 되는지 구하시오.

Answer: 45

Solution (Python):
var_a = 63
var_b = 29
var_c = var_a + var_b
var_d = 47
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): When you divide 15/14 by a particular number, you get 9/14. Find that particular number. 
Question (KO): 15/14를 어떤 수로 나누었더니 9/14가 되었습니다. 어떤 수를 구하시오.

Answer: 1.67

Solution (Python):
var_a = 1.0714285714285714
var_b = 0.6428571428571429
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Comparison

Question (EN): Seongkuk's orchard picked 40680 tangerines from 60 tangerine trees, and Hyukjun's orchard picked 37510 tangerines from 55 tangerine trees. Whose orchard averaged more tangerines per tangerine tree?
Question (KO): 성국이네 과수원에서는 귤나무 60 그루에서 귤을 40680 개 땄고, 혁준이네 과수원에서는 귤나무 55 그루 에서 귤을 37510 개 땄습니다. 누구네 과수원이 귤나무 한 그루당 평균적으로 귤을 더 많이 딴 셈입니까?

Answer: Hyukjun

Solution (Python):
var_a = 'Seongkuk'
var_b = 'Hyukjun'
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 = 40680
var_d = 60
var_e = var_c / var_d
var_f = 37510
var_g = 55
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: Comparison

Question (EN): How many of 0.8, 1/2, and 0.9 are less than 0.4?
Question (KO): 0.8, 1/2, 0.9 중에서 0.4보다 작은 수는 몇 개입니까?

Answer: 0

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.9
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 = 0.4
list_b = []
for i in list_a:
    if i < var_d:
        list_b.append(i)
var_e = len(list_b)
print(int(var_e))
Category: Geometry

Question (EN): How many balls are left when Jungkook removes 3 balls from a box containing 10 balls?
Question (KO): 10개의 공이 들어 있는 상자 안에서 정국이가 3개의 공을 뺐을 때 남은 공의 개수는?

Answer: 7

Solution (Python):
var_a = 10
var_b = 3
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): When you divide a number by 5, you get 2. What do you get if you subtract 6 from this number?
Question (KO): 어떤 수를 5로 나누었더니 2가 되었습니다. 어떤 수에서 6을 빼면 얼마입니까?

Answer: 4

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a * var_b
var_d = 6
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): How many odd two-digit numbers and even single-digit numbers exist?
Question (KO): 두 자리수의 홀수와 한 자리 수의 짝수는 모두 몇 개인지 구하시오.

Answer: 49

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

Question (EN): While Yoongi was adding 57 to the three-digit number, he mistook the three-digit units digit 9 for a 6. If the sum obtained by Yoongi is 823, what is the correct calculation result?
Question (KO): 윤기는 세 자리 수에 57을 더하던 중, 윤기는 세 자리 수의 일의 자리 숫자 9를 6으로 잘못 봤습니다. 윤기가 구한 합이 823이라고 하면, 바르게 계산한 결과는 무엇인가요?

Answer: 826

Solution (Python):
var_a = 823
var_b = 57
var_c = var_a - var_b
var_d = 6
var_e = 9
var_f = var_d - var_e
var_g = var_c - var_f
var_h = 57
var_i = var_g + var_h
print(int(var_i))
Category: Comparison

Question (EN): Which one has the least number of faces among a triangular-prism, quadrangular-prism, triangular-pyramid, quadrangular-pyramid, and truncated-quadrangular-pyramid?
Question (KO): 삼각기둥, 사각기둥, 삼각뿔, 사각뿔, 사각뿔대 중 면의 개수가 가장 적은 것은?

Answer: triangular-pyramid

Solution (Python):
var_a = 'triangular-prism'
var_b = 'quadrangular-prism'
var_c = 'triangular-pyramid'
var_d = 'quadrangular-pyramid'
var_e = 'truncated-quadrangular-pyramid'
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
var_g = 2
var_h = var_f + var_g
var_i = 4
var_j = 2
var_k = var_i + var_j
var_l = 3
var_m = 1
var_n = var_l + var_m
var_o = 4
var_p = 1
var_q = var_o + var_p
var_r = 4
var_s = 2
var_t = var_r + var_s
list_b= []
if "/" in str(var_t):
    var_t = eval(str(var_t))
list_b.append(var_t)
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
var_u = 1
list_c=list_b.copy()
list_c.sort()
var_v = list_c[var_u-1]
var_w = list_b.index(var_v)+1
var_x = list_a[var_w-1]
print(var_x)
Category: Comparison

Question (EN): Mincheol, Taehoon, and Chaejeong are standing in a row. When Taehoon is behind Mincheol and in front of Chaejeong, who is the student standing at the very back?
Question (KO): 민철, 태훈, 채정 세 학생이 일렬로 서있습니다. 태훈이가 민철이보다는 뒤에, 채정이보다는 앞에 서 있을 때, 맨 뒤에 서있는 학생은 누구입니까?

Answer: Chaejeong

Solution (Python):
var_a = 'Mincheol'
var_b = 'Taehoon'
var_c = 'Chaejeong'
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 = 'Taehoon'
var_e = 'Mincheol'
var_f = '<'
var_g = 'Taehoon'
var_h = 'Chaejeong'
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 = len(list_c)
var_k = list_c[var_j-1]
print(var_k)
Category: Arithmetic calculation

Question (EN): Eunji's math score is 25 points lower than Yoongi's, and Yuna's math score is 20 points lower than Eunji's. If Yuna's math score is 8, what score did Yoongi get?
Question (KO): 은지는 윤기보다 수학점수가 25점 낮고 유나는 은지보다 수학점수가 20점 낮습니다. 유나의 수학점수가 8점일 때 윤기의 수학점수는 몇 점입니까?

Answer: 53

Solution (Python):
var_a = 8
var_b = 20
var_c = var_a + var_b
var_d = 25
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): What is the sum of the numbers among 1.4, 9/10, 1.2, 0.5, and 13/10 that is less than 1.1?
Question (KO): 수 5개 1.4, 9/10, 1.2, 0.5, 13/10 중 1.1보다 작은 숫자를 구하고, 그 숫자들의 합을 구하면 얼마입니까?

Answer: 1.4

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)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Arithmetic calculation

Question (EN): 8 people decided to take turns riding 5 bikes. If the riding time is 2 hours 32 minutes, how long does one person ride the bike on average in minutes?
Question (KO): 8명이서 5개의 자전거를 돌아가면서 타기로 했다. 자전거를 탄 시간이 2시간 32분이라면 한 사람이 자전거를 탄 시간은 평균 몇 분입니까?

Answer: 95

Solution (Python):
var_a = 2
var_b = 60
var_c = var_a * var_b
var_d = 32
var_e = var_c + var_d
var_f = 8
var_g = var_e / var_f
var_h = 5
var_i = var_g * var_h
print(int(var_i))
Category: Possibility

Question (EN): We are trying to make a two-digit number by using 2, 4, 7, and 9 once each. What is the third smallest two-digit number with 7 in the tens place?
Question (KO): 2, 4, 7, 9를 한 번씩 사용하여 두자리 수를 만들려고 한다. 십의 자리 숫자가 7인 수들 중 세번째로 작은 두 자리 수는 무엇입니까?

Answer: 79

Solution (Python):
var_a = 2
var_b = 4
var_c = 7
var_d = 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 = 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 = 10
var_g = 7
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-1]
print(int(var_i))
Category: Geometry

Question (EN): You are trying to draw as many circles with a radius of 3 cm on a piece of paper that is 30 centimeters (cm) wide and 24 centimeters (cm) long, without overlapping them. How many circles can you draw?
Question (KO): 가로가 30센티미터(㎝), 세로가 24센티미터(㎝)인 직사각형 모양의 종이에 반지름이 3센티미터(㎝)인 원을 겹치지 않게 최대한 많이 그리려고 합니다. 원을 몇 개까지 그릴 수 있습니까?

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

Question (EN): There are 120 liters (L) of water in the water tank. When you open the faucet in this water tank, 4 liters (L) of water flow out per minute. How many liters (L) of water are left in the water tank after 20 minutes you open the faucet?
Question (KO): 물 탱크에 120리터(L) 만큼의 물이 있다. 이 물탱크에 수도꼭지를 열면 분 당 4리터(L)의 물이 흘러나온다. 수도꼭지를 열고 20 분이 지났을 때, 물탱크 안에 몇 리터(L)의 물이 남아있습니까?

Answer: 40

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

Question (EN): I am trying to make a number that is bigger than 550. Think of ways in which a number is made up of 4, 5, and 8, and the figure in each digit is different from each other. How many numbers are there?
Question (KO): 550보다 큰 수를 만드려고 한다. 4, 5, 8로 이루어져 있고 각 자리의 숫자가 모두 다른 수들은 몇 개인가?

Answer: 3

Solution (Python):
var_a = 4
var_b = 5
var_c = 8
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 550
list_c = []
for i in list_b:
    if i > var_e:
        list_c.append(i)
var_f = len(list_c)
print(int(var_f))
Category: Geometry

Question (EN): If the base of a parallelogram is 3.8 meters (m) and the height is 6.36 meters (m), what is the area?
Question (KO): 평형사변형의 밑변의 길이는 3.8미터(m)이며 높이는 6.36미터(m)일 때, 넓이는 얼마가 됩니까?

Answer: 24.17

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

Question (EN): There are a total of 18 cucumbers, and the number of watermelons is 8 more than that of cucumbers. What is the total number of watermelons and cucumbers?
Question (KO): 오이가 18개 있고, 오이는 수박보다 8개 더 적습니다. 수박과 오이는 모두 몇 개입니까?

Answer: 44

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

Question (EN): You have 2 purple candies, 1 white candy, and 1 red candy. If candies of the same color are indistinguishable from each other, how many different ways can you place 4 different candies in a row?
Question (KO): 보라색 사탕 2개, 흰색 사탕 1개, 빨간색 사탕 1개를 가지고 있습니다. 같은 색의 사탕은 각각 구별이 되지 않는다고 할 때, 사탕 4개를 서로 다르게 한 줄로 놓는 방법은 모두 몇 가지입니까?

Answer: 12

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

Question (EN): As a second foreign language, Japanese, Chinese, and French can be selected. The number of Japanese selectors is three times the number of Chinese selectors, and the number of Chinese selectors is 15 more than the number of French selectors. When the number of all students is 165, find the number of Japanese selectors.
Question (KO): 제2 외국어에는 일본어, 중국어, 프랑스어를 선택할 수 있다. 일본어 선택자 수는 중국어 선택자 수의 3배이고 중국어 선택자 수는 프랑스어 선택자 수보다 15명이 더 많다. 모든 학생이 165명 일 때, 일본어 선택자 수를 구하시오.

Answer: 108

Solution (Python):
var_a = 165
var_b = 15
var_c = var_a + var_b
var_d = 3
var_e = 1
var_f = 1
var_g = var_e + var_f
var_h = var_d + 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): There are 5 numbers 1, 4, 25, 16 and 22. What is the 2nd largest number?
Question (KO): 5개의 숫자 1, 4, 25, 16, 22가 있습니다. 2번째로 큰 숫자는 무엇입니까?

Answer: 22

Solution (Python):
var_a = 1
var_b = 4
var_c = 25
var_d = 16
var_e = 22
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))