philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): You are going to create a three-digit number using only once of 5, 9, and 2. Which of the two numbers is greater when the difference between the two numbers made is greatest?
Question (KO): 5, 9, 2 중에서 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만든 두 수의 차가 가장 크게 될 때, 두 수 중 큰 수는 무엇입니까?

Answer: 952

Solution (Python):
var_a = 5
var_b = 9
var_c = 2
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]
print(int(var_f))
Category: Geometry

Question (EN): A circular lake with a diameter of 100 meters (m) had a circumference of 314 meters (m). How many times bigger is the circumference of this lake compared to its diameter?
Question (KO): 지름이 100 미터(m) 인 원 모양의 호수의 둘레는 314 미터(m) 였습니다. 이 호수의 둘레는 지름의 몇 배 인가요?

Answer: 3.14

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

Question (EN): The teacher asks the students to create a four-digit number using all 1, 0, 5, and 7. How many answers can the student give?
Question (KO): 선생님이 학생에게 1, 0, 5, 7을 모두 사용해서 네 자리 수를 만들어 보라고 시켰습니다. 학생이 말할 수 있는 정답은 모두 몇 가지 입니까?

Answer: 18

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

Question (EN): There were 1.6 kg (kg) of strawberries. I ate 0.8 kg (kg) of strawberries yesterday and 0.3 kg (kg) today. How many kilograms (kg) of strawberries are left?
Question (KO): 딸기가 1.6킬로그램(㎏) 있었습니다. 딸기를 어제는 0.8킬로그램(㎏)을 먹고 오늘은 0.3킬로그램(㎏)을 먹었습니다. 남은 딸기는 몇 킬로그램(㎏) 입니까?

Answer: 0.5

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

Question (EN): A rectangle whose width divided by its height equals 0.875. Find the area of this rectangle when its height is 24 centimeters (cm).
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))
Category: Geometry

Question (EN): There is a rectangle with a width of 36 centimeters (cm) and a length of 64 centimeters (cm) and a square whose sum of four sides is equal to the sum of a rectangle's four sides. Find how many centimeters (cm) the length of one side of this square is.
Question (KO): 가로가 36센티미터(㎝)이고 세로가 64 센티미터(㎝)인 직사각형의 네 변의 길이의 합과 네 변의 길이의 합이 같은 정사각형이 있습니다. 이 정사각형의 한 변의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 50

Solution (Python):
var_a = 36
var_b = 64
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): It is said that the taxi fare in a city is 2,400 won for up to 3 kilometers (km), and 300 won is added for every 200 meters (km) beyond 3 kilometers (km). When a customer rides 4 kilometers (km), how much does he have to pay?
Question (KO): 어느 도시의 택시 요금이 3킬로미터(㎞)까지는 2400원이고, 3킬로미터(㎞)를 초과하면 200미터(m)에 300원씩 추가된다고 합니다. 한 손님이 4킬로미터(㎞)를 타고 갔을 때, 요금은 얼마를 내야 합니까?

Answer: 3900

Solution (Python):
var_a = 2400
var_b = 4
var_c = 3
var_d = var_b - var_c
var_e = 1000
var_f = var_d * var_e
var_g = 200
var_h = var_f / var_g
var_i = 300
var_j = var_h * var_i
var_k = var_a + var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): How many numbers that are both multiples of 6 and 15 are less than 200?
Question (KO): 6의 배수도 되고 15의 배수도 되는 수 중에서 200보다 작은 수는 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 1
var_b = 200
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
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 = 15
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 = 200
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): The area of a circle is equal to the sum of the areas of 4 circles of radius 2cm (cm). Find the radius of the circle.
Question (KO): 어떤 원의 넓이는 반지름이 2인 원 4개의 넓이의 합과 같다. 원의 반지름을 구하시오.

Answer: 4

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

Question (EN): Out of 1000 grams (g) of bread, if Bomi ate 350 grams (g) and Yejun ate 500 grams (g), how many grams (g) of bread are left?
Question (KO): 1000그램(g)의 빵중 보미가 350그램(g)먹고 예준이 500그램(g)을 먹었다면 남은 빵은 몇 그램(g)입니까?

Answer: 150

Solution (Python):
var_a = 1000
var_b = 350
var_c = var_a - var_b
var_d = 500
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): Jungkook has 6 erasers. Jimin has 4 more erasers than Jungkook and Seokjin has 3 fewer than Jimin. Who has the fewest erasers?
Question (KO): 정국이는 지우개를 6개 가지고 있습니다. 지민이는 지우개를 정국이보다 4개 더 많이 가지고 있고 석진이는 지민이보다 3개 더 적게 가지고 있습니다. 지우개를 가장 적게 가지고 있는 사람은 누구입니까?

Answer: Jungkook

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

Question (EN): There are pretty blankets whose shape is the same as a regular tetradecagon. When the length of all corners is 154 centimeters (cm). Find the length of one edge of the blanket.
Question (KO): 예쁜 담요가 있다. 담요의 모양은 정십사각형이다. 모든 모서리의 길이는 154센티미터(㎝)이다. 담요의 한 모서리 길이를 구하시오.

Answer: 11

Solution (Python):
var_a = 154
var_b = 14
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): The quotient of the three-digit number A63 divided by 7 is a three-digit number. Find the number of possible A.
Question (KO): 세 자리 수인 A63을 7로 나눈 몫은 세 자리 수입니다. A에 쓸 수 있는 숫자는 모두 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 'A63'
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 = 700
list_b = []
for i in list_a:
    if i >= var_b:
        list_b.append(i)
var_c = 7000
list_c = []
for i in list_b:
    if i < var_c:
        list_c.append(i)
var_d = len(list_c)
print(int(var_d))
Category: Arithmetic calculation

Question (EN): What is the smallest natural number excluding 1 that has the same remainder of 1 when divided by 3 and 5?
Question (KO): 3으로 나누었을 때의 나머지와 5로 나누었을 때의 나머지가 1로 같은 자연수 중 1을 제외하고 가장 작은 수는 얼마입니까?

Answer: 16

Solution (Python):
var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
var_e = 1
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 5
var_g = 1
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 2
list_d=list_c.copy()
list_d.sort()
var_i = list_d[var_h-1]
print(int(var_i))
Category: Arithmetic calculation

Question (EN): How many four-digit numbers less than 4000 are divisible by the five numbers of 2, 3, 5, 9, and 11?
Question (KO): 5개의 수 2, 3, 5, 9, 11로 나누어떨어질 수 있는 4000보다 작은 네 자리 수는 모두 몇 개 있습니까?

Answer: 3

Solution (Python):
var_a = 1000
var_b = 4000
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 = 2
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 = 3
list_c = []
var_g = int(var_g)
for i in list_b:
    i = int(i)
    if i % var_g == 0:
        list_c.append(i)
var_h = 5
list_d = []
var_h = int(var_h)
for i in list_c:
    i = int(i)
    if i % var_h == 0:
        list_d.append(i)
var_i = 5
list_e = []
var_i = int(var_i)
for i in list_d:
    i = int(i)
    if i % var_i == 0:
        list_e.append(i)
var_j = 9
list_f = []
var_j = int(var_j)
for i in list_e:
    i = int(i)
    if i % var_j == 0:
        list_f.append(i)
var_k = 11
list_g = []
var_k = int(var_k)
for i in list_f:
    i = int(i)
    if i % var_k == 0:
        list_g.append(i)
var_l = len(list_g)
print(int(var_l))
Category: Comparison

Question (EN): Among 1.4, 9/10, 1.2, 0.5, and 13/10, how many of these 5 numbers are greater than 1.1?
Question (KO): 1.4, 9/10, 1.2, 0.5, 13/10 5개 숫자 중에서 1.1보다 큰 숫자는 모두 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
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.1
list_b = []
for i in list_a:
    if i > var_f:
        list_b.append(i)
var_g = len(list_b)
print(int(var_g))
Category: Comparison

Question (EN): Jaewoong, Seongmin, and Eunseong are track and field athletes. When three people ran for 10 minutes, Jaewoong ran 20 kilometers (km), Sungmin ran 2600 meters (m), and Eunseong ran 5000 meters (m). Who has run the most?
Question (KO): 재웅, 성민, 은성은 육상선수입니다. 10분 동안 세 명이 달리기를 하였을 때 재웅이는 20킬로미터(㎞), 성민이는 2600미터(m), 은성이는 5000미터(m)를 달렸다. 가장 많이 달린 사람은 누구인가?

Answer: Jaewoong

Solution (Python):
var_a = 'Jaewoong'
var_b = 'Seongmin'
var_c = 'Eunseong'
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 = 20
var_e = 1000
var_f = var_d * var_e
var_g = 2600
var_h = 5000
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]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Geometry

Question (EN): Find the sum of the lengths of all the edges of a cube with a surface area of 150 square centimeters (cm2).
Question (KO): 겉넓이가 150제곱센티미터(㎠)인 정육면체의 모든 모서리의 길이의 합을 구하시오.

Answer: 60

Solution (Python):
var_a = 150
var_b = 6
var_c = var_a / var_b
var_d = 0.5
var_e = var_c ** var_d
var_f = 4
var_g = 3
var_h = var_f * var_g
var_i = var_e * var_h
print(int(var_i))
Category: Comparison

Question (EN): People are queuing up to enter the amusement park. If Eunji is standing at the 6th from the back, and there are 7 people in front of Eunji, how many people are all in line?
Question (KO): 놀이동산에 사람들이 입장하려고 줄을 서 있다. 은지가 뒤에서 6번째에 서있고 은지 앞에 7명이 있을 때, 줄을 서 있는 사람은 모두 몇명인가?

Answer: 13

Solution (Python):
var_a = 6
var_b = 7
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): The width of a rectangular parallelepiped is 7 centimeters (cm) and the length is 8 centimeters (cm). If the surface area is 442 square centimeters (cm2), how many centimeters (cm) is the height of this cuboid?
Question (KO): 어느 직육면체의 가로의 길이는 7센티미터(㎝)이고 세로의 길이는 8센티미터(㎝)입니다. 겉넓이가 442제곱센티미터(㎠)라면, 이 직육면체의 높이는 몇 센티미터(㎝)입니까?

Answer: 11

Solution (Python):
var_a = 442
var_b = 2
var_c = var_a / var_b
var_d = 7
var_e = 8
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 7
var_i = 8
var_j = var_h + var_i
var_k = var_g / var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): There were 55 cars in the parking lot. After 16 cars went out, another 19 came in. How many more cars are there in the parking lot?
Question (KO): 주차장에 자동차가 55대 있었습니다. 자동차 16대가 나간 후, 다시 19대가 들어왔습니다. 주차장에 자동차는 몇 대 더 많아졌습니까?

Answer: 3

Solution (Python):
var_a = 55
var_b = 16
var_c = var_a - var_b
var_d = 19
var_e = var_c + var_d
var_f = 55
var_g = var_e - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Jimin's science score is 87, and his social studies score is 6 points higher than his science score. How many English points does he need to get an average score of 92 in science, social studies, and English?
Question (KO): 지민이의 과학 점수는 87점이고, 사회 점수는 과학 점수보다 6점 높습니다. 과학, 사회, 영어 세 과목의 평균 점수가 92점이 되려면 영어를 몇 점 맞아야 합니까?

Answer: 96

Solution (Python):
var_a = 92
var_b = 3
var_c = var_a * var_b
var_d = 87
var_e = 87
var_f = 6
var_g = var_e + var_f
var_h = var_d + var_g
var_i = var_c - var_h
print(int(var_i))
Category: Geometry

Question (EN): You are about to buy apples and pears, and give out 4 apples and 3 pears, and there should be no leftovers. If you buy the same number of apples and pears, find the minimum number you need to buy.
Question (KO): 사과와 배를 사서 사과는 4개씩 배는 3개씩 나누어주려고 하고 나머지가 없어야 한다. 같은 개수의 사과와 배를 산다면 최소 몇 개를 사야하는지 구하시오.

Answer: 12

Solution (Python):
var_a = 3
var_b = 4
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
print(int(var_c))
Category: Geometry

Question (EN): There is a cube with the sum of the lengths of all its edges equal to 82.8 centimeters (cm). A new cube was created by shortening the length of one edge of this cube by 1/3. How many centimeters (cm) is the sum of the length of one edge of the newly created cube and the length of one edge of the original cube?
Question (KO): 모든 모서리의 길이의 합이 82.8센티미터(㎝)인 정육면체가 있습니다. 이 정육면체의 한 모서리의 길이를 1/3로 줄여서 새로운 정육면체를 만들었습니다. 새로 만든 정육면체의 한 모서리의 길이와 처음 정육면체의 한 모서리의 길이의 합은 몇 센티미터(㎝)입니까?

Answer: 9.2

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

Question (EN): The perimeter of an equilateral triangle is 2 meters (m). Find how many meters (m) is the side length of this equilateral triangle in decimal numbers.
Question (KO): 정삼각형의 둘레는 2미터(m)입니다. 이 정삼각형의 한 변의 길이는 몇 미터(m)인지 소수로 나타내어 보세요.

Answer: 0.67

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

Question (EN): There are 6000 Go stones in total. There are more white Go stones than black Go stones. When the difference between the number of white and black stones is subtracted from the total number of stones, the result is 4800. How many white Go stones are there?
Question (KO): 바둑돌이 모두 6000개가 있다. 흰 바둑돌이 검은 바둑돌 보다 많고 전체 개수에서 흰 바둑돌과 검은 바둑돌의 개수의 차를 빼면 4800개이다. 흰 바둑돌의 개수는 몇 개 입니까?

Answer: 3600

Solution (Python):
var_a = 6000
var_b = 4800
var_c = 2
var_d = var_b / var_c
var_e = var_a - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are three times as many pears as apples in the supermarket. If there are 240 kilograms (kg) of apples, how many kilograms (kg) do the apples and pears weigh?
Question (KO): 마트에 사과의 3배 만큼의 배가 있습니다. 사과가 240킬로그램(㎏) 있을 때, 사과와 배의 무게는 총 몇 킬로그램(㎏) 있습니까?

Answer: 960

Solution (Python):
var_a = 240
var_b = 240
var_c = 3
var_d = var_b * var_c
var_e = var_a + var_d
print(int(var_e))
Category: Geometry

Question (EN): I painted a trapezoidal roof. The upper side of the roof is 3.4 centimeters (cm) longer than the lower side, the height is 5.2 centimeters (cm) and the area is 100.62 square centimeters (cm2). How many centimeters (cm) is the length of the lower side of the roof?
Question (KO): 사다리꼴 모양의 지붕을 그렸습니다. 지붕의 윗변이 아랫변보다 3.4센티미터(㎝) 더 길고, 높이가 5.2센티미터(㎝)이고 넓이가 100.62제곱센티미터(㎠)입니다. 지붕의 아랫변의 길이는 몇 센티미터(㎝)입니까?

Answer: 17.65

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

Question (EN): There is a machine that makes 180 toys in 30 minutes. Find how many toys this machine made in 1 hour.
Question (KO): 30분 동안 180개의 장난감을 만드는 기계가 있다. 이 기계가 1시간 동안 만든 장난감은 몇 개인지 구하시오.

Answer: 360

Solution (Python):
var_a = 1
var_b = 60
var_c = var_a * var_b
var_d = 30
var_e = var_c / var_d
var_f = 180
var_g = var_e * var_f
print(int(var_g))
Category: Comparison

Question (EN): 20 students lined up in a single line. Eleven students are standing in front of Yoongi, and Hoseok is standing right behind Yoongi. How many students are standing behind Hoseok?
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: Correspondence

Question (EN): When 57A-2B4=364, what number should go in B?
Question (KO): 57A-2B4=364일 때, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 1

Solution (Python):
var_a = '57A-2B4=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: Geometry

Question (EN): There is a square-shaped colored paper with each side measuring 6 centimeters (cm). What is the area in square centimeters (cm2) of this sheet of paper?
Question (KO): 어떤 색종이는 정사각형 모양이고 한 변의 길이가 6센티미터(㎝)라고 합니다. 이 색종이의 넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 36

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

Question (EN): 8A4 rounded up to the tens place is 870. Find A.
Question (KO): 8A4를 올림하여 십의 자리까지 나타내면 870이 됩니다. A를 구하시오.

Answer: 6

Solution (Python):
var_a = '8A4'
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 = 870
list_b = []
for i in list_a:
    if i <= var_b:
        list_b.append(i)
var_c = 870
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 = '8A4'
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: Comparison

Question (EN): Eunji had 13 erasers. Yujeong had 4 erasers, and she got 3 more from her sister. Eunji gave her sister 7 erasers. Who has more erasers among Yujeong and Eunji?
Question (KO): 은지는 지우개 13개를 가지고 있다. 유정이는 지우개를 4개 가지고 있었는데 언니에게 3개 더 받았다. 은지는 동생에게 7개의 지우개를 주었다. 유정, 은지 중 지우개를 더 많이 가진 사람은 누구인가

Answer: Yujeong

Solution (Python):
var_a = 'Yujeong'
var_b = 'Eunji'
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 = 4
var_d = 3
var_e = var_c + var_d
var_f = 13
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: Arithmetic calculation

Question (EN): Find the greatest common divisor of 32 and 24.
Question (KO): 32와 24의 최대공약수를 구하시오.

Answer: 8

Solution (Python):
var_a = 32
var_b = 24
var_c = math.gcd(int(var_b), int(var_a))
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Students rode the 15-seater ride once over 18 times. If each ride has 3 empty seats, what is the total number of students?
Question (KO): 15인승 놀이기구를 학생들이 18번에 걸쳐 한번씩 탔습니다. 매번 탈때마다 3자리씩 비어있다면 모든 학생들의 수는 몇 명 입니까?

Answer: 216

Solution (Python):
var_a = 15
var_b = 3
var_c = var_a - var_b
var_d = 18
var_e = var_c * var_d
print(int(var_e))
Category: Correspondence

Question (EN): There are three different natural numbers A, B, and C. When A is divided by 11, the quotient is B and the remainder is C. Find the largest number that can be C.
Question (KO): 서로 다른 세 자연수 A, B, C가 있습니다. A를 11로 나누면 몫은 B이고 나머지는 C가 됩니다. 나머지 C가 될 수 있는 가장 큰 수를 구하시오.

Answer: 10

Solution (Python):
var_a = 11
var_b = 1
var_c = var_a - var_b
print(int(var_c))