philschmid/DMath huggingface dataset:
Category: Geometry

Question (EN): A friend gave the following problem to Taewon. "One of the edges of the regular hexagonal pyramid is 8 centimeters (cm) and the other is 13 centimeters (cm). So what is the sum of all the edges of the regular hexagonal pyramid?" What should Taewon answer to get the problem right?
Question (KO): 친구가 태원이에게 다음과 같은 문제를 냈습니다. "정육각뿔의 모서리 중 하나는 8센티미터(㎝)고, 다른 하나는 13센티미터(㎝)야. 그럼 정육각뿔의 모든 모서리의 합은 얼마일까?" 태원이는 문제를 맞히기 위해서 뭐라고 대답해야 합니까?

Answer: 126

Solution (Python):
var_a = 13
var_b = 6
var_c = var_a * var_b
var_d = 8
var_e = 6
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g))
Category: Comparison

Question (EN): Four students: Jimin, Yoongi, Taehyung, and Namjoon, are standing in a line. Yoongi stands ahead of Namjoon, and Jimin is ahead of Yoongi. If Taehyung is behind Namjoon, who stands at the very last?
Question (KO): 네 명의 학생 지민, 윤기, 태형, 남준이가 줄을 서고 있습니다. 윤기는 남준이보다 앞에 있고, 지민이는 윤기보다 앞에 있습니다. 태형이는 남준이보다 뒤에 있다면, 가장 뒤에 있는 학생은 누구입니까?

Answer: Taehyung

Solution (Python):
var_a = 'Jimin'
var_b = 'Yoongi'
var_c = 'Taehyung'
var_d = 'Namjoon'
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 = 'Jimin'
var_f = 'Yoongi'
var_g = '>'
var_h = 'Taehyung'
var_i = 'Namjoon'
var_j = '<'
var_k = 'Yoongi'
var_l = 'Namjoon'
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): On Halloween, Jimin gave 25 candies to Yuna and gave all the remaining 13 candies to her sister. How many candies did Jimin have at first?
Question (KO): 지민이는 할로윈을 맞아 유나에게 사탕 25개를 주고 남은 13개의 사탕을 모두 동생에게 주었습니다. 처음에 지민이가 가지고 있던 사탕은 몇 개입니까?

Answer: 38

Solution (Python):
var_a = 13
var_b = 25
var_c = var_a + var_b
print(int(var_c))
Category: Correspondence

Question (EN): Rounding 6AB3 to the nearest hundred results in 6200. What does 'A' refer to?
Question (KO): 6AB3을 올림하여 백의 자리까지 나타내면 6200이 됩니다. A는 무엇입니까?

Answer: 1

Solution (Python):
var_a = '6AB3'
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 = 6200
var_c = 100
var_d = var_b - var_c
list_b = []
for i in list_a:
    if i > var_d:
        list_b.append(i)
var_e = 6200
list_c = []
for i in list_b:
    if i <= var_e:
        list_c.append(i)
var_f = '6AB3'
var_g = 'A'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_c:
    elem = str(elem)
    var_h = int(elem[unk_idx])
print(int(var_h))
Category: Comparison

Question (EN): Dongwoo, Minyeop, and Seongjeong each received a cookie box containing equal amounts of cookies. If Dongwoo shared it with 7 meals, Minyeop with 8 meals, and Seongjeong with 5 meals, who ate the most cookies at one time?
Question (KO): 동우, 민엽이, 성정이는 각각 같은 양의 쿠키가 들어있는 쿠키 상자를 선물로 받았습니다. 동우는 7번에 나눠 먹고 민엽이는 8번에 나눠 먹고 성정이는 5번에 나눠 먹었다면 한 번 먹을 때 가장 많은 개수의 쿠키를 먹은 사람은 누구입니까?

Answer: Seongjeong

Solution (Python):
var_a = 'Dongwoo'
var_b = 'Minyeop'
var_c = 'Seongjeong'
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 = 1
var_e = 7
var_f = var_d / var_e
var_g = 1
var_h = 8
var_i = var_g / var_h
var_j = 1
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]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p)
Category: Comparison

Question (EN): Yuna is having a total of 20 days of summer vacation. If the number of vacation days excluding today is 11, how many vacation days are left excluding today?
Question (KO): 유나는 총 20일의 여름 방학을 보내고 있습니다. 오늘을 제외한 방학을 보낸 날의 수가 11일일 때, 오늘을 제외한 방학이 남은 날의 수는 며칠입니까?

Answer: 8

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

Question (EN): If a brick is 9 centimeters (cm) wide, 4 centimeters (cm) long, and 7 centimeters (cm) high, how many cubic centimeters (cm3) of volume does it have?
Question (KO): 가로가 9센티미터(㎝), 세로가 4센티미터(㎝), 높이가 7센티미터(㎝)인 벽돌이 있을 때, 이 벽돌의 부피는 몇 세제곱센티미터(㎤)입니까?

Answer: 252

Solution (Python):
var_a = 9
var_b = 4
var_c = var_a * var_b
var_d = 7
var_e = var_c * var_d
print(int(var_e))
Category: Correspondence

Question (EN): If the quotient of the four-digit number A614 divided by 6 is a four-digit number, find how many numbers fit in A.
Question (KO): 네 자리 수 A614에서 6으로 나눈 몫이 네 자리 수 일 때, A에 들어갈 수 있는 숫자의 개수를 구하시오.

Answer: 4

Solution (Python):
var_a = 'A614'
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 = 6000
list_b = []
for i in list_a:
    if i >= var_b:
        list_b.append(i)
var_c = 60000
list_c = []
for i in list_b:
    if i < var_c:
        list_c.append(i)
var_d = len(list_c)
print(int(var_d))
Category: Comparison

Question (EN): If the common multiples of 27 and 45 are written in order from smallest to largest, what is the product of all the numbers between the 7th and 10th numbers from the left?
Question (KO): 27과 45의 공배수를 작은 수부터 차례대로 썼을 때 왼쪽에서 7번째 수와 10번째 수 사이에 있는 수들을 모두 곱하면 얼마가 됩니까?

Answer: 1312200

Solution (Python):
var_a = 27
var_b = 45
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
var_d = 8
var_e = var_c * var_d
var_f = 27
var_g = 45
var_h = var_g * var_f / math.gcd(int(var_g), int(var_f))
var_i = 9
var_j = var_h * var_i
var_k = var_e * var_j
print(int(var_k))
Category: Comparison

Question (EN): A car runs at 92 kilometers (km) per hour, and B car runs at 1500 meters (m) per minute. Which of the two is faster?
Question (KO): A 자동차는 시속 92킬로미터(㎞)로 달리고, B 자동차는 분속 1500미터(m)로 달립니다. 두 자동차 중 속력이 더 빠른 자동차는 어느 것입니까?

Answer: A

Solution (Python):
var_a = 'A'
var_b = 'B'
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 = 92
var_d = 1500
var_e = 1000
var_f = var_d / var_e
var_g = 60
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_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]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Correspondence

Question (EN): When a number is divided by 5, the quotient is 248 and the remainder is 4. When this number is divided by 9, what is the sum of the quotient and the remainder?
Question (KO): 어떤 수를 5로 나누었더니 몫이 248이고 나머지가 4가 되었습니다. 어떤 수를 9로 나누면 몫과 나머지의 합은 얼마입니까?

Answer: 140

Solution (Python):
var_a = 248
var_b = 5
var_c = var_a * var_b
var_d = 4
var_e = var_c + var_d
var_f = 9
var_g = var_e // var_f
var_h = 248
var_i = 5
var_j = var_h * var_i
var_k = 4
var_l = var_j + var_k
var_m = 9
var_n = var_l % var_m
var_o = var_g + var_n
print(int(var_o))
Category: Possibility

Question (EN): Hyeonjeong, Seulgi, Miran, and Hocheol are trying to stand in one line. How many different ways are there to line up?
Question (KO): 현정, 슬기, 미란, 호철이가 한 줄로 서려고 합니다. 서로 다르게 한 줄로 서는 방법은 모두 몇 가지입니까?

Answer: 24

Solution (Python):
var_a = 'Hyeonjeong'
var_b = 'Seulgi'
var_c = 'Miran'
var_d = 'Hocheol'
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 = 4
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_e-i)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): When writing the numbers 10 through 99, find how many times the number 8 is written.
Question (KO): 10부터 99까지 수를 쓸 때, 숫자 8은 모두 몇 번 쓰는지 구하시오.

Answer: 19

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

Question (EN): Yena and Yesol are following a dietary plan. Within a month, Yena lost 0.41 times 6 kilograms (kg) and Yesol lost 2.3 kilograms (kg). Which of them has lost more weight?
Question (KO): 예나와 예솔이는 다이어트를 하고 있습니다. 한 달 동안 예나는 6킬로그램(㎏)의 0.41배만큼 살이 빠졌고, 예솔이는 2.3킬로그램(㎏)이 빠졌습니다. 살을 더 많이 뺀 사람은 누구입니까?

Answer: Yena

Solution (Python):
var_a = 'Yena'
var_b = 'Yesol'
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 = 0.41
var_e = var_c * var_d
var_f = 2.3
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: Geometry

Question (EN): In a factory, cuboid-shaped parts boxes measuring 8 centimeters (cm) in width, 12 centimeters (cm) in length, and 30 centimeters (cm) in height were stacked tightly to fill a cube-shaped room. At this time, if the size of the room is the smallest possible size, find how many boxes are stacked.
Question (KO): 어느 공장에서 가로의 길이가 8센티미터(㎝), 세로의 길이가 12센티미터(㎝), 높이가 30센티미터(㎝)인 직육면체 모양의 부품 상자를 빈틈없이 쌓아 정육면체 모양의 방을 채웠습니다. 이때 방의 크기는 가능한 최소의 크기라고 할 때, 몇 개의 상자를 쌓았을지 구하시오.

Answer: 600

Solution (Python):
var_a = 8
var_b = 12
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
var_d = 30
var_e = var_d * var_c / math.gcd(int(var_d), int(var_c))
var_f = 8
var_g = var_e / var_f
var_h = 8
var_i = 12
var_j = var_i * var_h / math.gcd(int(var_i), int(var_h))
var_k = 30
var_l = var_k * var_j / math.gcd(int(var_k), int(var_j))
var_m = 12
var_n = var_l / var_m
var_o = 8
var_p = 12
var_q = var_p * var_o / math.gcd(int(var_p), int(var_o))
var_r = 30
var_s = var_r * var_q / math.gcd(int(var_r), int(var_q))
var_t = 30
var_u = var_s / var_t
var_v = var_n * var_u
var_w = var_g * var_v
print(int(var_w))
Category: Possibility

Question (EN): There are cards with numbers from 1 to 6. Find the number of ways Yuni chooses a card with an even number inscribed.
Question (KO): 1부터 6까지 숫자 카드가 있다. 윤이가 짝수 카드를 고르는 경우의 수를 구하시오.

Answer: 3

Solution (Python):
var_a = 3
print(int(var_a))
Category: Geometry

Question (EN): I am trying to make the smallest square by arranging rectangular cards that are 5 centimeters (cm) wide and 7 centimeters (cm) tall without overlapping them. How many centimeters (cm) is one side of this square?
Question (KO): 가로가 5센티미터(㎝), 세로가 7센티미터(㎝)인 직사각형 모양의 카드를 겹치지 않게 빈틈없이 늘어놓아 가장 작은 정사각형을 만들려고 합니다. 이 정사각형의 한 변을 몇 센티미터(㎝)로 하면 됩니까?

Answer: 35

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

Question (EN): There is a regular octagonal prism whose sum of the lengths of its edges is 240 centimeters (cm). If the height of this prism is 12 centimeters (cm), what is the length of one side of the base?
Question (KO): 모서리의 길이의 합이 240센티미터(㎝)인 정팔각기둥이 있다. 이 각기둥의 높이가 12센티미터(㎝)일 때, 밑면의 한 변의 길이는 얼마입니까?

Answer: 9

Solution (Python):
var_a = 240
var_b = 12
var_c = 8
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 8
var_g = var_e / var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Comparison

Question (EN): Among five numbers of 1.4, 9/10, 1, 0.5, 13/10, how many are greater than 1?
Question (KO): 1.4, 9/10, 1, 0.5, 13/10 5개의 수 중 1보다 큰 수는 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 1.4
var_b = 0.9
var_c = 1
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
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: Possibility

Question (EN): You want to create a three-digit number by drawing three of 2, 0, 5, 9, and 6 and using them only once. Find the product of the largest number and the smallest number that can be made.
Question (KO): 2, 0, 5, 9, 6 중에서 3개를 뽑아 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 가장 큰 수와 가장 작은 수의 곱을 구하시오.

Answer: 197825

Solution (Python):
var_a = 2
var_b = 0
var_c = 5
var_d = 9
var_e = 6
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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = 1
list_d=list_b.copy()
list_d.sort()
var_j = list_d[var_i-1]
var_k = var_h * var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): You will need a 40 centimeters (cm) block of wood. If you have a block of wood which is 2 meters (m) 80 centimeters (cm) long, how many times do you have to cut it?
Question (KO): 40센티미터(㎝) 나무토막이 필요합니다. 2미터(m) 80센티미터(㎝) 나무토막이 있을 때 모두 몇 번 잘라야 합니까?

Answer: 6

Solution (Python):
var_a = 2
var_b = 100
var_c = var_a * var_b
var_d = 80
var_e = var_c + var_d
var_f = 40
var_g = var_e / var_f
var_h = 1
var_i = var_g - var_h
print(int(var_i))
Category: Comparison

Question (EN): In the multiplication of two-digit numbers, the 5 in the ones place of the number was misinterpreted as 2, so you mismultiplied it, resulting 704. If the correctly calculated value is 800, write the larger digit of the two two-digit numbers.
Question (KO): 두 자리 수끼리의 곱셈에서 곱하는 수의 일의 자리 숫자 5를 2로 잘못 보고 계산한 값이 704가 되었습니다. 바르게 계산한 값이 800일 때, 2개의 두 자리 수 중 더 큰 수를 쓰시오.

Answer: 32

Solution (Python):
var_a = 704
var_b = 800
var_c = var_a - var_b
var_d = 2
var_e = 5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 800
var_i = 704
var_j = 800
var_k = var_i - var_j
var_l = 2
var_m = 5
var_n = var_l - var_m
var_o = var_k / var_n
var_p = var_h / var_o
list_a= []
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_a.append(var_p)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_a.append(var_g)
list_a.reverse()
var_q = 1
list_b=list_a.copy()
list_b.sort()
var_r = list_b[-var_q]
print(int(var_r))
Category: Arithmetic calculation

Question (EN): Eunji solved 12 questions in the exam A and 15 questions in the exam B. She got 4 questions wrong in the exam A, and got 2 more questions right in exam B than in exam A. How many questions did Eunji get wrong in exam A and exam B in total?
Question (KO): 은지는 (가) 시험 12문제와 (나) 시험 15문제를 풀었습니다. (가) 시험은 4문제를 틀렸고, (나) 시험은 (가) 시험보다 2문제 더 많이 맞혔습니다. 은지가 (가) 시험과 (나) 시험에서 틀린 문제는 모두 몇 문제인지 구하시오.

Answer: 9

Solution (Python):
var_a = 4
var_b = 15
var_c = 12
var_d = 4
var_e = var_c - var_d
var_f = 2
var_g = var_e + var_f
var_h = var_b - var_g
var_i = var_a + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Jimin has 41 pieces of colored paper, and Jimin has 1 more than Seokjin. How many pieces of colored paper does Seokjin have?
Question (KO): 색종이를 지민이는 41장 가지고 있고, 지민이는 석진이보다 1장 더 많이 가지고 있습니다. 석진이가 가지고 있는 색종이는 몇 장입니까?

Answer: 40

Solution (Python):
var_a = 41
var_b = 1
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Namjoon gave Yoongi 18 candies, and there are 16 left over. How many candies did Namjoon have in the beginning?
Question (KO): 남준이가 윤기에게 사탕 18개를 주었더니 16개가 남았습니다. 처음에 남준이가 가지고 있던 사탕은 몇 개입니까?

Answer: 34

Solution (Python):
var_a = 18
var_b = 16
var_c = var_a + var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Yeonjeong and Donghun started at the same place and walked in opposite directions around the circumference of the lake with a circumference of 3 kilometers (km). If Yeonjeong walks at a speed of 100 meters (m) per minute and Donghun walks at a speed of 150 meters (m) per minute, find how many minutes later they meet again for the first time.
Question (KO): 둘레의 길이가 3킬로미터(㎞)인 호수의 둘레를 연정이와 동훈이가 같은 곳에서 동시에 출발하여 서로 반대 방향으로 걸었다. 연정이는 매분 100미터(m)의 속력으로, 동훈이는 매분 150미터(m)의 속력으로 걸었다면 몇 분 후에 처음으로 다시 만나는지 구하여라

Answer: 12

Solution (Python):
var_a = 3
var_b = 100
var_c = 1000
var_d = var_b / var_c
var_e = 150
var_f = 1000
var_g = var_e / var_f
var_h = var_d + var_g
var_i = var_a / var_h
print(int(var_i))
Category: Possibility

Question (EN): Minji wants to choose a top and a bottom to wear on a field trip. If there are 3 types of tops and 5 types of bottoms, choose how many combinations of clothes Minji can wear.
Question (KO): 민지가 수학여행에서 입을 상의와 하의를 고르고 있습니다. 상의는 3종류가 있고 하의는 5종류가 있을 때, 민지가 입을 수 있는 옷의 조합은 모두 몇 가지인지 고르세요.

Answer: 15

Solution (Python):
var_a = 3
var_b = 1
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)
var_d = 5
var_e = 1
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)
var_g = var_c * var_f
print(int(var_g))
Category: Possibility

Question (EN): Round up the smallest six-digit number that you can make by using the six number cards 0, 1, 3, 5, 7, and 9 once, to the thousandth place.
Question (KO): 6 장의 숫자 카드 0, 1, 3, 5, 7, 9를 한 번씩 사용하여 만들 수 있는 가장 작은 여섯 자리 수를 올림하여 천의 자리까지 나타내어 보시오.

Answer: 104000

Solution (Python):
var_a = 0
var_b = 1
var_c = 3
var_d = 5
var_e = 7
var_f = 9
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 = 6
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_g))
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_h = 1
list_c=list_b.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = 4
var_k=int(((var_i+9*10**(var_j-2))//(10**(var_j-1)))*10**(var_j-1))

print(int(var_k))
Category: Arithmetic calculation

Question (EN): There are 4 crates with 16 sweets each. How many sweets are there in all?
Question (KO): 과자가 16개 담긴 상자가 4개 있습니다. 과자는 모두 몇 개 인가요?

Answer: 64

Solution (Python):
var_a = 16
var_b = 4
var_c = var_a * var_b
print(int(var_c))
Category: Possibility

Question (EN): There is one volleyball, one soccerball, one basketball, and one baseball. How many different ways can there be to choose 2 different balls out of 4 balls?
Question (KO): 배구공, 축구공, 농구공, 야구공이 1개씩 있습니다. 4개의 공 중에서 서로 다른 2개의 공을 고르는 방법은 모두 몇 가지입니까?

Answer: 6

Solution (Python):
var_a = 'volleyball'
var_b = 'soccerball'
var_c = 'basketball'
var_d = 'baseball'
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 = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_e-i)
for i, elem in enumerate(range(var_f)):
    var_g = var_g / (i+1)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Jungkook's average score in Korean, math, and science is 92 points. If Jungkook's average score increased by 2 points after taking the English test, what is Jungkook's English score?
Question (KO): 정국이의 국어, 수학, 과학의 평균 점수는 92점입니다. 정국이가 영어 시험을 본 후 평균 점수가 2점 올랐다고 할 때, 정국이의 영어 점수는 몇 점입니까?

Answer: 100

Solution (Python):
var_a = 92
var_b = 2
var_c = var_a + var_b
var_d = 4
var_e = var_c * var_d
var_f = 92
var_g = 3
var_h = var_f * var_g
var_i = var_e - var_h
print(int(var_i))