philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): There were four students running in a race. Minyoung was faster than Yoongi. Yoongi was faster than Jimin. Jimin was slower than Yuna. Minyoung was slower than Yuna. Who would be the number 1?
Question (KO): 4명의 학생이 달리기 시합을 했습니다. 민영이는 윤기보다 빨랐습니다. 윤기는 지민이보다 빨랐습니다. 지민이는 유나보다 느렸습니다. 민영이는 유나보다 느렸습니다. 1등은 누구입니까?

Answer: Yuna

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

Question (EN): You have a rectangular piece of paper measuring 63 centimeters (cm) wide and 42 centimeters (cm) long. You want to cut several pieces of this paper into the largest square shapes without any remainder. How many centimeters (cm) should each side of the square be?
Question (KO): 가로가 63 센티미터(㎝), 세로가 42 센티미터(㎝)인 직사각형 모양의 종이가 있습니다. 이 종이를 남는 부분 없이 가장 큰 정사각형 모양으로 여러 개 자르려고 합니다. 정사각형의 한 변을 몇 센티미터(㎝)로 해야 할까요?

Answer: 21

Solution (Python):
var_a = 63
var_b = 42
var_c = math.gcd(int(var_b), int(var_a))
print(int(var_c))
Category: Correspondence

Question (EN): What number must go in A to make 632-5AB=41?
Question (KO): 632-5AB=41라는 식이 성립하려면, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 9

Solution (Python):
var_a = '632-5AB=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): Ten ginkgo trees are planted on one side of the playground at intervals of 10 meters (m). If ginkgo trees are planted at both the beginning and the end, find the length in meters (m) of this field.
Question (KO): 10미터(m)간격으로 은행나무 10개가 운동장 한 쪽에 심어져있습니다. 처음과 끝에도 은행나무가 심어져 있다면 이 운동장의 길이는 몇 미터(m)인지 구해 보시오.

Answer: 90

Solution (Python):
var_a = 10
var_b = 1
var_c = var_a - var_b
var_d = 10
var_e = var_c * var_d
print(int(var_e))
Category: Possibility

Question (EN): You are trying to pick a class president and a vice-captain from Jungkook, Jimin, Yoongi, Yuna, and Taehyung. How many possible cases are there?
Question (KO): 정국, 지민, 윤기, 유나, 태형 중에서 반장, 부반장을 뽑으려고 합니다. 가능한 경우의 수는 모두 몇 가지 입니까

Answer: 20

Solution (Python):
var_a = 'Jungkook'
var_b = 'Jimin'
var_c = 'Yoongi'
var_d = 'Yuna'
var_e = 'Taehyung'
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 = len(list_a)
var_g = 2
var_h = 1
var_f = int(var_f)
var_g = int(var_g)
for i, elem in enumerate(range(var_g)):
    var_h = var_h * (var_f-i)
print(int(var_h))
Category: Possibility

Question (EN): There are 5 marbles: red, blue, yellow, purple and black. You're going to pick two of these and play marbles. Find the number of cases.
Question (KO): 구슬이 빨강, 파랑, 노랑, 보라, 검정 5개가 있다. 이 중 2개를 골라서 구슬치기를 하려고 한다. 경우의 수를 구하여라.

Answer: 10

Solution (Python):
var_a = 5
var_b = 2
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: Arithmetic calculation

Question (EN): 12 of the 5th graders participated in the basketball game. The number of students participating in basketball games from the sixth grade is 6 times the number of 5th graders who joined the game. How many 5th and 6th graders participated in the game?
Question (KO): 5학년 중 12명이 농구 시합에 참가했습니다. 6학년 중 농구 시합에 참가한 학생 수는 참가한 5학년 학생 수의 6배입니다. 농구 시합에 참가한 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): When you divide 69 by a number, the remainder is 5, and when you divide 86, the remainder is 6. Write a process to solve what is the largest number that can be the number and find the answer.
Question (KO): 어떤 수로 69를 나누면 나머지가 5이고, 86을 나누면 나머지가 6입니다. 어떤 수가 될 수 있는 수 중에서 가장 큰 수는 얼마인지 풀이 과정을 쓰고 답을 구하세요

Answer: 16

Solution (Python):
var_a = 69
var_b = 5
var_c = var_a - var_b
var_d = 86
var_e = 6
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There is a bowl with the same 14 pieces of food on it. If the weight of this bowl is 11.14 kg (kg), how much kg (kg) will one piece of food weigh if the empty bowl weighs 0.5 kg (kg)?
Question (KO): 똑같은 음식 14개가 담근 그릇이 있습니다. 이 그릇의 무게는 11.14킬로그램(㎏)이며 빈 그릇의 무게는 0.5킬로그램(㎏)일 때 음식 한 개의 무게는 몇 킬로그램(㎏)입니까?

Answer: 0.76

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

Question (EN): A three-digit number was created using three of the numbers 0, 1, 2, 3, and 5. How many numbers can be made if each digit is different?
Question (KO): 0, 1, 2, 3, 5 중 3개의 숫자를 사용하여 세 자리 수를 만들었습니다. 이 세 자리 수의 각 자릿수가 서로 다르다고 할 때, 만들 수 있는 수는 몇 개입니까?

Answer: 48

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 5
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 = len(list_b)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Gyuri does 1/3 of her homework for 5 days, and Seungyeon does 1/5 of her homework for 2 days. If they do their homework together, how many days will it take to finish the work?
Question (KO): 규리는 5일동안 숙제를 1/3만큼하고 승연이는 2일동안 숙제를 1/5만큼 합니다. 규리와 승연이가 같이 숙제를 한다면 일을 끝내는데 며칠 걸리나요??

Answer: 6

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

Question (EN): The volumes of buckets A and B are 1100 milliliters (ml), and 3 liters (L) and 400 milliliters (ml), respectively. When the weights of these two buckets are added, which one has more volume compared to the kettle with 4 liters (L) and 800 milliliters (ml)?
Question (KO): 어느 양동이 A와 B의 들이는 각각 1100밀리리터(㎖)와 3리터(L) 400밀리리터(㎖)입니다. 이 두 양동이의 무게를 합하였을 때, 들이가 4리터(L) 800밀리리터(㎖) 인 주전자와 비교하여 어느 것의 들이가 더 많습니까?

Answer: kettle

Solution (Python):
var_a = 'kettle'
var_b = 'bucket'
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 = 4
var_d = 1000
var_e = var_c * var_d
var_f = 800
var_g = var_e + var_f
var_h = 1100
var_i = 3
var_j = 1000
var_k = var_i * var_j
var_l = 400
var_m = var_k + var_l
var_n = var_h + var_m
list_b= []
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_o = 1
list_c=list_b.copy()
list_c.sort()
var_p = list_c[-var_o]
var_q = list_b.index(var_p)+1
var_r = list_a[var_q-1]
print(var_r)
Category: Comparison

Question (EN): 9 students are running a race. Yoongi was running in 7th place and passed 4 other students. How many students are running behind Yoongi?
Question (KO): 9명의 학생이 달리기를 하고 있습니다. 윤기가 7등으로 달리다가 4명을 앞질렀습니다. 윤기 뒤에서 달리는 학생은 몇 명입니까?

Answer: 6

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

Question (EN): How many bases does a pyramid have?
Question (KO): 각뿔의 밑면의 수는?

Answer: 1

Solution (Python):
var_a = 1
print(int(var_a))
Category: Correspondence

Question (EN): The seven-digit number 95738AB is divisible by 5, and A and B can have any number from 0 to 9. How many numbers can satisfy these conditions?
Question (KO): 일곱 자리 수 95738AB가 5로 나누어떨어지고 A와 B에는 0부터 9까지의 숫자가 들어갈 수 있습니다. 이러한 수는 모두 몇 개입니까?

Answer: 20

Solution (Python):
var_a = '95738AB'
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 = 5
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: Geometry

Question (EN): There is a cuboid with a base area of 36 square centimeters (cm2). The volume of this cuboid is 252 cubic centimeters (cm3). Find the height of this cuboid.
Question (KO): 밑면의 넓이가 36제곱센티미터(㎠) 직육면체가 있습니다. 이 직육면체의 부피는 252세제곱센티미터(㎤)입니다. 이 직육면체의 높이를 구하시오.

Answer: 7

Solution (Python):
var_a = 252
var_b = 36
var_c = 1
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e))
Category: Possibility

Question (EN): Yeonseo has more than two types of skirts and pants each. If there are 4 types of pants and 7 ways to choose pants or skirts, find the number of cases that Yeonseo chooses a skirt.
Question (KO): 연서에게는 치마와 바지가 각각 2종류 이상이 있다. 바지는 4종류가 있으며, 바지 또는 치마를 고르는 경우의 수가 7가지일 때, 연서가 치마를 고르는 경우의 수를 구하시오.

Answer: 3

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

Question (EN): Seungchan read 0.2 of the children's book until yesterday, and today, he read 0.35 of the rest of the children's book, so there are 130 pages left. How many pages are there in the children's book Seungchan is reading?
Question (KO): 승찬이가 동화책을 어제까지 전체의 0.2 만큼 읽었고, 오늘은 어제까지 읽고 남은 부분의 0.35 만큼 읽었더니 130 쪽이 남았습니다. 승찬이가 읽고 있는 동화책은 모두 몇 쪽인지 구하시오

Answer: 250

Solution (Python):
var_a = 130
var_b = 1
var_c = 0.35
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 1
var_g = 0.2
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Possibility

Question (EN): Find the number of three-digit natural numbers that can be made by drawing three of the number cards 2, 4, 6, 7, and 9.
Question (KO): 숫자 카드 2, 4, 6, 7, 9 중 3장을 뽑아 만들 수 있는 세 자리 자연수의 개수를 구하시오.

Answer: 60

Solution (Python):
var_a = 2
var_b = 4
var_c = 6
var_d = 7
var_e = 9
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 = len(list_b)
print(int(var_g))
Category: Geometry

Question (EN): There is an equilateral triangle whose sum of the lengths of three sides is the same as the sum of the lengths of four sides of a rectangle that is 125 centimeters (cm) wide and 115 centimeters (cm) long. Find the length in centimeters (cm) of one side of this equilateral triangle.
Question (KO): 가로가 125센티미터(㎝)이고 세로가 115 센티미터(㎝)인 직사각형의 네 변의 길이의 합과 세 변의 길이의 합이 같은 정삼각형이 있습니다. 이 정삼각형의 한 변의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 160

Solution (Python):
var_a = 125
var_b = 115
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
var_f = 3
var_g = var_e / var_f
print(int(var_g))
Category: Correspondence

Question (EN): 27A8 minus 1203 is greater than 1022. How many digits from 0 to 9 can be written for A?
Question (KO): 27A8에 1203를 뺀 값은 1022보다 큽니다. 0부터 9까지의 숫자 중 A에 쓸 수 있는 숫자는 모두 몇 개입니까?

Answer: 10

Solution (Python):
var_a = '27A8'
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 = 1022
var_c = 1203
var_d = var_b + var_c
list_b = []
for i in list_a:
    if i > var_d:
        list_b.append(i)
var_e = '27A8'
var_f = 'A'
var_e = str(var_e)
var_f = str(var_f)
unk_idx = var_e.index(var_f)
list_c = []
for elem in list_b:
    elem = str(elem)
    list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_g = len(list_c)
print(int(var_g))
Category: Correspondence

Question (EN): 0.375 is the result of moving a decimal point three places to the left and multiplying it by 10. Find the original decimal number including the decimal point.
Question (KO): 0.375는 어떤 소수의 소수점을 왼쪽으로 세 칸 옮긴 뒤 10배만큼 커지게 했을때의 결과입니다. 원래의 소수를 소수점을 포함하여 구하시오.

Answer: 37.5

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

Question (EN): Find the sum of the largest and the third smallest three-digit numbers that can be formed by using all even numbers greater than 1 and less than 7 once.
Question (KO): 1보다 크고 7보다 작은 짝수를 한 번씩 모두 사용하여 만들 수 있는 세 자리 수 중 가장 큰 것과 세 번째로 작은 것의 합을 구하시오.

Answer: 1068

Solution (Python):
var_a = 1
var_b = 1
var_c = var_a + var_b
var_d = 7
var_e = 1
var_f = var_d - var_e
list_a = []
if var_c%2!=0:
    for i in range(var_c+1, var_f+1, 2):
        list_a.append(i)
else:
    for i in range(var_c, var_f+1, 2):
        list_a.append(i)
var_g = 3
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]
var_j = 3
list_d=list_b.copy()
list_d.sort()
var_k = list_d[var_j-1]
var_l = var_i + var_k
print(int(var_l))
Category: Correspondence

Question (EN): There is a four-digit number 6A42 which becomes 6000, when rounded to the hundred's place. How many possible A's are there if A can fit from 0 to 9?
Question (KO): 백의 자리에서 반올림하면 6000이 되는 네자리수 6A42가 있습니다. A에 0부터 9까지 들어갈 수 있을 때 가능한 A는 모두 몇 개입니까?

Answer: 5

Solution (Python):
var_a = '6A42'
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 = 6500
list_b = []
for i in list_a:
    if i >= var_b:
        list_b.append(i)
var_c = '6A42'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
    elem = str(elem)
    list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_e = len(list_c)
print(int(var_e))
Category: Possibility

Question (EN): How many numbers less than 1000 and greater than 100 can you make by using all of the number cards 4, 2, and 5 once?
Question (KO): 숫자 카드 4, 2, 5를 모두 한 번씩 사용하여 만들 수 있는 1000보다 작고 100보다 큰 수는 총 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 4
var_b = 2
var_c = 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 = 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 = len(list_b)
print(int(var_e))
Category: Possibility

Question (EN): We took two fruits out of a basket with one apple, one peach, one pear, and one melon each. How many ways are there for the selected fruit?
Question (KO): 사과, 복숭아, 배, 참외가 각각 하나씩 있는 바구니에서 2개의 과일을 뺐습니다. 선택된 과일의 경우의 수는 모두 몇 가지입니까?

Answer: 6

Solution (Python):
var_a = 'apple'
var_b = 'peach'
var_c = 'pear'
var_d = 'melon'
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): There are candy bags with 30 candies in each bag. If you put all 254 candies in and there is no space left in all the bags, find out how many more candies you need to buy.
Question (KO): 한 봉지에 사탕 30개가 들어가는 사탕 봉지가 있습니다. 사탕 254개를 모두 넣고 모든 봉지에 남는 자리가 없으려면 더 사야하는 사탕은 모두 몇 개인지 구하세요.

Answer: 16

Solution (Python):
var_a = 30
var_b = 254
var_c = 30
var_d = var_b % var_c
var_e = var_a - var_d
print(int(var_e))
Category: Geometry

Question (EN): A daycare center decided to give Christmas presents to children. The gift is in the shape of a cuboid measuring 8 centimeters (cm) in width, 12 centimeters (cm) in depth, and 30 centimeters (cm) in height. The presents are neatly stacked in the shape of a box cube. If you use the least number of gift boxes, how many gift boxes are there in total?
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): How many numbers are greater than 450, have different digits, and are consisted of 3, 4, and 6?
Question (KO): 450보다 크고, 각 자리수가 모두 다르며 3, 4, 6으로 구성되어 있는 수는 몇 개가 있는가?

Answer: 3

Solution (Python):
var_a = 3
var_b = 4
var_c = 6
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 = 450
list_c = []
for i in list_b:
    if i > var_e:
        list_c.append(i)
var_f = len(list_c)
print(int(var_f))