philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Jungkook's average score for Korean and English is 88 points, and his Math score is 100 points. What is Jungkook's average score of the three subjects?
Question (KO): 정국이의 국어와 영어의 평균 점수는 88점이고, 수학 점수는 100점입니다. 정국이의 세 과목 평균 점수는 몇 점입니까?

Answer: 92

Solution (Python):
var_a = 88
var_b = 2
var_c = var_a * var_b
var_d = 100
var_e = var_c + var_d
var_f = 2
var_g = 1
var_h = var_f + var_g
var_i = var_e / var_h
print(int(var_i))
Category: Geometry

Question (EN): A square-shaped park with a side of 20 meters (m) is to be divided into 9 zones by dividing each side into thirds. What is the area of the divided area in square meters (m2)?
Question (KO): 한 변이 20미터(m)인 정사각형 모양의 공원을 각 변마다 3등분하여 9개의 구역으로 나누고자 합니다. 나눠진 구역의 넓이는 몇 제곱미터(㎡)입니까?

Answer: 44.44

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

Question (EN): Youngsoo's school received an average of 75 points in the Korean midterm in class 1, 85 in class 2, 90 in class 3, and 65 in class 4. What is the sum of the averages of the classes below the school's midterm exam average?
Question (KO): 영수네 학교는 중간고사에서 국어 평균이 1반은 75점, 2반은 85점, 3반은 90점, 4반은 65점을 받았다. 영수네 학교 중간고사 평균보다 아래인 반의 평균 합은 얼마인가?

Answer: 140

Solution (Python):
var_a = 75
var_b = 85
var_c = 90
var_d = 65
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()
list_a = [float(i) for i in list_a]
var_e = sum(list_a)/len(list_a)
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(int(var_f))
Category: Correspondence

Question (EN): What number must go in A to make A72-23=549?
Question (KO): A72-23=549라는 식이 성립하려면, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 5

Solution (Python):
var_a = 'A72-23=549'
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: Correspondence

Question (EN): When I distributed pencils equally to 8 people, I could give 6 pencils each and there was 4 left. If you divide the same number of pencils equally among 4 people, how many can you distribute?
Question (KO): 연필을 8명에게 똑같이 나누어주니 6개씩 나누어주고 4개가 남았다. 같은 수의 연필을 4명에게 똑같이 나누어주면 몇개씩 나누어 줄 수 있는가?

Answer: 13

Solution (Python):
var_a = 6
var_b = 8
var_c = var_a * var_b
var_d = 4
var_e = var_c + var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g))
Category: Possibility

Question (EN): Find the sum of the largest and smallest two-digit numbers that can be formed by drawing out two different numbers from 3, 5, 7, and 8.
Question (KO): 3, 5, 7, 8 중에서 서로 다른 숫자 2개를 뽑아 만들 수 있는 두 자리 수 중에서 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 122

Solution (Python):
var_a = 3
var_b = 5
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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 1
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: Possibility

Question (EN): A thief has found a secret safe. The safe's password is the sum of the largest and smallest of the three digits created by using all 6,2 and 5 once. What is the password for the safe?
Question (KO): 도둑이 비밀 금고를 찾았습니다. 금고의 비밀번호는 6 ,2, 5를 한 번씩 모두 사용하여 만든 세 자리 중 가장 큰 수와 가장 작은 수의 합입니다. 금고의 비밀번호는 무엇입니까?

Answer: 908

Solution (Python):
var_a = 6
var_b = 2
var_c = 5
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 1
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i))
Category: Possibility

Question (EN): Round up the second largest five-digit number you can make by using the five number cards 0, 1, 5, 7, and 9 once to the tens digit.
Question (KO): 5 장의 숫자 카드 0, 1, 5, 7, 9를 한 번씩 사용하여 만들 수 있는 두번째로 큰 다섯 자리 수를 올림하여 십의 자리까지 나타내어 보시오.

Answer: 97510

Solution (Python):
var_a = 0
var_b = 1
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 = 5
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 = 2
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = 2
var_j=int(((var_h+9*10**(var_i-2))//(10**(var_i-1)))*10**(var_i-1))

print(int(var_j))
Category: Arithmetic calculation

Question (EN): There are 11 ripe watermelons and 13 unripe watermelons. If 15 of these watermelons are seedless, how many watermelons have seeds?
Question (KO): 익은 수박이 11개 덜익은 수박이 13개 있습니다. 이중 15개가 씨없는 수박이라면 씨가 있는 수박의 개수는 몇 개입니까?

Answer: 9

Solution (Python):
var_a = 11
var_b = 13
var_c = var_a + var_b
var_d = 15
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): A block of wood is in the shape of a cuboid measuring 5 centimeters (cm) in width, 4 centimeters (cm) in depth, and 3 centimeters (cm) in height. This block of wood was dipped in water, wet on all sides, and cut into 60 cubed pieces with a side area of 1 square centimeter (cm2). How many cubes have water on only one side?
Question (KO): 어떤 나무토막은 가로가 5센티미터(㎝), 세로가 4센티미터(㎝), 높이가 3센티미터(㎝)인 직육면체 모양이다. 이 나무토막을 물에 빠뜨려서 모든 면을 적시고, 한 면의 넓이가 1제곱센티미터(㎠)인 60개의 정육면체 조각으로 잘라냈다. 정육면체 조각 중 한 면에만 물이 묻어있는 것은 몇 개인가?

Answer: 22

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a - var_b
var_d = 4
var_e = 2
var_f = var_d - var_e
var_g = var_c * var_f
var_h = 5
var_i = 2
var_j = var_h - var_i
var_k = 3
var_l = 2
var_m = var_k - var_l
var_n = var_j * var_m
var_o = var_g + var_n
var_p = 4
var_q = 2
var_r = var_p - var_q
var_s = 3
var_t = 2
var_u = var_s - var_t
var_v = var_r * var_u
var_w = var_o + var_v
var_x = 2
var_y = var_w * var_x
print(int(var_y))
Category: Arithmetic calculation

Question (EN): It is said that it takes 1 hour and 36 minutes to cycle 5 laps around the playground on a bicycle. How many minutes does it take to complete one lap around the playground?
Question (KO): 자전거를 타고 운동장을 5바퀴 도는데 1시간 36분이 걸린다고 합니다. 운동장 한 바퀴 돌 때는 몇 분 걸리나요?

Answer: 19.2

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

Question (EN): This Alien likes to run. When it saw a rabbit and ran, it ran at 15 kilometers (km) per hour, and it ran at 10 kilometers per hour (km) when it spotted a frog, which took 30 minutes more. Find the time it took to run after seeing the frog.
Question (KO): 외계인은 달리기를 좋아한다. 토끼를 보고 달릴 때 시속 15킬로미터(㎞)로 뛰었고, 개구리를 보고 달려갈 때는 시속 10킬로미터(㎞)로 뛰었더니, 30분이 더 걸렸다. 개구리를 보고 뛰어갈 때 걸린 시간을 구하시오.

Answer: 1.5

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
var_j = 30
var_k = 60
var_l = var_j / var_k
var_m = var_i + var_l
print('{:.2f}'.format(round(var_m+1e-10,2)))
Category: Correspondence

Question (EN): When you add a number to 23, the result is 34. Find out which number exactly.
Question (KO): 23에 어떤 수를 더했더니 결과가 34가 되었습니다. 어떤 수를 정확히 구하시오.

Answer: 11

Solution (Python):
var_a = 34
var_b = 23
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): Find the value of 18/5 divided by 9/4 twice.
Question (KO): 18/5를 9/4로 두 번 나눈 값을 구하시오.

Answer: 0.71

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

Question (EN): In Jihye's wallet, there are two 1000 wons, and 560 won coins. What is the total amount of money in Jihye's wallet?
Question (KO): 지혜의 지갑에는 1000원짜리가 2장 있고 동전으로는 560원이 있습니다. 지혜의 지갑 속에 있는 돈은 총 얼마입니까?

Answer: 2560

Solution (Python):
var_a = 2
var_b = 1000
var_c = var_a * var_b
var_d = 560
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): Dividing a number by 8, adding 8, subtracting 30, and multiplying by 6 equals 12. Find the number.
Question (KO): 어떤 수를 8로 나눈 후 8을 더하고, 30을 뺀 값에 6을 곱한 값이 12입니다. 어떤 수를 구하시오.

Answer: 192

Solution (Python):
var_a = 12
var_b = 6
var_c = var_a / var_b
var_d = 30
var_e = var_c + var_d
var_f = 8
var_g = var_e - var_f
var_h = 8
var_i = var_g * var_h
print(int(var_i))
Category: Comparison

Question (EN): There are two circles of A and B. The area of A is 198.4 square centimeters (cm2), and the area of B is 251.1 square centimeters (cm2). On the condition that pi is calculated as 3.1, what is the number of centimeters (cm) when you subtract the circumference of A from the circumference of B, including the decimal point?
Question (KO): (가), (나) 두 개의 원이 있습니다. (가)의 넓이는 198.4제곱센티미터(㎠), (나)의 넓이는 251.1제곱센티미터(㎠)입니다. 원주율을 3.1로 계산할 때 (나)의 원 둘레 길이를 (가)의 원 둘레 길이로 뺀 값은 몇 센티미터(㎝)인지 소수점을 포함하여 구하시오.

Answer: 6.2

Solution (Python):
var_a = 198.4
var_b = 3.1
var_c = var_a / var_b
var_d = 1
var_e = 2
var_f = var_d / var_e
var_g = var_c ** var_f
var_h = 2
var_i = var_g * var_h
var_j = 3.1
var_k = var_i * var_j
var_l = 251.1
var_m = 3.1
var_n = var_l / var_m
var_o = 1
var_p = 2
var_q = var_o / var_p
var_r = var_n ** var_q
var_s = 2
var_t = var_r * var_s
var_u = 3.1
var_v = var_t * var_u
var_w = var_k - var_v
var_x = abs(var_w)
print('{:.2f}'.format(round(var_x+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Find the sum of the sum of all even numbers and the sum of all odd numbers from 1 to 50.
Question (KO): 1부터 50까지의 자연수 중에서 모든 짝수의 합과 모든 홀수의 합의 합을 구하시오

Answer: 1275

Solution (Python):
var_a = 1
var_b = 50
list_a = []
if var_a%2!=0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
var_d = 1
var_e = 50
list_b = []
if var_d%2==0:
    for i in range(var_d+1, var_e+1, 2):
        list_b.append(i)
else:
    for i in range(var_d, var_e+1, 2):
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
var_g = var_c + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): What is the smallest three-digit number that is divisible by the numbers 4 and 5?
Question (KO): 숫자 4, 5로 나누어 떨어질 수 있는 세 자리 수 중 가장 작은 수는 무엇입니까?

Answer: 100

Solution (Python):
var_a = 100
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 4
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-1]
print(int(var_g))
Category: Comparison

Question (EN): There are four numbers 0.8, 1/2, 0.9, 1/3. How many numbers are greater than 3?
Question (KO): 4개의 숫자 0.8, 1/2, 0.9, 1/3가 있습니다. 3보다 큰 수는 몇 개입니까?

Answer: 0

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 = 3
list_b = []
for i in list_a:
    if i > var_e:
        list_b.append(i)
var_f = len(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): You can make 60 toys in 5 days. How many days will it take to make 540?
Question (KO): 5일동안 60개의 장난감을 만들 수 있다. 540개를 만들려면 며칠 걸리는가?

Answer: 45

Solution (Python):
var_a = 540
var_b = 60
var_c = var_a / var_b
var_d = 5
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): You are going to use 2 of 4 number cards 3, 5, 6, and 7 to create a two-digit number. How many multiples of 7 can you make?
Question (KO): 3, 5, 6, 7 총 4장의 수 카드 중 2장을 사용하여 두 자리 수를 만들려고 합니다. 만들 수 있는 7의 배수는 모두 몇 개일까요?

Answer: 3

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

Question (EN): Minyoung jumped rope 52 times yesterday, and today she jumped 19 fewer times than yesterday. Yoojung jumped rope 18 times yesterday, and today she jumped 21 times more than yesterday. Who jumped more ropes today?
Question (KO): 민영이는 줄넘기를 어제는 52번 했고, 오늘은 어제보다 19번 더 적게 했습니다. 유정이는 줄넘기를 어제는 18번 했고, 오늘은 어제보다 21번 더 많이 했습니다. 오늘 줄넘기를 더 많이 한 사람은 누구입니까?

Answer: Yoojung

Solution (Python):
var_a = 'Minyoung'
var_b = 'Yoojung'
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 = 52
var_d = 19
var_e = var_c - var_d
var_f = 18
var_g = 21
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): The average score for Korean, English, social studies, and science is 90 points, and when math scores are included, the average score drops by 3 points. What is math score?
Question (KO): 국어, 영어, 사회, 과학의 평균 점수는 90점이고 수학 점수를 포함하면 평균 점수가 3점 떨어진다. 수학 점수는 몇 점인가?

Answer: 75

Solution (Python):
var_a = 90
var_b = 3
var_c = var_a - var_b
var_d = 5
var_e = var_c * var_d
var_f = 90
var_g = 4
var_h = var_f * var_g
var_i = var_e - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Namjoon took the test of 3 subjects: Korean, Mathematics, and English. If his math score is 100, his English 95, and the average score of 3 subjects is 95, what score did Namjoon's get in his Korean test?
Question (KO): 남준이는 국어, 수학, 영어 3과목 시험을 보았습니다. 수학은 100점, 영어는 95점이고 3과목 평균 점수가 95점일 때, 남준이의 국어 점수는 몇 점입니까?

Answer: 90

Solution (Python):
var_a = 95
var_b = 3
var_c = var_a * var_b
var_d = 100
var_e = var_c - var_d
var_f = 95
var_g = var_e - var_f
print(int(var_g))
Category: Correspondence

Question (EN): If A and B are different numbers and A2-5A=B3 is true, find the value of AxB.
Question (KO): A2-5A=B3을 만족하는 A, B가 서로 다른 두 수라면 AxB의 값을 구하시오

Answer: 27

Solution (Python):
var_a = 'A2-5A=B3'
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 = 'A2-5A=B3'
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: Possibility

Question (EN): A three-digit number was created by choosing three unequal numbers from 0 to 4. How many of these numbers have a remainder of 0 when divided by 2, 3, or 5?
Question (KO): 0부터 4까지의 숫자 중 서로 같지 않은 3개의 숫자를 골라 세 자리 수를 만들었다. 이 중 2, 3, 5로 나누었을 때 나머지가 0 인 수는 몇 개인가?

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 = 2
var_h = 3
var_i = var_h * var_g / math.gcd(int(var_h), int(var_g))
var_j = 5
var_k = var_j * var_i / math.gcd(int(var_j), int(var_i))
list_c = []
var_k = int(var_k)
for i in list_b:
    i = int(i)
    if i % var_k == 0:
        list_c.append(i)
var_l = len(list_c)
print(int(var_l))
Category: Arithmetic calculation

Question (EN): The total number of students at Yerin's school is 32 fewer than eight times the number of 5th graders, and there are 10 more 5th grade boys than 5th grade girls. If the total number of students in Yerin's school is 1152, how many female students are there in the 5th grade?
Question (KO): 예리네 학교 전체 학생 수는 5학년 학생 수의 8배보다 32명 더 적고 5학년 남학생은 5학년 여학생보다 10명 더 많습니다. 예리네 학교 전체 학생 수가 1152명일 때, 5학년 여학생은 몇 명입니까?

Answer: 69

Solution (Python):
var_a = 1152
var_b = 32
var_c = var_a + var_b
var_d = 8
var_e = var_c / var_d
var_f = 10
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Find the sum of three-digit even natural numbers.
Question (KO): 세 자리 짝수 자연수들의 합을 구하시오.

Answer: 247050

Solution (Python):
var_a = 100
var_b = 999
list_a = []
if var_a%2!=0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
print(int(var_c))
Category: Possibility

Question (EN): Gwangho has four number magnets of 2, 6, 0, and 7. When playing the game of making three-digit numbers by choosing three of those magnets, find the difference between the third largest number and the third smallest number that he can make.
Question (KO): 광호는 4개의 숫자 자석 2, 6, 0, 7을 가지고 있다. 여기서 3개를 골라 세 자리 수를 만드는 놀이를 할 때, 광호가 만들 수 있는 수 중 세 번째 큰 수와 세 번째 작은 수의 차를 구하시오.

Answer: 466

Solution (Python):
var_a = 2
var_b = 6
var_c = 0
var_d = 7
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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 3
list_c=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))