philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Sehee needs 15 liters of milk to make bread with friends. If Sehee currently has only 7 liters (L) and 200 milliliters (mL) of milk at home, how many 600 milliliters (mL) of milk should she buy at least?
Question (KO): 세희가 친구들과 빵을 만드는 데 15리터(L)의 우유가 필요합니다. 현재 집에는 우유가 7리터(L) 200밀리리터(㎖)밖에 없다면, 600밀리리터(㎖)로 된 우유를 최소 몇 개는 사야 합니까?

Answer: 13

Solution (Python):
var_a = 15
var_b = 1000
var_c = var_a * var_b
var_d = 7
var_e = 1000
var_f = var_d * var_e
var_g = 200
var_h = var_f + var_g
var_i = var_c - var_h
var_j = 600
var_k = var_i / var_j
var_l = 1
var_m=int(((var_k+9*10**(var_l-2))//(10**(var_l-1)))*10**(var_l-1))

print(int(var_m))
Category: Comparison

Question (EN): The length of one edge of a cube (a) is 5 centimeters (cm). A rectangular parallelepiped (b) is 4 centimeters (cm), 5 centimeters (cm), and 6 centimeters (cm) in width, length, and height, respectively. Which of the shapes (a) and (b) has the larger volume?
Question (KO): (가) 정육면체는 한 모서리의 길이가 5센티미터(㎝)입니다. (나) 직육면체는 가로, 세로, 높이가 각각 4센티미터(㎝), 5센티미터(㎝), 6센티미터(㎝)입니다. (가), (나) 중에서 부피가 더 큰 도형은 어느 것입니까?

Answer: (a)

Solution (Python):
var_a = '(a)'
var_b = '(b)'
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 = 5
var_d = 3
var_e = var_c ** var_d
var_f = 4
var_g = 5
var_h = 6
var_i = var_g * var_h
var_j = var_f * var_i
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Arithmetic calculation

Question (EN): Juyeon runs 215 meters (m) a day. If Juyeon ran 0.32 times her usual speed today, how many meters (m) did she run today?
Question (KO): 주연이는 하루에 215미터(m)를 달립니다. 오늘은 주연이가 평소의 0.32배를 달렸다면 오늘 달린 거리는 몇 미터(m)입니까?

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: Geometry

Question (EN): How many diagonals can you draw in an octagon?
Question (KO): 팔각형일 때, 총 몇 개의 대각선을 그을 수 있습니까?

Answer: 20

Solution (Python):
var_a = 8
var_b = 8
var_c = 3
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: Arithmetic calculation

Question (EN): There are four people sitting at a round table, and you want to shake hands with people who are not neighboring with you once. Find the number that you shake hands.
Question (KO): 둥그런 탁자에 4명이 앉아있다. 양옆으로 인접하지 않는 사람들과 악수를 한번씩하려면 악수를 모두 몇 번 하는지 구하시오.

Answer: 2

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

Question (EN): You are planning a trip to five cities: Gyeongju, Pohang, Busan, Geoncheon, and Gimhae. If you visit each city only once, how many orders can you make to visit the city? However, Gyeongju must be visited first.
Question (KO): 경주, 포항, 부산, 건천, 김해 다섯 개의 도시를 여행할 계획을 짜고 있습니다. 도시를 한 번씩만 차례대로 들른다고 할 때, 몇 가지 방법을 세울 수 있습니까? 단, 경주는 가장 먼저 들러야 합니다.

Answer: 24

Solution (Python):
var_a = 'Gyeongju'
var_b = 'Pohang'
var_c = 'Busan'
var_d = 'Geoncheon'
var_e = 'Gimhae'
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 = 'Gyeongju'
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_g = len(list_c)
var_h = len(list_c)
var_i = 1
var_g = int(var_g)
var_h = int(var_h)
for i, elem in enumerate(range(var_h)):
    var_i = var_i * (var_g-i)
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Grandpa wants to buy 12 bottles of 3-liter (L) water and distribute 3/4 liter (L) to each student. How many students can he share?
Question (KO): 할아버지께서 3리터(L)짜리 물을 12통 사서 학생들에게 3/4리터(L)씩 나누어 주려고 합니다. 몇 명에게 나누어 줄 수 있습니까?

Answer: 48

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

Question (EN): Hansol's height is 134.5 centimeters (cm). If Hancho's height is 1.06 times Hansol's height, how tall is Hancho in centimeters (cm)?
Question (KO): 한솔이의 키는 134.5 센티미터(㎝) 입니다. 한초의 키가 한솔이의 키의 1.06 배라면 한초의 키는 몇 센티미터(㎝) 입니까?

Answer: 142.57

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

Question (EN): There are five numbers 10, 11, 12, 13, and 14. Which number is the smallest?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중 가장 작은 수는 무엇입니까?

Answer: 10

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

Question (EN): How many three-digit numbers are greater than 137 and less than 285?
Question (KO): 세 자리 수 중 137보다 크고 285보다 작은 수의 개수는 얼마인지 구하시오.

Answer: 147

Solution (Python):
var_a = 137
var_b = 1
var_c = var_a + var_b
var_d = 285
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 = len(list_a)
print(int(var_h))
Category: Correspondence

Question (EN): There is a single digit number A. When 7A7 is rounded up to the tens place is 730. What is the right value for A?
Question (KO): 한 자리 수 A가 있습니다. 십의 자리까지 7A7을 올림하면 730이 됩니다. A에 알맞은 값은?

Answer: 2

Solution (Python):
var_a = '7A7'
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 = 730
list_b = []
for i in list_a:
    if i <= var_b:
        list_b.append(i)
var_c = 730
var_d = 10
var_e = var_c - var_d
list_c = []
for i in list_b:
    if i > var_e:
        list_c.append(i)
var_f = '7A7'
var_g = 'A'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_c:
    elem = str(elem)
    var_h = int(elem[unk_idx])
print(int(var_h))
Category: Arithmetic calculation

Question (EN): After the train departed, 29 people got off at the first station 17 people got on. At the second station, 27 people got off and 35 got on. There are 116 people on the train right now. How many people were on the train when it first departed?
Question (KO): 기차가 출발하여 1번째 역에서 29명이 내리고 17명이 탔습니다. 2번째 역에서 27명이 내리고 35명이 탔습니다. 지금 기차에 타고 있는 사람은 116명입니다. 기차가 처음 출발할 때 타고 있던 사람은 몇 명입니까?

Answer: 120

Solution (Python):
var_a = 116
var_b = 29
var_c = var_a + var_b
var_d = 17
var_e = var_c - var_d
var_f = 27
var_g = var_e + var_f
var_h = 35
var_i = var_g - var_h
print(int(var_i))
Category: Possibility

Question (EN): Find the number of two-digit natural numbers that can be made by drawing two from the number cards 1, 2, and 3.
Question (KO): 숫자 카드 1, 2, 3 중 2장을 뽑아 만들 수 있는 두 자리 자연수의 개수를 구하시오.

Answer: 6

Solution (Python):
var_a = 1
var_b = 2
var_c = 3
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 = 2
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 = len(list_b)
print(int(var_e))
Category: Geometry

Question (EN): There is a room in the shape of a cube. If the length of one side of this room is 5 meters (m), what is the circumference of the floor of this room in meters (m)?
Question (KO): 정육면체 모양의 방이 있습니다. 이 방의 한 변의 길이가 5미터(m)라면, 이 방의 바닥의 둘레는 몇 미터(m)입니까?

Answer: 20

Solution (Python):
var_a = 5
var_b = 4
var_c = var_a * var_b
print(int(var_c))
Category: Comparison

Question (EN): There are 4 numbers: 0.8, 1/2, 0.5, and 1/3. What is the sum of all numbers greater than or equal to 0.1?
Question (KO): 총 4개의 숫자 0.8, 1/2, 0.5, 1/3이 있습니다. 이 중 0.1보다 크거나 같은 수를 모두 더하면 얼마인가요?

Answer: 2.13

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.5
var_d = 0.3333333333333333
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 = 0.1
list_b = []
for i in list_a:
    if i >= var_e:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print('{:.2f}'.format(round(var_f+1e-10,2)))
Category: Arithmetic calculation

Question (EN): How many two-digit numbers are divisible by 3 and 5?
Question (KO): 숫자 3, 5로 나누어 떨어질 수 있는 두 자리 수는 모두 몇 개 있습니까?

Answer: 6

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 = len(list_c)
print(int(var_f))
Category: Correspondence

Question (EN): I need to add 22 to a number, but I mistakenly added 12 and got 48. Find the result of the correct calculation.
Question (KO): 어떤 수에 22를 더해야 하는데 잘못하여 12를 더했더니 48이 되었습니다. 바르게 계산한 결과를 구하시오.

Answer: 58

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

Question (EN): Jimin has paint, and he used 4.3 liters (L) of each to paint his house and his friend's house, and the remaining paint is 8.8 liters (L). Find how many liters (L) of paint Jimin had at the beginning.
Question (KO): 지민이는 페인트를 가지고 있는데 본인 집과 친구 집을 칠하는데 각각 4.3리터(L) 씩 사용했고 남은 페인트가 8.8리터(L) 이다. 지민이가 처음에 가지고 있던 페인트는 몇 리터(L)인지 구하시오.

Answer: 17.4

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

Question (EN): It is 28 when you multiply a number by 7/8. How much is it when you add 16 to that number and multiply 5/16?
Question (KO): 28은 어떤 수에 7/8을 곱한 수입니다. 어떤 수에 16을 더하고 5/16을 곱한 수는 얼마입니까?

Answer: 15

Solution (Python):
var_a = 28
var_b = 8
var_c = 7
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 16
var_g = var_e + var_f
var_h = 5
var_i = 16
var_j = var_h / var_i
var_k = var_g * var_j
print(int(var_k))
Category: Correspondence

Question (EN): Seongjun and Seungah are playing slap-match. It is said that the number of Seongjun's ttakji multiplied by 3/4 subtracted by 25 equals the number of Seunga's ttakji subtracted by 50 multiplied by 7. When Seunga has 100 ttakjis, find how many ttakji Seongjun has.
Question (KO): 성준이와 승아는 딱지치기 놀이를 하고 있습니다. 성준의 딱지의 개수의 3/4에서 25를 뺀 값이 승아의 딱지의 개수에서 50을 빼고 7을 곱한 값과 같다고 합니다. 승아가 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: Geometry

Question (EN): A rectangular slice of bread with an area of 59.6 square centimeters (cm2) is divided into 4 equal parts. What is the area of one part?
Question (KO): 넓이가 59.6제곱센티미터(㎠)인 직사각형 모양의 빵을 4 등분하였습니다. 빵 하나의 넓이는 얼마입니까?

Answer: 14.9

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

Question (EN): Divide 90.1 by some number to get 5.3. What is the number multiplied by 0.2?
Question (KO): 90.1 을 어떤 수로 나누었더니 5.3 이 되었습니다. 어떤 수에 0.2를 곱하면 얼마인지 구하시오

Answer: 3.4

Solution (Python):
var_a = 90.1
var_b = 5.3
var_c = var_a / var_b
var_d = 0.2
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Comparison

Question (EN): There are two natural numbers whose difference is 480. If the larger number divided by the smaller number gives the quotient of 4 and the remainder of 30, find the larger number.
Question (KO): 차가 480인 두 자연수가 있습니다. 큰 수를 작은 수로 나누면 몫이 4이고 나머지는 30일 때, 큰 수를 구하시오.

Answer: 630

Solution (Python):
var_a = 480
var_b = 30
var_c = var_a - var_b
var_d = 4
var_e = 1
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 4
var_i = var_g * var_h
var_j = 30
var_k = var_i + var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): The average score on Jungkook's math test in April and May is 89 points. If Jungkook's average score on the math test in April, May, and June is 88, how many points did Jungkook take on the math test in June?
Question (KO): 정국이가 4월, 5월에 본 수학 시험 평균 점수는 89점입니다. 정국이가 4월, 5월, 6월 3달 동안 본 수학 시험 평균 점수가 88점일 때, 6월에 본 수학 시험 점수는 몇 점입니까?

Answer: 86

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

Question (EN): A friend drank 300 milliliters (ml) more than 2/5 of the water Hyun-ji brought while climbing the mountain, and Hyun-ji drank 200 milliliters (ml) more than 1/2 of the remaining water. If the remaining water is 800 milliliters (ml), how many liters (l) is the amount of water Hyun-ji brought first?
Question (KO): 현지가 산에 오르면서 가져온 물의 2/5보다 300밀리리터(㎖) 많은 물은 친구가 마셨고 남은 물의 1/2보다 200밀리리터(㎖) 많은 물은 현지가 마셨다. 남은 물이 800밀리리터(㎖)라면 현지가 처음 가져온 물의 양은 몇 리터(L)인지 구하시오.

Answer: 2.5

Solution (Python):
var_a = 800
var_b = 200
var_c = var_a - var_b
var_d = 1
var_e = 0.5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 300
var_i = var_g + var_h
var_j = 1
var_k = 0.4
var_l = var_j - var_k
var_m = var_i / var_l
var_n = 1000
var_o = var_m / var_n
print('{:.2f}'.format(round(var_o+1e-10,2)))
Category: Geometry

Question (EN): You are trying to draw a diagonal line within a hexagon. Find the number of diagonals in this case.
Question (KO): 육각형 내에 대각선을 그리려고 합니다. 이 때의 대각선의 수를 구하시오.

Answer: 9

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

Question (EN): Find the number of multiples of 9 in numbers less than 80.
Question (KO): 80보다 작은 수 중에서 9의 배수들의 개수를 구하시오.

Answer: 8

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

Question (EN): A set of three bulgogi burgers and chicken burgers costs 21,000 won. If a bulgogi burger is 300 won more expensive than a chicken burger, how much does a chicken burger cost?
Question (KO): 불고기 버거와 치킨 버거 세트 3개 가격이 21000원이다. 불고기 버거가 치킨버거보다 300원 비싸다면 치킨버거 하나의 가격은 얼마입니까?

Answer: 3350

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

Question (EN): If the six-digit number A15B94 is a multiple of 99, find B
Question (KO): 여섯 자리 수 A15B94가 99의 배수일 때, B를 구하시오

Answer: 3

Solution (Python):
var_a = 'A15B94'
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 = 99
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 = 'A15B94'
var_d = 'B'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
var_e = 0
for elem in list_b:
    elem = str(elem)
    var_e = int(elem[unk_idx])
print(int(var_e))
Category: Geometry

Question (EN): There is a cube with one edge 3 centimeters (cm) long. If you cut a cube with one edge of 1 centimeters (cm) at each vertex, what is the volume in cubic centimeters (cm3) of the remaining part?
Question (KO): 한 모서리의 길이가 3㎝인 정육면체가 있습니다. 각 꼭짓점에서 한 모서리의 길이가 1㎝인 정육면체를 잘랐을 때, 남은 부분의 부피는 몇 세제곱센티미터입니까?

Answer: 19

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

Question (EN): When you multiply a number by 7, you get 50.68. find this number.
Question (KO): 어떤 수를 7을 곱했더니 50.68이 되었습니다. 어떤 수를 구하시오.

Answer: 7.24

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

Question (EN): The seven-digit number 25AB33C is said to be a multiple of 8, a multiple of 9, and a multiple of 11. Find the sum of A, B, and C
Question (KO): 일곱자리 수 25AB33C는 8의 배수이고 9의 배수이면서, 11의 배수라고 한다. A, B, C의 합을 구하시오

Answer: 14

Solution (Python):
var_a = '25AB33C'
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 = 8
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 = 9
list_c = []
var_c = int(var_c)
for i in list_b:
    i = int(i)
    if i % var_c == 0:
        list_c.append(i)
var_d = 11
list_d = []
var_d = int(var_d)
for i in list_c:
    i = int(i)
    if i % var_d == 0:
        list_d.append(i)
var_e = '25AB33C'
var_f = 'A'
var_e = str(var_e)
var_f = str(var_f)
unk_idx = var_e.index(var_f)
var_g = 0
for elem in list_d:
    elem = str(elem)
    var_g = int(elem[unk_idx])
var_h = '25AB33C'
var_i = 'B'
var_h = str(var_h)
var_i = str(var_i)
unk_idx = var_h.index(var_i)
var_j = 0
for elem in list_d:
    elem = str(elem)
    var_j = int(elem[unk_idx])
var_k = var_g + var_j
var_l = '25AB33C'
var_m = 'C'
var_l = str(var_l)
var_m = str(var_m)
unk_idx = var_l.index(var_m)
var_n = 0
for elem in list_d:
    elem = str(elem)
    var_n = int(elem[unk_idx])
var_o = var_k + var_n
print(int(var_o))
Category: Possibility

Question (EN): What is the value of adding the second largest number to the sum of the largest and smallest three-digit number that can be formed by using the number cards 2, 5, and 8 only once?
Question (KO): 숫자 카드 2, 5, 8을 한 번씩 사용하여 만들 수 있는 세 자리 수 중에서 가장 큰 수와 가장 작은 수의 합에 두 번째로 큰 수를 더하면 얼마가 됩니까?

Answer: 1935

Solution (Python):
var_a = 2
var_b = 5
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
var_j = 2
list_e=list_b.copy()
list_e.sort()
var_k = list_e[-var_j]
var_l = var_i + var_k
print(int(var_l))
Category: Geometry

Question (EN): You laid out four 100-won coins on a piece of paper and drew the smallest square containing the coins. The perimeter of the square was 56 centimeters (cm). Find the perimeter in centimeters (cm) of the smallest square containing 441 100-won coins.
Question (KO): 종이 위에 100원짜리 4개를 맞닿게 늘어놓고 그 개의 동전을 담는 가장 작은 정사각형을 그렸더니 정사각형의 둘레가 56센티미터(㎝)였다. 100원짜리 동전 441개를 포함하는 가장 작은 정사각형의 둘레는 몇 센티미터(㎝)인지 구하시오.

Answer: 588

Solution (Python):
var_a = 56
var_b = 4
var_c = var_a / var_b
var_d = 4
var_e = 0.5
var_f = var_d ** var_e
var_g = var_c / var_f
var_h = 441
var_i = 0.5
var_j = var_h ** var_i
var_k = var_g * var_j
var_l = 4
var_m = var_k * var_l
print(int(var_m))
Category: Comparison

Question (EN): Hohyeon, Seulgi, and Hyunjeong are competing in kicking jegi. Hohyeon kicked 23 times in the first and 28 times in the second. Hyunjeong kicked 32 times in the first and 17 times in the second. Seulgi kicked 27 times in the first. At least how many times does Seulgi need to kick in the 2nd to win first alone?
Question (KO): 호현, 슬기, 현정이가 제기차기 시합을 합니다. 호현이는 1번째에 23번, 2번째에 28번을 찼습니다. 현정이는 1번째에 32번, 2번째에 17번을 찼습니다. 슬기는 1번째에 27번을 찼습니다. 슬기가 혼자서 1등을 하려면 2번째에 적어도 몇 번을 차야 합니까?

Answer: 25

Solution (Python):
var_a = 'Hohyeon'
var_b = 'Seulgi'
var_c = 'Hyunjeong'
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 = 23
var_e = 28
var_f = var_d + var_e
var_g = 32
var_h = 17
var_i = var_g + var_h
var_j = 27
list_b= []
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_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]
var_m = 1
list_d=list_b.copy()
list_d.sort()
var_n = list_d[var_m-1]
var_o = var_l - var_n
var_p = 1
var_q = var_o + var_p
print(int(var_q))
Category: Arithmetic calculation

Question (EN): What is the largest four-digit number divisible by 5, 6, and 2?
Question (KO): 숫자 5, 6, 2로 나누어 떨어질 수 있는 네 자리 수 중 가장 큰 수는 무엇입니까?

Answer: 9990

Solution (Python):
var_a = 1000
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 5
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 = 6
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 = 2
list_d = []
var_f = int(var_f)
for i in list_c:
    i = int(i)
    if i % var_f == 0:
        list_d.append(i)
var_g = 1
list_e=list_d.copy()
list_e.sort()
var_h = list_e[-var_g]
print(int(var_h))