philschmid/DMath huggingface dataset:
Category: Geometry

Question (EN): What is the perimeter of an equilateral triangle with a side of 5 centimeters (cm)?
Question (KO): 한 변의 길이가 5센티미터(㎝)인 정삼각형의 둘레는 몇 센티미터(㎝)입니까?

Answer: 15

Solution (Python):
var_a = 5
var_b = 3
var_c = var_a * var_b
print(int(var_c))
Category: Correspondence

Question (EN): Yuna wants to divide 42 by a number. When she accidentally divided 35 by the number and the result was 5, Find the correct result.
Question (KO): 유나는 42에 어떤 수를 나누려고 합니다. 실수로 35에 어떤 수를 나눴을 때의 결과가 5라면 바르게 계산한 결과를 구하세요.

Answer: 6

Solution (Python):
var_a = 42
var_b = 35
var_c = 5
var_d = var_b / var_c
var_e = var_a / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): I tried to hand out 269 candies, which costs 150 won each, equally to 29 students, but a few candies were short. Find at least how much more money I need to buy the lacking candies.
Question (KO): 1개에 150원인 사탕 269개를 29명의 학생에게 똑같이 나누어 주려고 하였더니 몇 개가 모자랐습니다. 모자란 사탕을 사려면 적어도 얼마가 더 필요한지 구해 보시오.

Answer: 3150

Solution (Python):
var_a = 29
var_b = 269
var_c = 29
var_d = var_b % var_c
var_e = var_a - var_d
var_f = 150
var_g = var_e * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Minho divided the bindaetteok into 5 equal pieces and ate one. Yoona divided the same size of bindaetteok into 10 equal pieces. How many pieces will Yoona have to eat, to eat the same amount as Minho?
Question (KO): 민호는 빈대떡을 똑같이 5조각으로 나누어 한 조각을 먹었습니다. 윤아는 같은 크기의 빈대떡을 똑같이 10조각으로 나누었습니다. 민호와 같은 양을 먹으려면 윤아는 몇 조각을 먹어야 합니까?

Answer: 2

Solution (Python):
var_a = 10
var_b = 5
var_c = var_a / var_b
print(int(var_c))
Category: Comparison

Question (EN): Kiyoon and Seoyeon estimated the length of a road that is 1000 meters (m). If Kiyoon's estimate was 940 meters (m) and Seoyeon's estimate was 1080 meters (m), who made the estimate closer to reality?
Question (KO): 기윤이와 서연이가 1000미터(m)인 도로의 길이를 어림했습니다. 기윤이는 940미터(m)로 어림했고 서연이는 1080미터(m)로 어림했다면 실제와 더 가깝게 어림한 사람은 누구입니까?

Answer: Kiyoon

Solution (Python):
var_a = 'Kiyoon'
var_b = 'Seoyeon'
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 = 1000
var_d = 940
var_e = var_c - var_d
var_f = abs(var_e)
var_g = 1000
var_h = 1080
var_i = var_g - var_h
var_j = abs(var_i)
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[var_k-1]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Correspondence

Question (EN): When you round down the three-digit number 5A5 to the tens place, it becomes 500. Find the sum of the numbers from 0 to 9 that can be used for A.
Question (KO): 백의 자리 수와 일의 자리 수가 모두 5인 세 자리 수를 십의 자리에서 버림하면 500이 됩니다. 십의 자리 수를 A라고 할 때, 0부터 9까지의 숫자 중 A에 쓸 수 있는 수들의 합을 구하시오.

Answer: 45

Solution (Python):
var_a = 5
var_b = 'A'
var_c = 5
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d=""
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 = 600
list_c = []
for i in list_b:
    if i <= var_e:
        list_c.append(i)
var_f = 'A'
var_d = str(var_d)
var_f = str(var_f)
unk_idx = var_d.index(var_f)
list_d = []
for elem in list_c:
    elem = str(elem)
    list_d.append(int(elem[unk_idx]))
list_d = list(set(list_d))
list_d = [float(i) for i in list_d]
var_g = sum(list_d)
print(int(var_g))
Category: Correspondence

Question (EN): When 8 is added to a number, the result is 88. What is the result when the number is divided by 10?
Question (KO): 8을 어떤 수에 더했더니 결과가 88이 되었습니다. 어떤 수를 10으로 나누면 얼마인가요?

Answer: 8

Solution (Python):
var_a = 88
var_b = 8
var_c = var_a - var_b
var_d = 10
var_e = var_c / var_d
print(int(var_e))
Category: Geometry

Question (EN): Jihye drew a triangle with a base of 3 cm (cm) and a height of 2 cm (cm), and Donggeon drew a triangle with a base of 3 cm (cm) and a height of 6.02 cm (cm). How many times the area of the triangle drawn by Donggeon is the area of the triangle drawn by Jihye?
Question (KO): 지혜는 밑변이 3센티미터(㎝) 이고 높이가 2센티미터(㎝) 인 삼각형을 그렸고, 동건이는 밑변이 3센티미터(㎝) 이고 높이가 6.02 센티미터(㎝) 인 삼각형을 그렸습니다. 동건이가 그린 삼각형의 넓이는 지혜가 그린 삼각형의 넓이의 몇 배입니까?

Answer: 3.01

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

Question (EN): When it takes 30 pictures to play a drama for 1 second, how many pictures are needed to play 25 seconds?
Question (KO): 드라마를 1초 동안 상영하려면 그림 30장이 필요합니다. 드라마를 25초 상영하려면 그림이 몇 장 필요할까요?

Answer: 750

Solution (Python):
var_a = 30
var_b = 25
var_c = var_a * var_b
print(int(var_c))
Category: Geometry

Question (EN): Find the area of a rhombus whose two diagonals are 14 centimeters (cm) and 24 centimeters (cm).
Question (KO): 두 대각선이 각 14센티미터(㎝), 24센티미터(㎝)인 마름모의 넓이를 구하시오.

Answer: 168

Solution (Python):
var_a = 14
var_b = 24
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Possibility

Question (EN): You have 2 chances to draw from a basket that has one apple, one peach, and one pear each. How many orders of fruit can there be?
Question (KO): 사과, 복숭아, 배가 각각 하나씩 있는 바구니에서 뺄 기회는 2번입니다. 나올 수 있는 과일의 순서는 모두 몇 가지입니까?

Answer: 6

Solution (Python):
var_a = 'apple'
var_b = 'peach'
var_c = 'pear'
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: Correspondence

Question (EN): When 25 is divided by A, the quotient is 3 and the remainder is B. A and B are natural numbers. What is the largest possible number A?
Question (KO): 25를 A로 나눴더니 몫이 3이 되었고 나머지가 B가 되었습니다. A와 B는 자연수입니다. 가능한 A중 가장 큰 수는 무엇일까요?

Answer: 8

Solution (Python):
var_a = 25
var_b = 1
var_c = var_a - var_b
var_d = 3
var_e = var_c // var_d
print(int(var_e))
Category: Geometry

Question (EN): Yuri's TV is said to be a shape of rectangular with a width of 1.25 meters (m) and a length of 0.75 meters (m). How many square meters (m2) is the TV at Yuri's House?
Question (KO): 유리네 집 티비는 가로가 1.25미터(m)이고, 세로가 0.75미터(m)인 직사각형 모양이라고 합니다. 유리네 집 티비의 넓이는 몇 제곱미터(㎡)입니까?

Answer: 0.94

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

Question (EN): Students are lined up in the order of their age. Yuna is older than Yujeong who is in the fifth, and younger than Eunji, who is in the seventh. In which place is Yuna standing in that line?
Question (KO): 나이가 적은 순서대로 학생들이 줄을 섰습니다. 유나는 5번째인 유정이보다 나이가 많고 7번째인 은지보다는 나이가 적습니다. 유나는 줄에서 몇 번째에 서 있습니까?

Answer: 6

Solution (Python):
var_a = 5
var_b = 7
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e))
Category: Geometry

Question (EN): There are two spheres with a radius of 6 centimeters (cm) and 3 centimeters (cm) respectively. Find the quotient of the surface area of the larger sphere divided by the surface area of the smaller sphere.
Question (KO): 반지름이 각각 6센티미터(㎝), 3센티미터(㎝)인 구가 2개 있습니다. 둘 중 큰 구의 겉넓이를 작은 구의 겉넓이로 나눈 몫을 구하시오.

Answer: 4

Solution (Python):
var_a = 6
var_b = 3
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There is a box with a width of 24 centimeters (cm), a length of 15 centimeters (cm), and a height of 28 centimeters (cm). How many juice packs with a width of 4 centimeters (cm), a length of 5 centimeters (cm), and a height of 7 centimeters (cm) are there in the box if there are no gaps in this box ?
Question (KO): 가로 24센티미터(㎝), 세로 15센티미터(㎝), 높이 28센티미터(㎝)인 상자가 있습니다. 이 상자에 가로 4센티미터(㎝), 세로 5센티미터(㎝), 높이 7센티미터(㎝)인 주스팩이 빈틈없이 들어 있다면 상자에 들어 있는 주스팩은 모두 몇 개입니까?

Answer: 72

Solution (Python):
var_a = 24
var_b = 15
var_c = var_a * var_b
var_d = 28
var_e = var_c * var_d
var_f = 4
var_g = 5
var_h = var_f * var_g
var_i = 7
var_j = var_h * var_i
var_k = var_e / var_j
print(int(var_k))
Category: Geometry

Question (EN): The circumference of the regular nonagon-shaped shell is 171 centimeters (cm). Find the length of one side of the shell.
Question (KO): 정구각형 모양의 딱지 둘레는 171센티미터(㎝)입니다. 딱지의 한 변의 길이를 구하시오.

Answer: 19

Solution (Python):
var_a = 171
var_b = 9
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): What two-digit number between 70 and 80 is divisible by 8?
Question (KO): 8로 나누어 떨어지는 70과 80사이의 두 자리수는 무엇인가?

Answer: 72

Solution (Python):
var_a = 70
var_b = 1
var_c = var_a + var_b
var_d = 80
var_e = 1
var_f = var_d - var_e
var_g = 1
list_a = [i for i in range(var_c, var_f + 1, var_g)]
var_h = 8
list_b = []
var_h = int(var_h)
for i in list_a:
    i = int(i)
    if i % var_h == 0:
        list_b.append(i)
var_i = 1
var_j = list_b[var_i-1]
print(int(var_j))
Category: Possibility

Question (EN): There is a rose, lily, tulip chrysanthemum, and carnation. I'm going to pick 2 of these and put them in 2 different vases. How many different ways are there when placing flowers in a vase?
Question (KO): 꽃이 장미, 백합, 튤립, 국화, 카네이션 각각 1송이씩 있습니다. 이 중에서 2송이를 뽑아 서로 다른 두 개의 꽃병에 1송이씩 꽂으려고 합니다. 꽃병에 서로 다르게 꽃을 꽂는 방법은 모두 몇 가지인지 구하시오.

Answer: 20

Solution (Python):
var_a = 'rose'
var_b = 'lily'
var_c = 'tulip'
var_d = 'chrysanthemum'
var_e = 'carnation'
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 = len(list_a)
var_g = 2
var_h = 1
var_f = int(var_f)
var_g = int(var_g)
for i, elem in enumerate(range(var_g)):
    var_h = var_h * (var_f-i)
print(int(var_h))
Category: Possibility

Question (EN): Among the four number cards 3, 1, 9, and 7, find the two cards with the greatest difference and add them together.
Question (KO): 4장의 숫자 카드 3, 1, 9, 7 중 차가 가장 큰 2 장을 찾아 합하시오.

Answer: 10

Solution (Python):
var_a = 3
var_b = 1
var_c = 9
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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 1
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = '[OP_ADD}'
print(var_i)
Category: Arithmetic calculation

Question (EN): At the bank, you found 25 checks for 1 million won and 8 checks for 100,000 won. How much is all the money you find in the bank?
Question (KO): 은행에서 100만 원짜리 수표를 25장, 10만 원짜리 수표를 8장 찾았습니다. 은행에서 찾은 돈은 모두 얼마입니까?

Answer: 25800000

Solution (Python):
var_a = 100
var_b = 10000
var_c = var_a * var_b
var_d = 25
var_e = var_c * var_d
var_f = 10
var_g = 10000
var_h = var_f * var_g
var_i = 8
var_j = var_h * var_i
var_k = var_e + var_j
print(int(var_k))
Category: Comparison

Question (EN): Suho is taller than Minyoung. Seongju is shorter than Minyoung. Seongju is taller than Seonmi. Who is the shortest person?
Question (KO): 수호는 민영이보다 키가 큽니다. 성주는 민영이보다 키가 작습니다. 성주는 선미보다 키가 큽니다. 키가 가장 작은 사람은 누구입니까?

Answer: Seonmi

Solution (Python):
var_a = 'Suho'
var_b = 'Minyoung'
var_c = 'Seongju'
var_d = 'Seonmi'
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 = 'Suho'
var_f = 'Minyoung'
var_g = '>'
var_h = 'Seongju'
var_i = 'Minyoung'
var_j = '<'
var_k = 'Seongju'
var_l = 'Seonmi'
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 = len(list_c)
var_o = list_c[var_n-1]
print(var_o)
Category: Arithmetic calculation

Question (EN): Songhee read 288 pages in 12 days, and Eunju read 243 pages in 9 days. What is the difference between the number of pages the two students read in a day?
Question (KO): 송희는 12일 동안 288쪽의 책을 읽었고, 은주는 9일 동안 243쪽의 책을 읽었습니다. 두 학생이 하루 동안 읽은 책 쪽수의 차이는 얼마인가요?

Answer: 3

Solution (Python):
var_a = 288
var_b = 12
var_c = var_a / var_b
var_d = 243
var_e = 9
var_f = var_d / var_e
var_g = var_c - var_f
var_h = abs(var_g)
print(int(var_h))
Category: Possibility

Question (EN): There are 4 female students and 6 male students in the club. When selecting a representative from the male students amd the female students each, find the number of cases in which a representative can be selected.
Question (KO): 동아리에 여학생 4명, 남학생 6명이 있다. 남학생과 여학생 중 한명씩 대표를 뽑을 때, 뽑힐 수 있는 대표의 경우의 수를 구하시오.

Answer: 24

Solution (Python):
var_a = 4
var_b = 6
var_c = var_a * var_b
print(int(var_c))
Category: Geometry

Question (EN): Twenty sheets of paper each 10 centimeters (cm) long were glued together. If the length of the connected parts is 5 millimeters (mm) each, find the length in centimeters (cm) of the whole joined papers.
Question (KO): 길이가 10센티미터(㎝)인 종이 20장을 길게 이어 붙였습니다. 연결 부분의 길이가 5밀리미터(㎜)로 모두 같다면 이어 붙인 전체의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 190.5

Solution (Python):
var_a = 10
var_b = 20
var_c = var_a * var_b
var_d = 5
var_e = 10
var_f = var_d / var_e
var_g = 20
var_h = 1
var_i = var_g - var_h
var_j = var_f * var_i
var_k = var_c - var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Comparison

Question (EN): Students are standing in a line. Yoongi is standing 7th from the left and 5th from the right. How many students are standing in line?
Question (KO): 학생들이 한 줄로 서 있습니다. 그중 윤기는 왼쪽에서 7번째, 오른쪽에서 5번째에 서 있습니다. 줄을 서 있는 학생은 모두 몇 명입니까?

Answer: 11

Solution (Python):
var_a = 7
var_b = 5
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): 32 minus 16 equals a number multiplied by 4. What is the result of dividing the number by 4 and adding 16?
Question (KO): 32에서 16을 뺀 값이 어떤 수에 4를 곱한 값과 같다고 한다. 어떤 수를 4로 나누고 16을 더하면 얼마가 되는지 구하시오.

Answer: 17

Solution (Python):
var_a = 32
var_b = 16
var_c = var_a - var_b
var_d = 4
var_e = var_c / var_d
var_f = 4
var_g = var_e / var_f
var_h = 16
var_i = var_g + var_h
print(int(var_i))
Category: Comparison

Question (EN): Namjoon placed 12th, and Yoongi entered earlier than Namjoon, with 10 people between them. If we rank people according to their entrance time, what rank is Yoongi in?
Question (KO): 남준이는 12등을 했고, 윤기는 남준이보다 10명 앞에서 먼저 들어갔습니다. 윤기는 몇 등입니까?

Answer: 1

Solution (Python):
var_a = 12
var_b = 10
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): How many four-digit numbers can be made by using all of each number cards 7, 0, 1, and 5 once? Note that 0 cannot be in the highest digit of the number.
Question (KO): 숫자 카드 7, 0, 1, 5을 한 번 씩 모두 사용하여 만들 수 있는 네 자리 수는 몇 개입니까? 단, 수의 가장 높은 자리에 0이 올 수 없습니다.

Answer: 18

Solution (Python):
var_a = 7
var_b = 0
var_c = 1
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 = 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 = len(list_b)
print(int(var_f))
Category: Possibility

Question (EN): Write the largest number that can be made by using all the given number cards 6 and 3 once.
Question (KO): 주어진 숫자카드 6, 3를 한 번씩 모두 사용하여 만들 수 있는 가장 큰 수를 쓰시오.

Answer: 63

Solution (Python):
var_a = 6
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): Add 14 to a number to get 56. What is the value of the number multiplied by 3?
Question (KO): 14를 어떤 수에 더해 56을 얻었습니다. 3을 어떤 수에 곱하면 얼마입니까?

Answer: 126

Solution (Python):
var_a = 56
var_b = 14
var_c = var_a - var_b
var_d = 3
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): Find the sum of the largest and smallest three-digit numbers that can be formed by using the three number cards 6, 3, and 8 only once.
Question (KO): 3장의 숫자 카드 6, 3, 8을 한 번씩만 사용하여 만들 수 있는 세 자리 수 중에서 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 1231

Solution (Python):
var_a = 6
var_b = 3
var_c = 8
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 1
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): You will need 4 meters (m) of wire to draw one circle. If the length of Taemin's wire is 105.8 meters (m), how many meters (m) of wire are left after making several circles?
Question (KO): 동그라미를 한 개 그리려면 철사 4미터(m)가 필요합니다. 태민이가 가진 철사의 길이가 105.8미터(m)라면 동그라미를 여러 개 그리고 남은 철사는 몇 미터(m)입니까?

Answer: 1.8

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

Question (EN): There are different digits A, B, C, and D. The sum of two-digit CD, three-digit ACD, and four-digit ABCD is 2967. Find A.
Question (KO): 서로 다른 수 A, B, C, D가 있습니다. 두 자리 수 CD와 세 자리 수 ACD와 네 자리 수 ABCD의 합이 2967입니다. A를 구하시오.

Answer: 2

Solution (Python):
var_a = 'CD'
var_b = '+'
var_c = 'ACD'
var_d = '+'
var_e = 'ABCD'
var_f = '='
var_g = 2967
list_a= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_a.append(var_g)
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_h=""
for i in list_a:
    i = str(i)
    var_h = var_h + i
var_i = 'A'
ans_dict = dict()
var_h = var_h.replace('×','*')
var_h = var_h.replace('x','*')
var_h = var_h.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_h):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_h
    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_h):
        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_j = ans_dict[var_i]
print(int(var_j))
Category: Comparison

Question (EN): We are going to hand out erasers to the students. In Donghun's class, 15 students share 45 erasers, and in Kihoon's class, 5 students share 30 erasers. Whose class of students each gets more erasers?
Question (KO): 학생들에게 지우개를 나누어 주려고 합니다. 동훈이네 반은 지우개 45개를 학생 15명이 나누어 갖고, 기훈이네 반은 지우개 30개를 5명이 나누어 갖습니다. 누구네 반의 학생이 각각 더 많은 지우개를 나누어 받습니까?

Answer: Kihoon

Solution (Python):
var_a = 'Donghun'
var_b = 'Kihoon'
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 = 45
var_d = 15
var_e = var_c / var_d
var_f = 30
var_g = 5
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)