philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): When 6A5+B03=748, find A.
Question (KO): 6A5+B03=748일 때, A를 구하시오.

Answer: 4

Solution (Python):
var_a = '6A5+B03=748'
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: Comparison

Question (EN): There are boxes A, B, and C with balls in them. Box A has fewer balls than Box B, and Box C has more balls than Box A. If Box C contains more balls than Box B, which box has the most balls?
Question (KO): 공이 들어있는 A, B, C 상자가 있습니다. A 상자에는 B 상자보다 더 적은 공이 들어있고, C 상자에는 A 상자보다 더 많은 공이 들어있습니다. C 상자에 B 상자보다 더 많은 공이 들어있다면 가장 많은 공이 들어있는 상자는 어떤 상자인가요?

Answer: C

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
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 = 'C'
var_e = 'A'
var_f = '>'
var_g = 'A'
var_h = 'B'
var_i = '<'
var_j = 'C'
var_k = 'B'
var_l = '>'
list_b= []
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)
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_m = 1
var_n = list_c[var_m-1]
print(var_n)
Category: Geometry

Question (EN): I drew the largest rhombus in a circle with a radius of 10 centimeters (cm), and then drew a smaller rhombus by connecting the middle of all four sides of the rhombus. What is the area of the small rhombus in square centimeters (cm2)?
Question (KO): 반지름이 10센티미터(㎝)인 원 안에 가장 큰 마름모를 그린 다음, 마름모의 네 변의 한가운데를 모두 이어 작은 마름모를 그렸습니다. 작은 마름모의 넓이는 몇 제곱센티미터입니까?

Answer: 100

Solution (Python):
var_a = 10
var_b = 2
var_c = var_a * var_b
var_d = 2
var_e = var_c ** var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Possibility

Question (EN): I'm trying to draw 2 fruits out of apples, peaches, and pears and line them up. How many possible cases are there?
Question (KO): 사과, 복숭아, 배 중에서 2가지의 과일을 뽑아 줄을 세우려고 합니다. 가능한 경우의 수는 모두 몇 가지인가요?

Answer: 6

Solution (Python):
var_a = 'apples'
var_b = 'peaches'
var_c = 'pears'
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 = len(list_a)
var_e = 2
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
    var_f = var_f * (var_d-i)
print(int(var_f))
Category: Geometry

Question (EN): Find the area in square centimeters (cm2) of a rhombus where the length of one diagonal is three times 6 centimeters (cm), and the length of the other diagonal is three times 4 centimeters (cm).
Question (KO): 한 대각선의 길이는 6센티미터(㎝)의 3배이고, 다른 대각선의 길이는 4센티미터(㎝)의 3배인 마름모의 넓이는 몇 제곱센티미터(㎠)인지 구하시오.

Answer: 108

Solution (Python):
var_a = 6
var_b = 3
var_c = var_a * var_b
var_d = 4
var_e = 3
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: Correspondence

Question (EN): Jiho used 13/5 pieces of rubber clay to make a model. After making another identical piece, the remaining rubber clay was 9/7. Find the amount of rubber clay Jiho had at the beginning.
Question (KO): 지호가 어떤 모형을 만드는데 고무 찰흙을 13/5개 사용했다. 동일한 작품을 하나 더 만들고 남은 고무 찰흙이 9/7이었다. 지호가 처음에 가지고 있던 고무 찰흙의 양을 구하여라.

Answer: 6.49

Solution (Python):
var_a = 1.2857142857142858
var_b = 2.6
var_c = var_a + var_b
var_d = 2.6
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Possibility

Question (EN): Find the number of three-digit numbers where each digit is even.
Question (KO): 각 자리 수가 모두 짝수인 세 자리 수의 개수를 구하시오.

Answer: 100

Solution (Python):
var_a = 0
var_b = 9
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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=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 = len(list_b)
print(int(var_d))
Category: Arithmetic calculation

Question (EN): You decided to put 235 candies in a box of 10 and sell them for 3,000 won. What is the maximum amount of money you can make selling boxed candy?
Question (KO): 사탕 235개를 한 상자에 10개씩 담아 3000원에 팔기로 했습니다. 상자에 담은 사탕을 팔아서 벌 수 있는 돈은 최대 얼마입니까?

Answer: 69000

Solution (Python):
var_a = 235
var_b = 10
var_c = var_a // var_b
var_d = 3000
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): A turtle moves 15 meters (m) in 3 minutes at a constant speed. How many minutes does it take for a tortoise to travel 140 meters (m)?
Question (KO): 일정한 빠르기로 3분 동안 15미터(m)를 움직이는 거북이가 있습니다. 거북이가 140미터(m)를 이동하기 위해서는 몇 분이 필요합니까?

Answer: 28

Solution (Python):
var_a = 140
var_b = 15
var_c = 3
var_d = var_b / var_c
var_e = var_a / var_d
print(int(var_e))
Category: Geometry

Question (EN): Jaeho has a field in the shape of a rectangle. One side of this field is 5.9 meters (m) long and the other side is 3 meters (m) long. Find the area of this field.
Question (KO): 재호는 직사각형 모양의 밭을 가지고 있습니다. 이 밭의 한 변의 길이는 5.9미터(m)이고 다른 한 변의 길이는 3미터(m)입니다. 이 밭의 넓이를 구하시오.

Answer: 17.7

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

Question (EN): Namjoon was the second to arrive at school, and Jimin arrived just before Namjoon. In what place did Jimin enter school?
Question (KO): 남준이는 학교에 2번째로 도착했고, 지민이는 남준이보다 바로 전에 학교에 도착했습니다. 지민이는 몇 번째로 도착했습니까?

Answer: 1

Solution (Python):
var_a = 2
var_b = 1
var_c = var_a - var_b
print(int(var_c))
Category: Comparison

Question (EN): There are vineyards in the village (a), (b) and (c). If village (c) harvested fewer bunches of grapes than village (a), and village (b) harvested more bunches of grapes than village (a), find which village harvested the fewest bunches of grapes.
Question (KO): (가), (나), (다) 마을에는 포도밭이 있습니다. (다) 마을은 (가) 마을보다 더 적은 포도 송이를 수확하였고, (나) 마을은 (가) 마을보다 포도 송이를 더 많이 수확하였다면, 가장 적은 포도 송이를 수확한 마을은 어디인지 구하세요.

Answer: (c)

Solution (Python):
var_a = '(a)'
var_b = '(b)'
var_c = '(c)'
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 = '(b)'
var_e = '(a)'
var_f = '>'
var_g = '(c)'
var_h = '(a)'
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): The barrel has contained 4 fish (a) and 3 fish (b). I bought some more fish today and put them in the barrel, so there are 10 fish in total. How many more fish did I put in today?
Question (KO): 통에 (가) 물고기 4마리와 (나) 물고기 3마리가 들어 있었습니다. 오늘 물고기 몇 마리를 더 사 와서 통에 넣었더니 물고기는 모두 10마리가 되었습니다. 오늘 더 넣은 물고기는 몇 마리입니까?

Answer: 3

Solution (Python):
var_a = 10
var_b = 4
var_c = 3
var_d = var_b + var_c
var_e = var_a - var_d
print(int(var_e))
Category: Comparison

Question (EN): How many numbers greater than 256 have 5 in the tens digit and 2 in the hundreds digit?
Question (KO): 256보다 큰 수 중에서 십의 자리 숫자가 5, 백의 자리 숫자가 2인 수는 모두 몇 개인가요?

Answer: 3

Solution (Python):
var_a = 2
var_b = 5
var_c = 'A'
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=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
ans_dict = dict()
var_d = str(var_d)
list_b = []
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] = 0
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]))
    if len(var_d) == len(str(int(temp))):
        new_elem = int(temp)
        list_b.append(new_elem)
var_e = 256
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): A square has two pairs of parallel sides. If the height of this square is 8 centimeters (cm) and the area is 78.88 square cm (cm2), what is the length?
Question (KO): 두 쌍의 대변이 평행한 사각형이 있습니다. 이 사각형의 높이는 8센티미터(㎝)이고, 넓이는 78.88제곱센티미터(㎠)일 때, 밑변의 길이는 얼마인지 구하시오.

Answer: 9.86

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

Question (EN): When Jiyoung opened the fairy tale book, the sum of the pages on the two pages she opened was 217. What is the product of the number of pages unfolded?
Question (KO): 지영이가 동화책을 펼쳤더니 펼친 두 면의 쪽수의 합이 217이었습니다. 펼친 두 면의 쪽수의 곱은 얼마입니까?

Answer: 11772

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

Question (EN): The area of a trapezoid is 96.9 square centimeters (cm2). If the lower side is 3.6 centimeters (cm) shorter than the upper side and the height is 5.2 centimeters (cm), how many centimeters (cm) is the lower side?
Question (KO): 어떤 사다리꼴의 넓이가 96.9제곱센티미터(㎠)입니다. 아랫변이 윗변보다 3.6센티미터(㎝) 더 짧고, 높이가 5.2센티미터(㎝)라면 아랫변은 몇 센티미터(㎝)입니까?

Answer: 16.85

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

Question (EN): Find how many single digits are in all from 2 to 100.
Question (KO): 2부터 100까지의 수 중에서 한 자리 수는 모두 몇 개인지 구하시오.

Answer: 8

Solution (Python):
var_a = 2
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 9
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: Possibility

Question (EN): We are going to divide 54 apples equally into every plate. How many different ways can you portion it out on a plate? (However, not all 54 apples are placed on one plate.)
Question (KO): 사과 54개를 접시에 남김없이 똑같이 나누어 담으려고 합니다. 접시에 나누어 담을 수 있는 방법은 모두 몇 가지일까요? (단, 사과 54개를 접시 한 개에 모두 담지 않습니다.)

Answer: 7

Solution (Python):
var_a = 54
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 = 54
list_b= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_b.append(var_b)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_c = len(list_c)
print(int(var_c))
Category: Geometry

Question (EN): You are going to make as many small square pieces as possible by cutting out a large rectangular piece of paper measuring 262 centimeters (cm) long and 185 centimeters (cm) wide. Find how many square pieces of paper you can make.
Question (KO): 가로가 262센티미터(㎝)이고 세로가 185센티미터(㎝)인 직사각형 모양의 큰 도화지를 오려서 한 변이 18센티미터(㎝)인 정사각형 모양의 작은 종이를 될 수 있는 대로 많이 만들려고 합니다. 정사각형 모양의 종이는 모두 몇 장까지 만들 수 있는지 구해 보시오.

Answer: 140

Solution (Python):
var_a = 262
var_b = 18
var_c = var_a // var_b
var_d = 185
var_e = 18
var_f = var_d // var_e
var_g = var_c * var_f
print(int(var_g))
Category: Correspondence

Question (EN): If 2A3+36=269, what number should go in A?
Question (KO): 2A3+36=269일 때, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 3

Solution (Python):
var_a = '2A3+36=269'
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: Arithmetic calculation

Question (EN): Taehyung and Namjoon bought 10 pieces of colored paper each and used several of them. When Taehyung gave 3 of the remaining pieces of colored paper to Namjoon, the number of pieces of colored paper they both had ended up to 6. How many pieces of colored paper did Namjoon use?
Question (KO): 태형이와 남준이는 색종이를 각각 10장씩 사서 그중에서 몇 장을 사용했습니다. 태형이가 남은 색종이 중 3장을 남준이에게 주었더니 두 사람이 가지고 있는 색종이의 수는 각각 6장이 되었습니다. 남준이가 사용한 색종이는 몇 장입니까?

Answer: 7

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

Question (EN): Twelve candies that cost 530 won each, cost 5,400 won more than 8 chocolates. How much is one chocolate?
Question (KO): 하나에 530원인 사탕 12개가 초코릿 8개보다 5400원이 더 비싸다. 초콜릿 하나는 얼마인지 구하시오.

Answer: 120

Solution (Python):
var_a = 530
var_b = 12
var_c = var_a * var_b
var_d = 5400
var_e = var_c - var_d
var_f = 8
var_g = var_e / var_f
print(int(var_g))
Category: Possibility

Question (EN): You are about to make two-digit numbers by using two of the four cards 3, 5, 6, and 7. Find the average of the multiples of 7 you can make.
Question (KO): 3, 5, 6, 7 총 4장의 수 카드 중 2장을 사용하여 두 자리 수를 만들려고 합니다. 만들 수 있는 7의 배수의 평균을 구하시오.

Answer: 51.33

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 = 1
list_c = [float(i) for i in list_c]
var_h = sum(list_c)/len(list_c)
print('{:.2f}'.format(round(var_h+1e-10,2)))
Category: Comparison

Question (EN): Jaeyoon spun the hula hoop for 2 minutes and 5 seconds, and Seungah spun it for 183 seconds. Find out who spun the hula hoop longer.
Question (KO): 재윤이는 훌라후프를 2분 5초 동안 돌렸고 승아는 183초 동안 돌렸습니다. 훌라후프를 더 오래 돌린 사람은 누구인지 답을 구해 보세요.

Answer: Seungah

Solution (Python):
var_a = 'Jaeyoon'
var_b = 'Seungah'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 2
var_d = 60
var_e = var_c * var_d
var_f = 5
var_g = var_e + var_f
var_h = 183
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)
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): There are single digit numbers A and B. Given the number A4461B which is a multiple of 72, what is the sum of A and B?
Question (KO): 한 자리 수 A, B가 있습니다. 72의 배수인 숫자 A4461B가 있을 때, A와 B의 합은 무엇입니까?

Answer: 12

Solution (Python):
var_a = 'A4461B'
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 = 72
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 = 'A4461B'
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])
var_f = 'A4461B'
var_g = 'B'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_b:
    elem = str(elem)
    var_h = int(elem[unk_idx])
var_i = var_e + var_h
print(int(var_i))
Category: Correspondence

Question (EN): Minyeong multiplied 107.8 by a certain number and it was 9.8. Find out what number it is.
Question (KO): 민영이가 107.8 을 어떤 수로 곱하였더니 9.8 이 되었습니다. 어떤 수는 얼마인지 구하시오.

Answer: 0.09

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

Question (EN): Add all odd numbers from 1 to 20.
Question (KO): 1부터 20까지 홀수를 모두 더하시오.

Answer: 100

Solution (Python):
var_a = 1
var_b = 20
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: Correspondence

Question (EN): Some cookies come in bundles of 9 in a box, and there are 7 cookies in each bundle. If there are 13 boxes of these cookies, how many cookies are there?
Question (KO): 어떤 과자는 한 박스에 9개씩 묶음이 들어있고, 1개 묶음에 7개의 과자가 들어있다. 이 과자가 13 박스가 있다면 몇 개의 과자가 있는지 구하시오.

Answer: 819

Solution (Python):
var_a = 13
var_b = 9
var_c = var_a * var_b
var_d = 7
var_e = var_c * var_d
print(int(var_e))
Category: Geometry

Question (EN): How many pieces can be cut if a wire of length 27.9 centimeters (cm) is cut by 3.1 centimeters (cm)?
Question (KO): 길이가 27.9센티미터(㎝)인 철사를 3.1센티미터(㎝)씩 자르면 몇 토막으로 잘리는지 구하시오.

Answer: 9

Solution (Python):
var_a = 27.9
var_b = 3.1
var_c = var_a / var_b
print(int(var_c))
Category: Geometry

Question (EN): There is a frame in the shape of a square with a side length of 20 centimeters (cm). What is the area of the largest medallion that can be stored in a circular medallion? However, the ratio of circumference is assumed to be 3.14.
Question (KO): 한 변의 길이가 20센티미터(㎝)인 정사각형 모양의 틀이 있다. 이 안에 원 모양의 메달을 보관하려고 하는데, 보관할 수 있는 가장 큰 메달의 넓이는 얼마인지 구하시오. 단, 원주율은 3.14로 가정한다.

Answer: 314

Solution (Python):
var_a = 3.14
var_b = 20
var_c = 2
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 20
var_g = 2
var_h = var_f / var_g
var_i = var_e * var_h
print(int(var_i))