philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): There are four numbers: 0.8, 1/2, 0.9, 1/3. What is the sum of the numbers greater than or equal to 0.7?
Question (KO): 4개의 숫자 0.8, 1/2, 0.9, 1/3가 있습니다. 0.7보다 크거나 같은 수의 합은 얼마인가요?

Answer: 1.7

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.9
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.7
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): The family has been eating milk for 1,500 won every day since June 1st, but the price went up in the middle, thereby paying 1,600 won each. If they paid 46,200 won for milk in June, On what day in June did the price of milk increase?
Question (KO): 어느 가정에서 6월 1일부터 1500원짜리 우유를 매일 한 개씩 배달하여 먹고 있었는데, 중간에 값이 올라 1600원씩 내고 먹고 있습니다. 6월 한 달 동안의 우유값으로 46200원을 냈다면 우유는 6월 며칠부터 값이 올랐습니까?

Answer: 19

Solution (Python):
var_a = 30
var_b = 46200
var_c = 1500
var_d = 30
var_e = var_c * var_d
var_f = var_b - var_e
var_g = 1600
var_h = 1500
var_i = var_g - var_h
var_j = var_f / var_i
var_k = var_a - var_j
var_l = 1
var_m = var_k + var_l
print(int(var_m))
Category: Geometry

Question (EN): The surface area of a cube-shaped gift box is 600 square centimeters (cm2). What is the length of one side of this gift box?
Question (KO): 정육면체 모양의 선물 상자 겉넓이가 600제곱센티미터(㎠)입니다. 이 선물 상자의 한 변의 길이는?

Answer: 10

Solution (Python):
var_a = 600
var_b = 6
var_c = var_a / var_b
var_d = 0.5
var_e = var_c ** var_d
print(int(var_e))
Category: Correspondence

Question (EN): Subtracting 36 from a number and multipling by 22 gets you 748. Find the number.
Question (KO): 어떤 수에서 36을 빼고 22를 곱하면 748이 됩니다. 어떤 수를 구하시오.

Answer: 70

Solution (Python):
var_a = 748
var_b = 22
var_c = var_a / var_b
var_d = 36
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): Add 1.4 to a number, divide by 3, subtract 0.7, multiply by 9, and you get 5.4. Calculate the number including the decimal point.
Question (KO): 어떤 수에 1.4를 더한 후 3으로 나누고, 0.7을 뺀 값에 9를 곱하면 5.4가 됩니다. 어떤 수를 소수점을 포함하여 구하시오.

Answer: 2.5

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

Question (EN): Jungkook picked 25 persimmons. It is said that Jungkook picked 4 more persimoons than 3 times the number of persimmons that Hoseok picked. How many persimmons did Hoseok pick?
Question (KO): 정국이는 감을 25개 땄습니다. 정국이가 딴 감은 호석이가 딴 감의 수의 3배보다 4개가 더 많다고 합니다. 호석이가 딴 감은 몇 개입니까?

Answer: 7

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

Question (EN): There are 3 geese inside the fence. If you give the geese at least 2 bamboos, how many ways are there to distribute 20 bamboos?
Question (KO): 울타리 안에 3마리의 거위가 있습니다. 만약 거위들에게 적어도 2개 이상의 대나무를 준다고 한다면, 대나무 20개를 나누어 주는 방법은 몇 가지입니까?

Answer: 120

Solution (Python):
var_a = 3
var_b = 20
var_c = var_a + var_b
var_d = 3
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 1
var_i = var_g - var_h
var_j = 20
var_k = 3
var_l = 2
var_m = var_k * var_l
var_n = var_j - var_m
var_o = 1
var_i = int(var_i)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
    var_o = var_o * (var_i-i)
for i, elem in enumerate(range(var_n)):
    var_o = var_o / (i+1)
print(int(var_o))
Category: Comparison

Question (EN): I handed out erasers to both classes. 15 students in Dohoon's class were given 45 erasers equally, and 5 students in Kihoon's class were given 30 erasers equally. In which class will one student have more erasers?
Question (KO): 나는 두 반의 학생들에게 지우개를 나누어 주었다. 도훈이네 반 학생 15명에게는 지우개 45개를 균등하게, 기훈이네 반 5명에게는 지우개 30개를 균등하게 나누어 주었다. 어떤 반에서 한 학생이 더 많은 지우개를 가지게 됩니까?

Answer: Kihoon

Solution (Python):
var_a = 'Dohoon'
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)
Category: Arithmetic calculation

Question (EN): The sum of 7 consecutive natural numbers is 63. Find the third number.
Question (KO): 연속하는 7개의 자연수의 합이 63입니다 세번째 수를 구하시오

Answer: 8

Solution (Python):
var_a = 63
var_b = 0
var_c = 7
var_d = 1
var_e = var_c - var_d
var_f = 1
list_a = [i for i in range(var_b, var_e + 1, var_f)]
list_a = [float(i) for i in list_a]
var_g = sum(list_a)
var_h = var_a - var_g
var_i = 7
var_j = var_h / var_i
var_k = 3
var_l = 1
var_m = var_k - var_l
var_n = var_j + var_m
print(int(var_n))
Category: Correspondence

Question (EN): The difference of the age of the older brother and the younger brother is 12. The sum of the older brother's age and younger brother's age is 40 more than the difference. Find the product of the ages of the brothers.
Question (KO): 형의 나이와 동생의 나이의 차는 12입니다. 형의 나이와 동생의 나이의 합은 차보다 40이 많습니다. 형과 동생의 나이의 곱을 구하시오.

Answer: 640

Solution (Python):
var_a = 40
var_b = 2
var_c = var_a / var_b
var_d = 12
var_e = var_c + var_d
var_f = 40
var_g = 2
var_h = var_f / var_g
var_i = var_e * var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): When the bucket containing 320 kilograms (kg) of water was weighed again after using half of the water, it. became 175 kilograms (kg). Find the weight of the empty bucket in kilograms (kg).
Question (KO): 320킬로그램(㎏)의 물이 담긴 통에서 절반의 물을 쓴 후 통의 무게를 다시 재어 보니 175킬로그램(㎏)입니다. 통만의 무게는 몇 킬로그램(㎏)인지 구하시오.

Answer: 30

Solution (Python):
var_a = 320
var_b = 320
var_c = 175
var_d = var_b - var_c
var_e = 2
var_f = var_d * var_e
var_g = var_a - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): My uncle is 41 years old. If Yuna is 3 years older than Eunji and Eunji is 25 years younger than my uncle, what is the sum of the ages of Eunji and Yuna?
Question (KO): 삼촌의 나이는 41살입니다. 유나는 은지보다 3살이 많고 은지는 삼촌보다 25살이 적을때 은지와 유나의 나이 합은 몇 살인가요?

Answer: 35

Solution (Python):
var_a = 41
var_b = 25
var_c = var_a - var_b
var_d = 41
var_e = 25
var_f = var_d - var_e
var_g = 3
var_h = var_f + var_g
var_i = var_c + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): When Jimin drinks 150 milliliters (㎖) and Taehyung drinks 1.65 liter (L) from a 30 liter (L) bucket, find how many liters (L) of water are left.
Question (KO): 30리터(L) 짜리 물통에서 지민이가 150밀리리터(㎖)를 마시고, 태형이가 1.65밀리리터(㎖)를 먹었을 때, 남은 물의 양은 몇 리터(L)인지 구하시오.

Answer: 28.2

Solution (Python):
var_a = 30
var_b = 150
var_c = 1000
var_d = var_b / var_c
var_e = var_a - var_d
var_f = 1.65
var_g = var_e - var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Correspondence

Question (EN): If the reciprocal of -0.4 is A and the reciprocal of +5/2 is B, find the reciprocal of 3/A + 2/B.
Question (KO): -0.4의 역수가 A이고 +5/2의 역수가 B이면 3 / A + 2 / B의 역수를 찾으십시오.

Answer: 0.26

Solution (Python):
var_a = 1
var_b = 3
var_c = 1
var_d = -0.4
var_e = var_c / var_d
var_f = var_b / var_e
var_g = 2
var_h = 1
var_i = 2.5
var_j = var_h / var_i
var_k = var_g / var_j
var_l = var_f + var_k
var_m = var_a / var_l
print('{:.2f}'.format(round(var_m+1e-10,2)))
Category: Correspondence

Question (EN): Given the equation 23+A72=695. What number is A?
Question (KO): 등식 23+A72=695이 성립한다고 합니다. A에 들어가야 하는 숫자는 무엇인가요?

Answer: 6

Solution (Python):
var_a = '23+A72=695'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_a
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    term_list = []
    op_list = []
    temp_c = ''
    for tc in temp:
        if tc not in '+-*/=><().':
            temp_c += tc
        else:
            op_list.append(tc)
            term_list.append(temp_c)
            temp_c = ''
    term_list.append(temp_c)
    new_eq = ''
    for i in range(len(op_list)):
        new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    if len(new_eq) == len(var_a):
        new_eq=new_eq.replace('=', '==')
        new_eq=new_eq.replace('>==', '>=')
        new_eq=new_eq.replace('<==', '<=')
        eval_result = False
        try:
            eval_result = eval(new_eq)
        except:
            pass
        if eval_result:
            for i, (k, _) in enumerate(ans_dict.items()):
                ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c))
Category: Comparison

Question (EN): 20 students lined up in a single line. Jungkook is standing right in front of Yoongi, and 11 students are standing in front of Jungkook. How many students are standing behind Yoongi?
Question (KO): 20명의 학생들이 한 줄로 줄을 섰습니다. 윤기의 앞에는 정국이가 서있고, 정국이 앞에는 11명의 학생들이 서 있습니다. 윤기의 뒤에 서 있는 학생은 몇 명입니까?

Answer: 7

Solution (Python):
var_a = 20
var_b = 11
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
var_f = 1
var_g = var_e - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Yuna's family drank 0.4 of the total milk today, and the leftover milk was 0.69 liters (L). Find how many liters (L) of milk were there at first.
Question (KO): 유나네 가족이 오늘 우유를 전체의 0.4만큼 마셨더니 남은 우유가 0.69리터(L)였습니다. 처음에 있던 우유는 몇 리터(L)인지 구하시오.

Answer: 1.15

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

Question (EN): Among Jungkook, Jimin, Yoongi, and Yoojung, I'm going to vote for 2 people by allowing anonymous duplication. How many cases can possibly occur?
Question (KO): 정국, 지민, 윤기, 유정이 중에 무기명으로 중복을 허용하여 2명에게 투표를 하려고 합니다. 가능한 경우의 수는 몇 가지 일까요?

Answer: 10

Solution (Python):
var_a = 'Jungkook'
var_b = 'Jimin'
var_c = 'Yoongi'
var_d = 'Yoojung'
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 = var_e + var_f
var_h = 1
var_i = var_g - var_h
var_j = 2
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)
for i, elem in enumerate(range(var_j)):
    var_k = var_k / (i+1)
print(int(var_k))
Category: Comparison

Question (EN): There are 50 soccerballs, 26 basketballs, and 8 more baseballs than basketballs. Which ball has the most of the three?
Question (KO): 축구공이 50개, 농구공이 26개, 야구공이 농구공보다 8개 더 있습니다. 어떤 공이 가장 많이 있습니까?

Answer: soccerballs

Solution (Python):
var_a = 'soccerballs'
var_b = 'basketballs'
var_c = 'baseballs'
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 = 50
var_e = 26
var_f = 26
var_g = 8
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)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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): Find the number of 4-digit odd numbers that has 7 in the hundreds place and 5 in the tens place.
Question (KO): 백의 자리가 7이고, 십의 자리가 5인 네 자리 수 중 홀수의 개수를 구하시오.

Answer: 45

Solution (Python):
var_a = 'A'
var_b = 7
var_c = 5
var_d = 'B'
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=""
for i in list_a:
    i = str(i)
    var_e = var_e + i
ans_dict = dict()
var_e = str(var_e)
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_e):
    if v in variable_candi:
        ans_dict[v] = 0
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_e
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    if len(var_e) == len(str(int(temp))):
        new_elem = int(temp)
        list_b.append(new_elem)
var_f = 1000
var_g = 10000
list_c = []
if var_f%2==0:
    for i in range(var_f+1, var_g+1, 2):
        list_c.append(i)
else:
    for i in range(var_f, var_g+1, 2):
        list_c.append(i)
list_d = list(set(list_b) & set(list_c))
var_h = len(list_d)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): There are five times more students doing hula hoops than the number of students jumping rope. If there are 7 students jumping rope, how many students are doing hula hoops?
Question (KO): 줄넘기를 하는 학생 수의 5배만큼 훌라후프를 하고 있습니다. 줄넘기를 하는 학생이 7명이라면 훌라후프를 하는 학생은 몇 명입니까?

Answer: 35

Solution (Python):
var_a = 7
var_b = 5
var_c = var_a * var_b
print(int(var_c))
Category: Possibility

Question (EN): We want to create natural numbers less than 10000 and greater than 1000 using the natural numbers from 1 to 3. What is the sum of all possible numbers at this time?
Question (KO): 1부터 3까지의 자연수를 이용하여 10000미만 1000이상의 자연수를 만들고자 한다. 이 때, 만들 수 있는 모든 수의 합은 얼마인가?

Answer: 179982

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 = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=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 = 10000
list_c = []
for i in list_b:
    if i < var_e:
        list_c.append(i)
var_f = 1000
list_d = []
for i in list_c:
    if i >= var_f:
        list_d.append(i)
list_d = [float(i) for i in list_d]
var_g = sum(list_d)
print(int(var_g))
Category: Geometry

Question (EN): What is the area in square meters (m2) of a rectangular toilet with a length of 5 meters (m) and a width of 17/20 meters (m)?
Question (KO): 가로가 5미터(m)이고, 세로가 17/20미터(m)인 직사각형 모양의 화장실의 넓이는 몇 제곱미터(㎡)입니까?

Answer: 4.25

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

Question (EN): It was 40 that should be subtracted from, but mistakenly subtracting 21 from a number yields 52. How much do you get when you calculate it correctly?
Question (KO): 40을 어떤 수에 빼야 할 것을 잘못하여 21을 어떤 수에 뺀 결과는 52가 나옵니다. 바르게 계산하면 얼마인가요?

Answer: 33

Solution (Python):
var_a = 52
var_b = 21
var_c = var_a + var_b
var_d = 40
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): Taehyung's house is on the 7th floor from the top and the 13th floor from the bottom of the apartment, and if there are 15 houses on each floor, how many houses are there in this apartment?
Question (KO): 태형의 집은 아파트 위쪽에서 7번째 층, 아래쪽에서 13번째 층에 있고, 각 층마다 15채의 집이 있을 때, 이 아파트에 모여있는 집은 모두 몇 채입니까?

Answer: 315

Solution (Python):
var_a = 7
var_b = 13
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
var_f = 15
var_g = var_e * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Yujeong divided the pizza into 3 equal slices and ate one slice. Minwoo divided the same size pizza into 15 equal slices. How many slices does Minwoo need to eat to eat the same amount as Yujeong?
Question (KO): 유정이는 피자를 똑같이 3조각으로 나누어 한 조각을 먹었습니다. 민우는 같은 크기의 피자를 똑같이 15조각으로 나누었습니다. 유정이와 같은 양을 먹으려면 민우는 몇 조각을 먹어야 합니까?

Answer: 5

Solution (Python):
var_a = 15
var_b = 3
var_c = var_a / var_b
print(int(var_c))
Category: Possibility

Question (EN): Find the sum of the second largest and third smallest numbers greater than 100 and less than 1000, using the numbers 1, 6, and 8 once.
Question (KO): 숫자 1, 6, 8을 한 번씩 모두 사용할 때, 100보다 크고 1000보다 작은 수 중 두 번째로 큰 수와 세 번째로 작은 수의 합을 구하시오.

Answer: 1434

Solution (Python):
var_a = 1
var_b = 6
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 = 2
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 3
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): Minyoung and Taehyung have 9 and 3 candies, respectively. How many candies should Taehyung take from Minyeong to keep the number of candies equal?
Question (KO): 민영이와 태형이가 각각 사탕 9개, 3개를 가지고 있습니다. 둘이 가진 사탕의 수가 같아지려면 태형이는 민영이에게 사탕을 몇 개 받아야 할까요?

Answer: 3

Solution (Python):
var_a = 9
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 were 24 boys and 14 girls in the auditorium. After a while, an equal number of boys and girls left the auditorium. If only 30 students remained in the auditorium, how many girls left earlier?
Question (KO): 강당에 남학생 24명과 여학생 14명이 있었습니다. 잠시 후에 남학생과 여학생이 같은 수만큼 강당에서 나갔습니다. 강당에 남아 있는 학생이 30명이라면 강당에서 나간 여학생은 몇 명인지 구하시오.

Answer: 4

Solution (Python):
var_a = 24
var_b = 14
var_c = var_a + var_b
var_d = 30
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g))
Category: Possibility

Question (EN): There are 1 red marble, 1 green marble, 1 blue marble and 1 purple marble. In how many different ways can you place 4 marbles in a row?
Question (KO): 빨간색 구슬 1개, 초록색 구슬 1개, 파란색 구슬 1개, 보라색 구슬 1개가 있습니다. 구슬 4개를 서로 다르게 한 줄로 놓는 방법은 모두 몇 가지입니까?

Answer: 24

Solution (Python):
var_a = 'red'
var_b = 'green'
var_c = 'blue'
var_d = 'purple'
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 = 4
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))
Category: Geometry

Question (EN): Find the length of the other side of a right triangle with one non-hypotenuse of length 3 and hypotenuse of length 5.
Question (KO): 빗변이 아닌 한 변의 길이가 3이고, 빗변의 길이가 5인 직각삼각형에서 나머지 한 변의 길이를 구하시오.

Answer: 4

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a ** var_b
var_d = 3
var_e = 2
var_f = var_d ** var_e
var_g = var_c - var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): When 4 pieces of tape were overlapped and attached to the same length, it became 925 centimeters (cm). If the length of one piece of tape is 250 centimeters (cm), how many centimeters (cm) is the length of each of the overlapping parts?
Question (KO): 테이프 4개를 동일한 길이 만큼 겹쳐서 이어 붙였더니 925센티미터(㎝)가 되었습니다. 테이프 한 개의 길이가 250센티미터(㎝)라면 겹쳐진 부분의 각 길이는 몇 센티미터(㎝)가 되나요?

Answer: 25

Solution (Python):
var_a = 250
var_b = 4
var_c = var_a * var_b
var_d = 925
var_e = var_c - var_d
var_f = 4
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Jimin ate 7 of the 12 tangerines. How many tangerines are left?
Question (KO): 12개의 귤 중 7개를 지민이가 먹었습니다. 남아 있는 귤은 몇 개입니까?

Answer: 5

Solution (Python):
var_a = 12
var_b = 7
var_c = var_a - var_b
print(int(var_c))
Category: Possibility

Question (EN): Provided that the length of one side of the square is 2 centimeters (cm), we want to make a different rectangle by attaching all 210 of these squares. In case you rotate the rectangle that you made and when it has the same shape, you consider it as the same one, find how many ways you can make the rectangle.
Question (KO): 정사각형의 한 변의 길이가 2센티미터(cm)라고 할 때, 이 정사각형 210개를 모두 붙여서 서로 다른 직사각형을 만들려고 합니다. 만든 직사각형을 돌려 같은 모양인 경우 한 가지로 본다고 할 때, 직사각형을 만들 수 있는 방법은 모두 몇 가지인지 구하시오.

Answer: 8

Solution (Python):
var_a = 210
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
    if var_a % i == 0:
        list_a.append(i)
        list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = len(list_a)
var_c = 2
var_d = var_b / var_c
var_e = 1
var_f=int(((var_d+9*10**(var_e-2))//(10**(var_e-1)))*10**(var_e-1))

print(int(var_f))
Category: Geometry

Question (EN): The sides of a prism are made up of six rectangles. How many vertices does this prism have?
Question (KO): 어떤 각기둥의 옆면은 직사각형 여섯 개로 이루어져 있습니다. 이 각기둥의 꼭짓점은 몇 개입니까?

Answer: 12

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

Question (EN): How many two-digit numbers that can be formed by drawing two different numbers from 0, 1, 2, and 3 are divisible by 4?
Question (KO): 0, 1, 2, 3 중 서로 다른 숫자 2개를 뽑아 만들 수 있는 두 자리 수 중에서 4로 나누어떨어지는 수는 모두 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 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: Correspondence

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

Answer: 69

Solution (Python):
var_a = 78
var_b = 54
var_c = var_a - var_b
var_d = 45
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): There is a rectangle whose width is 0.875 times its length. If the length is 24 centimeters (cm), find the area in square centimeters (cm2).
Question (KO): 가로의 길이가 세로의 길이의 0.875배인 직사각형이 있습니다. 세로의 길이가 24센티미터(㎝)라면, 넓이는 몇 제곱센티미터(㎠)일지 구하시오.

Answer: 504

Solution (Python):
var_a = 24
var_b = 0.875
var_c = var_a * var_b
var_d = 24
var_e = var_c * var_d
print(int(var_e))