philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): It is 4.3 kilometers (km) from Chaeyoung's house to the school, and from Taehoon's house to the school, you have to pass 5 blocks of a 900m (m) long road. Which of Chaeyoung and Taehoon lives farther away from school?
Question (KO): 채영이네 집에서 학교까지는 4.3킬로미터(㎞)이고, 태훈이네 집에서 학교까지는 900미터(m) 길이의 도로를 5블럭 지나야 합니다. 채영이와 태훈이 중 학교에서 더 먼 곳에 사는 학생은 누구입니까?

Answer: Taehoon

Solution (Python):
var_a = 'Chaeyoung'
var_b = 'Taehoon'
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.3
var_d = 1000
var_e = var_c * var_d
var_f = 900
var_g = 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: Arithmetic calculation

Question (EN): If out of 1250 runners in a marathon, 124 more gave up while running than finished, how many total runners finished?
Question (KO): 어느 마라톤 대회에 참가한 1250명의 선수 중에서 뛰는 도중 포기한 사람이 완주한 사람보다 124명 더 많았다면 완주한 사람은 모두 몇 명인지 구하시오.

Answer: 563

Solution (Python):
var_a = 1250
var_b = 124
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Comparison

Question (EN): A problem appeared before the explorer who was exploring the cave. The content of the problem was to press all the buttons smaller than 1 out of the 5 buttons. There were 5 buttons in total, with 1/10, 8, 0.9, 7/10, and 5 were written on each. How many buttons does the explorer have to press?
Question (KO): 동굴을 탐험하던 탐험가 앞에 문제가 나타났다. 문제의 내용은, 앞의 버튼 5개 중 1보다 작은 것을 모두 누르는 것이였다. 버튼은 총 5개가 있었고, 각각 1/10, 8, 0.9, 7/10, 5가 적혀져 있었다. 탐험가는 몇 개의 버튼을 눌러야 하는가?

Answer: 3

Solution (Python):
var_a = 0.1
var_b = 8
var_c = 0.9
var_d = 0.7
var_e = 5
list_a= []
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 1
list_b = []
for i in list_a:
    if i < var_f:
        list_b.append(i)
var_g = len(list_b)
print(int(var_g))
Category: Comparison

Question (EN): A has 21 coins, B has 9 coins fewer than A's, and C has 17 more than B's. If the number of coins added to A and B is 5 less than the number of coins added to C and D, how many coins does D have?
Question (KO): 가는 동전 21개를 가지고 있고, 나는 가보다 9개 더 적게 가지고 있습니다. 또, 다는 나보다 17개 더 많이 가지고 있습니다. 가와 나의 동전을 더한 개수가 다와 라의 동전을 더한 개수보다 5개 더 적을 때, 라가 가지고 있는 동전은 몇 개인지 구하시오.

Answer: 9

Solution (Python):
var_a = 21
var_b = 21
var_c = 9
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 21
var_g = 9
var_h = var_f - var_g
var_i = 17
var_j = var_h + var_i
var_k = var_e - var_j
var_l = 5
var_m = var_k + var_l
print(int(var_m))
Category: Arithmetic calculation

Question (EN): A school has 128 students in 3rd grade. If there are 12 more boys than girls, how many boys are there?
Question (KO): 어느 학교의 3학년 학생 수는 모두 128명입니다. 남학생이 여학생보다 12명 더 많다면 남학생은 몇 명입니까?

Answer: 70

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

Question (EN): Shinyoung ate 1/3, Seokgi ate 1/4, and Woong ate 1/5 of the cake. Who ate the most cake?
Question (KO): 신영은 1/3, 석기는 4분의 1, 웅이은 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 = 1
var_f = 4
var_g = var_e / var_f
var_h = 0.2
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: Comparison

Question (EN): The three students, Yoongi, Jungkook, and Yuna, have the number cards 7, 6, and 9 each. Who has the 2nd smallest number?
Question (KO): 세 명의 학생 윤기, 정국, 유나는 각각 7, 6, 9 숫자 카드를 가지고 있습니다. 2번째로 작은 숫자를 가진 사람은 누구입니까?

Answer: Yoongi

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 = 7
var_e = 6
var_f = 9
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 = 2
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Geometry

Question (EN): If the length of the radius of a circle is 7 centimeters (cm), what is the length of the diameter in centimeters (cm)?
Question (KO): 원의 반지름의 길이가 7센티미터(㎝)일 때, 지름의 길이는 몇 센티미터(㎝)인가요?

Answer: 14

Solution (Python):
var_a = 7
var_b = 2
var_c = var_a * var_b
print(int(var_c))
Category: Possibility

Question (EN): When 5 people V, W, X, Y, Z are lined up, find the number of ways to put V first and X and Y next to each other.
Question (KO): V, W, X, Y, Z 5명을 한 줄로 세울 때, V를 제일 앞에, X와 Y를 이웃하게 세우는 경우의 수를 구하시오.

Answer: 12

Solution (Python):
var_a = 'V'
var_b = 'W'
var_c = 'X'
var_d = 'Y'
var_e = 'Z'
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 = 'V'
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_g = 'X'
list_d= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_d.append(var_g)
list_d.reverse()
list_e = list(set(list_c) - set(list_d))
var_h = len(list_e)
var_i = len(list_e)
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)
var_k = 'X'
var_l = 'Y'
list_f= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_f.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_f.append(var_k)
list_f.reverse()
var_m = len(list_f)
var_n = len(list_f)
var_o = 1
var_m = int(var_m)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
    var_o = var_o * (var_m-i)
var_p = var_j * var_o
print(int(var_p))
Category: Correspondence

Question (EN): Hoseok divides a number by 9 to get 8. What do you get when 11 is added to this number?
Question (KO): 호석이는 어떤 수에서 9를 나누어 8을 얻었습니다. 어떤 수에 11을 더하면 얼마일까요?

Answer: 83

Solution (Python):
var_a = 8
var_b = 9
var_c = var_a * var_b
var_d = 11
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): Dongkyun is taller than Jungkook, and Dongwook is taller than Jungkook. When comparing the heights of Dongwook and Dongkyun, Dongwook is shorter, Then who is the tallest?
Question (KO): 동균은 정국보다 키가 크고, 동욱은 정국보다 키가 크다. 동국과 동균의 키를 비교했을 때 동국이 작으면 이 중 누가 가장 클까?

Answer: Dongkyun

Solution (Python):
var_a = 'Dongkyun'
var_b = 'Jungkook'
var_c = 'Dongwook'
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 = 'Dongkyun'
var_e = 'Jungkook'
var_f = '>'
var_g = 'Dongwook'
var_h = 'Jungkook'
var_i = '>'
var_j = 'Dongwook'
var_k = 'Dongkyun'
var_l = '<'
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
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_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()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
    if cond_ in ("<", ">", "="):
        operand_right = temp_stack.pop()
        operand_left = temp_stack.pop()
        if cond_ == "=":
            cond_ = "=="
        conditions.append(f"{operand_left} {cond_} {operand_right}")
    else:
        if not cond_.isdigit():
            cond_ = "{" + cond_ + "}"
        temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
    item_name_index_dict = dict(zip(items_name_list, perm))
    formatted_conditions = \
        [condition.format_map(item_name_index_dict) for condition in conditions]
    if all(map(eval, formatted_conditions)):
        break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_m = 1
var_n = list_c[var_m-1]
print(var_n)
Category: Geometry

Question (EN): If the base of a rectangle that has two parallel sides is 9 centimeters (cm) long and the area is 33.3 square centimeters (cm2), how many centimeters (cm) is the height of the rectangle?
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: Comparison

Question (EN): All five different people took the same test, resulting in an average score of 81.6. It is said that the average of the remaining test scores except the 1st place's score is 6 points lower than the average of the remainder except for the 5th place's score. If the rest of the people's scores are 88, 84, and 76, find the score the 5th place has received.
Question (KO): 모두 다른 다섯 사람이 같은 시험을 쳤는데, 평균이 81.6점이었다. 1등의 시험 점수를 뺀, 나머지의 평균이 5등의 점수를 뺀 나머지의 평균보다 6점이 낮다고 한다. 나머지 사람들의 점수가 88점, 84점, 76점 이라고 할 때, 5등의 점수를 구하여라.

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: Correspondence

Question (EN): A certain number is greater than 7 but it is not 8. Find the number among 6, 7, 8, and 9.
Question (KO): 어떤 수는 7보다 크지만 8이 아닙니다. 6, 7, 8, 9 중에서 어떤 수를 구하시오.

Answer: 9

Solution (Python):
var_a = 6
var_b = 7
var_c = 8
var_d = 9
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 = 7
list_b = []
for i in list_a:
    if i > var_e:
        list_b.append(i)
var_f = 8
list_c= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_c.append(var_f)
list_c.reverse()
list_d = list(set(list_b) - set(list_c))
var_g = 1
var_h = list_d[var_g-1]
print(int(var_h))
Category: Comparison

Question (EN): At school, you took exams in the order of Korean, Mathematics, English, Science, and History. What subject did you take for the third time?
Question (KO): 학교에서 국어, 수학, 영어, 과학, 사회의 순서로 시험을 봤습니다. 3번째로 시험을 본 과목은 무엇입니까?

Answer: English

Solution (Python):
var_a = 'Korean'
var_b = 'Mathematics'
var_c = 'English'
var_d = 'Science'
var_e = 'History'
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 = list_a[var_f-1]
print(var_g)
Category: Arithmetic calculation

Question (EN): Junhyuk bought 15 notebooks that cost 1,000 won each and colored pencils that cost 2,000 won each, and spent 22,000 won. How many colored pencils were bought in total?
Question (KO): 준혁이는 1000원짜리 공책과 2000원짜리 색연필을 합하여 15개를 사고 22000원을 사용했습니다. 색연필은 모두 몇 개 샀을까요?

Answer: 7

Solution (Python):
var_a = 22000
var_b = 1000
var_c = 15
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 2000
var_g = 1000
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): There are 17 more rabbits than chickens on the farm. If there are 64 rabbits on the farm, how many rabbits and chickens are on the farm in total?
Question (KO): 농장에는 닭보다 토끼가 17마리 많습니다. 농장에서 토끼를 64마리 기르고 있다면 농장에서 기르는 토끼와 닭은 모두 몇 마리입니까?

Answer: 111

Solution (Python):
var_a = 64
var_b = 17
var_c = var_a - var_b
var_d = 64
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): A and B are natural numbers. Find the smallest number among B that satisfies the expression 360÷(A×A×A/B)=5.
Question (KO): B는 자연수입니다. 식 360÷(A×A×A/B)=5을 만족하는 B 중 가장 작은 수를 구하시오.

Answer: 3

Solution (Python):
var_a = '360÷(A×A×A/B)=5'
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] = []
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, 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)):
        if term_list[i] == '':
            new_eq += str(term_list[i])+op_list[i]
        else:
            new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    new_eq=new_eq.replace('=', '==')
    new_eq=new_eq.replace('>==', '>=')
    new_eq=new_eq.replace('<==', '<=')
    eval_result = False
    try:
        if '=' in new_eq and '>' not in new_eq and '<' not in new_eq:
            new_eq=new_eq.replace('==','=')
            new_eq=new_eq.replace('>','')
            new_eq=new_eq.replace('<','')
            new_eq=new_eq.split('=')
            for i in range(len(new_eq)-1):
                eval_result = math.isclose(eval(new_eq[i]), eval(new_eq[i+1]))
                if not eval_result:
                    break
        else:
            eval_result = eval(new_eq)
    except:
        eval_result = False
        pass
    if eval_result:
        for i, (k, _) in enumerate(ans_dict.items()):
            ans_dict[k].append(int(c[i]))
list_a = list(set(ans_dict[var_b]))
var_c = 1
list_b=list_a.copy()
list_b.sort()
var_d = list_b[var_c-1]
print(int(var_d))
Category: Arithmetic calculation

Question (EN): A honeybee was flying at 10 meters (m) per hour, seeking honey. After finding honey in a flower, it was so happy that it flew back to its nest at 15 meters (m) per hour, and it took 30 minutes less than when it was seeking honey. Find the distance between the bee's nest and the flower.
Question (KO): 꿀벌은 꿀을 시속 10미터(m)로 날고 있었다. 꽃에서 꿀을 발견하고, 너무 기쁜 나머지 다시 집으로 시속 15미터(m)로 날아갔더니, 꿀을 찾을 때보다 30분 덜 걸렸다. 꿀벌의 집과 꽃 사이의 거리를 구하시오.

Answer: 15

Solution (Python):
var_a = 30
var_b = 60
var_c = var_a / var_b
var_d = 1
var_e = 10
var_f = var_d / var_e
var_g = 1
var_h = 15
var_i = var_g / var_h
var_j = var_f - var_i
var_k = var_c / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2)))))
Category: Arithmetic calculation

Question (EN): Find how many odd numbers less than 6 are there from 1 to 10.
Question (KO): 1부터 10까지의 홀수 중 6이하의 수의 개수를 구하시오.

Answer: 3

Solution (Python):
var_a = 1
var_b = 10
list_a = []
if var_a%2==0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
var_c = 6
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: Geometry

Question (EN): After arranging the statues in a square shape and erecting them, there were six statues left. So, I tried to increase the horizontal and vertical sides by one row each, but i was short of 11 statues. If you put these statues in 7 rows, how many statues are in one row?
Question (KO): 동상을 정사각형 모양으로 빈틈없이 정렬하여 세워 보니 6개의 동상이 남았습니다. 그래서 가로 한 변과 세로 한 변을 1열씩 늘리려 하였지만 11개의 동상이 부족하였습니다. 이 동상들을 7열로 세운다면 1열에 몇 개씩 있겠습니까?

Answer: 10

Solution (Python):
var_a = 6
var_b = 11
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
var_i = var_g ** var_h
var_j = 6
var_k = var_i + var_j
var_l = 7
var_m = var_k / var_l
print(int(var_m))
Category: Arithmetic calculation

Question (EN): Hoseok makes 27 A items in an hour, and Jungkook makes 32 A items in an hour. If Hoseok and Jungkook made A item at the same speed in 6 hours, how many more did Jungkook make than Hoseok?
Question (KO): (가) 물건을 호석이는 1시간에 27개 만들고, 정국이는 1시간에 32개 만듭니다. (가) 물건을 호석이와 정국이가 같은 빠르기로 6시간 동안 만들었다면, 정국이는 호석이보다 몇 개 더 만들었습니까?

Answer: 30

Solution (Python):
var_a = 32
var_b = 27
var_c = var_a - var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e))
Category: Geometry

Question (EN): You want to paint different colors on each face of the pentagon. How many colors will be used?
Question (KO): 오각기둥의 각 면에 서로 다른 색을 칠하려고 합니다. 사용된 색은 모두 몇 가지입니까?

Answer: 7

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

Question (EN): Hyo-jae went to a friend's house, by travelling 300 meters (m) more than 2/5 of the total distance by subway, 200 meters (m) less than 1/2 of the remaining distance by taxi, and the remaining 800 meters (m) on foot. Find the total distance in kilometers (km) that Hyo-jae traveled to go to his friend's house.
Question (KO): 효재는 친구네 집을 가면서 전체 거리의 2/5보다 300미터(m) 많은 거리를 지하철로 이동하고 나머지의 1/2보다 200미터(m)적은 거리를 택시를 이용하고, 나머지 800미터(m)를 걸어서 목적지에 도착했다고 한다. 효재가 친구네 집을 가기 위해 이동한 전체 거리는 몇 킬로미터(㎞)인지 구하시오.

Answer: 2.5

Solution (Python):
var_a = 800
var_b = 200
var_c = var_a - var_b
var_d = 1
var_e = 0.5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 300
var_i = var_g + var_h
var_j = 1
var_k = 0.4
var_l = var_j - var_k
var_m = var_i / var_l
var_n = 1000
var_o = var_m / var_n
print('{:.2f}'.format(round(var_o+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Find the number of numbers that are multiples of 6 and are not less than 30 and not more than 50.
Question (KO): 6의 배수이면서 30이상 50이하인 수의 개수를 구하시오.

Answer: 4

Solution (Python):
var_a = 1
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 30
list_b = []
for i in list_a:
    if i >= var_d:
        list_b.append(i)
var_e = 50
list_c = []
for i in list_b:
    if i <= var_e:
        list_c.append(i)
var_f = 6
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 = len(list_d)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): There is a (a) school where there are 38 more female students than male students. If there are 658 female students in the (a) school, what is the total number of students who came to (a) school if 17 students were absent?
Question (KO): 여학생이 남학생보다 38명 더 많은 (가) 학교가 있습니다. (가) 학교의 여학생이 658명이라고 할 때, 17명의 학생이 결석했다면 학교에 온 학생의 총 수는?

Answer: 1261

Solution (Python):
var_a = 658
var_b = 658
var_c = 38
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 17
var_g = var_e - var_f
print(int(var_g))
Category: Geometry

Question (EN): You want to make the largest isosceles triangle with one side 6 centimeters (cm) long and the other two sides equal in length, with a piece of wire 20 centimeters (cm) long. How many centimeters (cm) should the length of the other side be?
Question (KO): 길이가 20센티미터(㎝)인 철사로 한 변의 길이가 6센티미터(㎝)이고 나머지 두 변의 길이가 같은 가장 큰 이등변삼각형을 만들려고 합니다. 다른 한 변의 길이를 몇 센티미터(㎝)로 하면 됩니까?

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: Geometry

Question (EN): A cube with a volume of 1 cubic centimeter (cm3) was cut by the number of vertexes from a cube with one edge 3 centimeters (cm) long. Find the volume of the remaining part.
Question (KO): 3센티미터(㎝) 길이의 모서리를 갖는 정육면체에서 부피가 1세제곱센티미터(㎤)인 정육면체를 꼭짓점의 개수만큼 잘라냈다. 남는 부분의 부피를 구하여라.

Answer: 19

Solution (Python):
var_a = 3
var_b = 3
var_c = var_a ** var_b
var_d = 1
var_e = 3
var_f = var_d ** var_e
var_g = 8
var_h = var_f * var_g
var_i = var_c - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): The length of the wooden block that Yujung has is 30 centimeters (cm) longer than 31 meters (m). Write the length in meters (m) of the wooden block that Yujung has.
Question (KO): 유정이 가진 나무도막의 길이는 31미터(m)보다 30센티미터(㎝) 깁니다. 유정이가 가진 나무도막의 길이를 미터(m)로 써보시오

Answer: 31.3

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

Question (EN): All of the heights of a red box is 4.2 centimeters (cm), and all of the heights of a yellow box is 3.3 centimeters (cm). Hyunjeong stacked up 15 red boxes, and Seulgi stacked up 20 yellow boxes. Who stacked the boxes up higher?
Question (KO): 빨간 상자 1개의 높이는 4.2센티미터(㎝)로 모두 같고, 노란 상자 1개의 높이는 3.3센티미터(㎝)로 모두 같습니다. 현정이는 빨간 상자 15개를 한 줄로 높게 쌓았고, 슬기는 노란 상자 20개를 한 줄로 높게 쌓았습니다. 상자를 더 높게 쌓은 사람은 누구입니까?

Answer: Seulgi

Solution (Python):
var_a = 'Hyunjeong'
var_b = 'Seulgi'
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.2
var_d = 15
var_e = var_c * var_d
var_f = 3.3
var_g = 20
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: Arithmetic calculation

Question (EN): There were 5 more boys than girls in the classroom. Later, 3 more boys and 10 girls joined the class, bringing the total number of girls up to 22. How many boys are in the classroom now?
Question (KO): 교실에 남학생이 여학생보다 5명 더 많이 있었습니다. 나중에 3명의 남학생과 10명의 여학생이 교실에 더 와서 여학생은 모두 22명이 되었습니다. 지금 교실에 있는 남학생은 몇 명입니까?

Answer: 20

Solution (Python):
var_a = 22
var_b = 10
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
var_f = 3
var_g = var_e + var_f
print(int(var_g))