philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): There are a total of 20 telephone poles at 25m (m) intervals between Seokgi's and Dongmin's houses. If there is no telephone pole in front of their houses, what is the distance in meters (m) between Seokgi's and Dongmin's houses?
Question (KO): 석기와 동민이의 집사이에 25미터(m)간격의 전봇대가 총 20개 있습니다. 석기와 동민이 집앞에는 전봇대가 없을 시 석기와 동민이의 집사이 거리는 몇미터(m)입니까?

Answer: 525

Solution (Python):
var_a = 20
var_b = 1
var_c = var_a + var_b
var_d = 25
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): There are 20 people in Seokjin's class. If you are trying to pick 11 people to play in a soccer tournament, what are possible cases to pick a team?
Question (KO): 석진이네 반은 20명입니다. 축구 대회에 출전할 11명을 뽑으려고 할 때, 팀을 뽑는 경우는 모두 몇 가지 입니까?

Answer: 167960

Solution (Python):
var_a = 20
var_b = 11
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
    var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
    var_c = var_c / (i+1)
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Jisoo got 30 robots. Heeyoung has four times as many robots as Jisoo. How many robots do Heeyoung and Jisoo have in total?
Question (KO): 지수는 로봇을 30개 얻었다. 희영이는 지수보다 로봇을 4배 더 많이 가지고 있다. 희영이와 지수는 총 몇개의 로봇을 가지고 있을까?

Answer: 120

Solution (Python):
var_a = 40
var_b = 4
var_c = var_a * var_b
var_d = 40
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): Given that 8 people are standing between Eunjung and Yoojung, how many students are in a line when Eunjeong is the 5th student from the front and Yoojung is the last student in the line?
Question (KO): 은정이와 유정이 사이에는 8명이 서 있습니다. 은정이는 앞에서 5번째로 서 있고 유정이는 맨 뒤에 서있을 때 줄을 서 있는 학생은 모두 몇 명입니까?

Answer: 14

Solution (Python):
var_a = 5
var_b = 8
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): Minsu, Changhyun, and Seonghyun are standing in line at the bus stop. If Minsu is standing in front of Changhyun and Changhyun is standing in front of Seonghyun, find out who is standing at the back.
Question (KO): 민수, 창현, 성현이가 버스정류장에서 줄을 서 있다. 민수가 창현이 보다 앞에 서 있고 창현인가 성현이 보다 앞에 서 있다면 가장 뒤에 서 있는 사람은 누구인지 구하시오.

Answer: Seonghyun

Solution (Python):
var_a = 'Minsu'
var_b = 'Changhyun'
var_c = 'Seonghyun'
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 = 'Minsu'
var_e = 'Changhyun'
var_f = '<'
var_g = 'Changhyun'
var_h = 'Seonghyun'
var_i = '<'
list_b= []
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
    if cond_ in ("<", ">", "="):
        operand_right = temp_stack.pop()
        operand_left = temp_stack.pop()
        if cond_ == "=":
            cond_ = "=="
        conditions.append(f"{operand_left} {cond_} {operand_right}")
    else:
        if not cond_.isdigit():
            cond_ = "{" + cond_ + "}"
        temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
    item_name_index_dict = dict(zip(items_name_list, perm))
    formatted_conditions = \
        [condition.format_map(item_name_index_dict) for condition in conditions]
    if all(map(eval, formatted_conditions)):
        break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_j = 1
var_k = list_c[var_j-1]
print(var_k)
Category: Possibility

Question (EN): Yoo-ah left one of the digits 5, 2, 8, or 0 out and tried to form a three-digit number with the remaining digits. How many of the numbers Yoo-ah made are greater than 550 and less than 850?
Question (KO): 유아는 5, 2, 8, 0 중 하나의 숫자를 빼고, 남은 숫자들로 세 자리수를 만드려고 합니다. 유아가 만드는 수 중 550보다 크고 850보다 작은 수는 모두 몇 가지 입니까?

Answer: 6

Solution (Python):
var_a = 5
var_b = 2
var_c = 8
var_d = 0
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 = 3
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 = 550
list_c = []
for i in list_b:
    if i > var_f:
        list_c.append(i)
var_g = 850
list_d = []
for i in list_c:
    if i < var_g:
        list_d.append(i)
var_h = len(list_d)
print(int(var_h))
Category: Geometry

Question (EN): If you draw a diagonal from one vertex of a figure made of 9 angles, how many figures made of 3 angles are made?
Question (KO): 9개의 각으로 이루어진 도형의 한 꼭짓점에서 대각선을 긋는다면, 3개의 각으로 이루어진 도형은 몇 개 만들어집니까?

Answer: 7

Solution (Python):
var_a = 9
var_b = 3
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): 22 people of different heights stand in a line in order, tallest first. (a) stands 13th from the back. If you line up again in order of shortest to tallest, what number will you stand from the back?
Question (KO): 각각의 키가 다른 22명이 키가 큰 사람부터 순서대로 한 줄로 서 있습니다. (가)는 뒤에서 13번째에 서 있습니다. 키가 작은 사람부터 순서대로 다시 한 줄로 서면 (가)는 뒤에서 몇 번째에 서게 됩니까?

Answer: 10

Solution (Python):
var_a = 22
var_b = 13
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): How many grams (g) of water must be evaporated from 300 grams (g) of 4% salt water to make 10% salt water?
Question (KO): 4%의 소금물 300그램(g)에서 몇 그램(g)의 물을 증발시켜야 10%의 소금물이 되는지 구하여라

Answer: 180

Solution (Python):
var_a = 300
var_b = 300
var_c = 4
var_d = 100
var_e = var_c / var_d
var_f = var_b * var_e
var_g = 100
var_h = 10
var_i = var_g / var_h
var_j = var_f * var_i
var_k = var_a - var_j
print(int(var_k))
Category: Comparison

Question (EN): Yoongi collected 4 apples and Jungkook collected 6 times 3 apples. Who has fewer apples?
Question (KO): 윤기는 4개, 정국에는 6 곱하기 3만큼 사과를 모았습니다. 누가 더 사과를 적게 가지고 있습니까?

Answer: Yoongi

Solution (Python):
var_a = 'Yoongi'
var_b = 'Jungkook'
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 = 6
var_e = 3
var_f = var_d * var_e
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Comparison

Question (EN): Jungkook ate 3 out of 6 apples. When Yoongi has 4 apples, who has fewer apples?
Question (KO): 정국이는 6개의 사과에서 3개를 먹었습니다. 윤기가 가진 사과가 4개라면 누가 더 적은 사과를 가지고 있나요?

Answer: Jungkook

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

Question (EN): There are apples, bananas and persimmons in the fruit shop. The number of apples is 4 times the number of bananas, and the number of persimmons is 3 times the number of bananas. If the sum of apples and persimmons is 210, how many bananas are there?
Question (KO): 과일 가게에 사과, 바나나, 감이 있습니다. 사과 수는 바나나 수의 4배이고, 감 수는 바나나 수의 3배입니다. 사과와 감 수의 합이 210개라면 바나나는 몇 개인지 구해 보시오.

Answer: 30

Solution (Python):
var_a = 210
var_b = 4
var_c = 3
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are 23 more soccer balls at Hoseok's school than basketballs and 18 fewer volleyballs than soccer balls. If there are 40 volleyballs, how many basketballs are there?
Question (KO): 호석이네 학교에 있는 축구공은 농구공보다 23개 더 많고 배구공은 축구공보다 18개 더 적습니다. 배구공이 40개 있을 때, 농구공은 몇 개입니까?

Answer: 35

Solution (Python):
var_a = 40
var_b = 18
var_c = var_a + var_b
var_d = 23
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): Multiplying a number by 0.55 in a row gives you 4.235. Find the number.
Question (KO): 어떤 수를 0.55로 두 번 연속 곱하였더니 4.235가 되었습니다. 어떤 수는 구하시오.

Answer: 14

Solution (Python):
var_a = 4.235
var_b = 0.55
var_c = var_a / var_b
var_d = 0.55
var_e = var_c / var_d
print(int(var_e))
Category: Comparison

Question (EN): If Eunji stands in line for a bus and there are 6 people waiting in front and 5 people behind, how many people are there?
Question (KO): 은지가 버스 줄을 섰는데 앞에 6명 뒤에 5명 있다면, 현재 줄에 있는 사람은 모두 몇 명입니까?

Answer: 12

Solution (Python):
var_a = 6
var_b = 1
var_c = var_a + var_b
var_d = 5
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): The circumference of Suyeong's school playground is 242.7 meters (m). If Suyeong ran 5 laps around the playground, how many meters (m) did she run?
Question (KO): 수영이네 학교의 운동장 둘레는 242.7 미터(m) 입니다 수영이가 운동장을 5 바퀴 달렸다면, 모두 몇 미터(m)를 달린 것 입니까?

Answer: 1213.5

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

Question (EN): There are 3 red balls, 2 blue balls, and 5 green balls in the bag. When a ball is drawn from the bag, what will be the color of the ball with the highest probability?
Question (KO): 주머니 속에 빨간 공이 3개, 파란 공이 2개, 초록 공이 5개 들어있다. 주머니에서 공 1개를 꺼낼 때, 확률이 가장 높은 공의 색깔을 쓰시오.

Answer: green

Solution (Python):
var_a = 'red'
var_b = 'blue'
var_c = 'green'
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
var_e = 2
var_f = 5
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Possibility

Question (EN): Soyun chooses and discards one of the number cards 3, 5, 8, and 9, and wants to make a three-digit natural number with the remaining cards. How many total numbers can Soyun make?
Question (KO): 소윤이는 숫자 카드 3, 5, 8, 9중 하나를 골라 버리고, 남은 카드들로 세 자리 자연수를 만들고자 합니다. 소윤이가 만들 수 있는 수들의 개수는 총 몇개입니까?

Answer: 24

Solution (Python):
var_a = 3
var_b = 5
var_c = 8
var_d = 9
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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = len(list_b)
print(int(var_f))
Category: Possibility

Question (EN): If you choose three different numbers from 0, 3, 5, and 9 and use them once to make a three-digit number, what is the sum of the smallest and largest numbers?
Question (KO): 0, 3, 5, 9 중 각각 다른 3개를 골라 한 번씩 사용하여 세 자리 수를 만든다고 할 때, 가장 작은 수와 가장 큰 수의 합은 얼마인가?

Answer: 1258

Solution (Python):
var_a = 0
var_b = 3
var_c = 5
var_d = 9
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 = 3
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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = 1
list_d=list_b.copy()
list_d.sort()
var_i = list_d[-var_h]
var_j = var_g + var_i
print(int(var_j))
Category: Arithmetic calculation

Question (EN): There is a hot air balloon that is 115 meters (m) high. How many minutes does it take to pass through the stratosphere of 1.625 kilometers (km) if it ascends 400 meters (m) in 1 minute?
Question (KO): 높이가 115미터(m)인 열기구가 있습니다. 1분에 400미터(m)를 올라간다고 할 때 1.625킬로미터(㎞)의 성층권을 통과하는데 몇 분이 걸리나요?

Answer: 3.78

Solution (Python):
var_a = 1.625
var_b = 1000
var_c = var_a * var_b
var_d = 115
var_e = var_c - var_d
var_f = 400
var_g = var_e / var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Comparison

Question (EN): The wire Yeongju has is 97.5 centimeters (cm), and the wire Minho has is 3 millimeters (mm) longer than 97 centimeters (cm). Who has a shorter wire?
Question (KO): 영주가 가지고 있는 철사는 97.5센티미터(㎝)이고, 민호가 가지고 있는 철사는 97센티미터(㎝)보다 3밀리미터(㎜)더 깁니다. 더 짧은 철사를 가지고 있는 사람은 누구입니까?

Answer: Minho

Solution (Python):
var_a = 'Yeongju'
var_b = 'Minho'
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 = 97.5
var_d = 97
var_e = 3
var_f = 10
var_g = var_e / var_f
var_h = var_d + var_g
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
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: Correspondence

Question (EN): Among the multiples of 123, there are is a number shaped162ABC6. Find the smallest of these numbers shaped like that.
Question (KO): 123의 배수 중 162ABC6 모양의 수가 있다. 이러한 수 중에서 가장 작은 수를 구하여라.

Answer: 1620156

Solution (Python):
var_a = 1620006
var_b = 1629996
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 123
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 = 10
var_f = 6
list_c = [] 
var_e = int(var_e)
var_f = int(var_f)
if var_f < 0:
    var_f = var_f + var_e
for i in list_b:
    i = int(i)
    if i%var_e == var_f:
        list_c.append(i)
var_g = 1
list_d=list_c.copy()
list_d.sort()
var_h = list_d[var_g-1]
print(int(var_h))
Category: Correspondence

Question (EN): Divide 11 by a number and you get 2 as a result. How much is 6 multiplied by a number?
Question (KO): 11을 어떤 수에서 나누었더니 결과로 2를 얻었습니다. 6을 어떤 수에 곱하면 얼마입니까?

Answer: 132

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

Question (EN): Hot air balloons are said to ascend into the sky at 3.8 kilometers (km) per hour. How high in kilometers (km) does a hot air balloon rise without stopping in 2 hours and 45 minutes?
Question (KO): 열기구는 한 시간에 3.8킬로미터(㎞)를 하늘로 올라간다고 합니다. 열기구가 2시간 45분동안 쉬지않고 올라간 높이는 몇 킬로미터(㎞)입니까?

Answer: 10.45

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

Question (EN): There are 12 liters (L) and 400 milliliters (㎖) of oil. You are trying to divide this into two bottles. A large bottle can hold 2 liters (L) and 600 milliliters (㎖) more than a small bottle. How many liters (liters) will the large bottle hold?
Question (KO): 12리터(L) 400밀리리터(㎖)의 기름이 있습니다. 이것을 큰 병에는 작은 병보다 2리터(L) 600밀리리터(㎖) 많게 나누어 담으려고 합니다. 큰 병에는 몇 리터(L)를 담게 됩니까?

Answer: 7.5

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

Question (EN): How many diagonals can be drawn from one vertex of a 10-angle figure?
Question (KO): 10개의 각으로 이루어진 도형의 한 꼭짓점에서 그을 수 있는 대각선의 개수는 몇 개입니까?

Answer: 7

Solution (Python):
var_a = 10
var_b = 3
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): The five-digit number A375B is divisible by 24. How many numbers fit for A?
Question (KO): 다섯 자리 수 A375B는 24로 나누어 떨어진다. A에 알맞은 숫자는 모두 몇 개인가?

Answer: 3

Solution (Python):
var_a = 'A375B'
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 = 24
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 = 'A375B'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
    elem = str(elem)
    list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_e = len(list_c)
print(int(var_e))
Category: Geometry

Question (EN): What is the total number of vertices of a figure with 21 edges, 9 faces, and two polygonal base sides that are parallel and congruent?
Question (KO): 모서리가 21개, 면이 9개이고, 다각형인 두 밑면이 서로 평행하고 합동인 도형의 꼭짓점의 개수는 총 몇 개입니까?

Answer: 14

Solution (Python):
var_a = 21
var_b = 3
var_c = var_a / var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e))
Category: Comparison

Question (EN): There are four numbers 0.8, 1/2, 0.9, and 1/3. How many numbers are less than or equal to 3?
Question (KO): 4개의 숫자 0.8, 1/2, 0.9, 1/3가 있습니다. 3보다 작거나 같은 수는 몇 개입니까?

Answer: 4

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 = 3
list_b = []
for i in list_a:
    if i <= var_e:
        list_b.append(i)
var_f = len(list_b)
print(int(var_f))
Category: Correspondence

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

Answer: 8

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 = '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 = 'A15B94'
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: Geometry

Question (EN): You have a rectangular piece of dough measuring 34 centimeters (cm) wide. When the dough is cut without gaps using a square mold with a side length of 4 centimeters (cm), if the width of the dough is 2 centimeters (cm) left and 24 cookies are made in total, Find the minimum perimeter of the dough before the mold is stamped in centimeters (cm).
Question (KO): 가로의 길이가 34센티미터(㎝)인 직사각형 모양의 반죽이 있습니다. 한 변의 길이가 4센티미터(㎝)인 정사각형 모양으로 생긴 틀을 이용해 반죽을 빈틈없이 찍었을 때, 가로의 길이가 2센티미터(㎝) 남고, 쿠키가 총 24개 만들어졌다면, 틀을 찍기 전의 반죽의 최소 둘레는 몇 센티미터(㎝)인지 구하시오.

Answer: 92

Solution (Python):
var_a = 24
var_b = 34
var_c = 4
var_d = var_b // var_c
var_e = var_a / var_d
var_f = 4
var_g = var_e * var_f
var_h = 34
var_i = var_g + var_h
var_j = 2
var_k = var_i * var_j
print(int(var_k))
Category: Possibility

Question (EN): At a fruit store that sells apples, peaches, pears, and strawberries, you want to buy two fruits allowing duplicates. How many possible cases are there?
Question (KO): 사과, 복숭아, 배, 딸기를 판매하는 과일가게에서 중복을 허락하여 2개의 과일을 구매하려고 합니다. 가능한 경우의 수는 몇 가지 일까요?

Answer: 10

Solution (Python):
var_a = 'apples'
var_b = 'peaches'
var_c = 'pears'
var_d = 'strawberries'
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: Arithmetic calculation

Question (EN): You have 200 grams (g) of salt water with 5% salt. When the remaining salt became 8% of the total salt water after the water evaporated from this salt water, find how many grams (g) of water has evaporated.
Question (KO): 소금이 5% 들어있는 소금물이 200그램(g) 있습니다. 이 소금물에서 물이 증발한 후 남은 소금은 전체 소금물의 8%가 되었을 때, 물은 몇 그램(g) 증발하였는지 구하시오.

Answer: 75

Solution (Python):
var_a = 200
var_b = 200
var_c = 5
var_d = 100
var_e = var_c / var_d
var_f = var_b * var_e
var_g = 100
var_h = 8
var_i = var_g / var_h
var_j = var_f * var_i
var_k = var_a - var_j
print(int(var_k))
Category: Comparison

Question (EN): There are 28 identical bookshelves in the library. Each bookshelf has 6 floors, and the number of books on each floor is the same. It is said that when two books are taken from one floor of a bookshelf, there are 20 books left on that floor. How many books are on the shelves in the library?
Question (KO): 도서관에 똑같은 책장이 28개 있습니다. 각 책장은 6층이고, 각 층마다 꽂혀 있는 책의 수는 같습니다. 어느 책장의 한 층에서 2개의 책을 뽑았을 때 그 층에 20권이 남았다고 합니다. 도서관의 책장에 꽂혀 있는 책은 모두 몇 권입니까?

Answer: 3696

Solution (Python):
var_a = 20
var_b = 2
var_c = var_a + var_b
var_d = 6
var_e = var_c * var_d
var_f = 28
var_g = var_e * var_f
print(int(var_g))