philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): Given that the equation A5+2B=68 is true, what number can go in B?
Question (KO): 등식 A5+2B=68이 성립한다고 합니다. 이 때, B에 들어갈 수 있는 숫자는 무엇인가요?

Answer: 3

Solution (Python):
var_a = 'A5+2B=68'
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: Comparison

Question (EN): Jinseok's backpack weighs 1.49 kilograms (kg) and Miho's backpack weighs 9/20 kilograms (kg). Whose backpack is lighter?
Question (KO): 지석의 배낭 무게는 1.49킬로그램(㎏), 미호의 배낭 무게는 9/20킬로그램(㎏)이다. 누구의 배낭이 더 가볍습니까?

Answer: Miho

Solution (Python):
var_a = 'Jinseok'
var_b = 'Miho'
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 = 1.49
var_d = 0.45
list_b= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Geometry

Question (EN): You see 4 squares from the front, 3 from the top, and 4 from the side. How many cubes are there?
Question (KO): 정사각형이 앞에서 4개, 위에서 3개, 옆에서 4개 보입니다. 정육면체는 몇 개 있을까요?

Answer: 6

Solution (Python):
var_a = 4
var_b = 2
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): How many cubic meters (m3) is the volume of a rectangular parallelepiped made by doubling the length, width, and height of a rectangular parallelepiped with a width of 80 centimeters (cm), a length of 75 centimeters (cm), and a height of 120 centimeters (cm)? Save it.
Question (KO): 가로가 80센티미터(㎝), 세로가 75센티미터(㎝), 높이가 120센티미터(㎝)인 직육면체의 가로, 세로, 높이를 각각 2배로 하여 만든 직육면체의 부피는 몇 세제곱미터(㎥)인지 답을 구해보세요.

Answer: 5.76

Solution (Python):
var_a = 80
var_b = 100
var_c = var_a / var_b
var_d = 2
var_e = var_c * var_d
var_f = 75
var_g = 100
var_h = var_f / var_g
var_i = 2
var_j = var_h * var_i
var_k = 120
var_l = 100
var_m = var_k / var_l
var_n = 2
var_o = var_m * var_n
var_p = var_j * var_o
var_q = var_e * var_p
print('{:.2f}'.format(round(var_q+1e-10,2)))
Category: Correspondence

Question (EN): A number equals a number minus 5 and multiply it by 4. Find some number.
Question (KO): 어떤 수에서 5를 뺀 것의 4배는 어떤 수와 같다. 어떤 수를 구하시오.

Answer: 6.67

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

Question (EN): My mother buys the same amount of eggs every month. There were 27 eggs left last month, but since my mother bought eggs, the number has increased to 58. If you eat 48 eggs this month and your mother buys eggs for the next month, how many eggs will there be?
Question (KO): 어머니는 매달 같은 양의 달걀을 사오신다. 지난달에 남은 달걀이 27개인데 어머니가 달걀을 사오신 후로 달걀이 58개가 되었다. 이번달에 48개의 달걀을 먹고 다음달에 어머니가 달걀을 사오신다면 달걀은 몇 개가 되겠는가?

Answer: 41

Solution (Python):
var_a = 58
var_b = 48
var_c = var_a - var_b
var_d = 58
var_e = 27
var_f = var_d - var_e
var_g = var_c + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): In a factory, machine A makes 8 toys per minute, and machine B makes 10 toys per minute. Provided that both machines started making toys at the same time and machine B made 100 toys, find how many fewer toys machine A made than machine B.
Question (KO): 어느 공장에서 장난감을 만드는 데 (가) 기계는 1분에 8개씩 만들고, (나) 기계는 1분에 10개씩 만듭니다. 동시에 장난감을 만들기 시작하여 (나) 기계가 장난감을 100개 만들었다면, (가) 기계가 (나) 기계보다 장난감을 몇 개 더 적게 만들었는지 구하시오.

Answer: 20

Solution (Python):
var_a = 100
var_b = 100
var_c = 10
var_d = var_b / var_c
var_e = 8
var_f = var_d * var_e
var_g = var_a - var_f
print(int(var_g))
Category: Geometry

Question (EN): I used all the 12/25 centimeter (cm) lengths of yarn to make a square. What is the length of one side of this square?
Question (KO): 12/25센티미터(㎝) 길이의 실을 모두 사용하여 정사각형을 만들었습니다. 이 정사각형의 한 변의 길이는?

Answer: 0.12

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

Question (EN): The length of board A is 2.4 centimeters (cm), board B is 3.2 centimeters (cm), and board C is 2.8 centimeters (cm). When Eunji, Namjoon, and Hoseok are standing on top of 8 A boards, 4 B boards, and 5 C boards, respectively, find who is at the lowest.
Question (KO): 판자 (가)는 2.4센티미터(㎝), 판자 (나)는 3.2센티미터(㎝), 판자 (다)는 2.8센티미터(㎝)이다. 은지, 남준, 호석은 각각 (가)판자 8개, (나)판자 4개, (다)판자 5개를 쌓은 곳 위에 서 있따. 누가 가장 낮은 곳에 있는가?

Answer: Namjoon

Solution (Python):
var_a = 'Eunji'
var_b = 'Namjoon'
var_c = 'Hoseok'
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.4
var_e = 8
var_f = var_d * var_e
var_g = 3.2
var_h = 4
var_i = var_g * var_h
var_j = 2.8
var_k = 5
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_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_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 is a block of wood in the shape of a cuboid, and it has a height of 3.5 meters (m). What is the volume in cubic centimeters (cm3) of this block of wood if the surface area is increased by 144 square centimeters (cm2) when divided into three parts by making two cuts parallel to the base?
Question (KO): 직육면체 모양의 나무토막이 있습니다. 이 나무토막의 높이는 3.5m입니다. 밑몉에 평행한 방향으로 두 번 잘라 세 부분으로 나누면 겉넓이가 144제곱센티미터(㎠) 만큼 늘어난다면 이 나무토막의 부피는 몇 세제곱센티미터(㎤)입니까?

Answer: 12600

Solution (Python):
var_a = 144
var_b = 4
var_c = var_a / var_b
var_d = 3.5
var_e = 100
var_f = var_d * var_e
var_g = var_c * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There was a string that was 70 centimeters (cm) long. Of these, 27 centimeters (cm) was given to Minyoung, and 7/9 of the remaining was used to make (A). How many centimeters (cm) is the length of the remaining string?
Question (KO): 길이가 70센티미터(㎝)인 끈이 있었습니다. 이 중에서 27센티미터(㎝)는 민영이에게 주고 나머지의 7/9은 (가)를 만드는 데 사용하였습니다. 남은 끈의 길이는 몇 센티미터(㎝)입니까?

Answer: 9.56

Solution (Python):
var_a = 70
var_b = 27
var_c = var_a - var_b
var_d = 1
var_e = 0.7777777777777778
var_f = var_d - var_e
var_g = var_c * var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Possibility

Question (EN): For the flower arrangement, you will pick one of four roses and one of three tulips and arrange them. When arranging flowers, how many cases are there where you pick only one of the roses and tulips the same?
Question (KO): 꽃꽂이를 위해 4송이의 장미와 3송이의 튤립 중에서 각각 1송이씩을 선택해 꽂으려 한다. 꽃꽂이를 할 때, 장미와 튤립 중에서 어느 하나만 서로 같은 꽃을 선택하는 경우의 수는?

Answer: 60

Solution (Python):
var_a = 4
var_b = 3
var_c = 2
var_d = 1
var_b = int(var_b)
var_c = int(var_c)
for i, elem in enumerate(range(var_c)):
    var_d = var_d * (var_b-i)
var_e = var_a * var_d
var_f = 3
var_g = 4
var_h = 2
var_i = 1
var_g = int(var_g)
var_h = int(var_h)
for i, elem in enumerate(range(var_h)):
    var_i = var_i * (var_g-i)
var_j = var_f * var_i
var_k = var_e + var_j
print(int(var_k))
Category: Geometry

Question (EN): Gayoung has a cube-shaped box with one corner measuring 20 centimeters (cm). What is the surface area of this box?
Question (KO): 가영이는 한 모서리의 길이가 20센티미터(㎝)인 정육면체 모양의 상자를 가지고 있습니다. 이 상자의 겉넓이는 얼마입니까?

Answer: 2400

Solution (Python):
var_a = 20
var_b = 2
var_c = var_a ** var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): If there are 6 people A, B, C, D, E, and F, find the number of ways to select 2 subjects and 1 king.
Question (KO): A, B, C, D, E, F 6명의 백성이 있을 때, 신하 2명, 왕 1명을 뽑는 경우의 수를 구하시오.

Answer: 60

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
var_e = 'E'
var_f = 'F'
list_a= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
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_g = len(list_a)
var_h = 2
var_i = 1
var_j = var_h + var_i
var_k = 1
var_g = int(var_g)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
    var_k = var_k * (var_g-i)
var_l = 2
var_m = 2
var_n = 1
var_l = int(var_l)
var_m = int(var_m)
for i, elem in enumerate(range(var_m)):
    var_n = var_n * (var_l-i)
var_o = var_k / var_n
print(int(var_o))
Category: Arithmetic calculation

Question (EN): The 28 students in Jungkook's class played matching games during PE class. We paired them up in groups of 5, subtracted the remaining students, then paired them in groups of 7, and subtracted the remaining students. Find how many students are excluded.
Question (KO): 정국이네 반 학생 28명은 체육 시간에 짝짓기 놀이를 하였습니다. 5명씩 짝짓기를 하여 남은 학생을 뺀 다음 다시 7명씩 짝짓기를 하고 남은 학생을 뺐습니다. 빠진 학생은 모두 몇 명인지 구하시오.

Answer: 7

Solution (Python):
var_a = 28
var_b = 5
var_c = var_a % var_b
var_d = 28
var_e = 28
var_f = 5
var_g = var_e % var_f
var_h = var_d - var_g
var_i = 7
var_j = var_h % var_i
var_k = var_c + var_j
print(int(var_k))
Category: Possibility

Question (EN): You are trying to create a three-digit number using three number cards of 5, 2, and 8 only once. Find the difference between the largest number and the smallest number that can be made.
Question (KO): 5, 2, 8 세 장의 수 카드를 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 가장 큰 수와 가장 작은 수의 차를 구해 보시오.

Answer: 594

Solution (Python):
var_a = 5
var_b = 2
var_c = 8
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 1
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Subin climbed a mountain with her father to pick chestnuts and wanted to divide them into 8 baskets equally. However, on the way up the mountain, two baskets were broken, so she put one more chestnut in each basket, and there were four left. How many chestnuts did Subin and her father pick?
Question (KO): 수빈이는 아버지와 함께 뒷산에 올라 밤을 따고 이 밤을 8 바구니에 똑같이 나누어 담으려 하였습니다. 그런데 산을 올라가는 도중 2개의 바구니가 망가져서 한 바구니에 1개씩 밤을 더 담았더니 4개가 남았습니다. 수빈이와 아버지가 함께 딴 밤은 모두 몇 개입니까?

Answer: 40

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

Question (EN): A basket containing 30 pears each weighing 0.36 kilograms (kg) weighs 11.26 kilograms (kg). How many kilograms (kg) does the basket weigh alone?
Question (KO): 한 개의 무게가 0.36킬로그램(㎏) 인 배가 30 개 들어 있는 바구니의 무게는 11.26킬로그램(㎏) 입니다. 바구니만의 무게는 몇 킬로그램(㎏) 입니까?

Answer: 0.46

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

Question (EN): Jinbeom had 12 large and 34 small ttakji. Jinbeom lost several large ttakji and three times as many small ones as he was playing a game of ttakji-chigi. If the number of ttakji Jinbeom currently has is 30, how many large ttakji did Jinbeom lose?
Question (KO): 진범이는 12개의 큰 딱지와 34개의 작은 딱지를 가지고 있었다. 진범이는 딱지치기를 하다가 몇 개의 큰 딱지와 그것의 3배 만큼의 작은 딱지를 잃었다. 진범이가 현재 가진 딱지의 개수가 모두 30개일 때, 진범이가 잃은 큰 딱지의 개수는 몇 개인가?

Answer: 4

Solution (Python):
var_a = 12
var_b = 34
var_c = var_a + var_b
var_d = 30
var_e = var_c - var_d
var_f = 1
var_g = 3
var_h = var_f + var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Street trees are to be planted at intervals of 4.5 meters (m) on a road with a length of 63 meters (m). If you plant street trees both at the beginning and at the end, how many trees will you need in total?
Question (KO): 길이가 63미터(m)인 도로에 4.5미터(m) 간격으로 가로수를 심으려고 합니다. 시작 부분과 끝 부분에 모두 가로수를 심는다면 모두 몇 그루가 필요합니까?

Answer: 15

Solution (Python):
var_a = 63
var_b = 4.5
var_c = var_a // var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): How many centimeters (cm) is the sum of all the side lengths of a regular octagon with a side length of 2.3 meters (m)?
Question (KO): 한 변의 길이가 2.3미터(m)인 정팔각형의 모든 변의 길이의 합은 몇 센티미터(㎝)입니까?

Answer: 1840

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

Question (EN): Find the length of one side of a square whose perimeter is the same as that of a rectangle whose sides are 7 centimeters (cm) long and 5 centimeters (cm) wide.
Question (KO): 가로가 7센티미터(㎝), 세로가 5센티미터(㎝)인 직사각형과 둘레의 길이가 같은 정사각형의 한 변의 길이를 구하시오.

Answer: 6

Solution (Python):
var_a = 7
var_b = 5
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): There is a bag with marbles in it. The weight of this bag is 3.4 kilograms (kg), and after taking out 1/5 of the marbles, the bag weighs 2.98 kilograms (kg). Find the weight in kilograms (kg) of the empty bag.
Question (KO): 구슬이 담긴 주머니가 있습니다. 이 주머니의 무게가 3.4킬로그램(㎏)이고 구슬의 1/5를 뺀 후 주머니의 무게는 2.98킬로그램(㎏)입니다. 빈 주머니의 무게는 몇 킬로그램(㎏)인지 구하세요.

Answer: 1.3

Solution (Python):
var_a = 3.4
var_b = 3.4
var_c = 2.98
var_d = var_b - var_c
var_e = 0.2
var_f = var_d / var_e
var_g = var_a - var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Geometry

Question (EN): In the fairy tale Jack and the Beanstalk, there is a scene where Jack climbs the beanstalk. Jack climbs 25 meters (m) during the day and slides down 3 meters (m) at night. If Jack climbed 25 meters (m) during the day on the 64th day and reached the sky island, find the height in meters (m) of the sky island.
Question (KO): 잭과 콩나무라는 동화에는 잭이 콩나무를 타고 기어올라가는 장면이 나옵니다. 잭은 낮에 25미터(m)를 기어올라가고 밤에 3미터(m)를 미끄러져 내려옵니다. 잭이 64일째 낮에 25미터(m)를 기어올라 하늘섬에 도착했다면 하늘섬의 높이는 몇 미터(m)인지 구하시오.

Answer: 1411

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

Question (EN): What is the sum of all numbers greater than or equal to 0.4 among 0.8, 1/2, and 0.9?
Question (KO): 0.8, 1/2, 0.9 중에서 0.4보다 크거나 같은 수를 모두 더하면 얼마일까요?

Answer: 2.2

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 = 0.4
list_b = []
for i in list_a:
    if i >= var_d:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Haeun is 1.56 meters (m) tall. Nayeon is 0.14 meters (m) shorter than Haeun and 0.27 meters (m) shorter than Minkyung. How tall is Minkyung in meters (m)?
Question (KO): 하은이의 키는 1.56미터(m)입니다. 나연이는 하은이보다 0.14 미터(m) 작고 민경보다 0.27 미터(m) 작다고 합니다. 민경이의 키는 몇 미터(m)입니까?

Answer: 1.69

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

Question (EN): You want to subtract a number from 20. When you mistakenly divide 40 by a number, the result is 5. What is the correct calculation result?
Question (KO): 20에 어떤 수를 빼려고 합니다. 잘못하여 40에 어떤 수를 나누었더니 결과는 5가 되었습니다. 바르게 계산한 결과는 얼마일까요?

Answer: 12

Solution (Python):
var_a = 20
var_b = 40
var_c = 5
var_d = var_b / var_c
var_e = var_a - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): You want to plant flags at intervals of 20 meters (m) along a playground track with a circumference of 200 meters (m). If there are 12 flags ready, how many flags are left? Also, if it/s not enough, how many are insufficient?
Question (KO): 둘레가 200미터(m)인 운동장 트랙을 따라 20미터(m) 간격으로 깃발을 꽂으려고 합니다. 준비된 깃발이 12개라면, 깃발은 몇 개 남습니까? 또, 부족하다면 몇 개 부족합니까?

Answer: 2

Solution (Python):
var_a = 12
var_b = 200
var_c = 20
var_d = var_b / var_c
var_e = var_a - var_d
print(int(var_e))
Category: Comparison

Question (EN): Dongkyun runs 8 laps around the playground 4 times a day, and Heejin runs 5/7 laps 10 times a day. Find who runs the playground more.
Question (KO): 동균이는 하루에 운동장을 8바퀴씩 4번 돌고, 희진이는 하루에 운동장을 5/7바퀴씩 10번 돕니다. 누가 더 운동장을 많이 도는지 구하시오

Answer: Dongkyun

Solution (Python):
var_a = 'Dongkyun'
var_b = 'Heejin'
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 = 8
var_d = 4
var_e = var_c * var_d
var_f = 0.7142857142857143
var_g = 10
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: Comparison

Question (EN): There are four numbers 0.8, 1/2, 0.9, and 1/3. How many numbers are less than 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): A is 742. A is 397 less than B. B is 693 greater than C. Find the value of A-C.
Question (KO): A는 742입니다. A는 B보다 397만큼 작습니다. B는 C보다 693만큼 큽니다. A-C의 값을 구하시오.

Answer: 296

Solution (Python):
var_a = 742
var_b = 742
var_c = 397
var_d = var_b + var_c
var_e = 693
var_f = var_d - var_e
var_g = var_a - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): A cloud train with a length of 20 meters (m) is running at 288 centimeters (cm) per second. If this train took 25 seconds to completely pass the tunnel, find the length of the tunnel in meters (m).
Question (KO): 길이가 20미터(m)인 구름 열차가 1초에 288센티미터(㎝)씩 달리고 있습니다. 이 열차가 터널을 완전히 통과하는 데 25초가 걸렸다면 터널의 길이는 몇 미터(m)인지 구해 보시오.

Answer: 52

Solution (Python):
var_a = 288
var_b = 100
var_c = var_a / var_b
var_d = 25
var_e = var_c * var_d
var_f = 20
var_g = var_e - var_f
print(int(var_g))
Category: Possibility

Question (EN): Suppose you make a three-digit natural number by selecting three of the four numbers 1, 2, 3, and 4 and arranging them in a row. How many numbers are divisible by 3?
Question (KO): 4개의 숫자 1, 2, 3, 4 중에서 중복을 허락하여 3개를 택해 일렬로 나열하여 세 자리의 자연수를 만들 때, 3으로 나눠 떨어지는 수의 개수는?

Answer: 22

Solution (Python):
var_a = 1
var_b = 2
var_c = 3
var_d = 4
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.product(list_b, repeat=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 = 3
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: Geometry

Question (EN): Cheolsu's nine classmates are standing in a nonagonal shape facing each other. If every student plays rock-paper-scissors once with everyone except for the person next to him/her, how many times do all students play rock-paper-scissors?
Question (KO): 철수네 학급 친구 9명이 구각형 모양으로 서로 마주 보고 서 있습니다. 모든 학생이 자신의 양옆 사람을 제외하고 다른 친구들과 한 번씩 가위바위보를 한다면, 가위바위보는 모두 몇 번 이루어지는지 구하시오.

Answer: 27

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

Question (EN): I would like to exchange 170,000 won for a trip to China. One Chinese yuan equals 161.5 won in Korean won. If you want to exchange 1000 yuan and 10 yuan bills, and you change as many 1000 yuan bills as possible, find how many bills will be converted into 10 yuan bills.
Question (KO): 중국여행을 위해 17만원을 환전하려고 합니다. 중국 돈 1위안은 우리나라 돈 161.5원입니다. 1000위안과 10위안짜리로 바꾸려하고 1000위안짜리를 가능한 만큼 많이 바꾼다면 10위안으로 바꿔지는 돈은 몇 장인지 구하세요.

Answer: 5

Solution (Python):
var_a = 17
var_b = 10000
var_c = var_a * var_b
var_d = 161.5
var_e = 1000
var_f = var_d * var_e
var_g = var_c % var_f
var_h = 161.5
var_i = 10
var_j = var_h * var_i
var_k = var_g // var_j
print(int(var_k))
Category: Correspondence

Question (EN): Ji-hoon made a mistake while calculating and subtracted 7 from a number instead of multiplying by 7, and it became 0.45. Find out the answer Jihoon was originally looking for.
Question (KO): 지훈이가 계산을 하다 7을 곱할 것을 실수하여 뺐더니 0.45가 되었다. 지훈이가 원래 찾던 답이 얼마인지 구하시오.

Answer: 52.15

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