philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Among the students in Eunji's class, there are 24 students who can play musical instrument (a), and 8 of them are said to be able to play instrument (b) as well. If not a single student can play both (a) and (b), and 17 students can play instrument (b), how many students are there in Eunji's class?
Question (KO): 은지네 반 학생 중 (가) 악기를 칠 수 있는 학생은 24명이고, 이 중 8명은 (나) 악기도 칠 수 있다고 합니다. 은지네 반 학생 중 (가) 악기와 (나) 악기를 모두 칠 수 없는 학생은 없고, (나) 악기를 칠 수 있는 학생이 17명이라면, 은지네 반에는 모두 몇 명의 학생이 있습니까?

Answer: 33

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

Question (EN): When you remove one of the cards from 7, 6, 2, and 0 and use all remaining cards to make a three-digit number, find the sum of the third largest number and the third smallest number.
Question (KO): 7, 6, 2, 0이 그려진 카드 중 하나를 빼고 남은 카드를 모두 사용하여 세 자리 수를 만들 때, 세 번째 큰 수와 세 번째 작은 수의 합을 구하시오.

Answer: 986

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

Question (EN): Yoochan walks 0.75 meters (m) in one step. If Yoochan walks straight for 13 minutes at 70 steps per minute, find how many meters (m) the current location of Yoochan is from the first location.
Question (KO): 유찬이는 한 걸음에 0.75미터(m)를 갑니다. 유찬이가 1분에 70걸음씩 13분 동안 직진으로 걸었다면, 유찬이의 현재 위치는 처음 있던 위치와 몇 미터(m)가 차이 나는지 구하시오.

Answer: 682.5

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

Question (EN): If you add the allowance of Yul-gi and Ga-yeong have, you get 6,000 won. If you subtract the difference between their allowance from the sum of their allowance, you get 4,800 won. If Yul-gi's allowance is more than Ga-yeong's, find out how much Yul-gi's allowance is.
Question (KO): 율기와 가영이가 가지고 있는 용돈을 더하면 6000원이고, 두 사람이 가지고 있는 용돈의 차를 용돈의 합에서 빼면 4800원입니다. 율기의 용돈이 가영이의 용돈보다 많을 때 율기의 용돈은 얼마인지 구하시오.

Answer: 3600

Solution (Python):
var_a = 6000
var_b = 4800
var_c = 2
var_d = var_b / var_c
var_e = var_a - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): A certain number multiplied by 7 minus 6 minus 12 equals the number multiplied by 4. Find the certain number.
Question (KO): 어떤 수에 7을 곱한 값에 6을 빼고 12을 뺀 값은 어떤 수에 4배와 같다. 어떤 수를 구하시오.

Answer: 6

Solution (Python):
var_a = 12
var_b = 6
var_c = var_a + var_b
var_d = 7
var_e = 4
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Minyoung has 9 dogs, 3 cats, and 5 rabbits, and Yoojeong has 2 more animals than Minyoung. If Yoojeong has 7 dogs and 2 fewer cats than rabbits, how many rabbits does Yoojeong have?
Question (KO): 민영이는 개 9마리, 고양이 3마리, 토끼 5마리를 기르고 있고, 유정이는 민영이보다 동물을 2마리 더 많이 기르고 있습니다. 유정이가 개를 7마리 키우고 고양이는 토끼보다 2마리 더 적게 기를 때, 유정이가 기르는 고양이는 몇 마리인지 구하시오

Answer: 7

Solution (Python):
var_a = 9
var_b = 3
var_c = var_a + var_b
var_d = 5
var_e = var_c + var_d
var_f = 2
var_g = var_e + var_f
var_h = 7
var_i = var_g - var_h
var_j = 2
var_k = var_i / var_j
var_l = 1
var_m = var_k + var_l
print(int(var_m))
Category: Geometry

Question (EN): The rectangular ranch fence has a perimeter of 30 meters (m), and the length of the fence is twice its width. What is the length of the fence in meters (m)?
Question (KO): 직사각형 모양인 목장 울타리의 둘레는 30미터(m)입니다. 울타리의 가로 길이는 세로 길이의 2배라고 합니다. 울타리의 가로 길이는 몇 미터(m)입니까?

Answer: 10

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

Question (EN): Find the second largest aliquot of 32.
Question (KO): 32의 약수 중 두 번째로 큰 값을 구하시오.

Answer: 16

Solution (Python):
var_a = 32
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
    if var_a % i == 0:
        list_a.append(i)
        list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = 2
list_b=list_a.copy()
list_b.sort()
var_c = list_b[-var_b]
print(int(var_c))
Category: Correspondence

Question (EN): There is a four-digit number 571A which is greater than 5716. How many digits can you put in A?
Question (KO): 5716보다 큰 네자리 수 571A가 있습니다. A에 쓸 수 있는 숫자는 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = '571A'
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 = 5716
list_b = []
for i in list_a:
    if i < var_b:
        list_b.append(i)
var_c = len(list_b)
print(int(var_c))
Category: Possibility

Question (EN): Round down the largest four-digit number you can make using four cards 7, 9, 3, and 6 only once each to the nearest tenth.
Question (KO): 7, 9, 3, 6 수 카드 4장을 한 번씩만 사용하여 만들 수 있는 가장 큰 네 자리 수를 내림하여 십의 자리까지 나타내어 보세요.

Answer: 9760

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

print(int(var_i))
Category: Arithmetic calculation

Question (EN): Among the three-digit natural numbers formed by using the three natural numbers 1, 6, and 8, what is the third number when arranged in ascending order?
Question (KO): 세 자연수 1, 6, 8을 이용하여 만드는 세 자리 자연수들 중, 큰 순서대로 나열하였을 때 세 번째에 위치한 수는 무엇인가?

Answer: 681

Solution (Python):
var_a = 1
var_b = 6
var_c = 8
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 = 3
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f))
Category: Correspondence

Question (EN): After Jungkook walked 3 kilometers (km) and 7 meters (m), he walked a few more meters (m). After a break, he took a walk for 840 meters (m), and it turned out that he walked 6 kilometers (km) and 30 meters (m) in total. How many meters (m) did Jungkook walk before the break?
Question (KO): 정국이는 3킬로미터(㎞) 7미터(m)를 걷고 나서 몇 미터(m)를 더 걸었습니다. 그리고 다시 840미터(m)를 걸어 전체 6킬로미터(㎞) 30미터(m)를 걸었습니다. 정국이가 중간에 걸은 거리는 몇 미터(m)입니까?

Answer: 2183

Solution (Python):
var_a = 6
var_b = 1000
var_c = var_a * var_b
var_d = 30
var_e = var_c + var_d
var_f = 840
var_g = var_e - var_f
var_h = 3
var_i = 1000
var_j = var_h * var_i
var_k = 7
var_l = var_j + var_k
var_m = var_g - var_l
print(int(var_m))
Category: Arithmetic calculation

Question (EN): What is the sum of all natural numbers greater than 28 and less than or equal to 31?
Question (KO): 28 초과 31 이하인 자연수를 모두 더하면 모두 얼마 입니까?

Answer: 90

Solution (Python):
var_a = 28
var_b = 1
var_c = var_a + var_b
var_d = 31
var_e = 1
list_a = [i for i in range(var_c, var_d + 1, var_e)]
list_a = [float(i) for i in list_a]
var_f = sum(list_a)
print(int(var_f))
Category: Comparison

Question (EN): There are a total of 4 numbers: 0.8, 1/2, 0.5, 1/3. How many of these numbers are less than 3?
Question (KO): 총 4개의 숫자 0.8, 1/2, 0.5, 1/3이 있습니다. 이 중 3보다 작은 수는 몇 개 일까요?

Answer: 4

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.5
var_d = 0.3333333333333333
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 = 3
list_b = []
for i in list_a:
    if i < var_e:
        list_b.append(i)
var_f = len(list_b)
print(int(var_f))
Category: Geometry

Question (EN): The perimeter of the eastern lake has 96 trees at 10m (m) intervals, and the perimeter of the western lake has 82 trees at 20 m (m) intervals. What is the difference between the circumferences of the two lakes in meters (m)?
Question (KO): 동쪽에 있는 호수의 둘레에는 10미터(m) 간격으로 96그루의 나무가 있고 서쪽에 있는 호수의 둘레에는 20미터(m) 간격으로 82그루의 나무가 있습니다. 두 호수의 둘레의 차는 몇 미터(m)입니까?

Answer: 680

Solution (Python):
var_a = 10
var_b = 96
var_c = var_a * var_b
var_d = 20
var_e = 82
var_f = var_d * var_e
var_g = var_c - var_f
var_h = abs(var_g)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): When the box containing 10 cups was weighed, it was 3.1 kg (kg). When you removed one cup from this box, its weight changed to 2.81 kilograms (kg). Find the weight of the empty box in kilograms (kg).
Question (KO): 컵 10개가 들어있는 상자의 무게를 재었더니 3.1킬로그램(㎏)이었습니다. 이 상자에서 컵 1개를 빼고 무게를 재었더니 2.81킬로그램(㎏)이었습니다. 빈 상자의 무게는 몇 킬로그램(㎏)인지 구해보세요

Answer: 0.2

Solution (Python):
var_a = 3.1
var_b = 3.1
var_c = 2.81
var_d = var_b - var_c
var_e = 10
var_f = var_d * var_e
var_g = var_a - var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Arithmetic calculation

Question (EN): What is the sum of the second largest and second smallest odd numbers from 1 to 15?
Question (KO): 1부터 15까지의 홀수 중에서 2번째로 큰 수와 2번째로 작은 수의 합은 얼마입니까?

Answer: 16

Solution (Python):
var_a = 1
var_b = 15
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 = 2
list_b=list_a.copy()
list_b.sort()
var_d = list_b[-var_c]
var_e = 2
list_c=list_a.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = var_d + var_f
print(int(var_g))
Category: Correspondence

Question (EN): Ji-woo and Seunghye saw the same number, but Jiwoo shifted the decimal point of the number one space to the right by mistake. If the difference of the number Seunghye saw and the number Jiwoo saw is 37.35, what is the number that Seunghye saw?
Question (KO): 지우와 승혜는 서로 같은 숫자를 봤는데 지우가 그 숫자의 소수점의 위치를 원래의 위치에 비해 오른쪽으로 한칸 있는 곳에 있다고 착각했습니다. 승혜가 본 숫자와 지우가 착각한 숫자의 차가 37.35일때 승혜가 본 숫자는 얼마인지 구하시오.

Answer: 4.15

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

Question (EN): There are 4 different chairs. When two people want to sit down, in how many ways can they sit?
Question (KO): 서로 다른 4개의 의자가 있습니다. 2명이 앉으려고 할 때, 앉을 수 있는 방법은 모두 몇 가지입니까?

Answer: 6

Solution (Python):
var_a = 4
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: Geometry

Question (EN): A rectangular room has sides with three different areas of 4 square centimetres (cm2) , 3 square centimetres (cm2) , and 6 square centimetres (cm2) , respectively. How many square tiles measuring 1 square centimetre (cm2) are needed to cover all the walls, floor, and ceiling of this room?
Question (KO): 어떤 직육면체 방의 3면의 넓이가 각각 4제곱센티미터(㎠) , 3제곱센티미터(㎠) , 6제곱센티미터(㎠)입니다. 이 방에 모든 벽과 바닥에 1제곱센티미터(㎠)크기의 정사각형 타일을 붙이려면 몇 개가 필요합니까?

Answer: 26

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

Question (EN): There are single-digit numbers A and B. If A56B made using these two is divisible by 36, how many numbers are there for A?
Question (KO): 한 자리 수 A와 B가 있습니다. 이 둘을 이용해 만든 A56B가 36으로 나누어 떨어질 때, A에 알맞은 숫자는 모두 몇 개인지 구하시오.

Answer: 3

Solution (Python):
var_a = 'A56B'
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 = 36
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 = 'A56B'
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: Arithmetic calculation

Question (EN): There are five numbers 10, 11, 12, 13, and 14. What is the remainder of the largest number divided by the next largest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 가장 큰 수와 그 다음으로 큰 수로 나눈 나머지는 얼마입니까?

Answer: 1

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
var_e = 14
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=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[-var_h]
var_j = var_g % var_i
print(int(var_j))
Category: Geometry

Question (EN): A cuboid has a volume of 28 cubic centimeters (cm3) and a height of 4 centimeters (cm). What is the area of the base?
Question (KO): 어떤 직육면체의 부피가 28세제곱센티미터(㎤) 이고 높이가 4센티미터(㎝)이다. 밑면의 넓이는 얼마입니까?

Answer: 7

Solution (Python):
var_a = 28
var_b = 4
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Minji drank 0.26 liters (L) of water in the morning and 0.37 liters (L) in the afternoon. How many liters (L) of water did Minji drink today?
Question (KO): 민지는 오늘 물을 오전에 0.26리터(L) 마셨고 오후에 0.37리터(L) 마셨습니다. 민지가 오늘 마신 물은 모두 몇 리터(L)입니까?

Answer: 0.63

Solution (Python):
var_a = 0.26
var_b = 0.37
var_c = var_a + var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Correspondence

Question (EN): When 14A+2B3=418, what number should go in A?
Question (KO): 14A+2B3=418일 때, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 5

Solution (Python):
var_a = '14A+2B3=418'
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: Correspondence

Question (EN): A number must be divided by 8, but when you accidentally divide it by 7, the quotient is 12 and the remainder is 5. Find what the quotient would be if calculated correctly.
Question (KO): 어떤 수를 8로 나누어야 하는데 실수로 7로 나누었더니 몫이 12이고 나머지가 5였다. 올바르게 계산했을 때 몫이 얼마일지 구하여라.

Answer: 11

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

Question (EN): When 52.5 kg (kg) of sweet potato is divided by 5 kg (kg) per person, find how many grams (g) of sweet potato are left after sharing.
Question (KO): 고구마 52.5킬로그램(㎏)을 한 사람 당 5킬로그램(㎏)씩 나누어 줄 때, 나누어 주고 남는 고구마는 몇 그램(g)인지 구하시오.

Answer: 2500

Solution (Python):
var_a = 52.5
var_b = 5
var_c = var_a % var_b
var_d = 1000
var_e = var_c * var_d
print(int(var_e))
Category: Comparison

Question (EN): In the line, Seokjin stands 8th from the front and 6th from the back. Find the total number of students standing in the line.
Question (KO): 일렬로 선 줄에서 석진이는 앞에서 8번째, 뒤에서 6번째 자리에 서있습니다. 총 몇 명의 친구들이 줄을 서 있는지 구하시오.

Answer: 13

Solution (Python):
var_a = 8
var_b = 6
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): When you should multiply a number by 16 and add 8, you mistakenly divide it by 16 and the quotient is divided by 8. Find the correct calculated value.
Question (KO): 어떤 수에 16을 곱하고 8을 더해야 할 것을 잘못하여 16으로 나누었더니 몫이 8로 나누어떨어졌습니다. 바르게 계산한 값을 구하세요.

Answer: 2056

Solution (Python):
var_a = 8
var_b = 16
var_c = var_a * var_b
var_d = 16
var_e = var_c * var_d
var_f = 8
var_g = var_e + var_f
print(int(var_g))
Category: Geometry

Question (EN): I made a rectangle by arranging 4 Go stones horizontally on each row and 8 vertically on each column. How many Go stones are at the perimeter?
Question (KO): 바둑돌을 가로로 4개씩, 세로로 8개씩 빈틈없이 늘어놓아 직사각형을 만들었습니다. 둘레에 놓인 바둑돌은 몇 개입니까?

Answer: 20

Solution (Python):
var_a = 4
var_b = 8
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
var_f = 4
var_g = var_e - var_f
print(int(var_g))
Category: Correspondence

Question (EN): I made a mistake and added 7/5 to this particular number, when I had to subtract 7/5 from this number and then multiply it by 5, and it became 81/20. Find the rightly calculated value.
Question (KO): 어떤 수에 7/5을 빼고 5를 곱해야 할 것을 잘못하여 7/5를 더했더니 81/20이 되었습니다. 바르게 계산한 값을 구하시오.

Answer: 6.25

Solution (Python):
var_a = 4.05
var_b = 1.4
var_c = var_a - var_b
var_d = 1.4
var_e = var_c - var_d
var_f = 5
var_g = var_e * var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Find the sum of the largest and smallest three-digit numbers whose hundreds digit is 4 and whose tens digit is 8.
Question (KO): 백의 자리 숫자가 4이고 십의 자리 숫자가 8인 세 자리 수 중에서 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 969

Solution (Python):
var_a = 4
var_b = 8
var_c = 'A'
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=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
ans_dict = dict()
var_d = str(var_d)
list_b = []
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_d):
    if v in variable_candi:
        ans_dict[v] = 0
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_d
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    if len(var_d) == len(str(int(temp))):
        new_elem = int(temp)
        list_b.append(new_elem)
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 1
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i))
Category: Geometry

Question (EN): A rectangular parallelepiped is 9 centimeters (cm) wide and 7 centimeters (cm) long. If the volume is 315 square centimeters (cm2), how many centimeters (cm) is the height of this cuboid?
Question (KO): 가로의 길이가 9센티미터(㎝), 세로의 길이가 7센티미터(㎝)인 직육면체가 있습니다. 부피가 315제곱센티미터(㎠) 이라면, 이 직육면체의 높이는 몇 센티미터(㎝)입니까?

Answer: 5

Solution (Python):
var_a = 315
var_b = 9
var_c = var_a / var_b
var_d = 7
var_e = var_c / var_d
print(int(var_e))
Category: Possibility

Question (EN): You are trying to find the case of choosing two different fruits. There are fruits including apples, peaches, pears, melons, and tangerines. How many cases are available?
Question (KO): 서로 다른 2가지 과일을 고르는 경우를 구하려고 합니다. 과일은 사과, 복숭아, 배, 참외, 귤이 있습니다. 이때 경우는 모두 몇 가지입니까?

Answer: 10

Solution (Python):
var_a = 'apples'
var_b = 'peaches'
var_c = 'pears'
var_d = 'melons'
var_e = 'tangerines'
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)
for i, elem in enumerate(range(var_g)):
    var_h = var_h / (i+1)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): In a toy factory, machine A makes 288 toys in 12 days, and machine B makes 243 toys in 9 days. Find the difference between the number of toys made per day by the two machines.
Question (KO): 장난감 공장에서 기계 A는 12일 동안 288개의 장난감을 만들고, 기계 B는 9일 동안 243개의 장난감을 만든다. 두 기계가 하루에 만든 장난감 개수의 차이를 구하시오.

Answer: 3

Solution (Python):
var_a = 288
var_b = 12
var_c = var_a / var_b
var_d = 243
var_e = 9
var_f = var_d / var_e
var_g = var_c - var_f
var_h = abs(var_g)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): A basket full of persimmons of the same size and weight weighed 62 kilograms (kg). After removing half of the persimmons, I weighed them together with the basket and found that they weighed 34 kilograms (kg). What is the weight of the basket without the persimmons?
Question (KO): 크기와 무게가 같은 감을 바구니에 가득 담아 무게를 재었더니 62킬로그램(㎏)이었습니다. 이 중 절반의 감을 덜어낸 후에 바구니와 함께 무게를 재어 보니 34킬로그램(㎏)이 되었습니다. 바구니만의 무게는 몇 킬로그램(㎏)입니까?

Answer: 6

Solution (Python):
var_a = 62
var_b = 62
var_c = 34
var_d = var_b - var_c
var_e = 2
var_f = var_d * var_e
var_g = var_a - var_f
print(int(var_g))