philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): When 3A5-2B=364 is true, what number should go in B?
Question (KO): 3A5-2B=364이 성립할 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 1

Solution (Python):
var_a = '3A5-2B=364'
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: Comparison

Question (EN): Hyenas run at a steady speed of 2.1 kilometers (km) per minute, and cheetahs run at 10.5 kilometers (km) in 4 minutes. Which animal can be said to be faster?
Question (KO): 하이에나는 일정한 빠르기로 1분에 2.1킬로미터(㎞)를 뛰고, 치타는 4분에 10.5킬로미터(㎞)를 뜁니다. 어느 동물이 더 빠르다고 할 수 있습니까?

Answer: cheetah

Solution (Python):
var_a = 'Hyena'
var_b = 'cheetah'
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.1
var_d = 1
var_e = var_c / var_d
var_f = 10.5
var_g = 4
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): Jimin has 2 times more marbles than Seokjin and Yuna has 1 less marble than Seokjin. If Seokjin has 3 marbles, how many more marbles does Jimin have than Yuna?
Question (KO): 지민이는 석진이보다 구슬을 2배 더 많이 갖고 있고 유나는 석진이보다 구슬을 1개 더 적게 가지고 있습니다. 석진이가 구슬 3개를 가지고 있을 때 지민이는 유나보다 구슬을 몇 개 더 많이 가지고 있습니까?

Answer: 4

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

Question (EN): There are two different numbers A and B. Find the sum of A and B in the two-digit subtraction formula A5-2A=B7.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 두 자리 수끼리의 뺄셈식 A5-2A=B7에서 A와 B의 합을 구하시오.

Answer: 13

Solution (Python):
var_a = 'A5-2A=B7'
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 = 'A5-2A=B7'
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): You are going to create a three-digit number using the numbers from 0 to 7, excluding odd numbers. What is the sum of the three-digit numbers that can be created with different digits?
Question (KO): 0부터 7까지 수 중 홀수를 제외한 수를 이용하여 세 자리 수를 만들고자 한다. 만들 수 있는 세 자리 자연수들 중 각 자리의 숫자가 모두 다른 수들의 합은 얼마인가?

Answer: 7728

Solution (Python):
var_a = 0
var_b = 7
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.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]
list_b = [float(i) for i in list_b]
var_d = sum(list_b)
print(int(var_d))
Category: Correspondence

Question (EN): Subtract 25 from 3/4 of a number, divide by 7, and add 50 to get 100. Find the number.
Question (KO): 어떤 수의 3/4에서 25를 빼고 7로 나눈 뒤 50을 더하면 100이 됩니다. 어떤 수를 구하시오.

Answer: 500

Solution (Python):
var_a = 100
var_b = 50
var_c = var_a - var_b
var_d = 7
var_e = var_c * var_d
var_f = 25
var_g = var_e + var_f
var_h = 0.75
var_i = var_g / var_h
print(int(var_i))
Category: Correspondence

Question (EN): When 26 is divided by A, the quotient is 8 and the remainder is 2. A is a natural number. What is A in this case?
Question (KO): 26을 A으로 나눴을 때 몫이 8, 나머지가 2 였습니다. A는 자연수입니다. 이 때 A는 무엇인가요?

Answer: 3

Solution (Python):
var_a = 26
var_b = 2
var_c = var_a - var_b
var_d = 8
var_e = var_c / var_d
print(int(var_e))
Category: Possibility

Question (EN): Write the difference between the largest 4-digit number and the smallest 4-digit number that can be made by using all of the given number marbles 0, 3, 4, and 8 once.
Question (KO): 주어진 숫자 구슬 0, 3, 4, 8을 한 번씩 모두 사용하여 만들 수 있는 가장 큰 네 자리 수와 가장 작은 네 자리 수의 차를 쓰시오.

Answer: 5382

Solution (Python):
var_a = 0
var_b = 3
var_c = 4
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 = 4
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
var_k = abs(var_j)
print(int(var_k))
Category: Correspondence

Question (EN): 38A-B1=364 holds. What is A?
Question (KO): 38A-B1=364이 성립합니다. A는 무엇인가요?

Answer: 5

Solution (Python):
var_a = '38A-B1=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: Possibility

Question (EN): Find the smallest number that can be formed by using the numbers 1, 5, and 2 all at once.
Question (KO): 숫자 1, 5, 2를 한 번씩 모두 이용하여 만들 수 있는 수 중 가장 작은 수를 구하시오,

Answer: 125

Solution (Python):
var_a = 1
var_b = 5
var_c = 2
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)
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-1]
print(int(var_f))
Category: Comparison

Question (EN): There are 4 vases, (a), (b), (c), and (d). Vase (a) is smaller than vase (c). Vase (d) is smaller than vase (a). Vase (b) is larger than vase (c). What is the largest vase?
Question (KO): (가), (나), (다), (라) 4개의 꽃병이 있습니다. (가) 꽃병은 (다) 꽃병보다 작습니다. (라) 꽃병은 (가) 꽃병보다 작습니다. (나) 꽃병은 (다) 꽃병보다 큽니다. 크기가 가장 큰 꽃병은 무엇입니까?

Answer: (b)

Solution (Python):
var_a = '(a)'
var_b = '(b)'
var_c = '(c)'
var_d = '(d)'
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 = '(c)'
var_f = '(a)'
var_g = '>'
var_h = '(d)'
var_i = '(a)'
var_j = '<'
var_k = '(c)'
var_l = '(b)'
var_m = '<'
list_b= []
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)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
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_n = 1
var_o = list_c[var_n-1]
print(var_o)
Category: Possibility

Question (EN): How many two-digit numbers can be made using even numbers only once among the unit digit less than 10?
Question (KO): 10 미만의 한 자리 수 중 짝수만을 한 번씩만 이용하여 만들 수 있는 두 자리 자연수의 개수는 모두 몇 가지인가?

Answer: 16

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

Question (EN): The fruit basket at the supermarket contains 4 bananas and 3 apples. Today, 25 more fruit baskets came in, resulting in the number of apples in the fruit basket to 150. Find the number of bananas by yesterday.
Question (KO): 마트에 있는 과일 바구니에 바나나가 4개, 사과가 3개 들어있습니다. 오늘 과일 바구니 25개가 더 들어와서 과일바구니에 있는 사과의 개수가 150개가 되었다. 어제까지 바나나의 개수를 구하시오.

Answer: 100

Solution (Python):
var_a = 150
var_b = 3
var_c = var_a / var_b
var_d = 25
var_e = var_c - var_d
var_f = 4
var_g = var_e * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Taehyung and Jimin are folding scabs together. If Taehyung can fold 256 in 4 hours and Jimin can fold 111 in 3 hours, how many scabs did Taehyung and Jimin fold after 3 hours?
Question (KO): 태형이와 지민이가 함께 딱지접기를 하고 있습니다. 태형이는 4시간에 256개를 접고 지민이는 3시간에 111개를 접을 수 있다면 3시간 후에 태형이와 지민이가 접은 딱지의 개수는 몇 개인지 구하세요.

Answer: 303

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

Question (EN): I want to create four-digit numbers by using all the natural numbers 7, 6, 5, and 8 once. Among the numbers I can make, what is the sum of the third largest number and the third smallest number?
Question (KO): 7, 6, 5, 8의 자연수를 한 번씩 모두 사용해서 네 자리 숫자를 만들고 싶습니다. 만들 수 있는 수 중 세 번째 큰 수와 세 번째 작은 수의 합은 얼마입니까?

Answer: 14443

Solution (Python):
var_a = 7
var_b = 6
var_c = 8
var_d = 5
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 = len(list_a)
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))
Category: Possibility

Question (EN): There are 5 employees. Among them, you are going to select two people and give one a special prize and the other a second prize. How many cases are there?
Question (KO): 5명의 직원이 있다. 이 중 2명을 뽑아 한 명에게 특상을, 다른 한 명에게 2등상을 주려고 한다. 몇 가지의 경우가 있겠는가?

Answer: 20

Solution (Python):
var_a = 5
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)
print(int(var_c))
Category: Possibility

Question (EN): You want to create a three-digit number by drawing three out of 5, 6, 4, and 7 and using them only once. After finding the fourth smallest possible number, find the sum of its digits.
Question (KO): 5, 6, 4, 7 중에서 3개를 뽑아 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 네 번째로 작은 수를 구한 후, 각 자리 수의 합을 구하시오.

Answer: 17

Solution (Python):
var_a = 5
var_b = 6
var_c = 4
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 = 4
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
list_d = []
var_g = int(var_g)
while var_g//10 > 0:
    list_d.append(var_g%10)
    var_g = var_g//10
list_d.append(var_g%10)
list_d = list_d[::-1]
list_d = [float(i) for i in list_d]
var_h = sum(list_d)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): Three of the number cards from 1 to 9 were drawn to make the number 735. Find the sum of the numbers greater than 4 among the number cards drawn.
Question (KO): 1부터 9까지의 숫자카드 중 3장을 뽑아 735라는 숫자를 만들었다. 뽑은 숫자카드들 중 4보다 큰 값들의 합은 얼마인지 구하시오.

Answer: 12

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)
list_b = [float(i) for i in list_b]
var_c = sum(list_b)
print(int(var_c))
Category: Comparison

Question (EN): The weight of the clay Yerim used to make the pottery is 0.65 kg (kg) and the weight of the clay used by Chanwoo is 0.645 kg (kg). Who used more clay?
Question (KO): 도자기를 만드는 데 예림이가 사용한 찰흙의 무게는 0.65킬로그램(㎏)이고 찬우가 사용한 찰흙의 무게는 0.645킬로그램(㎏) 입니다. 찰흙을 더 많이 사용한 사람은 누구입니까?

Answer: Yerim

Solution (Python):
var_a = 'Yerim'
var_b = 'Chanwoo'
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 = 0.65
var_d = 0.645
list_b= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Correspondence

Question (EN): I mistakenly divide a number by 23 when a number should be divided by 32 and it turns out that the quotient is 3 and the remainder is 17. Find the sum of the quotient and remainder when calculated correctly.
Question (KO): 어떤 수를 32로 나누어야 할 것을 잘못하여 23으로 나누었더니 몫이 3이고 나머지가 17이었습니다. 바르게 계산했을 때의 몫과 나머지의 합을 구해 보시오.

Answer: 24

Solution (Python):
var_a = 3
var_b = 23
var_c = var_a * var_b
var_d = 17
var_e = var_c + var_d
var_f = 32
var_g = var_e // var_f
var_h = 3
var_i = 23
var_j = var_h * var_i
var_k = 17
var_l = var_j + var_k
var_m = 32
var_n = var_l % var_m
var_o = var_g + var_n
print(int(var_o))
Category: Possibility

Question (EN): You want to divide 10 identical flowers into 2 different vases. You must place at least one flower in a vase. What is the number of possible ways to divide flowers?
Question (KO): 서로 같은 꽃 10송이를 서로 다른 2개의 꽃병에 나누어 꽂으려고 합니다. 꽃병에는 적어도 꽃 1송이를 꽂습니다. 꽃을 나누어 꽂는 방법은 모두 몇 가지입니까?

Answer: 9

Solution (Python):
var_a = 10
var_b = 2
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): The average score for Korean, English, and Mathematics is 92 points. If Social Studies is 90 points and Physical Education is 95 points, what is the average score for Korean, English, Mathematics, Social Studies, and Physical Education?
Question (KO): 국어, 영어, 수학의 평균 점수는 92점이다. 사회는 90점, 체육은 95점일때 국어, 영어, 수학, 사회, 체육의 평균 점수는 몇 점인가

Answer: 92.2

Solution (Python):
var_a = 92
var_b = 3
var_c = var_a * var_b
var_d = 90
var_e = var_c + var_d
var_f = 95
var_g = var_e + var_f
var_h = 5
var_i = var_g / var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Possibility

Question (EN): Jungkook has 3 red balls and 2 yellow balls. When Jungkook gives 1 yellow ball to Yoongi, how many red balls does Jungkook have?
Question (KO): 정국이는 빨간 공 3개와 노란 공 2개를 가지고 있습니다. 정국이가 윤기에게 노란 공 1개를 주었을 때, 정국이는 빨간 공을 몇 개 가지고 있습니까?

Answer: 3

Solution (Python):
var_a = 3
print(int(var_a))
Category: Comparison

Question (EN): How many numbers in 1.4, 9/10, 1.2, 0.5, 13/10 are less than or equal to 1.1?
Question (KO): 1.4, 9/10, 1.2, 0.5, 13/10에서 1.1보다 작거나 같은 숫자는 몇 개 일까요?

Answer: 2

Solution (Python):
var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
list_a= []
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 1.1
list_b = []
for i in list_a:
    if i <= var_f:
        list_b.append(i)
var_g = len(list_b)
print(int(var_g))
Category: Possibility

Question (EN): I'm going to pick two out of apples, peaches, pears, and melons and put them in different fruit baskets. How many possible cases are there?
Question (KO): 사과, 복숭아, 배, 참외 중 2개를 뽑아 서로 다른 과일 바구니에 담으려고 합니다. 가능한 경우의 수는 모두 몇 가지입니까?

Answer: 12

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