philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): The number of sheep is 6/11 of chickens, and the number of cows is 1/8 of sheeps in the farm. If there are 48 chickens, how many cows are there?
Question (KO): 목장에 양이 닭의 6/11만큼 있고, 소가 양의 1/8만큼 있다. 닭이 48마리이면 소는 몇 마리입니까?

Answer: 11

Solution (Python):
var_a = 48
var_b = 0.5454545454545454
var_c = var_a / var_b
var_d = 0.125
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

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

Answer: 24

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 = 9
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: Geometry

Question (EN): There are several cuboids. When the sum of the number of edges and the number of faces of all cuboids is 216, find the sum of the number of vertices of all cuboids.
Question (KO): 여러 개의 직육면체가 있습니다. 모든 직육면체의 모서리의 수와 면의 수의 합이 216일 때 모든 직육면체의 꼭짓점의 수의 합을 구하시오.

Answer: 96

Solution (Python):
var_a = 216
var_b = 12
var_c = 6
var_d = var_b + var_c
var_e = var_a / var_d
var_f = 8
var_g = var_e * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There are 240 third grade students at Heesu's school. If the number of third grade students who were glasses is 3/5 of the number of students who do not were glasses, how may third grade students do not were glasses?
Question (KO): 희수네 학교의 3학년 학생 수는 총 240명입니다. 3학년 학생 중 안경을 쓴 학생은 안경을 쓰지 않은 학생의 3/5일 때, 안경을 쓰지 않은 3학년 학생은 몇 명인지 구하시오.

Answer: 150

Solution (Python):
var_a = 240
var_b = 1
var_c = 0.6
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Five chrysanthemums and two roses are in the pot. How many flowers are in the pot?
Question (KO): 국화 5송이, 장미 2송이가 화분에 있습니다. 화분에 있는 꽃은 총 몇 송이 인가요?

Answer: 7

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a + var_b
print(int(var_c))
Category: Comparison

Question (EN): The height of the seven students in Hyungjun's class is 161.5 centimeters (cm), 154.3 centimeters (cm), 143.7 centimeters (cm), 160.1 centimeters (cm), 158.0 centimeters (cm), 153.5 centimeters (cm), 147.8 centimeters (cm) Find out how many of these students are over 1 meter (m) and 50 centimeters (cm).
Question (KO): 형준이네 반 학생 7명의 키가 161.5센티미터(㎝), 154.3센티미터(㎝), 143.7센티미터(㎝), 160.1센티미터(㎝), 158.0센티미터(㎝), 153.5센티미터(㎝), 147.8센티미터(㎝)일 때, 이 중에서 1미터(m) 50센티미터(㎝)가 넘는 학생은 몇 명인지 구하시오.

Answer: 5

Solution (Python):
var_a = 161.5
var_b = 154.3
var_c = 143.7
var_d = 160.1
var_e = 158
var_f = 153.5
var_g = 147.8
list_a= []
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()
var_h = 1
var_i = 100
var_j = var_h * var_i
var_k = 50
var_l = var_j + var_k
list_b = []
for i in list_a:
    if i > var_l:
        list_b.append(i)
var_m = len(list_b)
print(int(var_m))
Category: Geometry

Question (EN): We are going to make a rectangular parallelepiped 10 centimeters (cm) wide, 8 centimeters (cm) long, and 5 centimeters (cm) high with wire. At least how many centimeters (cm) of wire do you need?
Question (KO): 철사로 가로가 10센티미터(㎝), 세로가 8센티미터(㎝), 높이가 5센티미터(㎝)인 직육면체를 만들려고 합니다. 철사는 적어도 몇 센티미터(㎝)가 필요합니까?

Answer: 92

Solution (Python):
var_a = 10
var_b = 4
var_c = var_a * var_b
var_d = 8
var_e = 4
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 5
var_i = 4
var_j = var_h * var_i
var_k = var_g + var_j
print(int(var_k))
Category: Geometry

Question (EN): I drew the smallest circle enclosing a rhombus and the smallest square enclosing the circle. If the side of this square is 16 centimeters (cm), what is the area of the rhombus?
Question (KO): 어떤 마름모를 둘러싸고 있는 가장 작은 원을 그리고, 원을 둘러싸고 있는 가장 작은 정사각형을 그렸습니다. 이 정사각형의 한 변의 길이가 16센티미터(㎝)라면, 마름모의 넓이는 몇인지 구하시오.

Answer: 128

Solution (Python):
var_a = 16
var_b = 16
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): Subtract 74 from a number, multiply by 15, divide by 5, add 16, then subtract 15 to get 58. Find this number.
Question (KO): 어떤 수에서 74를 뺀 뒤 15를 곱하여 5로 나눈 뒤 16을 더한 후 15을 빼면 58입니다. 어떤 수를 구하시오.

Answer: 93

Solution (Python):
var_a = 58
var_b = 15
var_c = var_a + var_b
var_d = 16
var_e = var_c - var_d
var_f = 5
var_g = var_e * var_f
var_h = 15
var_i = var_g / var_h
var_j = 74
var_k = var_i + var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): In Yuna's house, there are 12 tangerines. If Yoo-jung ate 3 of them, how many tangerines are there at Yuna's house?
Question (KO): 유나네 집에는 감이 12개 있습니다. 유정이가 이 중 3개를 먹었다면 유나네 집에 있는 감은 몇 개일까요?

Answer: 9

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

Question (EN): It is said that the equation 632-AB1=41 holds. What number should be in A?
Question (KO): 등식 632-AB1=41이 성립한다고 합니다. A에 들어가야 하는 숫자는 무엇인가요?

Answer: 5

Solution (Python):
var_a = '632-AB1=41'
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: Arithmetic calculation

Question (EN): The red colored pencil is 5/9 of the total, and the blue colored pencil is 5/12 of the total. If the total number of colored pencils is 36, what is the number of red colored pencils minus the number of blue colored pencils?
Question (KO): 빨간색 색연필이 전체의 5/9이고, 파란색 색연필이 전체의 5/12입니다. 전체 색연필의 수가 36자루라면, 빨간색 색연필 수에서 파란색 색연필 수를 빼면 몇 자루입니까?

Answer: 5

Solution (Python):
var_a = 36
var_b = 0.5555555555555556
var_c = var_a * var_b
var_d = 36
var_e = 0.4166666666666667
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): We are trying to load 2153 chairs onto a truck. How many times should a truck carry at least if it can load up to 100 at a time?
Question (KO): 2153개의 의자를 화물차에 실어 나르려고 합니다. 한 번에 100개까지 실을 수 있을 때 화물차는 최소 몇 번을 날라야 할까요?

Answer: 22

Solution (Python):
var_a = 2153
var_b = 100
var_c = var_a / var_b
var_d = 1
var_e=int(((var_c+9*10**(var_d-2))//(10**(var_d-1)))*10**(var_d-1))

print(int(var_e))
Category: Comparison

Question (EN): There are three people: Hyunsoo, Seungah, and Kiyoon. Hyunsoo is taller than Kiyoon, and Kiyoon is taller than Seungah. Who is the tallest?
Question (KO): 현수, 승아, 기윤 세 사람이 있습니다. 현수는 기윤이보다 키가 크고, 기윤이는 승아보다 키가 클 때, 키가 가장 큰 사람은 누구입니까?

Answer: Hyunsoo

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

Question (EN): 8 people lined up. How many people are there between the person standing 4th from the back and the person standing 1st from the front?
Question (KO): 8명의 사람이 줄을 섰다. 뒤에서 4번째에 서 있는 사람과 앞에서 1번째에 서 있는 사람 사이에는 모두 몇 명이 있나요?

Answer: 3

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

Question (EN): A square was made from a piece of string that is 32 centimeters (cm) long. What is the maximum area of the rectangle created in square centimeters (cm2)?
Question (KO): 길이가 32센티미터(㎝) 인 끈으로 사각형을 만들었습니다. 만든 사각형의 넓이의 최대값은 몇 제곱센티미터(㎠) 입니까?

Answer: 64

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

Question (EN): There are 2 boxes with 3 and 4 balls respectively. How many balls are there in both boxes?
Question (KO): 2개의 상자에 각각 3개, 4개의 공이 있습니다. 2개의 상자 안에 있는 공의 개수는 모두 몇 개입니까?

Answer: 7

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

Question (EN): For two natural numbers A and B, if the quotient of A divided by B is 9 and the remainder is 13, what is the remainder if A is divided by 9?
Question (KO): 두 자연수 A, B에 대하여 A를 B로 나누었을 때 몫이 9이고, 나머지가 13이었다면, A를 9로 나누었을 때의 나머지는 얼마입니까?

Answer: 4

Solution (Python):
var_a = 13
var_b = 9
var_c = var_a % var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): My father has 45 chickens. If there are 8 fewer ducks than chickens, how many chickens and ducks does the father have?
Question (KO): 아버지는 닭 45마리를 기르고 있습니다. 오리가 닭보다 8마리 적다면, 아버지가 기르는 닭과 오리는 모두 몇 마리입니까?

Answer: 82

Solution (Python):
var_a = 45
var_b = 45
var_c = 8
var_d = var_b - var_c
var_e = var_a + var_d
print(int(var_e))
Category: Possibility

Question (EN): There are multiples of 123 that are greater than or equal to 1620006 and less than or equal to 1629996. Find the largest of these numbers.
Question (KO): 123의 배수중 1620006보다 같거나 크고 1629996보다 같거나 작은 수가 있다. 이러한 수 중 가장 큰 수를 구하시오.

Answer: 1629996

Solution (Python):
var_a = 1620006
var_b = 1629996
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 123
list_b = []
var_d = int(var_d)
for i in list_a:
    i = int(i)
    if i % var_d == 0:
        list_b.append(i)
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f))
Category: Arithmetic calculation

Question (EN): There are 23 males and 9 females. How many more men are there than women?
Question (KO): 남자가 23명, 여자가 9명 있습니다. 남자는 여자보다 몇 명 더 많습니까?

Answer: 14

Solution (Python):
var_a = 23
var_b = 9
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): You had to multiply a number by 2 but instead multiplied by 5 to get 40. Find the correctly calculated vlaue.
Question (KO): 어떤 수에 2를 곱해야 할 것을 잘못하여 어떤 수에 5를 곱했더니 40이 되었습니다. 바르게 계산하면 얼마인지 구하시오.

Answer: 16

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

Question (EN): Naeun, Leejun, Yoonseo, Seohyun, and Soyul are interviewed in order. When Yoonseo and Seohyeon switched, who will be the 4th person being interviewed?
Question (KO): 나은, 이준, 윤서, 서현, 소율 순으로 면접을 봅니다. 윤서와 서현이가 순서를 바꾸었을 때 4번째로 면접을 보는 사람은 누구인가요?

Answer: Yoonseo

Solution (Python):
var_a = 'Naeun'
var_b = 'Leejun'
var_c = 'Seohyun'
var_d = 'Yoonseo'
var_e = 'Soyul'
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 = 4
var_g = list_a[var_f-1]
print(var_g)
Category: Arithmetic calculation

Question (EN): Seungchan used 3/5 of the money he had yesterday and used 2/3 of the remaining money today. How many fractions of the money he had left?
Question (KO): 승찬이는 어제 가진 돈은 3/5를 사용했고, 오는 남은 돈의 2/3을 사용했다. 남은 돈은 처음 가지고 있던 돈의 몇 분의 몇 인가?

Answer: 0.13

Solution (Python):
var_a = 1
var_b = 0.6
var_c = var_a - var_b
var_d = 1
var_e = 0.6666666666666666
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): How many times do you choose 3 subjects out of math, science, Korean, social studies, and music?
Question (KO): 수학, 과학, 국어, 사회, 음악 과목 중에서 3가지의 과목을 고르는 경우는 모두 몇 가지입니까?

Answer: 10

Solution (Python):
var_a = 5
var_b = 3
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
    var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
    var_c = var_c / (i+1)
print(int(var_c))
Category: Correspondence

Question (EN): If 5A+13=64, what number should be in A?
Question (KO): 5A+13=64일 때, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 1

Solution (Python):
var_a = '5A+13=64'
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: Arithmetic calculation

Question (EN): It took 4 days to solve all the problems in the workbook. On the first day, I solved 1/2 of the total. On the second day, I solved 1/4 of the total. On the third day, I solved 1/6 of the total. When I solved 20 problems on the last day, find the total number of problems in the workbook.
Question (KO): 문제집에 있는 문제를 모두 풀기 위해 4일이 걸렸다. 첫째 날에는 전체의 1/2를 풀었고, 둘째 날에는 전체의 1/4를 풀었으며 셋째 날에는 전체 문제의 1/6을 풀었습니다. 마지막 날 20문제를 풀었을 때, 문제집에 있는 전체 문제의 개수를 구하세요.

Answer: 240

Solution (Python):
var_a = 20
var_b = 1
var_c = 0.5
var_d = 0.25
var_e = var_c + var_d
var_f = 0.16666666666666666
var_g = var_e + var_f
var_h = var_b - var_g
var_i = var_a / var_h
print(int(eval('{:.2f}'.format(round(var_i+1e-10,2)))))
Category: Correspondence

Question (EN): The number of mackerel is 6/11 of croakers in the fish shop, and the number of croakers is 1/8 of tunas in the fish market. Find how many tunas are there when there are 48 mackerels.
Question (KO): 생선가게에 고등어가 조기의 6/11만큼 있고, 조기가 참치의 1/8만큼 있다. 고등어가 48마리 있을 때 참치는 몇 마리 있는지 구하시오.

Answer: 704

Solution (Python):
var_a = 48
var_b = 0.5454545454545454
var_c = var_a / var_b
var_d = 0.125
var_e = var_c / var_d
print(int(var_e))
Category: Possibility

Question (EN): How many different ways can you place 2 white and 1 black go stones in a row?
Question (KO): 흰색 바둑돌 2개와 검은색 바둑돌 1개를 서로 다르게 한 줄로 놓는 방법은 모두 몇 가지입니까?

Answer: 3

Solution (Python):
var_a = 2
var_b = 1
var_c = var_a + var_b
var_d = 2
var_e = 1
var_c = int(var_c)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
    var_e = var_e * (var_c-i)
for i, elem in enumerate(range(var_d)):
    var_e = var_e / (i+1)
print(int(var_e))
Category: Possibility

Question (EN): At the airport, 3 foreigners and 2 Koreans are lining up at the checkpoint. At this time, when it is said that foreigners must pass continuously, find the number of cases.
Question (KO): 공항에서 외국인 3명과 한국인 2명이 검문소에서 줄을 서고 있다. 이때 외국인끼리는 연속해서 지나가야한다고 할 때, 경우의 수를 구하시오.

Answer: 36

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

Question (EN): There are 5, 1, 9, 0, 6, and 8. How many of them are between 4 and 8?
Question (KO): 5, 1, 9, 0, 6, 8이 있습니다. 그중에서 4와 8 사이에 있는 수는 모두 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 5
var_b = 1
var_c = 9
var_d = 0
var_e = 6
var_f = 8
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 = 4
list_b = []
for i in list_a:
    if i >= var_g:
        list_b.append(i)
var_h = 8
list_c = []
for i in list_b:
    if i <= var_h:
        list_c.append(i)
var_i = len(list_c)
print(int(var_i))
Category: Geometry

Question (EN): Six sheets of colored paper in the shape of a square with a side length of 30 centimeters (cm) were overlapped in a row by 7 centimeters (cm) and painted with glue. Find the area of the connected colored paper in square centimeters (cm2).
Question (KO): 한 변의 길이가 30센티미터(㎝)인 정사각형 모양의 색상지 6장을 7센티미터(㎝)씩 한 줄로 겹쳐 놓고 풀로 칠하였습니다. 연결된 색상지의 넓이는 몇 제곱센티미터(㎠)인지 구하시오.

Answer: 4350

Solution (Python):
var_a = 30
var_b = 6
var_c = var_a * var_b
var_d = 7
var_e = 6
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_c - var_h
var_j = 30
var_k = var_i * var_j
print(int(var_k))
Category: Correspondence

Question (EN): When you divide a certain number by 10, the result is 6. What is the value of the certain number minus 15?
Question (KO): 10으로 어떤 수를 나누었더니 결과가 6이 되었습니다. 15를 어떤 수에서 빼면 얼마일까요?

Answer: 45

Solution (Python):
var_a = 6
var_b = 10
var_c = var_a * var_b
var_d = 15
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): How many more bases are there in an octagonal prism than there are bases in a square prism?
Question (KO): 사각기둥의 한 밑면의 수보다 팔각기둥의 한 밑면의 수가 몇 개 많나요?

Answer: 4

Solution (Python):
var_a = 8
var_b = 4
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Yuna took the elevator from the third floor and went up two more floors. What floor is Yuna on?
Question (KO): 유나는 3층에서 엘리베이터를 타고 2층 더 위로 올라갔습니다. 유나는 몇 층에 있을까요?

Answer: 5

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

Question (EN): A2468B, consisting of single digits A and B, is divisible by 55. Find the number of numbers that can be A2468.
Question (KO): 한 자리 수 A, B로 이루어진 A2468B는 55로 나누어 떨어집니다. A2468이 될 수 있는 수의 개수를 구하시오.

Answer: 2

Solution (Python):
var_a = 'A2468B'
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 = 55
list_b = []
var_b = int(var_b)
for i in list_a:
    i = int(i)
    if i % var_b == 0:
        list_b.append(i)
var_c = len(list_b)
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There are 42 pigs and 48 sheep on the farm, and the number of pigs and dogs is the same. How many more pigs and dogs are there altogether than the number sheeps?
Question (KO): 농장에 돼지는 42마리, 양은 48마리 있고, 돼지와 개의 수는 같습니다. 돼지와 개를 합친 수는 양보다 몇 마리 더 많이 있습니까?

Answer: 36

Solution (Python):
var_a = 42
var_b = 42
var_c = var_a + var_b
var_d = 48
var_e = var_c - var_d
print(int(var_e))