philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): The father is 5 times Taehyung's age, and the mother is 4 times Taehyung's age. If Taehyung is 9 years old, how many years younger is his mother than his father?
Question (KO): 아버지의 나이는 태형이의 5배이고, 어머니의 나이는 태형이의 4배입니다. 태형이가 9살이라면 어머니는 아버지보다 몇 살 어립니까?

Answer: 9

Solution (Python):
var_a = 9
var_b = 5
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: Comparison

Question (EN): There are seven numbers 1.7, 1/5, 1/5, 1, 3/5, 3/8, and 1.4. When you write them down from the largest to the smallest, which number comes the fourth?
Question (KO): 일곱 개의 수 1.7, 1/5, 1/5, 1, 3/5, 3/8, 1.4가 있습니다. 크기를 비교하여 가장 큰 수부터 차례로 쓸 때 네 번째에 놓이는 수는 무엇입니까?

Answer: 0.6

Solution (Python):
var_a = 1.7
var_b = 0.2
var_c = 0.2
var_d = 1
var_e = 0.6
var_f = 0.375
var_g = 1.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 = 4
list_b=list_a.copy()
list_b.sort()
var_i = list_b[-var_h]
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Comparison

Question (EN): Two different natural numbers, B and 36, are in a relationship of factors and multiples. B is greater than 3 and less than 150. Find the 5th number from the right when the numbers corresponding to B are written in order from smallest to smallest.
Question (KO): 서로 다른 두 자연수 B와 36은 약수와 배수 관계입니다. B는 3보다 크고 150보다 작습니다. B에 해당하는 수를 작은 수부터 차례대로 썼을 때 오른쪽에서 5번째 수를 구하시오.

Answer: 18

Solution (Python):
var_a = 36
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 = 36
var_c = 150
var_d = 1
var_e = var_c - var_d
var_f = 36
list_b = [i for i in range(var_b, var_e + 1, var_f)]
list_c = list(set(list_a) | set(list_b))
var_g = 5
list_d=list_c.copy()
list_d.sort()
var_h = list_d[-var_g]
print(int(var_h))
Category: Arithmetic calculation

Question (EN): Jeongyeon's daily allowance is 300 won and Juho's daily allowance is 500 won. If Jeongyeon's current money is 12,000 won and Juho's money is 4,000 won, find how many days it will take for Jeongyeon and Juho's money to be the same.
Question (KO): 정연이의 하루 용돈은 300원이고 주호의 하루 용돈은 500원입니다. 정연이가 현재 가진 돈은 12000원이고 주호가 가진 돈은 4000원이라면 정연이와 주호가 가진 돈이 같아지려면 며칠이 있어야 하는 지 구하세요.

Answer: 40

Solution (Python):
var_a = 12000
var_b = 4000
var_c = var_a - var_b
var_d = 500
var_e = 300
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g))
Category: Correspondence

Question (EN): Inside the box, there are blue, yellow and red marbles. By dividing the number of blue marbles by the number of yellow marbles, the result is 1.2, and dividing the number of yellow marbles by the number of red marbles, the result is 5/6. What is the result if you divide the number of blue marbles by the number of red marbles?
Question (KO): 박스 안에 파란색, 노란색, 빨간색의 구슬이 있다. 파란색 구슬의 개수를 노란색 구슬의 개수로 나누면 몫이 1.2로 나누어떨어지고, 노란색 구슬의 개수를 빨간색 구슬의 개수로 나누면 몫이 5/6으로 나누어떨어진다. 파란색 구슬의 개수를 빨간색 구슬의 개수로 나누면 그 몫은 얼마인지 구하시오.

Answer: 1

Solution (Python):
var_a = 1.2
var_b = 0.8333333333333334
var_c = var_a * var_b
print(int(var_c))
Category: Correspondence

Question (EN): What single-digit number fits B in A85-2B=364?
Question (KO): A85-2B=364입니다. B는 얼마인가요?

Answer: 1

Solution (Python):
var_a = 'A85-2B=364'
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: Comparison

Question (EN): Younghee and Jimin take a walk. Younghee walked 2 kilometers (km), and Jimin walked 1300 meters (m). Which of the two walked longer?
Question (KO): 영희와 지민이는 산책을 합니다. 영희는 2킬로미터(㎞) 산책을 했고, 지민이는 1300미터(m)를 걸었습니다. 둘 중 더 긴 거리를 산책한 사람은 누구입니까?

Answer: Younghee

Solution (Python):
var_a = 'Younghee'
var_b = 'Jimin'
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 = 2
var_d = 1000
var_e = var_c * var_d
var_f = 1300
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): Use the four number cards 0, 1, 4, and 8 once to form the sixth smallest four-digit number which has 8 in the ones, then find the sum of numbers on each digit.
Question (KO): 4개의 숫자 카드 0, 1, 4, 8을 한 번 사용하여 일의 자리 숫자가 8인 세 번째로 작은 네 자리 숫자를 구한 다음 각 숫자의 합을 구하시오

Answer: 12

Solution (Python):
var_a = 0
var_b = 1
var_c = 4
var_d = 8
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
var_g = 8
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
for i in list_b:
    i = int(i)
    if (i//var_f)%10 == var_g:
        list_c.append(i)
var_h = 3
list_d=list_c.copy()
list_d.sort()
var_i = list_d[var_h-1]
list_e = []
var_i = int(var_i)
while var_i//10 > 0:
    list_e.append(var_i%10)
    var_i = var_i//10
list_e.append(var_i%10)
list_e = list_e[::-1]
list_e = [float(i) for i in list_e]
var_j = sum(list_e)
print(int(var_j))
Category: Arithmetic calculation

Question (EN): You bought two roses at \3,000 each and some lilies at \2,800 each, paid \25,000 and got \2,200 in change. Work out how many lilies you bought.
Question (KO): 3,000원짜리 장미 2송이와 2,800원짜리 백합 몇 송이를 사고 25,000원을 내었더니 거스름돈으로 2,200원을 받았습니다. 백합은 몇 송이를 샀는지 구하시오.

Answer: 6

Solution (Python):
var_a = 25000
var_b = 2200
var_c = var_a - var_b
var_d = 3000
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 2800
var_i = var_g / var_h
print(int(var_i))
Category: Correspondence

Question (EN): A fisherman catches fish and puts them in 15 boxes, leaving 6 fish. There are 20 fish in one box. How many fish has the fisherman caught?
Question (KO): 어부가 그물에서 물고기를 잡아서 15박스에 담고 6마리가 남았다. 한 박스에 물고기가 20마리가 들어간다. 어부가 잡은 물고기는 모두 몇마리인가?

Answer: 306

Solution (Python):
var_a = 15
var_b = 20
var_c = var_a * var_b
var_d = 6
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): Three of the cards of numbers from 1 to 9 were selected to make the number 735. Add up all the numbers that are less than 6 among the selected cards of numbers.
Question (KO): 1부터 9까지의 숫자카드 중 3장을 뽑아 735라는 숫자를 만들었다. 뽑은 숫자카드들 중 6보다 작은 수들의 합을 구하시오.

Answer: 8

Solution (Python):
var_a = 735
list_a = []
var_a = int(var_a)
while var_a//10 > 0:
    list_a.append(var_a%10)
    var_a = var_a//10
list_a.append(var_a%10)
list_a = list_a[::-1]
var_b = 6
list_b = []
for i in list_a:
    if i < var_b:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_c = sum(list_b)
print(int(var_c))
Category: Arithmetic calculation

Question (EN): The zoo keeps 35 female (a) animals. Males outnumber females by 7. How many  (a) animals are there in all?
Question (KO): 동물원에서 (가) 동물의 암컷 35마리를 기릅니다. 수컷이 암컷보다 7마리 많습니다. (가) 동물은 모두 몇 마리 있습니까?

Answer: 77

Solution (Python):
var_a = 35
var_b = 35
var_c = 7
var_d = var_b + var_c
var_e = var_a + var_d
print(int(var_e))
Category: Comparison

Question (EN): In the Korean test, Minyoung scored 55 points and Yuna scored 57 points. Eunji scored higher than Minyoung but lower than Yuna. If Eunji's score is a natural number, what is it?
Question (KO): 국어 시험에서 민영이는 55점을 받았고, 유나는 57점을 받았습니다. 은지는 민영이보다 시험을 잘봤지만 유나보다는 못봤습니다. 은지의 점수는 몇 점입니까?

Answer: 56

Solution (Python):
var_a = 55
var_b = 57
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11, and 12. What is the value of the multiplication of the smallest number and the next smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 작은 수와 그 다음으로 작은 수의 곱은 얼마입니까?

Answer: 110

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
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 = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
var_f = 2
list_c=list_a.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = var_e * var_g
print(int(var_h))
Category: Arithmetic calculation

Question (EN): There is a machine that produces 15 liters (l) of coke in 3 minutes at a constant rate. How many minutes does it take to get 140 liters (l) of Coke?
Question (KO): 일정한 빠르기로 3분 동안 15리터(L)의 물이 빠지는 구멍이 있습니다. 140리터(L)의 물이 다 빠지는 데 몇 분이 걸립니까?

Answer: 28

Solution (Python):
var_a = 140
var_b = 15
var_c = 3
var_d = var_b / var_c
var_e = var_a / var_d
print(int(var_e))
Category: Possibility

Question (EN): Of the three digit numbers that can be formed using the four natural numbers 7, 6, 2, and 0, find the sum of the third largest number with all different digits and the third smallest number with all different digits.
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: Possibility

Question (EN): You want to choose 3 people from Namjoon, Yoonki, Hoseok and Minyeong to send to Canada, the United States and Japan. What is the total number of cases you have selected three people?
Question (KO): 남준, 윤기, 호석, 민영이 중에서 3명을 뽑아 캐나다, 미국, 일본으로 보내려고 합니다. 보낼 수 있는 가짓수는 몇 개입니까?

Answer: 24

Solution (Python):
var_a = 'Namjoon'
var_b = 'Yoongi'
var_c = 'Hoseok'
var_d = 'Minyoung'
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 = 3
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_e-i)
print(int(var_g))
Category: Possibility

Question (EN): We are going to use 2 of our 3 number cards 1, 2 and 6 to form a two-digit number. How many multiples of 3 can you make?
Question (KO): 1, 2, 6 총 3장의 수 카드 중 2장을 사용하여 두 자리 수를 만들려고 합니다. 만들 수 있는 3의 배수는 모두 몇 개일까요?

Answer: 2

Solution (Python):
var_a = 1
var_b = 2
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 = 2
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 = []
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): The number of zebras in the national park is currently 725. This year, 419 were born and 263 died or were hundred. Find how many zebras there were last year.
Question (KO): 국립공원에 있는 얼룩말의 숫자는 현재 725마리이다. 올해 419마리가 새로 태어났고 263마리가 죽거나 잡아먹혔다. 작년에는 몇 마리의 얼룩말이 있었는지 구하시오.

Answer: 569

Solution (Python):
var_a = 725
var_b = 419
var_c = var_a - var_b
var_d = 263
var_e = var_c + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): It took Doocheol 1 hour and 36 minutes to circle the park 5 times at a constant speed. Express as a decimal number the number of minutes it took to cycle one lap around the park.
Question (KO): 두철이는 일정한 빠르기로 공원을 5 바퀴 도는 데 1 시간 36 분이 걸렸습니다. 공원을 한 바퀴 도는 데 걸린 시간은 몇 분인지 소수로 나타내시오.

Answer: 19.2

Solution (Python):
var_a = 1
var_b = 60
var_c = var_a * var_b
var_d = 36
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: Correspondence

Question (EN): I should have divided 21 by a particular number, but mistakingly divided 15 by that particular number, and as a result, I got 5. What is the correctly calculated value?
Question (KO): 21에 어떤 수를 나눠야 할 것을 잘못하여 15에 어떤 수를 나눴더니 5가 되었습니다. 바르게 계산하면 얼마인지 구하시오.

Answer: 7

Solution (Python):
var_a = 21
var_b = 15
var_c = 5
var_d = var_b / var_c
var_e = var_a / var_d
print(int(var_e))
Category: Comparison

Question (EN): Ginkgo trees were planted on one side of a 364 metre (m) long road and pine trees on the other side, at a distance of 45.5 and 22.75 metres from the start and end of the road respectively. Find out which of the pine and ginkgo trees was planted more.
Question (KO): 길이가 364 미터(m) 인 도로의 한쪽에는 은행나무를 다른 한 쪽에는 소나무를 각각 45.5 미터(m)와 22.75 미터(m) 간격으로 처음부터 끝까지 심었습니다. 소나무와 은행나무 중 어느 것을 더 많이 심었는지 구하시오.

Answer: pine

Solution (Python):
var_a = 'pine'
var_b = 'ginkgo'
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: Comparison

Question (EN): Yu-Jung collected 5 and 8, and Yuna collected 7 and 9. Who has the greater number?
Question (KO): 유정이는 5, 8을 모았고, 유나는 7과 9를 모았습니다. 누가 모은 수가 더 큰가요?

Answer: Yuna

Solution (Python):
var_a = 'Yu-Jung'
var_b = 'Yuna'
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 = 5
var_d = 8
var_e = var_c + var_d
var_f = 7
var_g = 9
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: Comparison

Question (EN): There are 28 identical cartons of eggs in the supermarket. Each egg carton contains the same number of eggs. If you choose 14th from the front, 20th from the back, 3rd from the left, and 2nd from the right on the carton, find the number of eggs in the egg carton at this supermarket.
Question (KO): 슈퍼마켓에는 28개의 동일한 계란 상자가 있습니다. 각 계란 상자에는 동일한 수의 계란이 있습니다. 달걀판에서 앞에서 14번째, 뒤에서 20번째, 왼쪽에서 3번째, 오른쪽에서 2번째를 선택한다면 이 마트의 달걀판에 있는 달걀의 개수를 구하세요.

Answer: 3696

Solution (Python):
var_a = 14
var_b = 20
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 3
var_g = 2
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
var_l = 28
var_m = var_k * var_l
print(int(var_m))
Category: Arithmetic calculation

Question (EN): How many three-digit numbers are divisible by 2, 3, 7, and 5?
Question (KO): 4개의 수 2, 3, 7, 5로 나누어 떨어질 수 있는 세 자리 수는 모두 몇 개 있습니까?

Answer: 4

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 = 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 = 7
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 = 5
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 = len(list_e)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): It took a total of three hours for Sooyoung to walk at 2 kilometers (km) per hour when she climbed up and 4 kilometers (km) per hour when she came down the same road. Find the length of the hiking trail.
Question (KO): 수영이가 등산을 하는데 올라갈 때는 시속 2 킬로미터(㎞)로 걷고, 같은 길로 내려올 때에는 시속 4 킬로미터(㎞)로 걸었더니 총 3시간이 걸렸다고 한다. 등산로의 길이를 구하시오.

Answer: 4

Solution (Python):
var_a = 3
var_b = 2
var_c = 4
var_d = math.gcd(int(var_c), int(var_b))
var_e = var_a * var_d
var_f = 2
var_g = 4
var_h = math.gcd(int(var_g), int(var_f))
var_i = 2
var_j = var_h / var_i
var_k = 2
var_l = 4
var_m = math.gcd(int(var_l), int(var_k))
var_n = 4
var_o = var_m / var_n
var_p = var_j + var_o
var_q = var_e / var_p
print(int(var_q))
Category: Possibility

Question (EN): When the given numbers 2, 3, 7, and 8 are used once to form the second large three-digit number, which number is not used?
Question (KO): 주어진 숫자 2, 3, 7, 8을 한 번씩 사용하여 두 번째 큰 세 자리 수를 만들 때, 사용하지 않는 숫자는 무엇입니까?

Answer: 3

Solution (Python):
var_a = 2
var_b = 3
var_c = 7
var_d = 8
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 = 2
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
list_d = []
var_g = int(var_g)
while var_g//10 > 0:
    list_d.append(var_g%10)
    var_g = var_g//10
list_d.append(var_g%10)
list_d = list_d[::-1]
list_e = list(set(list_a) - set(list_d))
var_h = 1
var_i = list_e[var_h-1]
print(int(var_i))
Category: Comparison

Question (EN): In the race, Namjoon, Yoongi, and Hoseok crossed the finish line in that order. Namjoon placed 10th, and Hoseok placed 12th. What is Yoongi's rank?
Question (KO): 달리기 시합에서 남준, 윤기, 호석이가 차례대로 결승선을 넘었습니다. 남준이는 10등을 했고, 호석이는 12등을 했습니다. 윤기는 몇 등입니까?

Answer: 11

Solution (Python):
var_a = 10
var_b = 12
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e))
Category: Comparison

Question (EN): Yoongi has 4 apples and Jungkook who had 6 apples got 3 more. When Yuna has 5 apples, who has the most apples?
Question (KO): 윤기는 4개의 사과를 가지고 있고 6개의 사과를 가지고 있던 정국이는 3개의 사과를 더 받았습니다. 유나는 5개의 사과를 가지고 있을 때, 누가 가장 사과를 많이 가지고 있습니까?

Answer: Jungkook

Solution (Python):
var_a = 'Yoongi'
var_b = 'Jungkook'
var_c = 'Yuna'
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 = 4
var_e = 6
var_f = 3
var_g = var_e + var_f
var_h = 5
list_b= []
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_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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: Possibility

Question (EN): At a fruit store that sells apples, peaches, and pears, you want to purchase two fruits by allowing duplicates. How many possible cases are there?
Question (KO): 사과, 복숭아, 배를 판매하는 과일가게에서 중복을 허락하여 2개의 과일을 구매하려고 합니다. 가능한 경우의 수는 몇 가지 일까요?

Answer: 6

Solution (Python):
var_a = 'apples'
var_b = 'peaches'
var_c = 'pears'
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 = var_d + var_e
var_g = 1
var_h = var_f - var_g
var_i = 2
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
    var_j = var_j * (var_h-i)
for i, elem in enumerate(range(var_i)):
    var_j = var_j / (i+1)
print(int(var_j))
Category: Correspondence

Question (EN): I made a mistake of dividing 172 by a certain number when I had to divide by 4, and the resulting quotient was 28 less than the correctly calculated quotient, and the remainder was 7. Find this certain number.
Question (KO): 172를 4로 나누어야 할 것을 잘못하여 어떤 수로 나누었더니 그 몫은 바르게 계산한 몫보다 28 작고 나머지가 7이었습니다. 어떤 수를 구하시오.

Answer: 11

Solution (Python):
var_a = 172
var_b = 7
var_c = var_a - var_b
var_d = 172
var_e = 4
var_f = var_d / var_e
var_g = 28
var_h = var_f - var_g
var_i = var_c / var_h
print(int(var_i))