philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): You can take 40 peaches and 34 cherries in separate bags. I am going to put 8 peaches and 5 cherries in bags, but I will not put the leftovers in bags. Find how many handles there are in the bags full of peaches and cherries.
Question (KO): 복숭아 40개와 체리 34개를 각각 다른 봉투에 담아서 가져간다. 복숭아는 8개, 체리는 5개씩 봉투에 담는데 남는 것들은 봉투에 담지 않는다. 복숭아와 체리를 담은 봉투에 손잡이는 모두 몇 개인지 구하시오.

Answer: 14

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

Question (EN): If 5 students, 2 of whom are elementary school students, are lined up, how many ways can the elementary school students stand at either end?
Question (KO): 초등학생 2명을 포함한 학생 5명을 한 줄로 세운다고 할 때, 초등학생이 양 끝에 서게 되는 경우의 수는?

Answer: 12

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a - var_b
var_d = 5
var_e = 2
var_f = var_d - var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_c-i)
var_h = 2
var_i = var_g * var_h
print(int(var_i))
Category: Geometry

Question (EN): Find the number of vertices of a pentagonal prism.
Question (KO): 오각기둥의 꼭짓점 개수를 구하세요.

Answer: 10

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a * var_b
print(int(var_c))
Category: Possibility

Question (EN): Choose 3 of the following number cards 5, 3, 6, 8 to form a three-digit number. When writing the numbers in order from smallest, find the 10th number.
Question (KO): 다음 숫자 카드 5, 3, 6, 8 중 3 장을 골라 세 자리 수를 만듭니다. 작은 수부터 차례로 쓸 때, 10번째 수를 구하시오.

Answer: 568

Solution (Python):
var_a = 5
var_b = 3
var_c = 6
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 = 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 = 10
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
print(int(var_g))
Category: Correspondence

Question (EN): A number needs to be multiplied by 3, but you accidentally multiplied it by 6 and it ended up being 42. What is the correct calculation result?
Question (KO): 어떤 수에 3을 곱해야 하는데 실수로 6을 곱했더니 42가 됐습니다. 바르게 계산한 결과는 무엇입니까?

Answer: 21

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

Question (EN): There are pigs and chickens on Seungwoo's farm. Chickens outnumber pigs by 12. Also, the sum of the number of chickens and the number of pigs is 40 more than 12. Find the product of the number of chickens and the number of pigs.
Question (KO): 승우네 농장에 돼지와 닭이 있습니다. 닭은 돼지보다 12마리가 많습니다. 또한 닭의 수와 돼지의 수의 합은 12보다 40만큼 많습니다. 닭의 수와 돼지의 수의 곱을 구하시오.

Answer: 640

Solution (Python):
var_a = 40
var_b = 2
var_c = var_a / var_b
var_d = 12
var_e = var_c + var_d
var_f = 40
var_g = 2
var_h = var_f / var_g
var_i = var_e * var_h
print(int(var_i))
Category: Correspondence

Question (EN): Hyejin's monthly evaluation score is 82 for ethics, 90 for Korean language, 88 for science, and 84 for social studies. The score for mathematics is unknown. When the average score is 88, what is the score for mathematics?
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): Jisoo and Yoongi rode bicycles. The two started from the same place, Yoongi ran 22 kilometers (km) in one hour, and Jisoo ran 19,000 meters (m) in one hour. Who rode more?
Question (KO): 지수와 윤기는 자전거를 탔습니다. 두 사람은 같은 곳에서 출발하여 윤기는 1시간 동안 22킬로미터(㎞)를 달렸고 지수는 1시간 동안 19000미터(m)를 달렸습니다. 누가 더 많이 달렸습니까?

Answer: Jisoo

Solution (Python):
var_a = 'Jisoo'
var_b = 'Yoongi'
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 = 22
var_d = 1000
var_e = var_c * var_d
var_f = 19000
list_b= []
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)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Geometry

Question (EN): Some polygons are said to have six diagonals drawn from one vertex. How many vertices does this polygon have?
Question (KO): 어떤 다각형은 한 꼭짓점에서 6개의 대각선을 그을 수 있다고 합니다. 이 다각형의 꼭짓점의 개수는?

Answer: 9

Solution (Python):
var_a = 6
var_b = 3
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): There is a bill with a width of 3 centimeters (cm) and an area of 1.77 square centimeters (cm2). How many centimeters (cm) is the length of this bill?
Question (KO): 가로의 길이가 3센티미터(㎝)이고 넓이가 1.77제곱센티미터(㎠)인 지폐가 있습니다. 이 지폐의 세로의 길이는 몇 센티미터(㎝) 입니까?

Answer: 0.59

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

Question (EN): Three of the number cards from 1 to 9 were drawn to make the number 735. How many number cards drawn have a value greater than 4? 
Question (KO): 1부터 9까지의 숫자카드 중 3장을 뽑아 735라는 숫자를 만들었다. 뽑은 숫자카드들 중 4보다 큰 값은 몇 개인지 구하시오.

Answer: 2

Solution (Python):
var_a = 735
list_a = []
var_a = int(var_a)
while var_a//10 > 0:
    list_a.append(var_a%10)
    var_a = var_a//10
list_a.append(var_a%10)
list_a = list_a[::-1]
var_b = 4
list_b = []
for i in list_a:
    if i > var_b:
        list_b.append(i)
var_c = len(list_b)
print(int(var_c))
Category: Geometry

Question (EN): One piece of colored paper is a square with sides measuring 30 centimeters (cm). What is the area of this piece of colored paper?
Question (KO): 어떤 색종이는 한 변이 30센티미터(㎝)인 정사각형 모양입니다. 이 색종이의 넓이는?

Answer: 900

Solution (Python):
var_a = 30
var_b = 2
var_c = var_a ** var_b
print(int(var_c))
Category: Correspondence

Question (EN): The equation A85-2B=364 makes. What number should go in A?
Question (KO): 등식 A85-2B=364이 성립한다고 합니다. A에 들어가야 하는 숫자는 무엇인가요?

Answer: 3

Solution (Python):
var_a = 'A85-2B=364'
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: Geometry

Question (EN): The diameter of a circle is 26 centimeters (cm). Then how long is the radius in centimeters (cm)?
Question (KO): 어느 원의 지름이 26센티미터(㎝)입니다. 이 때, 반지름의 길이는 몇 센티미터(㎝)인가요?

Answer: 13

Solution (Python):
var_a = 26
var_b = 2
var_c = var_a / var_b
print(int(var_c))
Category: Comparison

Question (EN): 4 students said one number each. The sum is 531, and the sum of the numbers uttered by the first student and the second student is 31 greater than the sum of the numbers spoken by the third and fourth students, and the third student said a number 22 greater than that of the fourth student. What number did the third student say?
Question (KO): 4명의 학생이 숫자를 말했습니다. 합은 총 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): If we divide the father's age by the son's age, the result was 3, 7 years ago. Their ages will combine to 74 after 8 years. What will be the age of the father in 8 years' time?
Question (KO): 아버지의 나이를 아들의 나이로 나누면 3이였던 때가 7년전입니다. 8년 후에는 둘의 나이가 합쳐서 74살이라면, 8년 후 아버지의 춘추를 구하십시오.

Answer: 48

Solution (Python):
var_a = 74
var_b = 8
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 7
var_g = 2
var_h = var_f * var_g
var_i = var_e - var_h
var_j = 3
var_k = 1
var_l = var_j + var_k
var_m = var_i // var_l
var_n = 3
var_o = var_m * var_n
var_p = 7
var_q = var_o + var_p
var_r = 8
var_s = var_q + var_r
print(int(var_s))
Category: Correspondence

Question (EN): I need to subtract 32 from a certain number, but I mistakenly subtracted 23, so I got 14. Find the number.
Question (KO): 어떤 수에서 32를 빼야 하는데 잘못하여 23을 뺐더니 14가 되었습니다. 어떤 수를 구하시오.

Answer: 37

Solution (Python):
var_a = 14
var_b = 23
var_c = var_a + var_b
print(int(var_c))
Category: Correspondence

Question (EN): What number must be in B to make A3B-41=591?
Question (KO): A3B-41=591라는 식이 성립하려면, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 2

Solution (Python):
var_a = 'A3B-41=591'
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: Geometry

Question (EN): There are three points that are not on a straight line. How many straight lines are possible with these three points?
Question (KO): 한 직선 위에 있지 않는 세 점이 있습니다. 이 세 점으로 가능한 직선의 개수는?

Answer: 3

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

Question (EN): What is the largest number that can be made by using the number cards 7 and 3 all once?
Question (KO): 숫자 카드 7, 3을 한 번씩 모두 사용하여 만들 수 있는 가장 큰 수는 얼마입니까?

Answer: 73

Solution (Python):
var_a = 7
var_b = 3
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 = len(list_a)
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_c))
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_d = 1
list_c=list_b.copy()
list_c.sort()
var_e = list_c[-var_d]
print(int(var_e))
Category: Correspondence

Question (EN): If you multiply a variable by 5 and then by 7, you get 5 and 4/9. Find the variable to two decimal places.
Question (KO): 어떤 수에 5를 곱하고 7을 곱했더니 5와 4/9가 되었습니다. 어떤 수가 얼마인지 소수 2번째 자리까지 나타내어 보세요.

Answer: 0.16

Solution (Python):
var_a = 5
var_b = 0.4444444444444444
var_c = var_a + var_b
var_d = 7
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): What is the largest two-digit number that is both a multiple of 3 and a multiple of 5?
Question (KO): 3의 배수이면서 5의 배수인 수 중 가장 큰 두 자리 수는?

Answer: 90

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 = 3
list_b = []
var_d = int(var_d)
for i in list_a:
    i = int(i)
    if i % var_d == 0:
        list_b.append(i)
var_e = 5
list_c = []
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i % var_e == 0:
        list_c.append(i)
var_f = 1
list_d=list_c.copy()
list_d.sort()
var_g = list_d[-var_f]
print(int(var_g))
Category: Possibility

Question (EN): Among the single-digit natural numbers A, B, and C, count the number of A, B, and C that satisfies  A + B + C < 7.
Question (KO): 한자리 자연수 A, B, C중 A + B + C < 7을 만족하는 A,B,C의 개수를 구하시오.

Answer: 20

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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=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 = 7
list_d = []
for i in list_c:
    if i < var_f:
        list_d.append(i)
var_g = len(list_d)
print(int(var_g))
Category: Geometry

Question (EN): There is a flower garden in the shape of a rectangle measuring 5 meters (m) long and 17/20 meters (m) wide. Find the area in square centimeters (cm2) of this flower field.
Question (KO): 가로가 5미터(m)이고, 세로가 17/20미터(m)인 직사각형 모양의 꽃밭이 있습니다. 이 꽃밭의 넓이는 몇 제곱센티미터(㎠)지 구하시오.

Answer: 42500

Solution (Python):
var_a = 5
var_b = 0.85
var_c = var_a * var_b
var_d = 100
var_e = 100
var_f = var_d * var_e
var_g = var_c * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There are six numbers 3/2, 2.3, 1/5, 1.1, 5/2, 4/5. How many of these numbers are greater than 1 and less than 2?
Question (KO): 6개의 수 3/2, 2.3, 1/5, 1.1, 5/2, 4/5가 있습니다. 이 중에서 1보다 크고 2보다 작은 수는 모두 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 1.5
var_b = 2.3
var_c = 0.2
var_d = 1.1
var_e = 2.5
var_f = 0.8
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 = 1
list_b = []
for i in list_a:
    if i > var_g:
        list_b.append(i)
var_h = 2
list_c = []
for i in list_b:
    if i < var_h:
        list_c.append(i)
var_i = len(list_c)
print(int(var_i))
Category: Correspondence

Question (EN): Find the value, including the decimal point, of subtracting the possible smallest from the largest of the two decimal numbers that becomes 1.7 when rounded to two decimal places.
Question (KO): 소수 2번째 자리에서 반올림하면 1.7이 되는 소수 두 자리 수 중 가장 큰 수에서 가장 작은 수를 뺀 값을 소수점을 포함하여 구하시오.

Answer: 0.09

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

Question (EN): What is the sum of 8 groups of 100 and 7 groups of 10 and count it 5 jumps in increments of 10?
Question (KO): 100개씩 묶음 8개와 10개씩 묶음 7개를 합한 수에서 10씩 커지게 5번 뛰어서 세면 얼마입니까?

Answer: 920

Solution (Python):
var_a = 100
var_b = 8
var_c = var_a * var_b
var_d = 10
var_e = 7
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 10
var_i = 5
var_j = var_h * var_i
var_k = var_g + var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): How many natural numbers from 1 to 100 have a remainder of 2 when divided by 5?
Question (KO): 1부터 100까지의 자연수 중 5로 나누었을 때 나머지가 2인 수는 몇 개입니까?

Answer: 20

Solution (Python):
var_a = 1
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 5
var_e = 2
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = len(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): Machine A makes 8 products per minute, and machine B makes 10 products per minute. When started making products at the same time, machine B made 100 products. How many more products did machine B make than machine A?
Question (KO): (가) 기계는 제품을 1분에 8개씩 만들고, (나) 기계는 1분에 10개씩 만든다. 동시에 제품을 만들기 시작했을 때 (나) 기계가 100개의 제품을 만들었다. (나) 기계는 (가) 기계보다 제품을 몇 개 더 많이 만들었는가?

Answer: 20

Solution (Python):
var_a = 100
var_b = 100
var_c = 10
var_d = var_b / var_c
var_e = 8
var_f = var_d * var_e
var_g = var_a - var_f
print(int(var_g))
Category: Comparison

Question (EN): Jungkook collected 6 divided by 3, Yoongi collected 4, and Yuna collected 5. Who got the biggest number?
Question (KO): 정국이는 6에서 3을 나눈 몫 만큼 모았고, 윤기는 4, 유나는 5만큼 모았습니다. 누가 가장 큰 수를 모았습니까?

Answer: Yuna

Solution (Python):
var_a = 'Jungkook'
var_b = 'Yoongi'
var_c = 'Yuna'
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 = 6
var_e = 3
var_f = var_d // var_e
var_g = 4
var_h = 5
list_b= []
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()
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): There are 15 consecutive natural numbers between 52 and a certain number. If the certain number is greater than 52, which number is in the middle between 52 and the certain number?
Question (KO): 52와 어떤 자연수 사이에는 연속된 자연수가 15개 있습니다. 어떤 수는 52보다 큰 수일 때, 52와 어떤 수 사이에 있는 수 중 한가운데 있는 수는 무엇입니까?

Answer: 60

Solution (Python):
var_a = 52
var_b = 15
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
var_f = 52
var_g = var_e + var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Comparison

Question (EN): The academy is on the 7th floor. The reading room is 4 floors higher than the academy, and the bookstore is 9 floors lower than the reading room. What floor is the bookstore on?
Question (KO): 학원은 7층입니다. 독서실은 학원보다 4층 높고, 서점은 독서실보다 9층 낮습니다. 서점은 몇 층입니까?

Answer: 2

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

Question (EN): The number of questions answered by 6 people in Dongwoo's group is 16, 22, 30, 26, 18, and 20. On average, how many questions did Dongwoo's group get right?
Question (KO): 동우네 모둠 6명이 이번 쪽지 시험에서 맞춘 문제의 수는 16, 22, 30, 26, 18, 20개입니다. 동우네 모둠이 맞춘 문제는 평균 몇 개입니까?

Answer: 22

Solution (Python):
var_a = 16
var_b = 22
var_c = 30
var_d = 26
var_e = 18
var_f = 20
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()
list_a = [float(i) for i in list_a]
var_g = sum(list_a)/len(list_a)
print(int(var_g))
Category: Correspondence

Question (EN): The four-digit number 2A3A is a multiple of 9. What is A?
Question (KO): 네 자리 수 2A3A는 9의 배수이다. A는 무엇인가?

Answer: 2

Solution (Python):
var_a = '2A3A'
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 = 9
list_b = []
var_b = int(var_b)
for i in list_a:
    i = int(i)
    if i % var_b == 0:
        list_b.append(i)
var_c = '2A3A'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
var_e = 0
for elem in list_b:
    elem = str(elem)
    var_e = int(elem[unk_idx])
print(int(var_e))
Category: Correspondence

Question (EN): Subtract 263 from a certain number and add 419, resulting in 725. Find the number.
Question (KO): 어떤 수에서 263을 빼고 419를 더하면 725이다. 어떤 수를 구하시오.

Answer: 569

Solution (Python):
var_a = 725
var_b = 419
var_c = var_a - var_b
var_d = 263
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): A factory is trying to pack pencils, but if you pack them in 5 units, 4 will remain, if you pack in 7 units, 6 units will remain, and if you pack in 8 units, 7 units will remain. If the number of pencils made by this factory is the smallest natural number between 1000 and 9999, how many pencils are there?
Question (KO): 공장에서 연필을 포장하려고 하는데 5개씩 포장하면 4개가 남고, 7개씩 포장하면 6개가 남고, 8개씩 포장하면 7개가 남는다고 한다. 이 공장이 만든 연필의 개수가 1000이상 9999이하의 자연수 중 가장 작은 수라고 할때 연필의 개수는 몇 개인지 구하시오.

Answer: 1119

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 = 8
var_e = 7
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 7
var_g = 6
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 5
var_i = -1
list_d = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_c:
    i = int(i)
    if i%var_h == var_i:
        list_d.append(i)
var_j = 1
list_e=list_d.copy()
list_e.sort()
var_k = list_e[var_j-1]
print(int(var_k))