philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): Jungkook, Jimin, Seokjin, Taehyung, and Namjoon are standing side by side. Jungkook is standing next to Jimin's right side, and Seokjin is standing next to Jimin's left side. Also, Namjoon is standing to the left of Seokjin, and Jungkook is standing to the left of Taehyung. Who's standing on the furthest right?
Question (KO): 정국, 지민, 석진, 태형, 남준이가 나란히 서 있습니다. 정국이는 지민이의 오른쪽 옆에 나란히 서 있고, 석진이는 지민이의 왼쪽 옆에 서 있습니다. 또 남준이는 석진이의 왼쪽 옆에 서 있고, 태형이의 왼쪽 옆에는 정국이가 서 있습니다. 가장 오른쪽에 서 있는 사람은 누구입니까?

Answer: Taehyung

Solution (Python):
var_a = 'Jungkook'
var_b = 'Jimin'
var_c = 'Seokjin'
var_d = 'Taehyung'
var_e = 'Namjoon'
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 = 'Jungkook'
var_g = 'Jimin'
var_h = '>'
var_i = 'Seokjin'
var_j = 'Jimin'
var_k = '<'
var_l = 'Namjoon'
var_m = 'Seokjin'
var_n = '<'
var_o = 'Jungkook'
var_p = 'Taehyung'
var_q = '<'
list_b= []
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
    var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
    if cond_ in ("<", ">", "="):
        operand_right = temp_stack.pop()
        operand_left = temp_stack.pop()
        if cond_ == "=":
            cond_ = "=="
        conditions.append(f"{operand_left} {cond_} {operand_right}")
    else:
        if not cond_.isdigit():
            cond_ = "{" + cond_ + "}"
        temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
    item_name_index_dict = dict(zip(items_name_list, perm))
    formatted_conditions = \
        [condition.format_map(item_name_index_dict) for condition in conditions]
    if all(map(eval, formatted_conditions)):
        break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_r = 1
var_s = list_c[var_r-1]
print(var_s)
Category: Correspondence

Question (EN): When a number is multiplied by 14, it is 458.64. When a number is divided by 17, round the remainder to two decimal places.
Question (KO): 어떤 수에 14를 곱하였더니 458.64가 되었습니다. 어떤 수를 17로 나누었을 때의 나머지를 반올림하여 소수 둘째 자리까지 나타내시오.

Answer: 15.76

Solution (Python):
var_a = 458.64
var_b = 14
var_c = var_a / var_b
var_d = 17
var_e = var_c % var_d
var_f = 2
var_g = round(float(var_e)+1e-10, var_f)
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Hyunggyu jumps rope 215 times every day. If Taewoo jumps 0.32 times the number of rope jumps made by Hyeonggyu, how many times does Taewoo jump rope a day?
Question (KO): 형규는 매일 줄넘기 215회를 넘습니다. 태우는 형규가 하는 줄넘기 횟수의 0.32배를 넘는다면 태우의 하루 줄넘기 횟수는 몇 회입니까?

Answer: 68.8

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

Question (EN): There are two different numbers A and B. Find B from the two-digit subtraction equation, 9A-B4=34.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 두 자리 수끼리의 뺄셈식 9A-B4=34에서 B를 구하시오.

Answer: 6

Solution (Python):
var_a = '9A-B4=34'
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: Possibility

Question (EN): How many three-digit numbers can you make from three different numbers of the numbers 1, 3, 6, and 7?
Question (KO): 1, 3, 6, 7 중에서 서로 다른 숫자 3개를 사용하여 만들 수 있는 세 자리 수는 모두 몇 개입니까?

Answer: 24

Solution (Python):
var_a = 1
var_b = 3
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 = 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 = len(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): There are pieces of ribbon each of which is 30 centimeters (cm) long. I tied 15 pieces of ribbon to each other to make a long piece of ribbon. If 2 centimeters (cm) of a piece of ribbon is used to tie the ribbon, what is the length of the piece of ribbon made?
Question (KO): 길이가 30센티미터(㎝)인 리본이 있습니다. 리본 15개를 묶어서 긴 리본을 하나 만들었습니다. 리본을 묶는데 2센티미터(㎝)가 사용된다고 할 때, 만든 리본의 길이는 얼마입니까?

Answer: 422

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

Question (EN): Find A that satisfies 32×A×A×A=42592
Question (KO): 32×A×A×A=42592를 만족하는 A를 구하시오

Answer: 11

Solution (Python):
var_a = '32×A×A×A=42592'
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] = 0
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, 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)):
        if term_list[i] == '':
            new_eq += str(term_list[i])+op_list[i]
        else:
            new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    new_eq=new_eq.replace('=', '==')
    new_eq=new_eq.replace('>==', '>=')
    new_eq=new_eq.replace('<==', '<=')
    eval_result = False
    try:
        if '=' in new_eq and '>' not in new_eq and '<' not in new_eq:
            new_eq=new_eq.replace('==','=')
            new_eq=new_eq.replace('>','')
            new_eq=new_eq.replace('<','')
            new_eq=new_eq.split('=')
            for i in range(len(new_eq)-1):
                eval_result = math.isclose(eval(new_eq[i]), eval(new_eq[i+1]))
                if not eval_result:
                    break
        else:
            eval_result = eval(new_eq)
    except:
        eval_result = False
        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): A pink rabbit and a white rabbit is running a race. The pink rabbit ran at a speed of 15 kilometers per hour (km), and the white rabbit ran at a speed of 10 kilometers per hour (km), arriving 30 minutes later than the pink rabbit. Find the time it took for the pink rabbit to arrive.
Question (KO): 분홍 토끼와 하양 토끼가 경주를 한다. 분홍 토끼는 시속 15킬로미터(㎞)의 속도로 달렸고, 하양 토끼는 시속 10킬로미터(㎞)의 속도로 달렸는데 분홍 토끼보다 30분 늦게 도착했다. 분홍 토끼가 도착할때 까지 걸린 시간을 구하시오.

Answer: 1

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

Question (EN): Taehyung is trying to get to his grandmother's house, which is 300 kilometers (km) away on a motorcycle at 60 kilometers (km) per hour. Find how far Taehyung needs to go when 2 hours have passed since he left.
Question (KO): 태형이는 시속 60킬로미터(㎞)의 오토바이를 타고 300킬로미터(㎞) 떨어진 할머니댁에 가려고 합니다. 태형이가 출발한 지 2시간이 지났을 때 더 가야할 거리는 얼마인지 구하세요.

Answer: 180

Solution (Python):
var_a = 300
var_b = 60
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Taehyung has 45 candies. If he plans to give 5 candies to his friends, how many friends can get candies in maximum?
Question (KO): 태형이는 사탕 45개를 가지고 있습니다. 친구들에게 사탕을 5개씩 나누어 주면 몇 명의 친구들에게 나누어 줄 수 있습니까?

Answer: 9

Solution (Python):
var_a = 45
var_b = 5
var_c = var_a // var_b
print(int(var_c))
Category: Possibility

Question (EN): How many multiples of 4 are there among the four-digit numbers made using the number cards 1, 3, 5, and 6 once?
Question (KO): 숫자 카드 1, 3, 5, 6을 한 번씩 사용하여 만들 수 있는 네 자리 수 중 4의 배수는 모두 몇 개인가?

Answer: 6

Solution (Python):
var_a = 1
var_b = 3
var_c = 5
var_d = 6
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 = 4
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: Possibility

Question (EN): Among Rat, Cow, Tiger, Rabbit, Dragon, and Snake, find the number of cases in which the rat is placed at the very front, the snake at the very back, and the rest are placed in one line.
Question (KO): 쥐, 소, 호랑이, 토끼, 용, 뱀 중 쥐의 위치는 맨 앞에, 뱀의 위치는 맨 뒤에 세워놓은 뒤 나머지를 한 줄로 세우는 경우의 수를 구하시오.

Answer: 24

Solution (Python):
var_a = 'Rat'
var_b = 'Cow'
var_c = 'Tiger'
var_d = 'Rabbit'
var_e = 'Dragon'
var_f = 'Snake'
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 = 'Rat'
list_b= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_h = 'Snake'
list_d= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_d.append(var_h)
list_d.reverse()
list_e = list(set(list_c) - set(list_d))
var_i = len(list_e)
var_j = len(list_e)
var_k = 1
var_i = int(var_i)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
    var_k = var_k * (var_i-i)
print(int(var_k))
Category: Arithmetic calculation

Question (EN): A car that requires 0.14 liters (l) of gasoline to run 1 kilometer (km) ran for 2 hours and 30 minutes at 93.6 kilometers (km) per hour. How many liters of gasoline did it use?
Question (KO): 1킬로미터(㎞)를 달리는 데 휘발유 0.14리터(L)가 필요한 자동차로 1시간에 93.6킬로미터(㎞)씩 2시간 30분 동안 달렸습니다. 사용한 휘발유는 모두 몇 리터(L)일까요?

Answer: 32.76

Solution (Python):
var_a = 0.14
var_b = 93.6
var_c = var_a * var_b
var_d = 2
var_e = 30
var_f = 60
var_g = var_e / var_f
var_h = var_d + var_g
var_i = var_c * var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Possibility

Question (EN): There are 5 different people. Everyone wanted to be an executive, so you decided to have 1 chairman, 1 vice-president, 1 secretary, 1 secretary, and 1 manager. Find the possible number of cases for assigning the position.
Question (KO): 5명의 서로 다른 사람이 있다. 모두가 임원을 하고 싶어해서 회장 1명, 부회장 1명, 총무 1명, 서기 1명, 관리부장 1명을 하기로 했다. 이렇게 5명을 뽑을 때 경우의 수를 구하여라.

Answer: 120

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

Question (EN): When 3+6AB=691, what number should go in B?
Question (KO): 3+6AB=691일 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 8

Solution (Python):
var_a = '3+6AB=691'
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: Possibility

Question (EN): There are two types of Korean language workbooks and four types of math workbooks. When choosing one book among them, in how many cases can you choose Korean workbook or math workbook?
Question (KO): 국어문제집이 2가지 종류, 수학문제집이 4가지 종류가 있다. 이 중에서 한 권을 선택할 때, 국어문제집 또는 수학문제집을 선택하는 경우의 수는?

Answer: 6

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

Question (EN): A regular hexagon with an area of 21.12 square centimeters (cm2) is divided into six pieces. If the cut pieces have the same shape and size, find the area of one piece in square centimeters (cm2).
Question (KO): 넓이가 21.12제곱센티미터(㎠)인 정육각형을 여섯 조각으로 나누었습니다. 잘린 조각들의 모양과 크기가 같을 때, 한 조각의 넓이는 몇 제곱센티미터(㎠)일지 구하시오.

Answer: 3.52

Solution (Python):
var_a = 21.12
var_b = 6
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Correspondence

Question (EN): There are a total of 928 baduk stones and 713 of them are colored white. Find the difference between the number of white stones and black stones.
Question (KO): 바둑알이 모두 928개가 있고 흰 바둑알이 713개 있다. 흰 바둑알과 검은 바둑알의 개수는 몇 개가 차이나는지 구하시오.

Answer: 498

Solution (Python):
var_a = 713
var_b = 928
var_c = 713
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e))
Category: Possibility

Question (EN): The smallest two-digit number that can be formed by two of 0, 3, 4, 6, and 8 is subtracted by a certain number and it became 7. Find the number.
Question (KO): 0, 3, 4, 6, 8을 한 번씩만 사용하여 만든 가장 작은 두 자리 수에서 어떤 수를 뺐더니 7이 됩니다. 어떤 수는 몇인지 구하시오.

Answer: 23

Solution (Python):
var_a = 0
var_b = 3
var_c = 4
var_d = 6
var_e = 8
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 = 2
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 = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = 7
var_j = var_h - var_i
print(int(var_j))
Category: Correspondence

Question (EN): When you multiply a number by 7, it becomes 98. What is that number?
Question (KO): 어떤 수에 7을 곱하였더니 98이 되었습니다. 어떤 수는 얼마입니까?

Answer: 14

Solution (Python):
var_a = 98
var_b = 7
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11, and 12. What is the difference between the smallest number and the second smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 작은 수와 2번째로 작은 수의 차는 얼마입니까?

Answer: 1

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

Question (EN): There are 42 chickens and 48 ducks on the farm, and there are as many geese as there are chickens. How many ducks are fewer than the number of chickens and geese combined?
Question (KO): 농장에 닭은 42마리, 오리는 48마리 있고, 거위는 닭의 수와 같습니다. 오리는 닭과 거위를 합한 것보다 몇 마리 더 적게 있습니까?

Answer: 36

Solution (Python):
var_a = 42
var_b = 42
var_c = var_a + var_b
var_d = 48
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): When a number is divided by 6, it becomes 1/10. What is the value of the number divided by 3/25?
Question (KO): 어떤 수는 6으로 나눴을때 1/10이 된다. 이때 어떤 수를 3/25로 나눈다면 얼마가 되는가?

Answer: 5

Solution (Python):
var_a = 0.1
var_b = 6
var_c = var_a * var_b
var_d = 0.12
var_e = var_c / var_d
print(int(eval('{:.2f}'.format(round(var_e+1e-10,2)))))
Category: Geometry

Question (EN): You want to place tissue paper with a radius of 2 centimeters (cm) inside a square box with a side length of 8 centimeters (cm) without overlapping. How many toilet papers can be put on one floor?
Question (KO): 반지름의 길이가 2센티미터(㎝)인 휴지를 한 변의 길이가 8센티미터(㎝)인 정사각형 상자 안에 겹치지 않게 넣으려고 합니다. 한 층에휴지는 모두 몇 개 넣을 수 있습니까?

Answer: 4

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

Question (EN): A3B-41=591. How much is A?
Question (KO): A3B-41=591입니다. A는 얼마인가요?

Answer: 6

Solution (Python):
var_a = 'A3B-41=591'
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): What is the smallest two-digit number that is a multiple of 3 and a multiple of 5 at the same time?
Question (KO): 3의 배수이면서 5의 배수인 수 중 가장 작은 두 자리 수는?

Answer: 15

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-1]
print(int(var_g))
Category: Correspondence

Question (EN): I should have subtracted 23, but I mistakenly subtracted 32 from some number and got 25. How much do you get when calculated correctly?
Question (KO): 23을 뺐어야하는데 잘못하여 32를 어떤 수에서 뺐더니 25가 나왔습니다. 바르게 계산하면 얼마입니까?

Answer: 34

Solution (Python):
var_a = 25
var_b = 32
var_c = var_a + var_b
var_d = 23
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): The rectangular shape of the ttakji's area is 1.77 square centimeters (cm2). If the width of this ttakji is 3 centimeters (cm), how many centimeters (cm) will the length be?
Question (KO): 직사각형 모양의 딱지의 넓이는 1.77제곱센티미터(㎠)입니다. 이 딱지의 가로의 길이는 3센티미터(㎝)일 때, 세로의 길이는 몇 센티미터(㎝) 일까요?

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)))