philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): The water in the small bucket is 7 liters (L) and the water in the large bucket is 5 liters (L). When 2 liters (L) of water from the large bucket is poured into the small bucket, how many liters (L) of water is more in the small bucket than in the large bucket?
Question (KO): 작은 통의 물은 7리터(L)이고 큰 통의 물은 5리터(L)입니다. 큰 통에 있던 물 2리터(L)를 작은 통에 따랐을 때, 작은 통의 물은 큰 통보다 몇 리터(L)가 많습니까?

Answer: 6

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

Question (EN): After Jisoo washed the dishes, she put the plate on the shelf 1st from the left, 7th from the right, 2nd from the top, and 4th from the bottom. How many slots are there on the shelf?
Question (KO): 지수가 설거지를 하고난 후 접시를 선반의 왼쪽에서 1번째 칸, 오른쪽에서 7번째 칸, 위에서 2번째 칸, 아래에서 4번째 칸에 놓았습니다. 선반의 모든 칸의 개수는 몇 칸입니까?

Answer: 35

Solution (Python):
var_a = 1
var_b = 7
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = 4
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
print(int(var_k))
Category: Possibility

Question (EN): How many of the three number cards among five number cards 0, 1, 2, 3, and 4 form a three-digit number that are both multiples of 6 and multiples of 9?
Question (KO): 다섯 장의 숫자 카드 0, 1, 2, 3, 4 중에서 3 장을 꺼내 세 자리 수를 만들 때, 6의 배수이면서 9의 배수인 수는 모두 몇 가지인가?

Answer: 4

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
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 = 6
var_h = 9
var_i = var_h * var_g / math.gcd(int(var_h), int(var_g))
list_c = []
var_i = int(var_i)
for i in list_b:
    i = int(i)
    if i % var_i == 0:
        list_c.append(i)
var_j = len(list_c)
print(int(var_j))
Category: Arithmetic calculation

Question (EN): There are 24 female and male students in total. Among them, 50 sheets of colored paper were equally distributed to female students only, and 2 sheets were left. How many pieces of colored paper will the girls have if there are twice as many boys as girls?
Question (KO): 여학생과 남학생이 모두 24명 있습니다. 이 중 여학생에게만 색종이 50장을 똑같이 나누어 주었더니 2장이 남았습니다. 남학생 수가 여학생 수의 2배일 때 여학생은 색종이를 몇 장씩 갖게 됩니까?

Answer: 6

Solution (Python):
var_a = 50
var_b = 2
var_c = var_a - var_b
var_d = 24
var_e = 2
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: Comparison

Question (EN): A compact car took 4 hours to drive 200 kilometers (km), and a midsize car took 3 hours to drive 180 kilometers (km). Find which car is faster.
Question (KO): 소형차는 200킬로미터(㎞)를 가는 데 4시간이 걸렸고, 중형차는 180킬로미터(㎞)를 가는 데 3시간이 걸렸습니다. 어느 차가 더 빠른지 구하시오.

Answer: midsize

Solution (Python):
var_a = 'compact'
var_b = 'midsize'
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 = 200
var_d = 4
var_e = var_c / var_d
var_f = 180
var_g = 3
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: Correspondence

Question (EN): When you divide a particular number by 2, 3, 4, 5, and 6, you get a remainder of 1, and that particular number is divisible by 7. When these numbers are counted from the smallest number, what number will come in the 3rd place?
Question (KO): 2, 3, 4, 5, 6으로 나누면 모두 1이 남고, 7로 나누면 나누어떨어지는 수가 있다. 이러한 수를 작은 수부터 세었을 때 셋째 번 수를 구하여라.

Answer: 1141

Solution (Python):
var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 2
var_e = 3
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
var_g = 4
var_h = var_g * var_f / math.gcd(int(var_g), int(var_f))
var_i = 5
var_j = var_i * var_h / math.gcd(int(var_i), int(var_h))
var_k = 6
var_l = var_k * var_j / math.gcd(int(var_k), int(var_j))
var_m = 1
list_b = [] 
var_l = int(var_l)
var_m = int(var_m)
if var_m < 0:
    var_m = var_m + var_l
for i in list_a:
    i = int(i)
    if i%var_l == var_m:
        list_b.append(i)
var_n = 7
var_o = 0
list_c = [] 
var_n = int(var_n)
var_o = int(var_o)
if var_o < 0:
    var_o = var_o + var_n
for i in list_b:
    i = int(i)
    if i%var_n == var_o:
        list_c.append(i)
var_p = 3
list_d=list_c.copy()
list_d.sort()
var_q = list_d[var_p-1]
print(int(var_q))
Category: Correspondence

Question (EN): I'm going to give you 68 apples for lunch. How many more apples are needed to divide 5 each equally to 14 people?
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: Arithmetic calculation

Question (EN): After taking 30 kilograms (kg) of apples out of 5 boxes containing apples of the same weight, the remaining apples in the 5 boxes were weighed the same as the 2 apple boxes in the initial state. How many kilograms (kg) of apples were in each box initially?
Question (KO): 같은 무게의 사과가 담겨있는 5개의 상자에서 사과를 30킬로그램(㎏)씩 꺼낸 후, 5개의 상자에 남은 사과의 무게를 재어보니 처음 상태의 사과 상자 2개의 무게와 같았습니다. 처음 각 상자에 들어 있던 사과는 몇 킬로그램(㎏)입니까?

Answer: 50

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

Question (EN): 6 minus a certain number equals 2. What is the value of the certain number minus 2?
Question (KO): 6에서 어떤 수를 뺀 값이 2다. 어떤 수에 2를 빼면 얼마인가?

Answer: 2

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

Question (EN): Rounding 34AC to the hundred's place gives 3400. How many possible A's are there?
Question (KO): 34AC를 반올림하여 백의 자리까지 나타내면 3400이 됩니다. 가능한 A는 모두 몇 가지인가?

Answer: 5

Solution (Python):
var_a = '34AC'
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 = 3400
var_c = 50
var_d = var_b - var_c
list_b = []
for i in list_a:
    if i >= var_d:
        list_b.append(i)
var_e = 3400
var_f = 50
var_g = var_e + var_f
list_c = []
for i in list_b:
    if i < var_g:
        list_c.append(i)
var_h = '34AC'
var_i = 'A'
var_h = str(var_h)
var_i = str(var_i)
unk_idx = var_h.index(var_i)
list_d = []
for elem in list_c:
    elem = str(elem)
    list_d.append(int(elem[unk_idx]))
list_d = list(set(list_d))
var_j = len(list_d)
print(int(var_j))
Category: Arithmetic calculation

Question (EN): You are trying to make a number between 1 and 300 using number cards from 0 to 9. Find how many number card 3 are needed.
Question (KO): 0부터 9까지의 숫자 카드로 1이상 300이하의 수를 만드려고 합니다. 숫자 카드 3은 모두 몇 장 필요한지 구하시오.

Answer: 61

Solution (Python):
var_a = 1
var_b = 300
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
list_b = []
var_d = int(var_d)
while var_d//10 > 0:
    list_b.append(var_d%10)
    var_d = var_d//10
list_b.append(var_d%10)
list_b = list_b[::-1]
var_e = 3
var_f = 0
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i == var_e:
        var_f = var_f + 1
print(int(var_f))
Category: Geometry

Question (EN): Find the sum of the number of sides of the triangle and the number of sides of the quadrilateral.
Question (KO): 삼각형의 변의 개수와 사각형의 변의 개수의 합을 구하시오

Answer: 7

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

Question (EN): A number needs to be divided by 5, but when I accidentally divide it by 8, the quotient is 156 and the remainder is 2. Find the value obtained by subtracting 3 from the correctly calculated value.
Question (KO): 어떤 수를 5로 나누어야 하는데 실수로 8로 나누었더니 몫이 156이고 나머지가 2였습니다. 계산을 제대로 했을 때 나오는 값에서 3을 뺀 값을 구하시오.

Answer: 247

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

Question (EN): It takes Taehyung 9 seconds to set up a flag. Also, after raising a flag, he must rest for 5 seconds. If the road is divided into 16 sections and flags are placed between the sections except for the ends, how many seconds will it take in total?
Question (KO): 태형이가 깃발을 하나 세우는 데에 9초가 걸립니다. 또한 하나의 깃발을 세운 후에는 5초 동안 쉬어야합니다. 도로를 16구간으로 나누고 양 끝 점을 제외한 구간 사이사이에 깃발을 세운다면 걸리는 시간은 모두 몇 초일까요?

Answer: 210

Solution (Python):
var_a = 16
var_b = 1
var_c = var_a - var_b
var_d = 9
var_e = 5
var_f = var_d + var_e
var_g = var_c * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): You are trying to make a bridge by joining 24 pieces of wood. If a piece of wood is 28 centimeters (cm) long, and you want to make a bridge 580 centimeters (cm) long, how many centimeters (cm) do you have to overlap each?
Question (KO): 나무토막 24장을 이어붙여 다리를 만들려고 합니다. 나무토막 한 장의 길이는 28센티미터(㎝)이며 다리의 길이를 580센티미터(㎝)로 만들려고 한다면 몇 센티미터(㎝)씩 겹쳐서 이어 붙여야 할까요?

Answer: 4

Solution (Python):
var_a = 28
var_b = 24
var_c = var_a * var_b
var_d = 580
var_e = var_c - var_d
var_f = 24
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

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

Answer: 1

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
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=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f % var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): After putting 6 gifts in a small bag weighing 220 grams (g), then put 9 of these small bags in a larger bag weighing 250 grams (g), the result was 13.3 kilograms (kg). If each gift is the same, how many grams (g) does each gift weigh?
Question (KO): 무게가 220그램(g)인 작은 가방에 선물을 6개씩 넣은 후 이 작은 가방 9개를 무게가 250그램(g)인 큰 가방에 넣었더니 13.3킬로그램(㎏)이 되었습니다. 각각의 선물이 모두 같은 것이라면 선물 하나의 무게는 몇 그램(g)입니까?

Answer: 205

Solution (Python):
var_a = 13.3
var_b = 1000
var_c = var_a * var_b
var_d = 250
var_e = var_c - var_d
var_f = 220
var_g = 9
var_h = var_f * var_g
var_i = var_e - var_h
var_j = 6
var_k = 9
var_l = var_j * var_k
var_m = var_i / var_l
print(int(var_m))
Category: Arithmetic calculation

Question (EN): How many pieces would it be if 3 meters (m) of tape were continuously cut by 1/4 meters (m)?
Question (KO): 3미터(m)의 테이프를 1/4미터(m)씩 자르면 몇 도막이 됩니까?

Answer: 12

Solution (Python):
var_a = 3
var_b = 0.25
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Yoongi is 3 years younger than Namjoon. How old is Yoongi when Namjoon becomes 6 years old this year?
Question (KO): 남준이보다 윤기는 3살이 더 적습니다. 올해 남준이가 6살일 때 윤기의 나이는 몇 살입니까?

Answer: 3

Solution (Python):
var_a = 6
var_b = 3
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): How many four-digit numbers are both multiples of 3 and multiples of 5?
Question (KO): 네 자리 수 중 3의 배수이면서 5의 배수인 수는 모두 몇 개 입니까?

Answer: 600

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 = len(list_c)
print(int(var_f))
Category: Comparison

Question (EN): There are four numbers 0.8, 1/2, 0.9, and 1/3. Find the sum of the numbers greater than 0.7.
Question (KO): 4개의 숫자 0.8, 1/2, 0.9, 1/3가 있습니다. 0.7보다 큰 수의 합은 얼마인가요?

Answer: 1.7

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.9
var_d = 0.3333333333333333
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.7
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: Arithmetic calculation

Question (EN): How many 100 won coins are equal to 80 10 won coins?
Question (KO): 10원짜리 동전 80개는 100원짜리 동전 몇 개와 같습니까?

Answer: 8

Solution (Python):
var_a = 10
var_b = 80
var_c = var_a * var_b
var_d = 100
var_e = var_c / var_d
print(int(var_e))
Category: Geometry

Question (EN): There is a square playground and a rectangular basketball court. The perimeter of the playground is 36 meters (m), and the perimeter of the basketball court is 38 meters (m). If the width of the basketball court is 15 meters (m), find the difference between the area of the playground and that of the basketball court.
Question (KO): 정사각형의 운동장과 직사각형의 농구 코트가 있다. 운동장의 둘레는 36미터(m)이고, 농구 코트의 둘레는 38미터(m)이다. 농구 코트의 가로 길이가 15미터(m)면 운동장과 농구 코트의 넓이 차이를 구하시오.

Answer: 21

Solution (Python):
var_a = 36
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
var_f = 38
var_g = 2
var_h = var_f / var_g
var_i = 15
var_j = var_h - var_i
var_k = 15
var_l = var_j * var_k
var_m = var_e - var_l
var_n = abs(var_m)
print(int(var_n))
Category: Arithmetic calculation

Question (EN): Yoongi's math score is 82, and his Korean score is 5 points higher than his math score. How many points does he need to get in English to get an average score of 89 in Korean, Mathematics, and English?
Question (KO): 윤기의 수학 점수는 82점이고, 국어 점수는 수학 점수보다 5점 높습니다. 국어, 수학, 영어 세 과목의 평균 점수가 89점이 되려면 영어를 몇 점 맞아야 합니까?

Answer: 98

Solution (Python):
var_a = 89
var_b = 3
var_c = var_a * var_b
var_d = 82
var_e = var_c - var_d
var_f = 82
var_g = 5
var_h = var_f + var_g
var_i = var_e - var_h
print(int(var_i))
Category: Comparison

Question (EN): Toy (A) is larger than toy (B) and smaller than a toy (C). Toy (B) is bigger than Toy (D). Toy (C) is smaller than Toy (E). Which toy is the biggest?
Question (KO): (가) 장난감은 (나) 장난감보다 크고 (다) 장난감보다 작습니다. (나) 장난감은 (라) 장난감보다 큽니다. (다) 장난감은 (마) 장난감보다 작습니다. 가장 큰 장난감은 어느 장난감입니까?

Answer: (E)

Solution (Python):
var_a = '(A)'
var_b = '(B)'
var_c = '(C)'
var_d = '(D)'
var_e = '(E)'
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 = '(A)'
var_g = '(B)'
var_h = '>'
var_i = '(A)'
var_j = '(C)'
var_k = '<'
var_l = '(B)'
var_m = '(D)'
var_n = '>'
var_o = '(C)'
var_p = '(E)'
var_q = '<'
list_b= []
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
    var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
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)
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_r = 1
var_s = list_c[var_r-1]
print(var_s)
Category: Geometry

Question (EN): Find the area of a rhombus whose two diagonals are 6 centimeters (cm) and 10 centimeters (cm), respectively.
Question (KO): 두 대각선의 길이가 각각 6센티미터(㎝), 10센티미터(㎝)인 마름모의 넓이를 구하세요.

Answer: 30

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

Question (EN): 63+6AB=748. How much is B?
Question (KO): 63+6AB=748입니다. B는 얼마인가요?

Answer: 5

Solution (Python):
var_a = '63+6AB=748'
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: Arithmetic calculation

Question (EN): It takes 0.84 meters (m) of shiny string to decorate one tree. If there are 50 centimeters (cm) of rope left after decorating 10 trees, how many meters (m) of rope were there before decorating the tree?
Question (KO): 트리 하나를 장식하는 데 반짝이는 줄이 0.84미터(m)가 들어갑니다. 10개의 트리를 장식한 후에 줄이 50센티미터(㎝) 남았다면, 트리를 장식하기 전에는 줄이 몇 미터(m)였습니까?

Answer: 8.9

Solution (Python):
var_a = 0.84
var_b = 10
var_c = var_a * var_b
var_d = 50
var_e = 100
var_f = var_d / var_e
var_g = var_c + var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Arithmetic calculation

Question (EN): I rode a bicycle back and forth between the two points A and B, traveling at 15 kilometers per hour (km) on the way forth and 10 kilometers per hour (km) on the way back. It took 30 minutes longer to come back. Find the time it took to go forth.
Question (KO): 두 지점 A, B 사이를 자전거를 타고 왕복하는데 갈때는 시속 15 킬로미터(㎞)로, 올 때는 시속 10 킬로미터(㎞)로 달렸더니 올 때는 갈 때보다 30분이 더 걸렸다. 갈 때 걸린 시간을 구하시오.

Answer: 1

Solution (Python):
var_a = 10
var_b = 30
var_c = 60
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 15
var_g = 10
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): How many natural numbers are greater than 40 and less than 70?
Question (KO): 40 초과 70 미만인 자연수는 모두 몇 개입니까?

Answer: 29

Solution (Python):
var_a = 70
var_b = 40
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): A red ball, blue ball, yellow ball and a green ball are in the box. The total number of these balls is 531, and the sum of the red and blue balls is 31 more than the sum of the yellow and green balls. Also, if there are 22 more yellow balls than green balls, how many yellow balls are there?
Question (KO): 상자 안에 빨간 공, 파란 공, 노란 공, 초록 공이 있습니다. 이 공들은 모두 합쳐 531개이며, 빨간 공과 파란 공의 개수 합은 노랑 공과 초록 공의 개수 합 보다 31개 더 많습니다. 또, 노랑 공이 초록 공 보다 22개 더 많다고 할 때, 노랑 공은 몇 개가 들어있는지 구하시오.

Answer: 136

Solution (Python):
var_a = 531
var_b = 31
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 22
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
var_j = 22
var_k = var_i + var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): What is the smallest four-digit number that is divisible by 3?
Question (KO): 3으로 나누어 떨어질 수 있는 네 자리 수 중 가장 작은 수는?

Answer: 1002

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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
print(int(var_f))
Category: Arithmetic calculation

Question (EN): When I went to the health room from the science room, I walked at 2 kilometers (km) per hour, and when I went to the science room from the health room, I walked 2 kilometers (km) further at 3 kilometers (km) per hour. If it took 4 hours in total, what is the distance from the health room to the science room?
Question (KO): 과학실에서 보건실을 갈 때는 시속 2킬로미터(㎞)로, 보건실에서 과학식을 올 때는 2킬로미터(㎞) 더 먼 길을 시속 3킬로미터(㎞)로 걸어왔다. 총 걸린시간이 4시간이라면 보건실에서 과학실로 온 거리는 얼마인지 구하시오.

Answer: 6

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

Question (EN): How many two-digit numbers can be made by selecting two different numbers from 2, 3, and 4?
Question (KO): 2, 3, 4 중에서 서로 다른 숫자 2개를 뽑아 만들 수 있는 두 자리 수는 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 2
var_b = 3
var_c = 4
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 = 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]
var_e = len(list_b)
print(int(var_e))