philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): A is the number of 23 groups of 10 and 1 of 100 groups. B is the number that can be counted by jumping from 172 to 105 four times. Find the sum of A and B.
Question (KO): A는 100개씩 묶음이 1개와 10개씩 묶음이 23개인 수입니다. B는 172에서 105씩 커지게 4번 뛰어서 센 수입니다. A와 B의 합을 구하시오.

Answer: 922

Solution (Python):
var_a = 100
var_b = 1
var_c = var_a * var_b
var_d = 10
var_e = 23
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 172
var_i = 105
var_j = 4
var_k = var_i * var_j
var_l = var_h + var_k
var_m = var_g + var_l
print(int(var_m))
Category: Geometry

Question (EN): Find the number of sides and vertices of the pentagon and find the sum of them all.
Question (KO): 오각형의 변과 꼭짓점의 수를 구하고 이를 모두 더한 값을 구하시오.

Answer: 10

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

Question (EN): Figure A is a rectangle that is 15 centimeters (cm) wide and 8 centimeters (cm) long. Figure B is a rectangle with a width of 10 centimeters (cm) and a length of 13 centimeters (cm). Which of the two shapes has greater area?
Question (KO): 도형 A는 가로가 15센티미터(㎝), 세로가 8센티미터(㎝)인 직사각형입니다. 도형 B는 가로가 10센티미터(㎝), 세로가 13센티미터(㎝)인 직사각형입니다. 두 도형 중 넓이가 더 넓은 것은 무엇입니까?

Answer: B

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 = 15
var_d = 8
var_e = var_c * var_d
var_f = 10
var_g = 13
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): What is the sum of the numbers greater than or equal to 0.4 among 0.8, 1/2, and 0.3?
Question (KO): 0.8, 1/2, 0.3 중 0.4보다 크거나 같은 수의 총합은?

Answer: 1.3

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.3
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 = 0.4
list_b = []
for i in list_a:
    if i >= var_d:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Geometry

Question (EN): An octahedron has a side length of 2 centimeters (cm). What is the surface area of this regular octahedron in square centimeters (cm2)?
Question (KO): 어떤 정팔면체는 한 변의 길이가 2센티미터(㎝)입니다. 이 정팔면체의 겉넓이는 몇 제곱센티미터(㎠)입니까?

Answer: 10.39

Solution (Python):
var_a = 3
var_b = 3
var_c = 0.5
var_d = var_b ** var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
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: Arithmetic calculation

Question (EN): There are three numbers 100, -1, and 2. What is the difference between the largest number and the smallest number?
Question (KO): 3개의 수 100, -1, 2가 있습니다. 그 중에서 가장 큰 수와 가장 작은 수의 차는 얼마입니까?

Answer: 101

Solution (Python):
var_a = 100
var_b = -1
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 = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[-var_d]
var_f = 1
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: Possibility

Question (EN): Among the people of A, B, C, and D, two people are selected, one to be the president and the other to be the vice president. Find the number of possible cases.
Question (KO): 가, 나, 다, 라의 사람 중 2명을 뽑아 한 명은 회장을 , 다른 한 명은 부회장을 하기로 한다. 가능한 경우의 수를 구하시오.

Answer: 12

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = len(list_a)
var_f = 2
var_g = 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: Geometry

Question (EN): What is the area of a square when one diagonal is 12 meters (m) long?
Question (KO): 정사각형에서 한 대각선의 길이가 12센티미터(㎝)라면 이 정사각형의 넓이는 얼마인가요?

Answer: 72

Solution (Python):
var_a = 12
var_b = 2
var_c = var_a ** var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Among the people who visited the cinema during the week, 1518 were women, and among them, 536 were office workers. There were 525 more males than females, and among them, 1257 were non-workers. How many office workers visited the cinema in total?
Question (KO): 일주일 동안 영화관을 찾은 사람 중 중 여성은 1518명이고, 이 중에서 직장인은 536명이었습니다. 남성은 여성보다 525명이 더 많았고, 이 중에서 직장인이 아닌 사람은 1257명이었습니다. 영화관을 찾은 직장인은 모두 몇 명입니까?

Answer: 1322

Solution (Python):
var_a = 1518
var_b = 525
var_c = var_a + var_b
var_d = 1257
var_e = var_c - var_d
var_f = 536
var_g = var_e + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There are a total of 24 students with and without after-school activities. Of these, 50 candies were distributed equally only to students doing after-school activities, leaving 2 candies. When students who do after-school activities are twice as many students who do not do after-school activities, how many candies do students who do after-school activities get?
Question (KO): 방과후 활동을 하는 학생과 방과후 활동을 하지 않는 학생이 합하여 24명이 있습니다. 이 중에서 방과후 활동을 하는 학생에게만 사탕 50개를 똑같이 나누어 주었더니 2개가 남았습니다. 방과후 활동을 하는 학생은 방과후 활동을 하지 않는 학생의 2배일 때, 방과후 활동을 하는 학생은 사탕을 몇 개씩 받았는지 구하시오.

Answer: 6

Solution (Python):
var_a = 50
var_b = 2
var_c = var_a - var_b
var_d = 24
var_e = 2
var_f = 1
var_g = var_e + var_f
var_h = var_d // var_g
var_i = var_c // var_h
print(int(var_i))
Category: Geometry

Question (EN): How many diagonals can be drawn in a tetragon?
Question (KO): 사각형에서 그을 수 있는 대각선의 개수는?

Answer: 2

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

Question (EN): Yechan was supposed to divide the tape by 2.5, but he divided it into 2 and 2/5 by mistake, and it became 15/32 centimeters (cm). Find the length in centimeters (cm) of the tape that Yechan originally intended to use.
Question (KO): 예찬이는 테이프의 길이를 2.5로 나누어서 사용하려했는데 잘못하여 2와 2/5로 나누었더니 15/32센티미터(㎝)가 되었습니다. 예찬이가 원래 사용하려 했던 테이프의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 0.45

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

Question (EN): Two 275 centimeters (cm) long tapes are overlapped and attached, resulting in a total length of 512 centimeters (cm). Find the length of the overlapped part in centimeters (cm).
Question (KO): 길이가 275센티미터(㎝)인 테이프 2개를 겹쳐서 붙였더니 전체의 길이가 512센티미터(㎝)가 되었습니다. 겹쳐진 부분의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 19

Solution (Python):
var_a = 275
var_b = 275
var_c = var_a + var_b
var_d = 512
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g))
Category: Possibility

Question (EN): Nine digits from 1 to 9 are used once to form a nine-digit number. If this number is a multiple of 55, find the largest 9-digit number.
Question (KO): 1부터 9까지 9개의 숫자를 한 번씩 사용하여 아홉 자리 수를 만들었다. 이 수가 55의 배수일 때, 가장 큰 아홉자리 수를 구하여라.

Answer: 987642315

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

Question (EN): If you have 100 sheets of paper to make 3 notebooks of 30 sheets, how many sheets are left?
Question (KO): 30장짜리 공책 3권을 만들려고 할 때 100장의 종이가 있다면 몇 장이 남습니까?

Answer: 10

Solution (Python):
var_a = 100
var_b = 30
var_c = 3
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e))
Category: Possibility

Question (EN): Find the number of ways to put 5 people in a line.
Question (KO): 5명의 사람을 한 줄로 세우는 경우의 수를 구하여라.

Answer: 120

Solution (Python):
var_a = 5
var_b = 5
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)
print(int(var_c))
Category: Comparison

Question (EN): Jungkook has 0.8 and Yoongi has 1/2 number cards. How many people have number cards less than or equal to 0.3?
Question (KO): 정국이는 0.8, 윤기는 1/2의 숫자카드를 갖고 있습니다. 0.3보다 작거나 같은 숫자카드를 가지고 있는 사람은 몇 명입니까?

Answer: 0

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

Question (EN): If the minimum weight that a scale with numbers written at 5 kilograms (kg) intervals can display is 0 kilograms (kg) and the maximum weight is 199 kilograms (kg), find how many times 0 is written on this scale.
Question (KO): 5킬로그램(㎏) 간격으로 숫자가 쓰여 있는 체중계가 표시할 수 있는 최소 무게는 0킬로그램(㎏)이고, 최대 무게는 199킬로그램(㎏)일 때, 이 체중계에는 0이 몇 번 쓰여 있는지 구하시오.

Answer: 21

Solution (Python):
var_a = 0
var_b = 199
var_c = 5
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
list_b = []
var_d = int(var_d)
while var_d//10 > 0:
    list_b.append(var_d%10)
    var_d = var_d//10
list_b.append(var_d%10)
list_b = list_b[::-1]
var_e = 0
var_f = 0
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i == var_e:
        var_f = var_f + 1
print(int(var_f))
Category: Correspondence

Question (EN): Adding some number to 37 gives 52. What number is it?
Question (KO): 37에 어떤 수를 더하였더니 52가 되었습니다. 어떤 수는 얼마입니까?

Answer: 15

Solution (Python):
var_a = 52
var_b = 37
var_c = var_a - var_b
print(int(var_c))
Category: Comparison

Question (EN): Seokgi read 1/4 of the children's book, Shinyoung read 1/3 of it, and Woong read 1/5 of it. Find the person who has read the most of the children's book.
Question (KO): 똑같은 동화책을 석기는 전체의 1/4, 신영이는 전체의 1/3, 웅이는 전체의 1/5를 읽었습니다. 동화책을 가장 많이 읽은 사람을 구하시오.

Answer: Shinyoung

Solution (Python):
var_a = 'Shinyoung'
var_b = 'Seokgi'
var_c = 'Woong'
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 = 0.3333333333333333
var_e = 0.25
var_f = 0.2
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)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
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): There are 3 books in Daehyun's bag, 2 books in Donggil's bag, 5 books in Minjoo's bag, 3 books in Haeun's bag, and 1 book in Soyeong's bag. How many of them have 3 books?
Question (KO): 대현이의 가방에는 책이 3권, 동길이의 가방에는 2권, 민주의 가방에는 5권, 하은이의 가방에는 3권, 소영이의 가방에는 1권 들어있습니다. 책을 3권 가지고 있는 친구는 몇 명입니까?

Answer: 2

Solution (Python):
var_a = 3
var_b = 2
var_c = 5
var_d = 3
var_e = 1
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
var_g = 0
var_f = int(var_f)
for i in list_a:
    i = int(i)
    if i == var_f:
        var_g = var_g + 1
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Among Korean, Mathematics, Science, and English, the average score before taking the English test was 92 points, and the average score after taking the English test turned to 94 points. What is your English score?
Question (KO): 국어, 수학, 과학, 영어 중 영어 시험을 보기 전의 평균 점수는 92점이고 영어 시험을 본 후의 평균 점수를 94점입니다. 영어 점수는 몇 점입니까?

Answer: 100

Solution (Python):
var_a = 92
var_b = 2
var_c = var_a + var_b
var_d = 4
var_e = var_c * var_d
var_f = 92
var_g = 3
var_h = var_f * var_g
var_i = var_e - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): There is a hole through which 15 liters (l) of water is drained in 3 minutes at a constant rate. How many minutes does it take for 140 liters (l) of water to drain?
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: Correspondence

Question (EN): Find A from the 4-digit equation A2B2+1C1D=3333.
Question (KO): 네 자리 수 연산식 A2B2+1C1D=3333 에서 A를 구하시오.

Answer: 2

Solution (Python):
var_a = 'A2B2+1C1D=3333'
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: Comparison

Question (EN): At school, students take turns giving presentations. Eunjeong will be the 6th speaker, followed by 7 other students. How many students are giving presentations?
Question (KO): 학교에서 학생들이 차례대로 발표를 합니다. 은정이는 6번째로 발표를 하고 은정이 다음으로 7명의 학생이 발표를 할 것입니다. 발표를 하는 학생은 총 몇 명입니까?

Answer: 13

Solution (Python):
var_a = 6
var_b = 7
var_c = var_a + var_b
print(int(var_c))
Category: Comparison

Question (EN): Namjoon gathered 3 and 6 together. Jimin gathered 7 and 1 together. Whose sum of numbers is greater?
Question (KO): 남준이는 3과 6을 모았습니다. 지민이는 7과 1을 모았습니다. 누구의 모은 수의 합이 더 큽니까?

Answer: Namjoon

Solution (Python):
var_a = 'Namjoon'
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 = 3
var_d = 6
list_b= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
var_f = 7
var_g = 1
list_c= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_c.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_c.append(var_f)
list_c.reverse()
list_c = [float(i) for i in list_c]
var_h = sum(list_c)
list_d= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_d.append(var_h)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_d.append(var_e)
list_d.reverse()
var_i = 1
list_e=list_d.copy()
list_e.sort()
var_j = list_e[-var_i]
var_k = list_d.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Geometry

Question (EN): Find the length in centimeters (cm) of the base of a triangle with a height of 8 centimeters (cm) and an area of 24 square centimeters (cm2).
Question (KO): 높이가 8센티미터(㎝)이고, 넓이가 24제곱센티미터(㎠)인 삼각형의 밑변의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 6

Solution (Python):
var_a = 24
var_b = 2
var_c = var_a * var_b
var_d = 8
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are five numbers 44, 16, 2, 77, and 241. Find the difference between the sum and the average of the five numbers given.
Question (KO): 5개의 수 44, 16, 2, 77, 241이 있습니다. 주어진 5개 숫자들의 합과 평균의 차를 구하시오.

Answer: 304

Solution (Python):
var_a = 44
var_b = 16
var_c = 2
var_d = 77
var_e = 241
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()
list_a = [float(i) for i in list_a]
var_f = sum(list_a)
list_a = [float(i) for i in list_a]
var_g = sum(list_a)/len(list_a)
var_h = var_f - var_g
print(int(var_h))
Category: Geometry

Question (EN): How many degrees is the measure of one angle of a regular decagon?
Question (KO): 정십각형의 한 각의 크기는 몇 도입니까?

Answer: 144

Solution (Python):
var_a = 10
var_b = 2
var_c = var_a - var_b
var_d = 180
var_e = var_c * var_d
var_f = 10
var_g = var_e / var_f
print(int(var_g))
Category: Comparison

Question (EN): Jihee used 1 meter (m) and 1/5 meters (m), and Hyun used 8/5 meters (m) of shoelaces. Find out who used more shoelaces.
Question (KO): 신발끈은 지희가 1미터(m)와 1/5미터(m), 현지가 8/5미터(m)를 사용했다. 누가 신발끈을 더 많이 사용했는지 구하시오.

Answer: Hyun

Solution (Python):
var_a = 'Jihee'
var_b = 'Hyun'
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
var_d = 1
var_e = 5
var_f = var_d / var_e
var_g = var_c + var_f
var_h = 8
var_i = 5
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_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n)
Category: Comparison

Question (EN): I have three brothers, and when they add up their ages, it becomes 34. The age of the oldest brother is 3 times the age of the youngest brother, and the age of the second oldest brother is 2 years younger than twice the age of the youngest brother. How old is the second oldest brother?
Question (KO): 나이의 합이 34살인 세 형제가 있습니다. 첫째의 나이는 막내의 나이의 3배이고, 둘째의 나이는 막내 나이의 2배보다 2살 어립니다. 둘째의 나이는 얼마입니까?

Answer: 10

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

Question (EN): There is a triangle with a side length of 6 centimeters (cm). If the other two sides of the triangle are equal in length and the sum of all sides is 20 centimeters (cm), how many centimeters (cm) is the length of one of the two equal sides?
Question (KO): 한 변의 길이가 6센티미터(㎝)인 삼각형이 있습니다. 이 삼각형의 나머지 두 변의 길이가 같고, 모든 변의 길이의 합이 20센티미터(㎝)일 때 길이가 같은 두 변 중 한 변의 길이는 몇 센티미터(㎝)입니까?

Answer: 7

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

Question (EN): When we divide the natural number A by 5, we get a remainder of 4 and a quotient of 6. Find the right value for A.
Question (KO): 자연수 A를 5로 나눴더니 나머지가 4, 몫이 6이 되었습니다. A에 알맞은 값을 구하시오.

Answer: 34

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

Question (EN): When students stand in a line, Yoojung is at the front, and Eunjung is standing at the 5th from the back. If 30 students are standing between Yoojung and Eunjeong, how many students are in a line?
Question (KO): 학생들이 한 줄로 서 있습니다. 유정이는 맨 앞에 서 있습니다. 은정이는 뒤에서 5번째에 서 있습니다. 유정이와 은정이 사이에 30명이 서 있을 때, 줄을 선 학생은 모두 몇 명입니까?

Answer: 36

Solution (Python):
var_a = 5
var_b = 30
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Possibility

Question (EN): Using the number cards 1, 6, and 8 all once, find the difference between the second largest three-digit number and the third smallest three-digit number.
Question (KO): 숫자 카드 1, 6, 8를 한 번씩 모두 사용하여 두 번째로 큰 세 자리 수와 세 번째로 작은 세 자리수의 차를 구하시오.

Answer: 198

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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 2
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 3
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f - var_h
var_j = abs(var_i)
print(int(var_j))
Category: Possibility

Question (EN): You have 4 blue pencils and 1 red pencil. How many different ways can you place 5 pencils in a row?
Question (KO): 파란색 연필 4자루와 빨간색 연필 1자루가 있습니다. 연필 5자루를 서로 다르게 한 줄로 놓는 방법은 모두 몇 가지입니까?

Answer: 5

Solution (Python):
var_a = 4
var_b = 1
var_c = var_a + var_b
var_d = 4
var_e = 1
var_c = int(var_c)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
    var_e = var_e * (var_c-i)
for i, elem in enumerate(range(var_d)):
    var_e = var_e / (i+1)
print(int(var_e))
Category: Geometry

Question (EN): I want to put 5 cm (cm) height of water into a cuboid shaped fishbowl that is 10 cm (cm) width, 12 cm (cm) length, and 10 cm (cm) height. Find the volume of water that needs to be added.
Question (KO): 가로 10센티미터(㎝), 세로 12센티미터(㎝), 높이 10센티미터(㎝)인 직육면체 어항에 높이가 5센티미터(㎝)가 되도록 물을 넣고 싶다. 넣어야 하는 물의 부피를 구하라.

Answer: 600

Solution (Python):
var_a = 10
var_b = 12
var_c = var_a * var_b
var_d = 5
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Round the value of 14.23÷4.7 to two decimal places.
Question (KO): 14.23÷4.7 의 값을 반올림하여 소수 둘째 자리까지 구하시오.

Answer: 3.03

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

Question (EN): Kanghee and Hojae shared a 2kg (kg) and 100g (g) watermelon. If Kanghee ate 200 grams (g) more than Hojae did, how many kilograms (kg) of watermelon did Kanghee eat?
Question (KO): 강희와 호재가 2킬로그램(㎏) 100그램(g)의 수박을 나눠 먹었습니다. 강희가 호재보다 200그램(g) 더 많이 먹었다면, 강희가 먹은 수박은 몇 킬로그램(㎏)입니까?

Answer: 1.15

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