philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Yuna had 23 candies, but after eating a few, there are 7 left. How many candies did Yuna eat?
Question (KO): 유나에게 23개의 사탕이 있었는데 몇 개를 먹었더니 7개가 남았다. 유나가 먹은 사탕의 수는?

Answer: 16

Solution (Python):
var_a = 23
var_b = 7
var_c = var_a - var_b
print(int(var_c))
Category: Comparison

Question (EN): The height of 5 of the dwarves next to Snow White is measured. The average was 81.6 centimeters (cm), and the average height without the tallest, Red, was 6 centimeters (cm) lower than the average height without the shortest, Green. If the heights of Blue, Black, and Yellow are 88 centimeters (cm), 84 centimeters (cm), and 76 centimeters (cm), find the height of Green.
Question (KO): 백설 공주 옆의 난쟁이 중 5명의 키를 쟀다. 평균이 81.6센티미터(㎝)가 나왔고, 제일 키가 큰 빨강이의 키를 뺀 나머지의 평균이 제일 작은 초록이의 키를 뺀 평균보다 6센티미터(㎝) 낮았다. 파랑이, 검정이, 노랑이의 키가 88센티미터(㎝), 84센티미터(㎝), 76센티미터(㎝)라고 할 때, 초록이의 키를 구하라.

Answer: 68

Solution (Python):
var_a = 81.6
var_b = 5
var_c = var_a * var_b
var_d = 88
var_e = 84
var_f = var_d + var_e
var_g = 76
var_h = var_f + var_g
var_i = var_c - var_h
var_j = 6
var_k = 4
var_l = var_j * var_k
var_m = var_i - var_l
var_n = 2
var_o = var_m / var_n
print(int(var_o))
Category: Arithmetic calculation

Question (EN): Yoongi bought a 200-page book and read 12 pages each day for two weeks. Find out how many pages Yoongi has not read.
Question (KO): 윤기는 200쪽짜리 책 한 권을 사서 매일 12쪽씩 2주일 동안 읽었습니다. 윤기가 읽지 않은 부분은 몇 쪽인지 구하시오.

Answer: 32

Solution (Python):
var_a = 200
var_b = 12
var_c = 2
var_d = var_b * var_c
var_e = 7
var_f = var_d * var_e
var_g = var_a - var_f
print(int(var_g))
Category: Correspondence

Question (EN): 3 times a number minus 8 minus 2 equals the number. Find the number.
Question (KO): 어떤 수의 3배에서 8을 빼고 2를 뺀 값은 어떤 수와 같다. 어떤 수를 구하시오.

Answer: 5

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

Question (EN): A box of apples weighs 1.3 kilograms (kg), and a box of pears weighs 1100 grams (g). If you have one box of apples and one box of pears, which one is heavier?
Question (KO): 사과 한 박스의 무게는 1.3킬로그램(㎏)이고, 배 한 박스의 무게는 1100그램(g)입니다. 사과와 배가 한 박스씩 있다고 할 때, 둘 중 어느 것이 더 무겁습니까?

Answer: apples

Solution (Python):
var_a = 'apples'
var_b = 'pears'
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 = 1.3
var_d = 1000
var_e = var_c * var_d
var_f = 1100
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: Possibility

Question (EN): You are trying to make a signal by turning three light bulbs on or off. How many signals can you make?
Question (KO): 3개의 전구를 켜거나 꺼서 신호를 만드려고 합니다. 만들 수 있는 신호는 모두 몇 가지입니까?

Answer: 8

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

Question (EN): The difference between the number of red and blue marbles is 12. Also, the total number of marbles is 40 more than the difference between the number of red and blue marbles. What is the product of the number of blue ones times the number of red ones?
Question (KO): 빨간 구슬과 파란 구슬의 개수 차이가 12개이다. 또 전체 구슬의 수는 빨간 구슬과 파란 구슬의 개수 차이보다 40이 많다. 파란 구슬의 개수와 빨간 구슬의 개수를 곱하면 얼마인지 구하시오

Answer: 640

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

Question (EN): Find the difference between the largest and the 4th largest number of 8, 0, 3, 7, 5, 2, 4.
Question (KO): 8, 0, 3, 7, 5, 2, 4 중 가장 큰 수와 4번째로 큰 수의 차이를 구하시오.

Answer: 4

Solution (Python):
var_a = 8
var_b = 0
var_c = 3
var_d = 7
var_e = 5
var_f = 2
var_g = 4
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
list_b=list_a.copy()
list_b.sort()
var_i = list_b[-var_h]
var_j = 4
list_c=list_a.copy()
list_c.sort()
var_k = list_c[-var_j]
var_l = var_i - var_k
print(int(var_l))
Category: Geometry

Question (EN): rectangle with an area of 59.6 square centimeters (cm2) is divided into 4 equal parts. What is the area of one part?
Question (KO): 넓이가 59.6제곱센티미터(㎠)인 직사각형을 4 등분하였습니다. 1등분의 넓이는 얼마입니까?

Answer: 14.9

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

Question (EN): Let the length of the two diagonals of a rhombus be 4 centimeters (cm). Find the area of this rhombus.
Question (KO): 어떤 마름모의 두 대각선의 길이가 4센티미터(㎝)라고 합니다. 이 마름모의 넓이를 구하시오.

Answer: 8

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

Question (EN): Eight people will share one watermelon. If there are 4 watermelons, how many people can share them?
Question (KO): 수박 1개를 8명이 나눠 먹습니다. 수박이 4개 있으면 몇 명이 나눠 먹을 수 있나요?

Answer: 32

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

Question (EN): How many numbers not less than 40 and less than 80 are multiples of 8?
Question (KO): 40 이상 80 미만인 수 중에서 8의 배수에 해당되는 수는 모두 몇 개입니까?

Answer: 5

Solution (Python):
var_a = 40
var_b = 80
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
var_f = 8
list_b = []
var_f = int(var_f)
for i in list_a:
    i = int(i)
    if i % var_f == 0:
        list_b.append(i)
var_g = len(list_b)
print(int(var_g))
Category: Comparison

Question (EN): The students are lined up in the order of Jungkook, Minyoung, and Taehyung. Who is the third person in line?
Question (KO): 학생들이 정국, 민형, 태형 순으로 줄을 섰습니다. 3번째에 줄을 선 사람은 누구인가요?

Answer: Taehyung

Solution (Python):
var_a = 'Jungkook'
var_b = 'Minyoung'
var_c = 'Taehyung'
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
var_e = list_a[var_d-1]
print(var_e)
Category: Comparison

Question (EN): Students stand in a line. Nakyung takes the 5th from the front and is the last person. How many students are in line?
Question (KO): 학생들이 한 줄로 서 있습니다. 나경이는 앞에서 5번째에 서 있고 가장 마지막 사람입니다. 줄을 서 있는 학생은 모두 몇 명입니까?

Answer: 6

Solution (Python):
var_a = 5
var_b = 1
var_c = var_a + var_b
print(int(var_c))
Category: Correspondence

Question (EN): I want to subtract this number from 20. I mistakenly added this number to 40, and the result was 52. What is the result of the correct calculation?
Question (KO): 20에 어떤 수를 빼려고 합니다. 잘못하여 40에 어떤 수를 더했더니 결과는 52가 되었습니다. 바르게 계산한 결과는 얼마일까요?

Answer: 8

Solution (Python):
var_a = 20
var_b = 52
var_c = 40
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): You brought 18 more chickens on the first day and 12 more chickens on the second day to the farm, which originally raised 45 chickens. Find the number of increased chickens since the beginning.
Question (KO): 닭 45마리를 키우는 농장에 첫번째 날 닭 18마리를 더 사오고, 두번째 날에는 12마리의 닭을 더 사왔다. 처음에 키우던 닭보다 몇 마리의 닭이 늘었는지 구하시오.

Answer: 30

Solution (Python):
var_a = 18
var_b = 12
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): (a), (b), and (c) are all pyramids. If the sum of the vertices of the three pyramids is 40, what is the sum of the edges of the three pyramids?
Question (KO): (가), (나), (다)는 모두 각뿔입니다. 세 각뿔의 꼭짓점의 수의 합이 40일때 세 각뿔의 모서리의 수의 합은 모두 몇 개입니까?

Answer: 74

Solution (Python):
var_a = 40
var_b = 3
var_c = var_a - var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Hyeon-joo saves an average of 7,000 won a week. How many weeks will it take for Hyeon-Joo to save 100,000 won?
Question (KO): 현주는 일주일에 평균 7000원씩 저금을 한다. 현주가 계속 저금하여 100000원을 모으려면 몇 주가 걸리겠는가?

Answer: 15

Solution (Python):
var_a = 100000
var_b = 7000
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: Possibility

Question (EN): Write the number that can fit in the hundredth place when using the given number cards 7, 5, and 2 once to make a number greater than 520 and less than 710.
Question (KO): 주어진 숫자 카드 7, 5, 2를 한 번 사용하여 520보다 크고 710보다 작은 수를 만들 때 백의 자리에 들어갈 수 있는 수를 쓰십시오.

Answer: 5

Solution (Python):
var_a = 7
var_b = 5
var_c = 2
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 = 520
list_c = []
for i in list_b:
    if i > var_e:
        list_c.append(i)
var_f = 710
list_d = []
for i in list_c:
    if i < var_f:
        list_d.append(i)
var_g = 1
var_h = list_d[var_g-1]
list_e = []
var_h = int(var_h)
while var_h//10 > 0:
    list_e.append(var_h%10)
    var_h = var_h//10
list_e.append(var_h%10)
list_e = list_e[::-1]
var_i = 1
var_j = list_e[var_i-1]
print(int(var_j))
Category: Comparison

Question (EN): There is a radish field and a cabbage field with a length of 364 meters (m). When radishes are planted at intervals of 22.75 meters (m) and cabbages are planted at intervals of 45.5 meters (m), find out which of radishes and cabbages was planted more.
Question (KO): 길이가 364 미터(m) 인 무밭과 배추밭이 있습니다. 무는 22.75 미터(m) 간격으로, 배추는 45.5 미터(m) 간격으로 각각 심어져 있을 때, 무와 배추 중 어느 것을 더 많이 심었는지 구하시오.

Answer: radish

Solution (Python):
var_a = 'radish'
var_b = 'cabbage'
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 = 364
var_d = 22.75
var_e = var_c / var_d
var_f = 364
var_g = 45.5
var_h = var_f / var_g
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Geometry

Question (EN): A figure with one side of 16 centimeters (cm) and all sides of the same length has a perimeter of 80 centimeters (cm). How many sides does this figure have?
Question (KO): 한 변의 길이가 16센티미터(㎝)이고, 모든 변의 길이가 같은 도형의 둘레는 80센티미터(㎝)입니다. 이 도형은 총 몇 개의 변으로 이루어져 있습니까?

Answer: 5

Solution (Python):
var_a = 80
var_b = 16
var_c = var_a / var_b
print(int(var_c))
Category: Possibility

Question (EN): How many cases are there to choose and study two subjects among English, Mathematics, and Korean?
Question (KO): 영어, 수학, 국어 중 2개 과목을 골라서 공부하는 경우는 모두 몇 가지 입니까?

Answer: 3

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

Question (EN): If a pencil sold at a store is 200 won cheaper than 5,000 won, find the price of the pencil in units of 10,000 won.
Question (KO): 어느 가게에서 파는 연필이 5천원보다 2백원 쌀 때, 연필의 가격을 만원 단위로 구하시오.

Answer: 0.48

Solution (Python):
var_a = 5000
var_b = 200
var_c = var_a - var_b
var_d = 10000
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Comparison

Question (EN): There are 5 and 6 rows of cars parked on either side of the father's car in the parking lot, 6 and 7 rows of cars parked in the front and back. Assuming the number of cars in each row is the same, how many cars are in the parking lot?
Question (KO): 주차장에 세워진 아빠의 차의 양옆에는 각각 5, 6줄의 차들이 주차되어 있고, 앞뒤에는 각각 6, 7줄의 차들이 주차되어 있다면 각 줄마다 있는 자동차의 수가 같다고 할 때, 주차장에 세워진 차들은 모두 몇 대입니까?

Answer: 168

Solution (Python):
var_a = 5
var_b = 6
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
var_f = 6
var_g = 7
var_h = var_f + var_g
var_i = 1
var_j = var_h + var_i
var_k = var_e * var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): How many two-digit numbers are divisible by 3?
Question (KO): 3으로 나누어 떨어질 수 있는 두 자리 수는 모두 몇 개 있습니까?

Answer: 30

Solution (Python):
var_a = 10
var_b = 99
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
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 = len(list_b)
print(int(var_e))
Category: Arithmetic calculation

Question (EN): You want to divide candies equally among the students, but if you distribute 7 candies to all students, 12 candies are in short, and if you distribute 3 candies, 20 candies are left over. If the number of students is A and the number of candies is B, find the value of A+B.
Question (KO): 학생들에게 사탕을 똑같이 나누어 주려고 하는데 모든 학생들에게 7개씩 나누어 주면 12개가 모자라고, 3개씩 나누어 주면 20개가 남는다고 한다. 학생 수를 A명, 사탕의 개수를 B개라 할 때, A+B의 값을 구하여라.

Answer: 52

Solution (Python):
var_a = 20
var_b = 12
var_c = var_a + var_b
var_d = 7
var_e = 3
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 7
var_i = var_g * var_h
var_j = 12
var_k = var_i - var_j
var_l = 20
var_m = 12
var_n = var_l + var_m
var_o = 7
var_p = 3
var_q = var_o - var_p
var_r = var_n / var_q
var_s = var_k + var_r
print(int(var_s))
Category: Arithmetic calculation

Question (EN): Find the sum of the aliquots of 32 that are not aliquots of 8.
Question (KO): 32의 약수들 중에서 8의 약수가 아닌 수들의 총합을 구하시오.

Answer: 48

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 = 8
list_b = []
num_sqrt = int(math.sqrt(var_b))
for i in range(1, num_sqrt+1):
    if var_b % i == 0:
        list_b.append(i)
        list_b.append(int(var_b/i))
list_b = sorted(set(list_b))
list_c = list(set(list_a) - set(list_b))
list_c = [float(i) for i in list_c]
var_c = sum(list_c)
print(int(var_c))
Category: Arithmetic calculation

Question (EN): A children's book was placed on one side of the two-arm scale, and two 0.3 kilograms (kg) dolls and 0.5 kilograms (kg) toy cars were placed on the other side. How many kilograms (kg) is one children's book?
Question (KO): 양팔 저울의 한 쪽에는 동화책 한 권을 올려두고, 다른 쪽에는 0.3킬로그램(㎏)짜리 인형 2개와 0.5킬로그램(㎏)짜리 장난감 자동차를 올려두었더니 수평이 되었습니다. 동화책은 한 권은 몇 킬로그램(㎏)일까요?

Answer: 1.1

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

Question (EN): There is a rectangle with a length of 10 centimeters (cm) and a width of 8 centimeters (cm) and a square with the same perimeter. Find the length of one side of this square.
Question (KO): 가로 10센티미터(㎝), 세로 8센티미터(㎝)인 직사각형과 둘레의 길이가 같은 정사각형이 있습니다. 이 정사각형의 한 변의 길이를 구하시오.

Answer: 9

Solution (Python):
var_a = 10
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: Possibility

Question (EN): You are about to make a three-digit number by selecting three from 0, 2, 4, and 6 and using them only once. What is the sum of the largest and smallest possible numbers.
Question (KO): 0, 2, 4, 6 중에서 3개 뽑아 한 번씩만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 846

Solution (Python):
var_a = 0
var_b = 2
var_c = 4
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 = 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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 1
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): What is the product of the numbers 4, 6, 7, and 14?
Question (KO): 숫자 4, 6, 7, 14의 곱은 얼마입니까?

Answer: 2352

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

Question (EN): Rounding 42A3 to the hundreds place makes it 4300. How many possible A's are there?
Question (KO): 42A3을 반올림하여 백의 자리까지 나타내면 4300이 됩니다. 가능한 A는 모두 몇 개입니까?

Answer: 5

Solution (Python):
var_a = '42A3'
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 = 4300
var_c = 50
var_d = var_b - var_c
list_b = []
for i in list_a:
    if i >= var_d:
        list_b.append(i)
var_e = 4300
var_f = 50
var_g = var_e + var_f
list_c = []
for i in list_b:
    if i < var_g:
        list_c.append(i)
var_h = '42A3'
var_i = 'A'
var_h = str(var_h)
var_i = str(var_i)
unk_idx = var_h.index(var_i)
list_d = []
for elem in list_c:
    elem = str(elem)
    list_d.append(int(elem[unk_idx]))
list_d = list(set(list_d))
var_j = len(list_d)
print(int(var_j))
Category: Correspondence

Question (EN): Dividing a number by 6 gives a remainder of 4, dividing a number by 8 leaves a remainder of 6, and dividing a number by 10 leaves a remainder of 8. Find the smallest number that satisfies the above condition.
Question (KO): 어떤 수를 6으로 나누면 4가 남고 8로 나누면 6이 남고 10으로 나누면 8이 남는다. 이러한 수 중 가장 작은 수를 구하시오.

Answer: 118

Solution (Python):
var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
var_e = 4
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 8
var_g = 6
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 10
var_i = 8
list_d = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_c:
    i = int(i)
    if i%var_h == var_i:
        list_d.append(i)
var_j = 1
list_e=list_d.copy()
list_e.sort()
var_k = list_e[var_j-1]
print(int(var_k))
Category: Arithmetic calculation

Question (EN): There is a square with a side length of 12 centimeters (cm). If the area of the new rectangle made by increasing the horizontal length of this square by 3 centimeters (cm) and reducing the vertical length by A centimeters (cm) is 120 square cm (cm2), find the value of A.
Question (KO): 한 변의 길이가 12 센티미터(㎝)인 정사각형이 있다. 이 정사각형의 가로의 길이를 3 센티미터(㎝)만큼 늘이고, 세로의 길이를 A 센티미터(㎝)만큼 줄여서 만든 직사각형의 넓이가 120제곱센티미터(㎠)일 때, A의 값을 구하시오.

Answer: 4

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

Question (EN): There are 12 crates of 200 and 150 in total. When 2180 apples were divided into these boxes, leaving 30 apples. How many boxes of 200 are there?
Question (KO): 200개짜리 상자와 150개짜리 상자가 총 12개 있습니다. 2180개의 사과를 이 상자에 나누어 담았더니 30개가 남았습니다. 200개짜리 상자는 몇 상자인가요?

Answer: 7

Solution (Python):
var_a = 2180
var_b = 30
var_c = var_a - var_b
var_d = 150
var_e = 12
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 200
var_i = 150
var_j = var_h - var_i
var_k = var_g / var_j
print(int(var_k))
Category: Comparison

Question (EN): Yoongi has 4 apples and Jungkook has 6 plus 3 apples. Who has more apples?
Question (KO): 윤기는 4개, 정국이는 6에 3을 합1개수의 사과를 가지고 있습니다. 누가 더 사과를 많이 가지고 있습니까?

Answer: Jungkook

Solution (Python):
var_a = 'Yoongi'
var_b = 'Jungkook'
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 = 6
var_e = 3
var_f = var_d + var_e
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
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): Taesoo read a 161-page storybook for a week. How many pages did he read on average per day?
Question (KO): 태수는 161쪽짜리 동화책을 일주일 동안 읽었습니다. 하루에 평균 몇 쪽을 읽었는가?

Answer: 23

Solution (Python):
var_a = 161
var_b = 7
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): When 68A+3=691, find what A is.
Question (KO): 68A+3=691일 때, A를 구하시오.

Answer: 8

Solution (Python):
var_a = '68A+3=691'
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))