philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): The heights of the 10 students in Eunji's class are 145 centimeters (cm), 142 centimeters (cm), 138 centimeters (cm), 136 centimeters (cm), 143 centimeters (cm), 146 centimeters (cm), 138 centimeters (cm), 144 centimeters (cm), 137 centimeters (cm), 141 centimeters (cm). What is the average height of these 10 students in centimeters (cm)?
Question (KO): 은지네 반 학생 중 10명의 키가 각각 145센티미터(㎝), 142센티미터(㎝), 138센티미터(㎝), 136센티미터(㎝), 143센티미터(㎝), 146센티미터(㎝), 138센티미터(㎝), 144센티미터(㎝), 137센티미터(㎝), 141센티미터(㎝)라고 합니다. 이 학생 10명의 평균 키는 몇 센티미터(㎝)입니까?

Answer: 141

Solution (Python):
var_a = 145
var_b = 142
var_c = 138
var_d = 136
var_e = 143
var_f = 146
var_g = 138
var_h = 144
var_i = 137
var_j = 141
list_a= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_a.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_a.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_a.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_a.append(var_g)
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()
list_a = [float(i) for i in list_a]
var_k = sum(list_a)/len(list_a)
print(int(var_k))
Category: Correspondence

Question (EN): When we divide a number by 1.33, we get 48. Write what is the number we divided.
Question (KO): 어떤 수를 1.33으로 나누었더니 48이 되었습니다. 어떤 수는 얼마인지 쓰시오.

Answer: 63.84

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

Question (EN): If the number of triangles that can be formed by drawing a line from one vertex to another inside a polygon is at most 20, find the number of diagonals of this polygon.
Question (KO): 어떤 대각형 내부의 한 점에서 다른 꼭짓점으로 선을 그어 만들 수 있는 삼각형의 개수가 최대 20개일 때 이 다각형의 대각선은 몇 개인지 구하시오.

Answer: 170

Solution (Python):
var_a = 20
var_b = 20
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: Correspondence

Question (EN): I subtracted 29 from a particular number and added 64 and got 76 as a result. Find that particular number.
Question (KO): 어떤 수에서 29를 빼고 64를 더했더니 76이 되었습니다. 어떤 수를 구하시오.

Answer: 41

Solution (Python):
var_a = 76
var_b = 64
var_c = var_a - var_b
var_d = 29
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): There is a certain regular octahedron with a side length of 2 centimeters (cm). What is the surface area of this regular octahedron in square centimeters (cm2)?
Question (KO): 한 변의 길이가 2센티미터(㎝)인 어떤 정팔면체가 있습니다. 이 정팔면체의 겉넓이는 몇 제곱센티미터(㎠)일까요?

Answer: 13.86

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

Question (EN): There is a rectangular-shaped post-it note with a length of 9.4 centimeters (cm) and a width of 3.7 centimeters (cm). There is an adhesive on the upper part of the back of the post-it note that allows it to be attached and detached, and this part is 0.6 centimeters (cm) long. What is the area of 15 post-it notes connected vertically so that only the adhesive part touches the other post-it notes?
Question (KO): 세로가 9.4센티미터(㎝), 가로가 3.7센티미터(㎝)인 직사각형 모양의 포스트잇이 있습니다. 포스트잇의 뒷면의 윗부분에는 이를 붙였다 떼었다 할 수 있도록 하는 접착제가 있는데 이 부분의 길이가 0.6센티미터(㎝)라고 합니다. 접착제가 있는 부분만 다른 포스트잇에 닿도록 포스트잇 15장을 세로로 길게 연결했을 때의 넓이는 얼마입니까?

Answer: 490.62

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

Question (EN): There are some 6th graders who participated in the basketball game, and the number is 6 times bigger than the number of 5th graders in the game. If there were 12 of 5th graders, what would be a total number of 5th and 6th grade students playing in the basketball game?
Question (KO): 5학년 중 농구 시합에 참가한 학생 수의 6배만큼 6학년 학생이 농구 시합에 참가하였습니다. 5학년 중 12명이 농구 시합에 참가하였다면 농구 시합에 참가한 5학년과 6학년 학생은 모두 몇 명입니까?

Answer: 84

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

Question (EN): A number multiplied by 15 equals 45. Hoseok wants to subtract the number by 1. What is the result Hoseok will get?
Question (KO): 어떤 수에 15를 곱하면 45가 됩니다. 호석이는 어떤 수에서 1을 빼고자 합니다. 호석이가 얻는 결과값은?

Answer: 2

Solution (Python):
var_a = 45
var_b = 15
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): There are 3/8 liters (L) of Milk, 7/10 liters (L) of Cider, and 11/15 liters (L) of Orange-Juice in the refrigerator. Find the one with the largest amount among the three.
Question (KO): 냉장고 안에 우유가 3/8리터(L), 사이다가 7/10리터(L), 오렌지주스가 11/15리터(L) 있습니다. 셋 중에서 양이 가장 많은 것을 구하시오.

Answer: Orange-Juice

Solution (Python):
var_a = 'Milk'
var_b = 'Cider'
var_c = 'Orange-Juice'
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.375
var_e = 0.7
var_f = 0.7333333333333333
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: Comparison

Question (EN): There are 7/10, 3/2, 1.8, 3/5, and 1.1. If you pick numbers greater than 1 from these, how many are there?
Question (KO): 7/10, 3/2, 1.8, 3/5, 1.1이 있습니다. 이 중에서 1보다 큰 수를 고른다면 모두 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 0.7
var_b = 1.5
var_c = 1.8
var_d = 0.6
var_e = 1.1
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 = []
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): Choose the second largest number among 5, 8, 4, 3, and 7.
Question (KO): 5, 8, 4, 3, 7중에서 2번째로 큰 숫자를 선택합니다.

Answer: 7

Solution (Python):
var_a = 5
var_b = 8
var_c = 4
var_d = 3
var_e = 7
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=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
print(int(var_g))
Category: Correspondence

Question (EN): There is a piece of paper in the shape of a square of 69.7 square centimeters (cm2). Find the area of one small square obtained by dividing the length and width into 8 equal parts.
Question (KO): 69.7제곱센티미터(㎠) 정사각형 모양의 종이가 있다. 가로, 세로를 각각 8등분 하여 나오는 작은 정사각형 1개의 면적을 구하시오.

Answer: 1.09

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

Question (EN): The average score of 20 successful candidates for a certain national examination is 42 points, and the average score of 20 candidates who did not pass the examination is 38 points. What is the average of all test takers?
Question (KO): 어떤 국가고시의 통과자 20명의 평균은 42점이고 불합격자 20명의 평균은 38점이다. 전체 응시자 평균은 얼마인지 구하시오.

Answer: 40

Solution (Python):
var_a = 20
var_b = 42
var_c = var_a * var_b
var_d = 20
var_e = 38
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 20
var_i = 20
var_j = var_h + var_i
var_k = var_g / var_j
print(int(var_k))
Category: Comparison

Question (EN): In the prize draw at the mart, Namjoon won 2nd place and Yoongi won 4th place. Hoseok is higher than Yoongi, but lower than Namjoon. What is the rank of Hoseok?
Question (KO): 마트에서 경품을 추첨하여 남준이는 2등을 했고, 윤기는 4등을 했습니다. 호석이는 윤기보다 높지만 남준이보다 낮습니다. 호석이는 몇 등입니까?

Answer: 3

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

Question (EN): If the diagonal of square is 12 centimeters (cm), what is the area of this square?
Question (KO): 대각선의 길이가 12센티미터(㎝)인 정사각형의 넓이를 구하시오.

Answer: 72

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

Question (EN): Jiyoon is practicing mental arithmetic. She must say the sum of all the numbers that her friend called earlier. Her friend called 36, 17, 32, 54, 28, 3. What value should Jiyoon say?
Question (KO): 지윤이는 암산 연습을 하고 있다. 친구가 앞에서 부른 수들을 모두 더한 값을 말해야 한다. 친구는 36, 17, 32, 54, 28, 3을 불렀다. 지윤이는 어떤 값을 말해야 하는가?

Answer: 170

Solution (Python):
var_a = 36
var_b = 17
var_c = 32
var_d = 54
var_e = 28
var_f = 3
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()
list_a = [float(i) for i in list_a]
var_g = sum(list_a)
print(int(var_g))
Category: Comparison

Question (EN): Yesterday, Wonhee slept 10 and 9/10 hours, and Dongil slept 102/10 hours. Find out who slept longer.
Question (KO): 어제 원희는 10과 9/10 시간을 자고, 동일이는 102/10 시간을 잤습니다. 누가 더 오래 잤는지 답을 구하세요.

Answer: Wonhee

Solution (Python):
var_a = 'Wonhee'
var_b = 'Dongil'
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 = 10
var_d = 0.9
var_e = var_c + var_d
var_f = 10.2
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]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Correspondence

Question (EN): When I cut 7 centimeters (cm) of wire into each piece, it became 12 pieces, leaving 4 centimeters (cm). If you cut this wire by 3 centimeters (cm), how many pieces will there be, leaving 1 centimeter (cm)?
Question (KO): 철사를 한 도막에 7센티미터(㎝)씩 잘랐더니 12도막이 되고, 4센티미터(㎝)가 남았습니다. 이 철사를 3센티미터(㎝)씩 자르면 몇 도막이 되고, 1센티미터(㎝)가 남습니까?

Answer: 29

Solution (Python):
var_a = 7
var_b = 12
var_c = var_a * var_b
var_d = 4
var_e = var_c + var_d
var_f = 3
var_g = var_e // var_f
print(int(var_g))
Category: Correspondence

Question (EN): If you divide 18 by 3 and divide it by 3 again, what is the result?
Question (KO): 18을 3으로 나누고 다시 3으로 나눈다면 얼마가 되는지 구하시오.

Answer: 2

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

Question (EN): A 50.5 centimeters (cm) long color tape was made by overlapping and attaching three 18 centimeters (cm) color tapes. How many centimeters (cm) did you overlap and attach each?
Question (KO): 50.5센티미터(㎝)의 색 테이프를 18센티미터(㎝) 색테이프 3개를 겹쳐서 이어 붙여 만들었습니다. 몇 센티미터(㎝)씩 겹쳐서 이어 붙였나요?

Answer: 1.75

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

Question (EN): A trapezoid with an upper side 3.6 centimeters (cm) longer than a lower side and with a height of 5.2 centimeters (cm) has an area of 96.9 square cm (cm2). How many centimeters (cm) is the lower side?
Question (KO): 윗변이 아랫변보다 3.6센티미터(㎝) 더 길고, 높이가 5.2센티미터(㎝)인 사다리꼴의 넓이가 96.9제곱센티미터(㎠)입니다. 아랫변은 몇 센티미터(㎝)입니까?

Answer: 16.85

Solution (Python):
var_a = 96.98
var_b = 2
var_c = var_a * var_b
var_d = 5.2
var_e = var_c / var_d
var_f = 3.6
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 are 240 candies of strawberry and grape flavors in total. If the number of grape-flavored candies is 2 less than the number of strawberry-flavored candies, how many strawberry-flavored candies are there?
Question (KO): 딸기맛 사탕과 포도맛 사탕이 합하여 240개가 있습니다. 포도맛 사탕의 개수가 딸기맛 사탕의 개수보다 2개가 적다면 딸기맛 사탕의 개수는 몇 개인가요?

Answer: 121

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

Question (EN): Find how many times 4 appears when you list two-digit numbers that are even.
Question (KO): 두 자리 수 짝수를 나열했을 때 4는 몇 번 등장하는지 구하시오.

Answer: 14

Solution (Python):
var_a = 11
var_b = 99
list_a = []
if var_a%2!=0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
var_c=""
for i in list_a:
    i = str(i)
    var_c = var_c + i
list_b = []
var_c = int(var_c)
while var_c//10 > 0:
    list_b.append(var_c%10)
    var_c = var_c//10
list_b.append(var_c%10)
list_b = list_b[::-1]
var_d = 4
var_e = 0
var_d = int(var_d)
for i in list_b:
    i = int(i)
    if i == var_d:
        var_e = var_e + 1
print(int(var_e))
Category: Comparison

Question (EN): From 1.4, 9/10, 1.2, 0.5 and 13/10, pick numbers greater than 1.1 and calculate their sum. What is the sum?
Question (KO): 1.4, 9/10, 1.2, 0.5, 13/10 5개 숫자 중에서 1.1보다 큰 숫자를 고르고, 총합을 계산하면 얼마입니까?

Answer: 3.9

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)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Comparison

Question (EN): We are comparing the heights of 4 students. If Yuna is taller than Yoongi, Yoongi is taller than Yoojung, and Yoojung is taller than Jimin, who is the shortest student?
Question (KO): 4학생의 키를 비교하고 있습니다. 유나는 윤기보다 크고, 윤기는 유정보다 크고, 유정은 지민보다 크다면, 키가 가장 작은 학생은 누구입니까?

Answer: Jimin

Solution (Python):
var_a = 'Yuna'
var_b = 'Yoongi'
var_c = 'Yoojung'
var_d = 'Jimin'
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 = 'Yuna'
var_f = 'Yoongi'
var_g = '>'
var_h = 'Yoongi'
var_i = 'Yoojung'
var_j = '>'
var_k = 'Yoojung'
var_l = 'Jimin'
var_m = '>'
list_b= []
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
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)
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_n = len(list_c)
var_o = list_c[var_n-1]
print(var_o)
Category: Arithmetic calculation

Question (EN): There are 40 students in Hoseok's class. Hoseok, Jimin, and Yoongi's English test scores are 95, 82, and 88, respectively. Excluding these three students, the average score of students in English is 70. What is the average English score for Hoseok's class?
Question (KO): 호석이네 반 학생 수는 40명입니다. 호석, 지민, 윤기의 영어 시험 점수는 각각 95점, 82점, 88점입니다. 이 3명을 제외한 학생들의 영어 평균 점수는 70점입니다. 호석이네 반 영어 평균 점수는 몇 점입니까?

Answer: 71.38

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

Question (EN): Jungkook has 5 red balls, 4 blue balls, and 3 yellow balls. When Jungkook gives Yoongi 1 blue ball, how many red balls does Jungkook have?
Question (KO): 정국이는 빨간 공 5개, 파란 공 4개, 노란 공 3개를 가지고 있습니다. 정국이가 윤기에게 파란 공 1개를 주었을 때, 정국이는 빨간 공을 몇 개 가지고 있습니까?

Answer: 5

Solution (Python):
var_a = 5
print(int(var_a))
Category: Comparison

Question (EN): Sueun's jump rope is 1.704 meters (m) long and Yeonwoo's jump rope is 1.74 meters (m) long. Whose jump rope is longer?
Question (KO): 수은이의 줄넘기의 길이는 1.704미터(m)이고 연우의 줄넘기의 길이는 1.74미터(m)입니다. 둘 중 누구의 줄넘기가 더 깁니까?

Answer: Yeonwoo

Solution (Python):
var_a = 'Sueun'
var_b = 'Yeonwoo'
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.704
var_d = 1.74
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]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Arithmetic calculation

Question (EN): You are going to hand out notebooks to a few students. If each student is given 4 books, 3 books are left, and if 5 books are distributed, then 6 books are in short. Find the number of students.
Question (KO): 몇 명의 학생들에게 공책을 나누어 주려고 한다. 한 학생에게 4권씩 나누어 주면 3권이 남고, 5권씩 나누어 주면 6권이 부족하다고 할 때, 학생 수를 구하시오.

Answer: 9

Solution (Python):
var_a = 3
var_b = 6
var_c = var_a + var_b
var_d = 5
var_e = 4
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g))
Category: Correspondence

Question (EN): The equation 691-A87=4 holds. What number should be in A?
Question (KO): 등식 691-A87=4이 성립한다고 합니다. A에 들어가야 하는 숫자는 무엇인가요?

Answer: 6

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

Question (EN): Add 40 to a number multiplied by 5 to get 555. What is the result of multiplying a number by 7 and subtracting 55?
Question (KO): 어떤 수에 40을 더하여 5를 곱한 값이 555이다. 어떤 수에 7을 곱하고 55를 빼면 얼마인지 구하시오.

Answer: 442

Solution (Python):
var_a = 555
var_b = 5
var_c = var_a / var_b
var_d = 40
var_e = var_c - var_d
var_f = 7
var_g = var_e * var_f
var_h = 55
var_i = var_g - var_h
print(int(var_i))
Category: Correspondence

Question (EN): Given two natural numbers A and B, if B is A multiplied by 9 and plus 13, what is the remainder when B is divided by 9?
Question (KO): 두 자연수 A와 B에 대해 B가 A에 9를 곱하고 13을 더한 수라면 B를 9로 나눈 나머지는 얼마입니까?

Answer: 4

Solution (Python):
var_a = 13
var_b = 9
var_c = var_a - var_b
print(int(var_c))
Category: Comparison

Question (EN): 20 students are waiting for the bus. If Jungkook came right after Yoongi, and there are 11 people who came after Jungkook, how many people came before Yoongi?
Question (KO): 20명의 학생들이 버스를 기다리고 있습니다. 정국이는 윤기 바로 뒤에 왔고, 정국이보다 늦게 온 사람은 11명이라면 윤기보다 먼저 온 사람들은 몇 명입니까?

Answer: 7

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

Question (EN): You multiplied the length of a radius of a 30 square centimeters (cm2) circle by a factor of 5. What will be the area of that newly formed circle?
Question (KO): 넓이가 30제곱센티미터(㎠)인 원의 반지름을 5배 늘리면 넓이는 얼마인지 구하시오.

Answer: 750

Solution (Python):
var_a = 30
var_b = 5
var_c = 5
var_d = var_b * var_c
var_e = var_a * var_d
print(int(var_e))
Category: Correspondence

Question (EN): Divide 107.8 by some number to get 9.8. Find out what the number is.
Question (KO): 107.8 을 어떤 수로 나누었더니 9.8 이 되었습니다. 어떤 수는 얼마인지 구하시오.

Answer: 11

Solution (Python):
var_a = 107.8
var_b = 9.8
var_c = var_a / var_b
print(int(eval('{:.2f}'.format(round(var_c+1e-10,2)))))