philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): How many three-digit integers greater than 600 and less than 950 have 4, 6, and 9 in each digit?
Question (KO): 600보다 크고 950보다 작은 세 자리 자연수 중 4, 6, 9가 각 자릿수에 모두 들어 있는 경우는 몇 가지입니까?

Answer: 3

Solution (Python):
var_a = 4
var_b = 6
var_c = 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 = 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 = 600
list_c = []
for i in list_b:
    if i > var_e:
        list_c.append(i)
var_f = 950
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: Possibility

Question (EN): There are weights of 1 gram (g), 2 grams (g), 4 grams (g), and 8 grams (g) each in the lab. How many different weights can you measure using these weights?
Question (KO): 실험실에는 저울추 1g, 2g, 4g, 8g짜리가 각각 하나씩 있습니다. 이 추들을 이용하여 최대 몇 가지 다른 무게를 잴 수 있습니까?

Answer: 15

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

Question (EN): Yoongi has 4 apples, Yuna has 5, and Jungkook has 6 plus 3 apples. Who has the smallest number of apples?
Question (KO): 윤기는 4개, 유나는 5개, 정국이는 6에 3을 합한 수 만큼의 사과를 가지고 있습니다. 누가 가장 사과를 조금 가지고 있습니까?

Answer: Yoongi

Solution (Python):
var_a = 'Yoongi'
var_b = 'Yuna'
var_c = 'Jungkook'
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 = 4
var_e = 5
var_f = 6
var_g = 3
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)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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: Geometry

Question (EN): How many pairs of sides are parallel in a regular hexagon?
Question (KO): 정육각형에 대하여 평행인 변은 모두 몇 쌍인가?

Answer: 3

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

Question (EN): When you multiply a number by 3 and then subtract 4, you get 5. Find the number.
Question (KO): 어떤 수에 3을 곱한 후 4를 뺐더니 5가 되었습니다. 어떤 수를 구하시오.

Answer: 3

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

Question (EN): When 90 is divided by any number, how many divisible numbers are there?
Question (KO): 90을 어떤 수로 나누었을 때 나누어떨어지게 하는 수는 모두 몇 개일까요?

Answer: 12

Solution (Python):
var_a = 90
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
    if var_a % i == 0:
        list_a.append(i)
        list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = len(list_a)
print(int(var_b))
Category: Geometry

Question (EN): There is a piece of colored paper in the shape of a square with a side length of 11 centimeters (cm). What is the area of this sheet of colored paper?
Question (KO): 한 변의 길이가 11센티미터(㎝)인 정사각형 모양의 색종이가 있습니다. 이 색종이의 넓이는 얼마입니까?

Answer: 121

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

Question (EN): When A is divided by 8, the quotient is B and the remainder is C. A, B, and C are natural numbers. If B and C are equal, what is the largest possible number of A?
Question (KO): A를 8로 나누면 몫이 B, 나머지는 C가 됩니다. A, B, C는 자연수 입니다. B와 C가 같을 때, 가능한 A 중 가장 큰 수는 무엇인가요?

Answer: 63

Solution (Python):
var_a = 8
var_b = 1
var_c = var_a - var_b
var_d = 8
var_e = var_c * var_d
var_f = 8
var_g = 1
var_h = var_f - var_g
var_i = var_e + var_h
print(int(var_i))
Category: Possibility

Question (EN): There are 1 red marble, 1 blue marble, and 1 yellow marble. Find the number of ways in which two of these can be placed in two boxes of the same shape.
Question (KO): 빨간색 구슬, 파란색 구슬, 노란색 구슬이 1개씩 있습니다. 이 중 2개를 골라 똑같은 모양의 두 상자에 1개씩 넣는 경우의 수를 구하시오.

Answer: 3

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

Question (EN): There is a square with a side of 14 centimeters (cm). You want to subdivide this square into rectangles that are 2 centimeters (cm) wide and 8 centimeters (cm) long. How many such rectangles can you get at most?
Question (KO): 어떤 정사각형은 한 변의 길이가 14센티미터(㎝)입니다. 이 정사각형을 세로가 2센티미터(㎝), 가로가 8센티미터(㎝)인 직사각형으로 쪼개려고 합니다. 이러한 직사각형은 최대 몇 개 얻을 수 있습니까?

Answer: 12

Solution (Python):
var_a = 14
var_b = 2
var_c = var_a ** var_b
var_d = 8
var_e = 2
var_f = var_d * var_e
var_g = var_c // var_f
print(int(var_g))
Category: Possibility

Question (EN): If you throw three coins that are distinguishable from each other, how many outcomes will you get?
Question (KO): 서로 구분이 가능한 세 개의 동전을 던졌을 때, 몇 가지의 결과가 나옵니까?

Answer: 8

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

Question (EN): You need to multiply a number by 3 and add 49. But you subtract 3 and add 49 mistakenly and get 66. Find the difference between the correctly calculated value and the incorrectly calculated value.
Question (KO): 어떤 수에 3을 곱하고 49를 더해야 하는데 3을 빼고 49를 더했더니 66이 되었습니다. 바르게 계산한 값과 틀리게 계산한 값의 차는 얼마인지 구하시오.

Answer: 43

Solution (Python):
var_a = 66
var_b = 49
var_c = var_a - var_b
var_d = 3
var_e = var_c + var_d
var_f = 3
var_g = var_e * var_f
var_h = 49
var_i = var_g + var_h
var_j = 66
var_k = var_i - var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): Dohyun divided the donut into 3 equal pieces and ate one piece. Dongmin divided a donut of the same size into 12 equal pieces. How many donuts must Dongmin eat to eat the same amount as Dohyun?
Question (KO): 도현이는 도넛을 똑같이 3조각으로 나누어 한 조각을 먹었습니다. 동민이는 같은 크기의 도넛을 똑같이 12조각으로 나누었습니다. 도현이와 같은 양을 먹으려면 동민이는 몇 조각의 도넛을 먹어야 합니까?

Answer: 4

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

Question (EN): If you give 1 kg (kg) 900 grams (g) out of 3 kg (kg) 300 grams (g) of strawberries to a friend, how many grams (g) of strawberries are left?
Question (KO): 3킬로그램(㎏) 300그램(g)의 딸기중 1킬로그램(㎏) 900을 친구에게 줄 시 남은 딸기는 몇 그램(g)인가요

Answer: 1400

Solution (Python):
var_a = 3
var_b = 1000
var_c = var_a * var_b
var_d = 300
var_e = var_c + var_d
var_f = 1
var_g = 1000
var_h = var_f * var_g
var_i = 900
var_j = var_h + var_i
var_k = var_e - var_j
print(int(var_k))
Category: Geometry

Question (EN): Chae Song-i made a square with a side length of 13 centimeters (cm) using thread. What is the length of the thread that Chaesongi has?
Question (KO): 채송이는 실을 이용해 한 변의 길이가 13센티미터(㎝)인 정사각형을 만들었습니다. 채송이가 가진 실의 길이는 얼마입니까?

Answer: 52

Solution (Python):
var_a = 13
var_b = 4
var_c = var_a * var_b
print(int(var_c))
Category: Geometry

Question (EN): There are two points with an actual distance of 5 kilometers (km). On a map with a scale of 1/250000, how many centimeters (cm) would be the length of the two points when measured with a ruler?
Question (KO): 실제 거리가 5킬로미터(㎞)인 두 지점이 있습니다. 축척이 1/250000인 지도에서 두 지점을 표시한 후 자로 길이를 재었을 때 몇 센티미터(㎝)가 되겠습니까?

Answer: 2

Solution (Python):
var_a = 5
var_b = 100
var_c = 1000
var_d = var_b * var_c
var_e = var_a * var_d
var_f = 4e-06
var_g = var_e * var_f
print(int(var_g))
Category: Geometry

Question (EN): Find the number of vertices of the rectangular prism.
Question (KO): 사각기둥의 꼭지점의 개수를 구하시오.

Answer: 8

Solution (Python):
var_a = 4
var_b = 2
var_c = var_a * var_b
print(int(var_c))
Category: Comparison

Question (EN): I drew three circles with colored pencils. The radius of the orange circle is 4 centimeters (cm), the diameter of the light-green circle is 6 centimeters (cm), and the radius of the sky-blue circle is 5 centimeters (cm). What color circle is with the widest area?
Question (KO): 색연필로 원을 3개 그렸습니다. 주황색 원의 반지름은 4센티미터(㎝)이고, 연두색 원의 지름은 6센티미터(㎝)이고, 하늘색 원의 반지름은 5센티미터(㎝)입니다. 넓이가 가장 넓은 원은 무슨 색입니까?

Answer: sky-blue

Solution (Python):
var_a = 'orange'
var_b = 'light-green'
var_c = 'sky-blue'
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 = 4
var_e = 6
var_f = 2
var_g = var_e / var_f
var_h = 5
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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: Correspondence

Question (EN): To make dumplings with 45 grams (g) of dough, each dumpling needs 4 grams (g). Find the maximum number of dumplings you can make.
Question (KO): 반죽 45그램(g)으로 만두를 만드는데 만두 하나당 4그램(g)씩 들어갑니다. 최대 몇 개의 만두를 만들 수 있는지 구하시오.

Answer: 11

Solution (Python):
var_a = 45
var_b = 4
var_c = var_a // var_b
print(int(var_c))
Category: Correspondence

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

Answer: 17

Solution (Python):
var_a = 90.1
var_b = 5.3
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): How many three-digit numbers are multiples of 6, multiples of 5, multiples of 8, and multiples of 9?
Question (KO): 6의 배수이면서 5의 배수이면서 8의 배수이면서 9의 배수인 수 중 세 자리 수는 모두 몇 개 입니까?

Answer: 2

Solution (Python):
var_a = 100
var_b = 999
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 = 5
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 = 8
list_d = []
var_f = int(var_f)
for i in list_c:
    i = int(i)
    if i % var_f == 0:
        list_d.append(i)
var_g = 9
list_e = []
var_g = int(var_g)
for i in list_d:
    i = int(i)
    if i % var_g == 0:
        list_e.append(i)
var_h = len(list_e)
print(int(var_h))
Category: Geometry

Question (EN): The shape of the base side of the pyramid is a dodecagon. How many faces does this pyramid have?
Question (KO): 각뿔의 밑면의 모양이 십이각형이다. 이 각뿔의 면은 모두 몇 개인가?

Answer: 13

Solution (Python):
var_a = 12
var_b = 1
var_c = var_a + var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Seokgi and Yeseul shared a wire. The length of this wire is 1 meter (m) and 50 centimeters (cm), and it is said that the Seokgi's share is 16 centimeters (cm) shorter than Yeseul. How many centimeters (cm) of wire does Seokgi have?
Question (KO): 석기와 예슬이가 철사를 나누어 가졌습니다. 철사의 길이는 1미터(m) 50센티미터(㎝)이며 석기는 예슬이보다 16센티미터(㎝) 더 짧게 가진다고 합니다. 석기는 몇 센티미터(㎝)를 가집니까?

Answer: 67

Solution (Python):
var_a = 1
var_b = 100
var_c = var_a * var_b
var_d = 50
var_e = var_c + var_d
var_f = 16
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): There are 8 apples in the basket. Jungkook put 7 more apples in the basket. How many apples are in the basket?
Question (KO): 바구니에 사과가 8개 있습니다. 정국이가 바구니에 사과 7개를 더 넣었습니다. 바구니 안에 있는 사과는 모두 몇 개입니까?

Answer: 15

Solution (Python):
var_a = 8
var_b = 7
var_c = var_a + var_b
print(int(var_c))
Category: Possibility

Question (EN): I am trying to pick two different numbers at the same time from natural numbers from 1 to 9. Find the number of ways in which the sum of two numbers is greater than 10.
Question (KO): 1부터 9까지의 자연수 중에서 서로 다른 두 수를 동시에 뽑으려고 합니다. 두 수의 합이 10보다 큰 경우의 수를 구하시오.

Answer: 32

Solution (Python):
var_a = 1
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 2
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]
list_c=[]
for i in list_b:
    var_e = 0
    i = int(i)
    while i//10 > 0:
        var_e = var_e + i%10
        i = i//10
    var_e = var_e + i%10
    list_c.append(var_e)
var_f = 10
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: Correspondence

Question (EN): 4 is the result of mistakenly subtracting 5 from a number instead of subtracting 4. Find this number
Question (KO): 4는 어떤 수에서 4를 뻬야 할것을 잘못하여 5를 빼서 나온 결과입니다. 어떤 수를 구하세요.

Answer: 9

Solution (Python):
var_a = 4
var_b = 5
var_c = var_a + var_b
print(int(var_c))
Category: Correspondence

Question (EN): 4A5B+C2D7=8070. Find C when there are four different numbers A, B, C, and D.
Question (KO): 4A5B+C2D7=8070입니다. 서로 다른 네 수 A, B, C, D가 있을 때 C를 구하세요.

Answer: 3

Solution (Python):
var_a = '4A5B+C2D7=8070'
var_b = 'C'
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 quadrangular pyramid with the sum of the lengths of its edges being 14.8 meters (m). Find the length of one edge of this quadrangular pyramid when all the edge lengths are the same.
Question (KO): 모서리의 길이의 합이 14.8미터(m)인 사각뿔이 있습니다. 이 사각뿔의 모서리의 길이는 모두 같을 때, 한 모서리의 길이를 구하시오.

Answer: 1.85

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

Question (EN): Each box contains 3 balls. If you have 2 boxes, how many balls do you have in total?
Question (KO): 1개의 상자에는 3개의 공이 들어 있습니다. 2개의 상자를 가지고 있을 때 전체 공의 개수는?

Answer: 6

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

Question (EN): There are numbers 0.8, 1/2, and 0.9. Find the largest of all numbers less than 0.6.
Question (KO): 0.8, 1/2, 0.9의 숫자가 있다. 이 중 0.6보다 작은 숫자들 중 가장 큰 수를 구하시오.

Answer: 0.5

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

Question (EN): If Junhyeok and Hyeonyoung do a certain task together for 8 days, they can do 7/12 of the total work. After the two of them worked together for eight days, Junhyeok decided to do the rest by himself. If Junhyeok worked alone for 10 days, how many days would it take to finish the job if Heonyeong did it alone from the beginning?
Question (KO): 준혁이와 현영이가 둘이서 어떤 일을 8일 동안 하면 전체 일의 7/12를 할 수 있습니다. 이 일을 둘이서 8일 동안 함께 한 후에, 나머지는 준혁이가 혼자 하기로 했습니다. 준혁이가 혼자 일을 한 기간이 10일이라면, 이 일을 처음부터 헌영이가 혼자서 했을 경우 끝내기 위해 며칠이 걸리는지 구하시오.

Answer: 32

Solution (Python):
var_a = 1
var_b = 0.5833333333333334
var_c = 8
var_d = var_b / var_c
var_e = 1
var_f = 0.5833333333333334
var_g = var_e - var_f
var_h = 10
var_i = var_g / var_h
var_j = var_d - var_i
var_k = var_a / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2)))))
Category: Comparison

Question (EN): There are a total of three numbers: 0.8, 1/2, and 0.5. What is the smallest of these numbers greater than or equal to 0.1?
Question (KO): 총 3개의 숫자 0.8, 1/2, 0.5이 있습니다. 이 중 0.1보다 크거나 같은 수 중 가장 작거나 같은 수를 구하면 무엇인가요?

Answer: 0.5

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

Question (EN): Find the sum of all numbers between 1 and 100.
Question (KO): 1부터 100사이에 있는 모든 수의 합을 구하시오.

Answer: 5050

Solution (Python):
var_a = 1
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
list_a = [float(i) for i in list_a]
var_d = sum(list_a)
print(int(var_d))
Category: Possibility

Question (EN): Find the number of two-digit natural numbers that can be made by selecting two figures among 0, 1, and 2.
Question (KO): 숫자 카드 0, 1, 2 중 2장을 뽑아 만들 수 있는 두 자리 자연수의 개수를 구하시오.

Answer: 4

Solution (Python):
var_a = 0
var_b = 1
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 = 2
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 = len(list_b)
print(int(var_e))
Category: Correspondence

Question (EN): Subtracting 5 from a number and dividing it by 3 gives you 4. Find the number.
Question (KO): 어떤 수에서 5를 빼고 다시 3으로 나누면 4가 됩니다. 어떤 수를 구하시오.

Answer: 17

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

Question (EN): If the diameter of a circle is 8 centimeters (cm) and the circumference is 25.12 centimeters (cm), what is the pi of the circle?
Question (KO): 어떤 원의 지름이 8센티미터(㎝) 이고, 원주가 25.12센티미터(㎝) 일 때, 이 원의 원주율을 구하면 얼마일까요?

Answer: 3.14

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

Question (EN): The volleyball teams A, B, C, and D are playing volleyball. A beat B 3-2, and B lost to D 2-5. When C beats D 3-2, find the last-place team.
Question (KO): 배구팀 (가), (나), (다), (라)가 배구 시합을 하고 있습니다. (가)는 (나)를 3대 2로 이겼으며, (나)는 (라)에게 2대 5로 졌습니다. (다)는 (라)를 3대 2로 이겼을 때, 꼴찌팀을 구하시오.

Answer: B

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
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 = 'A'
var_f = 'B'
var_g = '>'
var_h = 'B'
var_i = 'D'
var_j = '<'
var_k = 'C'
var_l = 'D'
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: Geometry

Question (EN): How many diagonals can you draw in a 10-sided figure?
Question (KO): 10개의 변으로 이루어진 도형 내에 그릴 수 있는 대각선의 개수는 몇 개입니까?

Answer: 35

Solution (Python):
var_a = 10
var_b = 10
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): Among the three people, the heaviest weight person differs from the middle weight person by 7 kilograms (kg) and 700 grams (g), and the lightest weight person differs from the middle weight person by 4.8 kilograms (kg). If the sum of the weights of the three people is 106 kilograms (kg) and 600 grams (g), how many kilograms (kg) does the heaviest person weigh?
Question (KO): 세 명의 사람 중에서 몸무게가 가장 무거운 사람은 몸무게가 중간인 사람과 7킬로그램(㎏) 700그램(g) 차이 나고, 몸무게가 가장 가벼운 사람은 몸무게가 중간인 사람과 4.8킬로그램(㎏) 차이 납니다. 세 사람의 몸무게 합이 106킬로그램(㎏) 600그램(g)일 때 몸무게가 가장 무거운 사람은 몇 킬로그램(㎏)입니까?

Answer: 42.27

Solution (Python):
var_a = 106
var_b = 600
var_c = 1000
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 7
var_g = 700
var_h = 1000
var_i = var_g / var_h
var_j = var_f + var_i
var_k = 2
var_l = var_j * var_k
var_m = var_e + var_l
var_n = 4.8
var_o = var_m + var_n
var_p = 3
var_q = var_o / var_p
print('{:.2f}'.format(round(var_q+1e-10,2)))
Category: Correspondence

Question (EN): I had to divide a number by 4, but I accidentally divided a number by 2, and the share became 8. How much is it if I calculate it correctly?
Question (KO): 어떤 수를 4로 나누어야 할 것을 잘못하여 2로 나누었더니 몫이 8이 되었습니다. 바르게 계산하면 얼마입니까?

Answer: 4

Solution (Python):
var_a = 8
var_b = 2
var_c = var_a * var_b
var_d = 4
var_e = var_c / var_d
print(int(var_e))