philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): When the six-digit number A4461B is divisible by 72, find A+B.
Question (KO): 여섯 자리 수 A4461B이 72로 나누어 떨어질 때, A+B를 구하시오.

Answer: 12

Solution (Python):
var_a = 'A4461B'
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 = 72
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 = 'A4461B'
var_d = 'A'
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])
var_f = 'A4461B'
var_g = 'B'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_b:
    elem = str(elem)
    var_h = int(elem[unk_idx])
var_i = var_e + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): You want to cut 360 meters (m) of wire into 3.6 meters (m) long pieces. In how many pieces can you cut the wire?
Question (KO): 길이가 360미터(m)인 철사를 3.6미터(m) 씩 자르려고 합니다. 철사를 모두 몇 도막으로 자를 수 있습니까?

Answer: 100

Solution (Python):
var_a = 360
var_b = 3.6
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): 1260 people visited the park last Sunday. Of those, 7/18 were men, and 6/11 of the women were students. Find how many female students visited the park.
Question (KO): 지난 일요일 어느 공원에 방문한 사람은 1260명입니다. 그중에서 7/18은 남자이고, 여자 중 6/11은 학생이었습니다. 공원에 방문한 여학생은 몇 명인지 구하시오.

Answer: 420

Solution (Python):
var_a = 1260
var_b = 1
var_c = 0.3888888888888889
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 0.5454545454545454
var_g = var_e * var_f
print(int(eval('{:.2f}'.format(round(var_g+1e-10,2)))))
Category: Arithmetic calculation

Question (EN): Eunji has 44 ping pong balls. If she gives 4 ping pong balls to her friends each, how many friends will get the ping pong balls?
Question (KO): 은지는 44개의 탁구공을 가지고 있습니다. 친구들에게 탁구공을 4개씩 나누어 주면 몇 명의 친구들이 탁구공을 받게 됩니까?

Answer: 11

Solution (Python):
var_a = 44
var_b = 4
var_c = var_a / var_b
print(int(var_c))
Category: Geometry

Question (EN): How many vertices are there in a tetrahedron?
Question (KO): 정사면체의 꼭짓점의 개수는?

Answer: 4

Solution (Python):
var_a = 3
var_b = 1
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): There is a rectangle with a width three times its height. If the length of this rectangle is 0.06 meters (m), how many square meters (m2) is its area?
Question (KO): 가로가 세로의 3배인 직사각형이 있습니다. 이 직사각형의 세로가 0.06미터(m)일 때, 넓이는 몇 제곱미터(㎡)입니까?

Answer: 0.01

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

Question (EN): There are 12 more volleyballs and 23 fewer basketballs than soccer balls. If there are 68 soccer balls, how many soccer balls, volleyballs, and basketballs are there?
Question (KO): 배구공은 축구공보다 12개 많고, 농구공은 축구공보다 23개 적습니다. 축구공이 68개일 때 축구공, 배구공, 농구공은 모두 몇 개입니까?

Answer: 193

Solution (Python):
var_a = 68
var_b = 12
var_c = var_a + var_b
var_d = 68
var_e = 23
var_f = var_d - var_e
var_g = var_c + var_f
var_h = 68
var_i = var_g + var_h
print(int(var_i))
Category: Correspondence

Question (EN): You need to multiply a certain number by 6, but you mistakenly multiplied it by 9, and I got 153. Find the result of the correct calculation.
Question (KO): 어떤 수에 6을 곱해야 하는데 잘못하여 9를 곱했더니 153이 되었습니다. 바르게 계산한 결과를 구하시오.

Answer: 102

Solution (Python):
var_a = 153
var_b = 9
var_c = var_a / var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e))
Category: Comparison

Question (EN): Jinho gave 3 of the 9 pencils he had to his younger brother, and Youngsu gave 7 of the 14 pencils he had to his friend. Who has more pencils between Jinho and Youngsu?
Question (KO): 진호는 가지고 있던 연필 9자루 중에서 3자루를 동생에게 주었고, 영수는 가지고 있던 연필 14자루 중에서 7자루를 친구에게 주었습니다. 진호와 영수 중 누가 더 많은 연필을 가지고 있습니까?

Answer: Youngsu

Solution (Python):
var_a = 'Jinho'
var_b = 'Youngsu'
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 = 9
var_d = 3
var_e = var_c - var_d
var_f = 14
var_g = 7
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: Possibility

Question (EN): Among 2, 4, 6, 8, and 9, you want to create a two-digit number by drawing two cards and using them only once. Find the sum of the largest and smallest two-digit numbers that can be made.
Question (KO): 2, 4, 6, 8, 9 중에서 2장을 뽑아 한 번씩만 사용하여 두 자리 수를 만들려고 합니다. 만들 수 있는 두 자리 수 중에서 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 122

Solution (Python):
var_a = 2
var_b = 4
var_c = 6
var_d = 8
var_e = 9
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]
var_i = 1
list_d=list_b.copy()
list_d.sort()
var_j = list_d[var_i-1]
var_k = var_h + var_j
print(int(var_k))
Category: Possibility

Question (EN): You want to pick two fruits out of an apple, a peach and a pear and place them in different fruit baskets. What are the number of cases?
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: Geometry

Question (EN): A cube-shaped fishbowl with an edge length of 20 centimeters (cm) was filled with water up to 15 centimeters (cm) high. Here, a cube-shaped piece of iron whose edge is 10 centimeters (cm) long was placed to be completely submerged in the water. Find how many centimeters (cm) the water level in this fish tank has risen, including the decimal point.
Question (KO): 한 모서리의 길이가 20센티미터(㎝)인 정육면체 모양의 어항에 높이가 15센티미터(㎝)가 되도록 물을 채워 넣었습니다. 여기에 한 모서리의 길이가 10센티미터(㎝)인 정육면체 모양의 철 조각을 물 안에 완전히 잠기도록 넣었습니다. 이 어항의 물의 높이는 몇 센티미터(㎝) 높아지는지 소수점을 포함하여 구하시오.

Answer: 2.5

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

Question (EN): You are going to make chocolate necklaces for 134 kindergarteners at Seonhee's Kindergarten this year. If you need 7 chocolates for each chocolate necklace, how many bags of 28 chocolates should you buy at least?
Question (KO): 선희네 유치원에서 올해 들어온 유치원생 134명에게 초콜릿 목걸이를 만들어 주려고 합니다. 초콜릿 목걸이 한 개에 초콜릿 7개씩 필요하다면, 한 봉지에 28개씩 들어있는 초콜릿을 적어도 몇 봉지 사야 합니까?

Answer: 34

Solution (Python):
var_a = 134
var_b = 7
var_c = var_a * var_b
var_d = 28
var_e = var_c / var_d
var_f = 1
var_g=int(((var_e+9*10**(var_f-2))//(10**(var_f-1)))*10**(var_f-1))

print(int(var_g))
Category: Arithmetic calculation

Question (EN): If the rabbits are color coded, 12 are white and 9 are black. If 8 rabbits are female, how many male rabbits are there?
Question (KO): 토끼를 색으로 구별하면 12마리는 흰색이고 9마리는 검은색입니다. 전체 토끼 중 8마리가 암컷이라면 수컷 토끼는 몇 마리입니까?

Answer: 13

Solution (Python):
var_a = 12
var_b = 9
var_c = var_a + var_b
var_d = 8
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): There are 5 students in Yoongi's class, and they are trying to select a class president. At this time, how many cases can Yoongi vote for the 3 class president candidates?
Question (KO): 윤기네 반에는 5명의 학생이 있고, 반장을 뽑으려고 합니다. 이때, 3명의 반장 후보자에게 투표할 수 있는 경우는 모두 몇 가지입니까?

Answer: 243

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

Question (EN): If the sum of three consecutive natural numbers is 30, find the middle number among the three natural numbers.
Question (KO): 연속하는 세 자연수의 합이 30일 때, 세 자연수 중 중간 수를 구하시오.

Answer: 10

Solution (Python):
var_a = 30
var_b = 0
var_c = 3
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 = 3
var_j = var_h / var_i
var_k = 3
var_l = 2
var_m = var_k // var_l
var_n = var_j + var_m
print(int(var_n))
Category: Geometry

Question (EN): Find the area of a flower field in the shape of a circle with a radius of 0.6 meters (m) when the pi is 3.
Question (KO): 원주율이 3일 때, 반지름이 0.6미터(m)인 원 모양의 꽃밭의 넓이를 구하시오.

Answer: 1.08

Solution (Python):
var_a = 3
var_b = 0.6
var_c = 2
var_d = var_b ** var_c
var_e = var_a * var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Geometry

Question (EN): There is a rectangular parallelepiped with three distinct edges whose length is 4 centimeters (cm), 6 centimeters (cm), and 15 centimeters (cm) each. Find what is the volume of this rectangular parallelepiped.
Question (KO): 각기 다른 세 모서리의 길이가 4센티미터(㎝), 6센티미터(㎝), 15센티미터(㎝)인 직육면체가 있다. 부피는 얼마인지 구하시오.

Answer: 360

Solution (Python):
var_a = 15
var_b = 6
var_c = var_a * var_b
var_d = 4
var_e = var_c * var_d
print(int(var_e))
Category: Correspondence

Question (EN): If you add 82, add 90, add 88, add 84 to a number and divide it by 5, the quotient is 88. Find the number.
Question (KO): 어떤 수에 82를 더하고 90을 더하고 88을 더하고 84를 더한 다음 5로 나누면 몫이 88이다. 어떤 수를 구하시오.

Answer: 96

Solution (Python):
var_a = 88
var_b = 5
var_c = var_a * var_b
var_d = 82
var_e = var_c - var_d
var_f = 90
var_g = var_e - var_f
var_h = 88
var_i = var_g - var_h
var_j = 84
var_k = var_i - var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): There are five numbers: 10, 11, 12, 13, and 14. What is the remainder if the largest number is divided by the second largest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 가장 큰 수와 2번째로 큰 수로 나눈 나머지는 얼마입니까?

Answer: 1

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]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[-var_h]
var_j = var_g % var_i
print(int(var_j))
Category: Arithmetic calculation

Question (EN): There are 288 red marbles in 12 bags, and 243 blue marbles in 9 bags. Find the difference between the number of marbles in one bag of red and blue marbles.
Question (KO): 빨간 구슬 12봉투 안에 288개의 구슬이 들어 있고, 파란 구슬 9봉투 안에 243개의 구슬이 들어 있다. 빨간 구슬과 파란 구슬 1봉투에 들어 있는 구슬의 개수 차를 구하시오.

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

Question (EN): There are three numbers 0.8, 1/2, and 0.9. What is the largest number that is less than 2?
Question (KO): 3개의 숫자 0.8, 1/2, 0.9가 있습니다. 2보다 작은 수 중 가장 큰 숫자는 얼마인가요?

Answer: 0.9

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

Question (EN): If you fold and unfold the paper once making them overlap, you get 2 squares, and if you fold and unfold it twice, you get 4 squares, and if you fold and unfold it 3 times, you get 8 squares. How many squares will there be on the paper if you fold and unfold it 8 times in the same way?
Question (KO): 종이를 겹치게 1번 접었다가 펼치면 2칸이 생기고, 2번 접었다가 펼치면 4칸, 3번 접었다가 펼치면 8칸이 생깁니다. 같은 방법으로 8번 접었다가 펼치면 종이에는 몇 칸이 생기겠습니까?

Answer: 256

Solution (Python):
var_a = 2
var_b = 8
var_c = var_a ** var_b
print(int(var_c))
Category: Geometry

Question (EN): There is a square with the sum of the lengths of its four sides measuring 52 centimeters (cm). Find the area of this square.
Question (KO): 네 변의 길이의 합이 52센티미터(㎝)인 정사각형이 있다. 정사각형의 넓이를 구하시오.

Answer: 169

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

Question (EN): A person consumes 0.08 milliliters (ml) of water per 1 kilometer (km). Find the amount of water consumed in milliliters (㎖) when traveling for 2 hours and 36 minutes at the speed of moving 80 kilometers (㎞) in 1 hour.
Question (KO): 사람은 1킬로미터(㎞)를 가면 0.08밀리리터(㎖)의 물이 소모됩니다. 1시간동안 80킬로미터(㎞)를 움직이는 빠르기로 2시간 36분을 이동하였을 때, 소모한 물의 양은 몇 밀리리터(㎖)인지 구하시오.

Answer: 16.64

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

Question (EN): Given that there are 18 apples and the sum of apples and persimmons are 33. Find the number of persimmons.
Question (KO): 사과가 18개 있고 사과와 감을 합하면 33개가 있습니다. 감은 몇 개 있는지 구하시오.

Answer: 15

Solution (Python):
var_a = 33
var_b = 18
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): Yoongi wants to add two-digit to three-digit numbers. Yoongi confused the 9 in the ones place of a two-digit number with 6, and switched the digits in the hundreds and ones place of a three-digit number and saw it as 253. If the sum obtained by Yoongi is 299, find the two-digit number.
Question (KO): 윤기는 두 자리 수와 세 자리 수의 덧셈을 하려 합니다. 윤기는 두 자리 수의 일의 자리 숫자 9를 6으로 잘못 보았고, 세 자리 수의 백의 자리 숫자와 일의 자리 숫자를 바꾸어 253이라고 잘못 보았습니다. 윤기가 구한 합은 299 일 때, 두 자리 수를 구하시오.

Answer: 49

Solution (Python):
var_a = 299
var_b = 253
var_c = var_a - var_b
var_d = 6
var_e = 9
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g))
Category: Comparison

Question (EN): There are numbers 0.8, 1/2, 0.9, and 1/3. Find the sum of all numbers greater than 0.3.
Question (KO): 0.8, 1/2, 0.9, 1/3의 숫자가 있다. 이 중 0.3보다 큰 숫자들의 합을 구하시오.

Answer: 2.53

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.3
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: Correspondence

Question (EN): When 5A8-B14=364 is valid, find B.
Question (KO): 5A8-B14=364일 때, B를 구하시오.

Answer: 2

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

Question (EN): If you buy only 2 fruits out of Apples, Peaches, Pears, and Melons, how many combinations are possible?
Question (KO): 사과, 복숭아, 배, 참외 중에서 2가지의 과일만 구매한다면, 몇 가지의 조합이 가능합니까?

Answer: 6

Solution (Python):
var_a = 'Apple'
var_b = 'Peach'
var_c = 'Pear'
var_d = 'Melon'
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = len(list_a)
var_f = 2
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_e-i)
for i, elem in enumerate(range(var_f)):
    var_g = var_g / (i+1)
print(int(var_g))
Category: Geometry

Question (EN): There is a square-shaped park. It is said that the perimeter of a park is the largest multiple of 4 and is less than 35. If Seong-hoon tries to walk 35 kilometers (km) around the perimeter of the park, how many more kilometers (km) must he walk after one lap?
Question (KO): 정사각형 모양의 공원이 있다. 공원의 둘레의 길이가 35보다 작은 4의 배수 중 가장 큰 값이라고 한다. 성훈이가 공원 둘레를 따라 35킬로미터(㎞)를 걸으려고 하면 1바퀴를 돌고 몇 킬로미터(㎞)를 더 걸어야하는가?

Answer: 3

Solution (Python):
var_a = 35
var_b = 4
var_c = var_a % var_b
print(int(var_c))
Category: Possibility

Question (EN): You are making new numbers using all 3, 9, and 8. What is the number of cases in which the number you made is more than or equal to 850 and less than or equal to 920?
Question (KO): 850이상 920이하 범위에서 3, 9, 8을 모두 사용하여 만들 수 있는 수는 모두 몇 개입니까?

Answer: 1

Solution (Python):
var_a = 3
var_b = 9
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 = 850
list_c = []
for i in list_b:
    if i > var_e:
        list_c.append(i)
var_f = 920
list_d = []
for i in list_c:
    if i < var_f:
        list_d.append(i)
var_g = len(list_d)
print(int(var_g))
Category: Geometry

Question (EN): If the volume of the cube is 729 cubic centimeters (cm3), how many centimeters (cm) is the length of one side of the cube?
Question (KO): 정육면체의 부피가 729세제곱센티미터(㎤)일 때, 한 모서리의 길이는 몇 센티미터(㎝)입니까?

Answer: 9

Solution (Python):
var_a = 729
var_b = 0.3333333333333333
var_c = var_a ** var_b
print(int(eval('{:.2f}'.format(round(var_c+1e-10,2)))))
Category: Geometry

Question (EN): There is a tetragon having all four sides the same length. If the lengths of the two diagonals of this figure are 9 centimeters (cm) and 14 centimeters (cm), what is the area?
Question (KO): 네 변의 길이가 모두 같은 사각형이 있습니다. 이 도형의 두 대각선의 길이가 각각 9센티미터(㎝), 14센티미터(㎝)라면 넓이는 얼마입니까?

Answer: 63

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

Question (EN): Divide 49 erasers and 66 pencils equally to the students in the class, leaving 4 erasers and 6 pencils. Find how many students are in the class.
Question (KO): 지우개 49개와 연필 66개를 반 학생들에게 똑같이 나누어주면 지우개는 4개가 남고 연필은 6개가 남는다. 반 학생들은 몇 명인지 구하시오.

Answer: 15

Solution (Python):
var_a = 49
var_b = 4
var_c = var_a - var_b
var_d = 66
var_e = 6
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
print(int(var_g))
Category: Comparison

Question (EN): Jungkook collected 6 divided by 3 apples, Yoongi collected 4 apples, and Yuna collected 5 apples. Who has the fewest apples?
Question (KO): 정국이는 6 나누기 3만큼 사과를 모았고, 윤기는 4개, 유나는 5개의 사과를 모았습니다. 누가 가진 사과가 가장 적습니까?

Answer: Jungkook

Solution (Python):
var_a = 'Jungkook'
var_b = 'Yoongi'
var_c = 'Yuna'
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 = 6
var_e = 3
var_f = var_d // var_e
var_g = 4
var_h = 5
list_b= []
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()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[var_i-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Arithmetic calculation

Question (EN): How many two-digit numbers meet the condition where the sum of the numbers in the ones and in the tens is greater than or equal to 8?
Question (KO): 두 자리 자연수 중에서 각 자릿수의 합이 8 이상인 수는 몇 개입니까?

Answer: 62

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)]
list_b=[]
for i in list_a:
    var_d = 0
    i = int(i)
    while i//10 > 0:
        var_d = var_d + i%10
        i = i//10
    var_d = var_d + i%10
    list_b.append(var_d)
var_e = 8
list_c = []
for i in list_b:
    if i >= var_e:
        list_c.append(i)
var_f = len(list_c)
print(int(var_f))