philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): There are 11 bamboo trees in the forest. The average length of these bamboos is 145.7 centimeters (cm) and the average length of two of the bamboos is 142.1 centimeters (cm). Find the average of the lengths of the remaining bamboos.
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: Correspondence

Question (EN): When you divide a number by 3, you get 27. Find the value of a number divided by 9.
Question (KO): 어떤 수를 3으로 나누었더니 27이 되었습니다. 어떤 수를 9로 나눈 값을 구하시오.

Answer: 9

Solution (Python):
var_a = 27
var_b = 3
var_c = var_a * var_b
var_d = 9
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): 41 is the result of mistakenly subtracting 15 from a certain number and adding 27, instead of subtracting 27 and adding 15. What do you get when you calculate correctly?
Question (KO): 41은 어떤 수에서 27을 빼고 15를 더해야 하는데 실수로 15를 빼고 27을 더하여 나온 결과이다. 바르게 계산하면 어떻게 되는가?

Answer: 17

Solution (Python):
var_a = 41
var_b = 27
var_c = var_a - var_b
var_d = 15
var_e = var_c + var_d
var_f = 27
var_g = var_e - var_f
var_h = 15
var_i = var_g + var_h
print(int(var_i))
Category: Comparison

Question (EN): Suppose that there are two numbers A and B. A is 7 greater than 50. B is 7 less than 6 groups of 10. 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: Possibility

Question (EN): There are five number cards 1, 3, 5, 7, and 9. How many 3-digit natural numbers can be made using this card that are less than 500? (The card can be used repeatedly.)
Question (KO): 1, 3, 5, 7, 9 다섯 장의 숫자카드가 있다. 이 카드를 사용하여 만들 수 있는 3자리 자연수 중 500미만인 수는 모두 몇 개인지 구하시오. (단, 카드는 중복사용 가능하다.)

Answer: 50

Solution (Python):
var_a = 1
var_b = 3
var_c = 5
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.product(list_b, repeat=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 = 500
list_c = []
for i in list_b:
    if i < var_g:
        list_c.append(i)
var_h = len(list_c)
print(int(var_h))
Category: Possibility

Question (EN): Find the number of common multiples of 12 and 36 that are less than 150.
Question (KO): 두 수 12, 36의 공배수 중에서 150보다 작은 수는 모두 몇 개인지 구하세요.

Answer: 4

Solution (Python):
var_a = 36
var_b = 150
var_c = 36
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = len(list_a)
print(int(var_d))
Category: Correspondence

Question (EN): When A is divided by 8, the quotient and remainder are 2 and 7, respectively. A is a natural number. Find A at this time.
Question (KO): A를 8으로 나누면 몫과 나머지가 각각 2과 7이 나옵니다. A는 자연수입니다. 이 때 A를 구하시오.

Answer: 23

Solution (Python):
var_a = 8
var_b = 2
var_c = var_a * var_b
var_d = 7
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): If you add all the natural numbers from 1 to a natural number, you get 91. Find a natural number.
Question (KO): 1부터 어떤 자연수까지 모두 더하면 91이 됩니다. 어떤 자연수를 구하시오.

Answer: 13

Solution (Python):
var_a = 91
var_b = 2
var_c = var_a * var_b
var_d = 0.5
var_e = var_c ** var_d
var_f = 1
var_g=int((var_e//(10**(var_f-1)))*10**(var_f-1))

print(int(var_g))
Category: Geometry

Question (EN): Find the number of diagonals of the nonagon.
Question (KO): 구각형의 대각선의 개수를 구하시오.

Answer: 27

Solution (Python):
var_a = 9
var_b = 9
var_c = 3
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: Arithmetic calculation

Question (EN): Dahyun is solving a math problem for homework. If she solved 1/3 of the total yesterday and 1/2 of the total today, how many times did the total number of math problems she solved in two days?
Question (KO): 다현이가 숙제로 수학 문제를 풀고 있습니다. 어제는 전체의 1/3을 풀었고, 오늘은 전체의 1/2를 풀었다면 이틀 동안 푼 수학 문제는 전체 문제의 몇 배입니까?

Answer: 0.83

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

Question (EN): The square-shaped cards are regularly arranged without gaps to form a large square. If the number of cards laid at the perimeter was 240, how many total cards in total were used?
Question (KO): 정사각형 모양의 카드를 빈틈없이 규칙적으로 늘어놓아 큰 정사각형을 만들었습니다. 둘레에 놓인 카드의 개수가 240개였다면, 사용한 카드 전체의 개수는 몇 개입니까?

Answer: 3721

Solution (Python):
var_a = 240
var_b = 4
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
var_f = 2
var_g = var_e ** var_f
print(int(var_g))
Category: Geometry

Question (EN): You have a square with a perimeter of 12/25 centimeters (cm). Find the length of one side of this square.
Question (KO): 둘레의 길이가 12/25센티미터(㎝)인 정사각형이 있습니다. 이 정사각형의 한 변의 길이를 구하시오.

Answer: 0.12

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

Question (EN): According to the equation, 21+AB=54, what number fits B?
Question (KO): 21+AB=54입니다. B는 얼마인가요?

Answer: 3

Solution (Python):
var_a = '21+AB=54'
var_b = 'B'
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): You want to multiply a number by 24. If the result you get when you mistakenly subtract 42 from this number is 50, what would be the correct result?
Question (KO): 어떤 수에 24를 곱하려고 합니다. 잘못하여 42를 뺐을 때의 답이 50이라면 바르게 계산한 결과는 얼마일까요?

Answer: 2208

Solution (Python):
var_a = 50
var_b = 42
var_c = var_a + var_b
var_d = 24
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Hyungyeong decided to do 18 hula hoops on the first day, twice the first day on the second day, and twice the second day on the third day. If Hyungyeong does the hula hoop in the same way, find out how many times she should do on the fourth day.
Question (KO): 현경이는 훌라후프를 첫째 날에는 18번을 하고, 둘째 날에는 첫째 날의 2배, 셋째 날에는 둘째 날의 2배를 하기로 했습니다. 현경이가 같은 방법으로 훌라후프를 한다면 넷째 날에는 모두 몇 번 해야 하는지 구해 보시오.

Answer: 144

Solution (Python):
var_a = 18
var_b = 2
var_c = 4
var_d = 1
var_e = var_c - var_d
var_f = var_b ** var_e
var_g = var_a * var_f
print(int(var_g))
Category: Geometry

Question (EN): If the length of the base of the parallelogram is 9 centimeters (cm) and the area is 33.3 square centimeters (cm2), find the height of the parallelogram.
Question (KO): 평행사변형의 밑변의 길이는 9센티미터(㎝)이고 넓이는 33.3제곱센티미터(㎠)일 때, 이 평행사변형의 높이를 구하시오.

Answer: 3.7

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

Question (EN): There is a triangle A with a base of 3 centimeters (cm) and a height of 2 centimeters (cm) and a triangle B with a base of 3 centimeters (cm) and a height of 6.02 centimeters (cm). How many times the area of A is the area of B?
Question (KO): 밑변이 3센티미터(㎝) 이고 높이가 2센티미터(㎝) 인 삼각형 A와 밑변이 3센티미터(㎝) 이고 높이가 6.02 센티미터(㎝) 인 삼각형 B가 있습니다. A의 넓이는 B의 넓이의 몇 배일까요?

Answer: 3.01

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

Question (EN): There are two different numbers A and B. Find the sum of A and B in the two-digit subtraction equation 7A-B5=34.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 두 자리 수끼리의 뺄셈식 7A-B5=34에서 A와 B의 합을 구하시오.

Answer: 13

Solution (Python):
var_a = '7A-B5=34'
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]
var_d = '7A-B5=34'
var_e = 'B'
ans_dict = dict()
var_d = var_d.replace('×','*')
var_d = var_d.replace('x','*')
var_d = var_d.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_d):
    if v in variable_candi:
        ans_dict[v] = 1
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]))
    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_d):
        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_f = ans_dict[var_e]
var_g = var_c + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): At the first station of the train with 332 people, 119 people got on and 113 got off, and at the secone station 95 got off and 86 got on. How many people are currently on the train?
Question (KO): 332명이 타고 있는 기차의 첫번째 정류장에서 119명이 타고 113명이 내렸으며 두번째 정류장에서는 95명이 내리고 86명이 탔습니다. 현재 기차에 남아 있는 사람은 몇 명일까요?

Answer: 329

Solution (Python):
var_a = 332
var_b = 119
var_c = 113
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 86
var_g = 95
var_h = var_f - var_g
var_i = var_e + var_h
print(int(var_i))
Category: Comparison

Question (EN): Invite three students to class and ask them to name a number that comes to mind. The average of the numbers spoken by the first two people was 23 greater than the average of the numbers spoken by the three people, and the average of the numbers spoken by the next two people was 17 less than the average of the total. When the second person said 66, how much did the third student say?
Question (KO): 반에 세 명의 학생을 불러 생각나는 숫자를 말해보게 했다. 세 사람이 말한 수의 평균보다 앞의 두 사람이 말한 수의 평균이 23 더 컸고, 뒤의 두 사람이 말한 평균은 전체의 평균보다 17 작았다. 두 번째 사람이 66을 말했을 때, 세 번째 학생은 얼마를 말하였는가?

Answer: 8

Solution (Python):
var_a = 23
var_b = 6
var_c = var_a * var_b
var_d = 66
var_e = var_c - var_d
var_f = 2
var_g = var_e * var_f
var_h = 66
var_i = -1
var_j = var_h * var_i
var_k = 17
var_l = 6
var_m = var_k * var_l
var_n = -1
var_o = var_m * var_n
var_p = var_j + var_o
var_q = var_g + var_p
var_r = 3
var_s = -1
var_t = var_r * var_s
var_u = var_q / var_t
print(int(var_u))
Category: Comparison

Question (EN): Jiwoo read 32 pages and Heesu read 39 pages in the morning. In the evening, Jiwoo read 12 more pages than in the morning, and Heesu read 9 fewer pages than in the morning. Who read less children's books today in total?
Question (KO): 아침에 책을 지우는 32쪽, 희수는 39쪽 읽었다.저녁에 지우는 아침보다 12쪽 더 많이 읽고, 희수는 아침보다 9쪽 덜 읽었다. 오늘 동화책을 가장 덜 읽은 사람은 누구인가?

Answer: Heesu

Solution (Python):
var_a = 'Jiwoo'
var_b = 'Heesu'
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 = 32
var_d = 32
var_e = 12
var_f = var_d + var_e
var_g = var_c + var_f
var_h = 39
var_i = 39
var_j = 9
var_k = var_i - var_j
var_l = var_h + var_k
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[var_m-1]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p)
Category: Correspondence

Question (EN): If you subtract 12 from a number and multiply it by 5, you get 40. Find the number.
Question (KO): 어떤 수에서 12를 빼고 5를 곱하면 40이 됩니다. 어떤 수를 구하시오.

Answer: 20

Solution (Python):
var_a = 40
var_b = 5
var_c = var_a / var_b
var_d = 12
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): When I tried to hand out 98 sheets of colored drawing paper equally to 12 students, I was short of a few sheets. I'm going to buy more sheets of colored drawing paper to hand out the colored drawing paper equally. If a sheet of colored drawing paper costs 450 won, at least how much do I need?
Question (KO): 색 도화지 98장을 12명의 학생에게 똑같이 나누어 주려고 하였더니 몇 장이 모자랐습니다. 색 도화지를 남김없이 똑같이 나누어 주기 위해 색 도화지를 더 사려고 합니다. 색 도화지 한 장이 450원이라면 적어도 얼마가 필요합니까?

Answer: 4500

Solution (Python):
var_a = 12
var_b = 98
var_c = 12
var_d = var_b % var_c
var_e = var_a - var_d
var_f = 450
var_g = var_e * var_f
print(int(var_g))
Category: Geometry

Question (EN): A rhombus has a long diagonal of 5/6 meters (m) and a short diagonal of 4/6 meters (m). Find the difference in meters (m) between the diagonals of this rhombus.
Question (KO): 긴 대각선의 길이가 5/6미터(m)이고, 짧은 대각선의 길이가 4/6미터(m)인 마름모가 있습니다. 이 마름모의 대각선 길이의 차는 몇 미터(m)인지 구하시오.

Answer: 0.17

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

Question (EN): One edge in some dice is 15 centimeters (cm) long. Find the sum of the lengths of all edges of this dice.
Question (KO): 어떤 주사위는 한 모서리의 길이가 15센티미터(㎝)라고 합니다. 이 주사위의 모든 모서리의 길이의 합을 구하시오.

Answer: 180

Solution (Python):
var_a = 15
var_b = 4
var_c = 3
var_d = var_b * var_c
var_e = var_a * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): The students were divided into 8 groups in class (A). Six of them have six people each, and the other two groups have 7 people each. How many students are in class (A)?
Question (KO): (가) 반 학생들을 8개 조로 나누었습니다. 그중 6개 조는 각각 6명이고, 나머지 2개 조는 각각 7명입니다. (가) 반 학생은 모두 몇 명입니까?

Answer: 50

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

Question (EN): How many three-digit even numbers can be formed by using 1, 4, and 9 and allowing overlaps?
Question (KO): 1, 4, 9를 중복으로 사용하여 만들 수 있는 세 자리의 짝수는 모두 몇 개입니까?

Answer: 9

Solution (Python):
var_a = 1
var_b = 4
var_c = 9
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.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]
var_e = 2
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: Correspondence

Question (EN): A certain number is greater than 34 and less than the value of 18+18. Find the number out of 34, 35, 36, and 37.
Question (KO): 어떤 수는 34보다 크고 18+18의 값보다 작습니다. 34, 35, 36, 37 중 어떤 수를 구하시오.

Answer: 35

Solution (Python):
var_a = 34
var_b = 35
var_c = 36
var_d = 37
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 = 34
list_b = []
for i in list_a:
    if i > var_e:
        list_b.append(i)
var_f = 18
var_g = 18
var_h = var_f + var_g
list_c = []
for i in list_b:
    if i < var_h:
        list_c.append(i)
var_i = 1
var_j = list_c[var_i-1]
print(int(var_j))
Category: Possibility

Question (EN): Jicheol has number cards with the numbers 0, 1, 2, 3, and 4 written on them. Of these, he chooses three cards to form a three-digit number. How many numbers are divisible by 2, 3, and 5?
Question (KO): 지철이는 0, 1, 2, 3, 4가 적혀 있는 숫자 카드를 가지고 있다. 이 중 카드 세 장을 골라 세 자리 수를 만들고자 한다. 만들었을 때 2, 3, 5로 나누어 떨어지는 수는 모두 몇 가지인가?

Answer: 4

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
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 = 2
var_h = 3
var_i = var_h * var_g / math.gcd(int(var_h), int(var_g))
var_j = 5
var_k = var_j * var_i / math.gcd(int(var_j), int(var_i))
list_c = []
var_k = int(var_k)
for i in list_b:
    i = int(i)
    if i % var_k == 0:
        list_c.append(i)
var_l = len(list_c)
print(int(var_l))
Category: Correspondence

Question (EN): When you divide 49 by a certain number, the remainder is 4, and when you divide 66, the remainder is 6. Find what the certain number is.
Question (KO): 어떤 수로 49를 나누면 나머지가 4이고, 66을 나누면 나머지가 6입니다. 이때 어떤 수를 구하시오.

Answer: 15

Solution (Python):
var_a = 49
var_b = 4
var_c = var_a - var_b
var_d = 66
var_e = 6
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
print(int(var_g))
Category: Correspondence

Question (EN): You mistakenly divided a number by 180, so when you divided it by 18, the quotient was 210 and the remainder was 2. Find the remainder when calculated correctly.
Question (KO): 어떤 수를 180 로 나누어야 할 것을 잘못하여 18 로 나누었더니 몫은 210 이고, 나머지는 2 가 되었습니다. 바르게 계산했을 때의 나머지를 구하시오.

Answer: 2

Solution (Python):
var_a = 210
var_b = 18
var_c = var_a * var_b
var_d = 2
var_e = var_c + var_d
var_f = 180
var_g = var_e % var_f
print(int(var_g))
Category: Geometry

Question (EN): The sum of the numbers on the opposite sides of a dice is 7. Find the number of eyes on the side opposite to the side on which the eyes of 3 are drawn.
Question (KO): 주사위에서 마주 보는 면의 눈의 수의 합은 7입니다. 3의 눈이 그려진 면과 마주 보는 면의 눈의 수를 구하시오.

Answer: 4

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

Question (EN): A is 509. A is greater than B by 197. C is less than B by 125. Find C.
Question (KO): A는 509입니다. A는 B보다 197만큼 큽니다. C는 B보다 125만큼 작습니다. C를 구하시오.

Answer: 187

Solution (Python):
var_a = 509
var_b = 197
var_c = var_a - var_b
var_d = 125
var_e = var_c - var_d
print(int(var_e))
Category: Comparison

Question (EN): What is the second largest natural number greater than 28 and less than or equal to 31?
Question (KO): 28 초과 31 이하인 자연수 중 둘째로 큰 수는 얼마인지 구하시오.

Answer: 30

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)]
var_f = 2
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
print(int(var_g))
Category: Correspondence

Question (EN): There are 93 fish and birds in the pond. There are 66 fish and the bird eats one fish per day. If 21 new fish came into the pond the next day and the birds ate the fish, how many fish are in the pond?
Question (KO): 연못에 물고기와 새가 합쳐서 93마리가 있다. 물고기는 66마리가 있고 새는 하루에 1마리씩 물고기를 잡아먹는다. 다음날 물고기 21마리가 새로 연못에 들어왔고 새들이 물고기를 잡아먹었다면 연못에 물고기는 몇 마리가 있습니까?

Answer: 60

Solution (Python):
var_a = 66
var_b = 93
var_c = 66
var_d = var_b - var_c
var_e = var_a - var_d
var_f = 21
var_g = var_e + var_f
print(int(var_g))
Category: Possibility

Question (EN): You are trying to pick and grow two kinds of fruits out of strawberries, pears, and grapes. How many cases are there in total to choose the fruit?
Question (KO): 딸기, 배, 포도 중에 2종류의 과일을 골라 키우려고 합니다. 과일을 고르는 총 몇 가지 경우가 있을까요?

Answer: 3

Solution (Python):
var_a = 'strawberries'
var_b = 'pears'
var_c = 'grapes'
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))