philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): There are two numbers A and B. A is the number of 50 plus 7, and B is the number of 6 groups of 10 minus 7. Which number is greater?
Question (KO): A, B 두 수가 있다. A는 50에서 7더한 수, B는 10개씩 6묶음인 수에서 7을 뺀 수이다. 더 큰 수는 어느 것인가?

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 = 50
var_d = 7
var_e = var_c + var_d
var_f = 10
var_g = 6
var_h = var_f * var_g
var_i = 7
var_j = var_h - var_i
list_b= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Comparison

Question (EN): I made an ade with 3 and 2/6 spoons of blueberry syrup and 21/6 spoons of grapefruit syrup. Find the answer with more blueberry syrup or grapefruit syrup.
Question (KO): 블루베리청 3과 2/6 숟가락과 자몽청 21/6 숟가락을 넣어 에이드를 만들었습니다. 블루베리청과 자몽청 중 어느 것을 더 많이 넣었는지 답을 구하세요.

Answer: grapefruit

Solution (Python):
var_a = 'blueberry'
var_b = 'grapefruit'
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 = 3
var_d = 0.3333333333333333
var_e = var_c + var_d
var_f = 3.5
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: Arithmetic calculation

Question (EN): A box with 6 billiard balls of equal weight weighs 1.82 kilograms (kg). Find the weight in kilograms (kg) of one billiard ball if the empty box weighs 0.5 kilograms (kg).
Question (KO): 무게가 같은 당구공 6개가 들어 있는 상자의 무게는 1.82킬로그램(㎏)입니다. 빈 상자의 무게가 0.5킬로그램(㎏)이라면 당구 공 한 개의 무게는 몇 킬로그램(㎏)인지 답을 구해 보세요.

Answer: 0.22

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

Question (EN): Three of the six numbers 0, 1, 2, 3, 4, 5, and 8 have been chosen to form a three-digit number. If you can use the same number more than once, what is the sum of all the possible numbers?
Question (KO): 여섯 개의 숫자 0, 1, 2, 3, 4, 5, 8 중에서 3개를 골라 세 자리의 수를 만들었다. 같은 수를 여러 번 사용해도 된다면, 만들 수 있는 모든 수들의 합은 얼마인가?

Answer: 123326

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
var_f = 5
var_g = 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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_h))
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_b = [float(i) for i in list_b]
var_i = sum(list_b)
print(int(var_i))
Category: Correspondence

Question (EN): Rounding off 34A5 to the tens place gives 3420. Find the value of A.
Question (KO): 34A5를 버림하여 십의 자리까지 나타내면 3420이 됩니다. A를 구하시오.

Answer: 2

Solution (Python):
var_a = '34A5'
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 = 3420
list_b = []
for i in list_a:
    if i >= var_b:
        list_b.append(i)
var_c = 3420
var_d = 10
var_e = var_c + var_d
list_c = []
for i in list_b:
    if i < var_e:
        list_c.append(i)
var_f = '34A5'
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: Arithmetic calculation

Question (EN): You bought 5 erasers for 200 won and 7 pencils for 800 won at a stationery store. Four of your friends are willing to pay the same amount. Find out how much you will have to pay per friend.
Question (KO): 문구점에서 200원짜리 지우개 5개, 800원짜리 연필 7개를 구매했습니다. 친구 4명이 똑같은 돈을 내려고 합니다. 친구 한 명당 얼마를 내야하는지 구하세요.

Answer: 1650

Solution (Python):
var_a = 200
var_b = 5
var_c = var_a * var_b
var_d = 800
var_e = 7
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 4
var_i = var_g / var_h
print(int(var_i))
Category: Correspondence

Question (EN): I have to add 95 to a number, but I accidentally added 65 to a number, and it became 125. Find the correct result.
Question (KO): 어떤 수에 95를 더해야 하는데 잘못하여 65를 더했더니 125가 되었습니다. 바르게 계산한 결과를 구하시오.

Answer: 155

Solution (Python):
var_a = 125
var_b = 65
var_c = var_a - var_b
var_d = 95
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): A cuboid has a square base and a perimeter of 32 centimeters (cm). If the height of a cuboid is 9 centimeters (cm), how many cubic centimeters (cm3) is its volume?
Question (KO): 어떤 직육면체의 밑면이 정사각형이고 둘레가 32센티미터(㎝)이다. 직육면체의 높이가 9센티미터(㎝)이면 부피는 몇 세제곱센티미터(㎤)입니까?

Answer: 576

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

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

Answer: 45

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 = 4
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 = len(list_c)
print(int(var_f))
Category: Geometry

Question (EN): There is a fishbowl in the shape of a rectangular cuboid. This fishbowl is 16 centimeters (cm) wide, 14 centimeters (cm) long, and 9 centimeters (cm) high. The water was 4 centimeters (cm) high in this bowl. When a stone was placed in this bowl, the water level rose to 9 centimeters (cm). Find the volume of the stone.
Question (KO): 직육면체 모양의 어항이 있다. 이 어항의 가로는 16센티미터(㎝), 세로는 14센티미터(㎝), 높이는 9센티미터(㎝)입니다.이 그릇에 물이 4센티미터(㎝) 높이만큼 들어 있었습니다. 이 그릇에 돌을 넣었더니 물의 높이가 9센티미터(㎝)가 되었습니다. 돌의 부피를 구하시오.

Answer: 1120

Solution (Python):
var_a = 16
var_b = 14
var_c = var_a * var_b
var_d = 9
var_e = 4
var_f = var_d - var_e
var_g = var_c * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): The average length of the 11 sticks is 145.7 centimeters (cm). But if the average of the lengths of two of them is 142.1 centimeters (cm), find the average of the lengths of the remaining bars.
Question (KO): 막대기 11개의 길이의 평균이 145.7센티미터(㎝)이다. 그런데 그 중 2개의 길이의 평균이 142.1센티미터(㎝)라고 하면, 나머지 막대의 길이의 평균을 구하시오.

Answer: 146.5

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

Question (EN): There were 20 tangerines in each of five different baskets. After a few days, you noticed that some of the tangerines were rotten, so when you removed the rotten tangerines, the number of tangerines in the basket became 10, 18, 17, 13, and 16, respectively. If you move the tangerines from the basket containing 13 or less to a new basket, how many tangerines will be in the new basket?
Question (KO): 서로 다른 다섯 개의 바구니에 귤이 각각 20개씩 있었습니다. 며칠이 지난 후 보니 몇 개의 귤이 썩어 썩은 귤을 빼자 바구니에 담긴 귤의 개수가 각각 10개, 18개, 17개, 13개, 16개가 되었습니다. 귤이 13개 이하로 담긴 바구니에 있는 귤은 전부 꺼내 새로운 바구니에 담았을 때, 이 바구니에는 몇 개의 귤이 있을지 구하시오.

Answer: 23

Solution (Python):
var_a = 10
var_b = 18
var_c = 17
var_d = 13
var_e = 16
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 = 13
list_b = []
for i in list_a:
    if i <= var_f:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print(int(var_g))
Category: Geometry

Question (EN): Find the perimeter of the largest square that can be made by arranging as many squares with sides of 7 centimeters (cm) as possible without overlapping.
Question (KO): 한 변의 길이가 7센티미터(㎝)인 정사각형을 겹치지 않게 최대한 많이 이어 붙여서 만들 수 있는 가장 큰 정사각형의 둘레의 길이를 구하시오.

Answer: 168

Solution (Python):
var_a = 36
var_b = 0.5
var_c = var_a ** var_b
var_d = 7
var_e = var_c * var_d
var_f = 4
var_g = var_e * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There were 7 numbers with an average of 7, and when you changed one of them to 9, the average was 8. What was the original number before changing?
Question (KO): 평균이 7인 일곱 개의 수 중에 한개를 9로 바꾸니 평균이 8이 되었다.바꾼수는 원래 얼마인가?

Answer: 2

Solution (Python):
var_a = 7
var_b = 7
var_c = var_a * var_b
var_d = 7
var_e = 8
var_f = var_d * var_e
var_g = 9
var_h = var_f - var_g
var_i = var_c - var_h
print(int(var_i))
Category: Geometry

Question (EN): Find how long it would take to drive a road that is 28/3 kilometers (km) at 14/5 kilometers (km) per hour.
Question (KO): 28/3킬로미터(㎞)인 도로를 시속 14/5킬로미터(㎞)로 달리면 얼마가 걸리는지 구하시오.

Answer: 3.33

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

Question (EN): Hohyun has 32 yellow marbles and Miran has 34 blue marbles. If Seulgi has 23 red marbles, who has more marbles, Seulgi or Hohyun?
Question (KO): 호현이는 노란 구슬을 32개 가지고 있고 미란이는 파란 구슬을 34개 가지고 있습니다. 슬기가 빨간 구슬을 23개 가지고 있을 때 슬기와 호현이 중에 누가 구슬을 더 많이 가지고 있습니까?

Answer: Hohyun

Solution (Python):
var_a = 'Seulgi'
var_b = 'Hohyun'
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 = 23
var_d = 32
list_b= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Arithmetic calculation

Question (EN): What is the smallest five-digit number divisible by the numbers 2, 3, 8, and 9?
Question (KO): 숫자 2, 3, 8, 9로 나누어 떨어질 수 있는 다섯 자리 수 중 가장 작은 수는?

Answer: 10008

Solution (Python):
var_a = 10000
var_b = 99999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 2
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 = 3
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 = 1
list_f=list_e.copy()
list_f.sort()
var_i = list_f[var_h-1]
print(int(var_i))
Category: Correspondence

Question (EN): You are going to divide 20 by a certain number. If you mistakenly divide 10 by the number, the result is 2. What is the correct calculation result?
Question (KO): 20에 어떤 수를 나눠주려 합니다. 잘못하여 10에 어떤 수를 나눴더니 결과는 2가 되었습니다. 바르게 계산한 결과는 얼마일까요?

Answer: 4

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

Question (EN): A is 14 and B is 24. If we add A to a particular number and multiply it by A, then subtract B, then divide it by B, we get 13. Find that particular number.
Question (KO): A는 14고 B는 24입니다. 어떤 수에 A를 더하고 A를 곱한 후에 B를 빼고 B로 나눠주었더니 13이 되었습니다. 어떤 수를 구하시오.

Answer: 10

Solution (Python):
var_a = 13
var_b = 24
var_c = var_a * var_b
var_d = 24
var_e = var_c + var_d
var_f = 14
var_g = var_e / var_f
var_h = 14
var_i = var_g - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): How many odd numbers are less than 10?
Question (KO): 10 이하의 홀수는 몇 개입니까?

Answer: 5

Solution (Python):
var_a = 1
var_b = 10
list_a = []
if var_a%2==0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
var_c = len(list_a)
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Ryeowoon and Miyeon shared 85 sheets of colored paper. Ryeowoon decided not to have pink-colored paper, and there were 11 sheets of pink-colored paper. Colored paper in every other color was in even numbers to be shared equally by two friends. How many sheets of colored paper did Miyeon get?
Question (KO): 려운이와 미연이가 색종이 85장을 나누어 가졌습니다. 려운이는 분홍색 색종이를 갖지 않기로 했고 분홍색 색종이는 모두 11장이었습니다. 다른 색의 색종이는 모두 짝수 장이 있으며 두 친구가 같은 장수로 나누어 가질 때 미연이는 몇 장의 색종이를 가지게 되는지 구하시오.

Answer: 48

Solution (Python):
var_a = 85
var_b = 11
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 11
var_g = var_e + var_f
print(int(var_g))
Category: Comparison

Question (EN): Yuna, Eunji, and Minyoung are playing rock-paper-scissors game. Eunji lost to Minyoung and Yuna defeated Minyoung. Who's in last place?
Question (KO): 유나, 은지, 민영이가 가위바위보게임을 하고 있습니다. 은지는 민영이에게 졌고, 유나는 민영이를 이겼습니다. 꼴찌는 누구일까요?

Answer: Eunji

Solution (Python):
var_a = 'Yuna'
var_b = 'Eunji'
var_c = 'Minyoung'
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 = 'Yuna'
var_e = 'Minyoung'
var_f = '>'
var_g = 'Eunji'
var_h = 'Minyoung'
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 = len(list_c)
var_k = list_c[var_j-1]
print(var_k)
Category: Geometry

Question (EN): How many faces are perpendicular to any one face of a cube?
Question (KO): 직육면체의 어떤 한 면과 수직인 면의 개수는 몇 개일까요?

Answer: 4

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

Question (EN): There is a relay race that covers 115.15 kilometers (km). The total distance of the race is divided into 7 sections, and 7 people are divided into each group to run each section. If every participants run the same distance, how long does each participant covers?
Question (KO): 115.15킬로미터(㎞)를 나눠서 뛰는 계주대회가 있다. 총 구간을 7조가 나눠서 뛰고 각 조에 7명이 나눠서 뛴다. 모든 사람이 똑같은 길이를 나눠서 달릴때 한 명이 뛰는 길이는 얼마인가?

Answer: 2.35

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

Question (EN): Thirty balls each weighing 0.36 kilograms (kg) are placed in a box. Find how many kilograms (kg) the box without the balls is when the box containing the balls weighed 11.26 killograms (kg).
Question (KO): 배 한 개는 0.36킬로그램(㎏)입니다. 바구니 하나에 배가 30개 들어있을 때 바구니 전체의 무게를 재면 11.26킬로그램(㎏)입니다. 빈 바구니의 무게는 몇 킬로그램(㎏)일지 구하세요.

Answer: 0.46

Solution (Python):
var_a = 11.26
var_b = 0.36
var_c = 30
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): You are trying to get 2 balls out of a box containing a red ball, a blue ball, a black ball, and a yellow ball. How many ways are there for balls can be drawn if allowing duplication? However, the order in which the balls are retrieved is not considered.
Question (KO): 빨간색 공, 파란색 공, 검정색 공, 노란색 공이 들어있는 상자에서 공 2개 꺼내려고 합니다. 중복을 허용하여 꺼낼 수 있는 공의 경우의 수는 모두 몇 가지입니까? 단, 공을 꺼내는 순서는 고려하지 않는다.

Answer: 10

Solution (Python):
var_a = 'red'
var_b = 'blue'
var_c = 'black'
var_d = 'yellow'
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 = var_e + var_f
var_h = 1
var_i = var_g - var_h
var_j = 2
var_k = 1
var_i = int(var_i)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
    var_k = var_k * (var_i-i)
for i, elem in enumerate(range(var_j)):
    var_k = var_k / (i+1)
print(int(var_k))
Category: Arithmetic calculation

Question (EN): I'm trying to make 1000 toys. Assuming that the speed of making toys is the same every day, how many days are left if I have made 100 toys a day for 6 days?
Question (KO): 장난감 1000개를 만들려고 합니다. 장난감을 만드는 속도는 매일 같다고 할 때 지금까지 하루에 100개씩 6일 동안 만들었다면 며칠이 남았습니까?

Answer: 4

Solution (Python):
var_a = 1000
var_b = 100
var_c = 6
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 100
var_g = var_e / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Adding 8 consecutive even numbers gives 424. Find the smallest of 8 even numbers.
Question (KO): 연속하는 8개의 짝수를 더하였더니 424가 되었습니다. 8개의 짝수 중 가장 작은 수를 구하시오.

Answer: 46

Solution (Python):
var_a = 424
var_b = 0
var_c = 8
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e * var_f
var_h = 2
list_a = [i for i in range(var_b, var_g + 1, var_h)]
list_a = [float(i) for i in list_a]
var_i = sum(list_a)
var_j = var_a - var_i
var_k = 8
var_l = var_j / var_k
print(int(var_l))
Category: Possibility

Question (EN): How many times can you use the natural numbers 4, 5, and 6 once to form a number greater than 560?
Question (KO): 자연수 4, 5, 6을 한 번씩 사용하여 560보다 큰 수를 만드는 경우는 몇 가지인가?

Answer: 3

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

Question (EN): When a certain number that should be divided by 8 is divided by 7, the quotient is 13 and the remainder is 1. Find the sum of the correctly calculated quotient and remainder.
Question (KO): 어떤 수를 8로 나누어야 할 것을 7로 나누었더니 몫은 13이고 나머지는 1이었습니다. 바르게 계산한 몫과 나머지의 합을 구하시오.

Answer: 15

Solution (Python):
var_a = 13
var_b = 7
var_c = var_a * var_b
var_d = 1
var_e = var_c + var_d
var_f = 8
var_g = var_e // var_f
var_h = 13
var_i = 7
var_j = var_h * var_i
var_k = 1
var_l = var_j + var_k
var_m = 8
var_n = var_l % var_m
var_o = var_g + var_n
print(int(var_o))
Category: Geometry

Question (EN): You are going to make the largest square out of 60 centimeters (cm) of wire. How many centimeters (cm) should be the length of one side?
Question (KO): 길이가 60센티미터(㎝)인 철사로 가장 큰 정사각형을 만들려고 합니다. 한 변의 길이를 몇 센티미터(㎝)로 해야 합니까?

Answer: 15

Solution (Python):
var_a = 60
var_b = 4
var_c = var_a / var_b
print(int(var_c))
Category: Comparison

Question (EN): 20 students are waiting for the bus. Jungkook came later than Yoongi, and there are 5 students between Yoongi and Jungkook. There are 6 students standing in front of Jungkook. How many students are standing behind Yoongi?
Question (KO): 20명의 학생들이 버스를 기다리고 있습니다. 정국이는 윤기보다 늦게 왔고, 윤기와 정국이 사이에는 5명의 학생이 있습니다. 정국의 앞에는 6명의 학생들이 서 있습니다. 윤기의 뒤에 서 있는 학생은 몇 명입니까?

Answer: 13

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

Question (EN): We created a three-digit natural number among the number cards 1 to 9 and overlaps were allowed. Find how many numbers there are whose sum of each digit is 7.
Question (KO): 1부터 9까지의 숫자카드 중 중복을 허용하여 세자리 자연수를 만들었다. 이 수들 중 각 자리 숫자의 합이 7인 숫자들은 몇 개인지 구하시오.

Answer: 15

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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=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 = 7
var_g = 0
var_f = int(var_f)
for i in list_c:
    i = int(i)
    if i == var_f:
        var_g = var_g + 1
print(int(var_g))
Category: Possibility

Question (EN): Make the smallest number with the number cards of 1, 4, and 5 one at a time.
Question (KO): 1, 4, 5가 적힌 카드를 한 번씩 이용하여 가장 작은 수를 만드시오.

Answer: 145

Solution (Python):
var_a = 1
var_b = 4
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 = len(list_a)
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
print(int(var_f))