philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): There are three cups (a), (b), (c) filled with water. The sum of the water in these three cups is 1 liter (L) and 200 milliliters (㎖). If you transfer 200 milliliters (㎖) from cup (c) to cup (b), and 100 milliliters (㎖) from cup (c) to cup (a), the amount of water in the three cups becomes the same. Find the amount of water that was initially contained in the cup (a).
Question (KO): (가), (나), (다) 세 개의 컵에 물이 담겨 있습니다. 세 컵의 물의 양의 합은 1리터(L) 200밀리리터(㎖)입니다. (다) 컵에서 (나) 컵으로 200밀리리터(㎖), (가) 컵으로 100밀리리터(㎖)의 물을 옮기면 세 개의 컵에 담긴 물의 양은 같아진다고 합니다. (가) 컵에 처음 담겨 있었던 물의 양을 구하시오.

Answer: 300

Solution (Python):
var_a = 1
var_b = 1000
var_c = var_a * var_b
var_d = 200
var_e = var_c + var_d
var_f = 200
var_g = var_e - var_f
var_h = 100
var_i = var_g - var_h
var_j = 3
var_k = var_i / var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): Find the second smallest odd number from 1 to 10.
Question (KO): 1부터 10까지의 홀수 중 2번째로 작은 수를 구하시오.

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 = 2
list_b=list_a.copy()
list_b.sort()
var_d = list_b[var_c-1]
print(int(var_d))
Category: Comparison

Question (EN): Five balls (a), (b), (c), (d), and (e) are placed side by side. (e) is placed to the right of (c), and (e) is placed to the left of (d). Also, (c) is on the right side of (a), and (d) is on the left side of (b). Which ball is placed to the far left?
Question (KO): 5개의 공 (가), (나), (다), (라), (마)를 나란히 놓았습니다. (마)는 (다)의 오른쪽 옆에 놓여 있고, (마)는 (라)의 왼쪽 옆에 놓여 있습니다. 또 (가)의 오른쪽 옆에 (다)가 있고, (나)의 왼쪽 옆에 (라)가 있습니다. 가장 왼쪽에 놓여진 공은 무엇입니까?

Answer: (a)

Solution (Python):
var_a = '(a)'
var_b = '(b)'
var_c = '(c)'
var_d = '(d)'
var_e = '(e)'
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 = '(e)'
var_g = '(c)'
var_h = '>'
var_i = '(e)'
var_j = '(d)'
var_k = '<'
var_l = '(c)'
var_m = '(a)'
var_n = '>'
var_o = '(d)'
var_p = '(b)'
var_q = '<'
list_b= []
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
    var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
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)
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_r = len(list_c)
var_s = list_c[var_r-1]
print(var_s)
Category: Comparison

Question (EN): Three students pulled marbles with numbers from their pockets. The marble that Jungkook picked has a 7 written on it, and the marble that Minyoung picked has a 5 written on it. Taehyung's number of marble is greater than Minyoung's but less than Jungkook's. What is the number of marble Taehyung has?
Question (KO): 3명의 학생이 주머니에서 숫자가 적힌 구슬을 꺼냈습니다. 정국이가 뽑은 구슬엔 7이 적혀있고 민영이가 뽑은 구슬엔 5가 적혀있습니다. 태형이가 뽑은 구슬의 숫자는 민영이보다 크지만 정국이보다는 작습니다. 태형이가 가진 구슬의 숫자는 무엇입니까?

Answer: 6

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

Question (EN): Find the greatest possible two-digit number that is common multiple of 3 and 5.
Question (KO): 두 자리 수 중 3과 5의 공배수 중 가장 큰 수는?

Answer: 90

Solution (Python):
var_a = 10
var_b = 99
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
list_b = []
var_d = int(var_d)
for i in list_a:
    i = int(i)
    if i % var_d == 0:
        list_b.append(i)
var_e = 5
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): The total weight of 9 apples of the same weight is 4.5 kilograms (kg). Several melons weighing 850 grams (g) and two apples were placed on one side of the pan balance scale, and five watermelons weighing 1050 grams (g) were placed on the other side, and they were level. How many melons are there?
Question (KO): 무게가 같은 사과 9개의 무게의 총합은 4.5킬로그램(㎏)입니다. 사과 2개와 무게가 850그램(g)인 멜론 몇 개를 양팔 저울 한쪽에 올려놓고, 다른 쪽에는 무게가 1050그램(g)인 수박 5개를 올려놓았더니 수평을 이루었습니다. 올려놓은 멜론은 몇 개입니까?

Answer: 5

Solution (Python):
var_a = 1050
var_b = 5
var_c = var_a * var_b
var_d = 4.5
var_e = 1000
var_f = var_d * var_e
var_g = 9
var_h = var_f / var_g
var_i = 2
var_j = var_h * var_i
var_k = var_c - var_j
var_l = 850
var_m = var_k / var_l
print(int(var_m))
Category: Possibility

Question (EN): We want to create a four-digit number by using all single-digit odd numbers greater than 1 once. Find the sum of the possible numbers.
Question (KO): 1보다 큰 한 자리 홀수를 모두 한 번씩 사용하여 네 자리수를 만들고자 한다. 만들 수 있는 수들의 총합을 구하여라.

Answer: 159984

Solution (Python):
var_a = 1
var_b = 1
var_c = var_a + var_b
var_d = 9
list_a = []
if var_c%2==0:
    for i in range(var_c+1, var_d+1, 2):
        list_a.append(i)
else:
    for i in range(var_c, var_d+1, 2):
        list_a.append(i)
var_e = 4
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]
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11, and 12. What is the quotient of the largest number divided by the second largest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 큰 수와 그 다음으로 큰 수로 나눈 몫은 얼마입니까?

Answer: 1

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]
var_f = 2
list_c=list_a.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = var_e // var_g
print(int(var_h))
Category: Arithmetic calculation

Question (EN): There are four friends, Soohyun, Kiyoon, Taehun, and Hwajun. Kiyoon is 207 millimeters (mm) taller than Soohyun. Taehun is 252 millimeters (mm) taller than Soohyun. Hwajun is 839 millimeters (mm) taller than Kiyoon. How many millimeters (mm) is the difference in height between Soohyun and Hwajun?
Question (KO): 수현, 기윤, 태훈, 화준 네 명의 친구가 있습니다. 기윤이는 수현이보다 207밀리미터(㎜) 더 큽니다. 태훈이는 수현이보다 252밀리미터(㎜) 더 큽니다. 화준이는 기윤이보다 839밀리미터(㎜) 더 큽니다. 수현이와 화준이의 키 차이는 몇 밀리미터(㎜)입니까?

Answer: 1046

Solution (Python):
var_a = 207
var_b = 839
var_c = var_a + var_b
print(int(var_c))
Category: Possibility

Question (EN): If there are 5 people A, B, C, D, E, find the number of ways to select 1 president and 1 vice president.
Question (KO): A, B, C, D, E 5명이 있을 때, 회장 1명, 부회장 1명을 뽑는 경우의 수를 구하시오.

Answer: 20

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

Question (EN): Seulgi is 159 centimeters (cm) tall and Hohyeon is 162 centimeters (cm) tall. Which of the two is taller?
Question (KO): 슬기의 키는 159센티미터(㎝)이고 호현이는 키는 162센티미터(㎝)입니다. 둘 중 키가 더 큰 사람은 누구입니까?

Answer: Hohyeon

Solution (Python):
var_a = 'Seulgi'
var_b = 'Hohyeon'
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 = 159
var_d = 162
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()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Comparison

Question (EN): At school, students take turns giving presentations. Eunjung was in sixth place, followed by seven students. How many students are there in total?
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): Shinyoung read 1/3 of the children's book, Seokgi 1/4, and Woong 1/5. Who has read the most of the children's book?
Question (KO): 똑같은 동화책을 신영이는 전체의 1/3, 석기는 전체의 1/4, 웅이는 전체의 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): The 20 students in Heesun's class have their own attendance numbers ranging from 1 to 20. Among the students in Heesun's class, the female students numbers are 1, 3, 4, 6, 7, 10, 11, 13, 16, 17, 18, and 20, and the student who is an only child is numbered 1, 4, 5, 8, 11, 14, 17 and 20. Find out the number of students who are female and at the same time, an only child.
Question (KO): 희선이네 반 학생 20명은 1번부터 20번까지 자신의 출석 번호를 가지고 있습니다. 희선이네 반 학생 중 여학생은 1번, 3번, 4번, 6번, 7번, 10번, 11번, 13번, 16번, 17번, 18번, 20번 학생이고, 외동인 학생은 1번, 4번, 5번, 8번, 11번, 14번, 17번, 20번 학생일 때, 외동인 여학생은 몇 명입니까?

Answer: 5

Solution (Python):
var_a = 1
var_b = 3
var_c = 4
var_d = 6
var_e = 7
var_f = 10
var_g = 11
var_h = 13
var_i = 16
var_j = 17
var_k = 18
var_l = 20
list_a= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_a.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_a.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_a.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_a.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_a.append(var_h)
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_m = 1
var_n = 4
var_o = 5
var_p = 8
var_q = 11
var_r = 14
var_s = 17
var_t = 20
list_b= []
if "/" in str(var_t):
    var_t = eval(str(var_t))
list_b.append(var_t)
if "/" in str(var_s):
    var_s = eval(str(var_s))
list_b.append(var_s)
if "/" in str(var_r):
    var_r = eval(str(var_r))
list_b.append(var_r)
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
    var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
list_b.reverse()
list_c = list(set(list_a) & set(list_b))
var_u = len(list_c)
print(int(var_u))
Category: Possibility

Question (EN): If three of 3, 5, 8, and 9 are drawn to form a three-digit natural number, how many possible numbers are there?
Question (KO): 3, 5, 8, 9중 세 개를 뽑아 세 자리 자연수를 만들 때, 가능한 모든 수들의 개수는 몇개입니까?

Answer: 24

Solution (Python):
var_a = 3
var_b = 5
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 = 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 = len(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): The transparent bottle contains 12 liters (L) and 400 milliliters (ml) of water, and the opaque bottle contains 7600 milliliters (ml) of water. How many liters (l) must be transferred from the transparent bottle to the opaque bottle to equalize the volume of water in the two bottles?
Question (KO): 투명한 병에는 12리터(L) 400밀리리터(㎖)의 물이 들어있고, 불투명한 병에는 물이 7600밀리리터(㎖)가 들어있습니다. 두 병에 들어있는 물의 양이 같아지려면 투명한 병에서 불투명한 병으로 몇 리터(L)를 옮겨야 합니까?

Answer: 2.4

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

Question (EN): A+B=84 and B+C=60 and A=B+B+B+B+B+B. Find A-C when A, B, and C are three different natural numbers.
Question (KO): A+B=84이고 B+C=60이고 A=B+B+B+B+B+B입니다. A, B, C는 서로 다른 세 자연수일 때 A-C를 구하세요.

Answer: 24

Solution (Python):
var_a = 84
var_b = 7
var_c = var_a / var_b
var_d = 6
var_e = var_c * var_d
var_f = 60
var_g = 84
var_h = 7
var_i = var_g / var_h
var_j = var_f - var_i
var_k = var_e - var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): Junhoe had a wire measuring 134.5 cm (cm). If the length of Yujin's wire was 1.06 times the length of Junhoe's wire, how many centimeters (cm) long is Yujin's wire?
Question (KO): 준회는 134.5센티미터(㎝)의 철사를 가졌습니다. 유진이가 가진 철사의 길이는 준회가 가진 철사의 1.06배라면 유진이가 가진 철사는 몇 센티미터(㎝) 인지 구하세요.

Answer: 142.57

Solution (Python):
var_a = 134.5
var_b = 1.06
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Comparison

Question (EN): There are 17 more adults on the train compared to the children. At the next station, 57 adults and 18 children got on and 44 got off. How many adults were on the train initially, provided there are 502 people on the train now?
Question (KO): 기차 안에는 어른들이 이린이보다 17명 더 많습니다. 다음 역에서 어른 57명, 어린이 18명이 타고 44명이 내렸습니다. 현재 기차 안에는 502명이 있을 때 처음에 기차 안에 있던 어른들은 몇 명입니까?

Answer: 244

Solution (Python):
var_a = 502
var_b = 18
var_c = 57
var_d = var_b + var_c
var_e = 44
var_f = var_d - var_e
var_g = var_a - var_f
var_h = 17
var_i = var_g + var_h
var_j = 2
var_k = var_i / var_j
print(int(var_k))
Category: Possibility

Question (EN): Find the second smallest number using all 0, 2, 4, 6, 8, and 9 cards only once.
Question (KO): 0, 2, 4, 6, 8, 9 수 카드를 모두 한 번씩만 사용하여 두 번째로 작은 수를 찾으시오

Answer: 204698

Solution (Python):
var_a = 0
var_b = 2
var_c = 4
var_d = 6
var_e = 8
var_f = 9
list_a= []
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_g = len(list_a)
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_g))
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_h = 2
list_c=list_b.copy()
list_c.sort()
var_i = list_c[var_h-1]
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Find the average of the odd numbers from 1 to 10 that are less than 6.
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)
list_b = [float(i) for i in list_b]
var_d = sum(list_b)/len(list_b)
print(int(var_d))
Category: Possibility

Question (EN): Jimin came to the fruit section of the supermarket. In the fruit section, there are three types of fruits, apple, pear, and melon. How many ways are there to buy all 6 fruits with these fruits?
Question (KO): 지민이는 마트의 과일 코너에 왔습니다. 과일 코너에는 사과, 배, 참외 세 종류가 있습니다. 이 과일들로 6개의 과일들을 사는 방법은 모두 몇 가지인가요?

Answer: 28

Solution (Python):
var_a = 3
var_b = 1
var_c = var_a - var_b
var_d = 6
var_e = var_c + var_d
var_f = 6
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)
for i, elem in enumerate(range(var_f)):
    var_g = var_g / (i+1)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Find an even number between 40 and 50 that has a remainder of 2 when divided by 7.
Question (KO): 40부터 50사이의 짝수 중에서 7로 나눈 나머지가 2인 수를 구하시오.

Answer: 44

Solution (Python):
var_a = 40
var_b = 50
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 = 7
var_d = 2
list_b = [] 
var_c = int(var_c)
var_d = int(var_d)
if var_d < 0:
    var_d = var_d + var_c
for i in list_a:
    i = int(i)
    if i%var_c == var_d:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print(int(var_e))
Category: Geometry

Question (EN): There is a perimeter of 210 centimeters (m) round ring made by connecting 12 sheets of paper tape whose length is 18 centimeters (cm). If the overlapped parts of the tape is the same, find how much is overlapped in millimeters (mm).
Question (KO): 길이가 18센티미터(㎝)인 종이 테이프 12장을 겹치는 부분의 길이가 같도록 풀로 붙여서 둥근 고리 모양을 만들었습니다. 이 둥근 고리 모양의 둘레의 길이가 210센티미터(㎝)라면, 겹쳐진 부분의 길이는 몇 밀리미터(㎜)입니까?

Answer: 5

Solution (Python):
var_a = 18
var_b = 12
var_c = var_a * var_b
var_d = 210
var_e = var_c - var_d
var_f = 12
var_g = var_e / var_f
var_h = 10
var_i = var_g * var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Find the difference between the sum of all even numbers and the sum of all odd numbers from 1 to 100.
Question (KO): 1부터 100까지의 자연수 중에서 모든 짝수의 합과 모든 홀수의 합의 차를 구하시오

Answer: 50

Solution (Python):
var_a = 1
var_b = 100
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)
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
var_d = 1
var_e = 100
list_b = []
if var_d%2==0:
    for i in range(var_d+1, var_e+1, 2):
        list_b.append(i)
else:
    for i in range(var_d, var_e+1, 2):
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
var_g = var_c - var_f
print(int(var_g))
Category: Possibility

Question (EN): There is 1 white hat and 4 indistinguishable black hats. How many different ways can you arrange these hats in a row?
Question (KO): 흰색 모자가 1개, 구분안되는 검은색 모자가 4개있습니다. 이 모자들을 서로 다르게 한 줄로 배열하는 방법은 모두 몇 가지입니까?

Answer: 5

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

Question (EN): We had a swimming competition in the pool. 2nd place is Namjoon, 4th place is Yoongi. Hoseok was slower than Namjoon and faster than Yoongi. What is the rank of Hoseok?
Question (KO): 수영장에서 수영 시합을 했습니다. 2등은 남준이, 4등은 윤기입니다. 호석이는 남준이보다 느리고 윤기보다 빨랐습니다. 호석이는 몇 등입니까?

Answer: 3

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

Question (EN): All seven boxes of apples contain the same weight of apples. After taking out 20 kilograms (kg) of apples from each box, the weight of the seven apple boxes was equal to the weight of the first three apple boxes. Find the weight of the first box of apples.
Question (KO): 사과 상자 7개에 모두 같은 무게의 사과가 담겨있습니다. 각 상자에서 사과를 20킬로그램(㎏)씩 꺼낸 후 7개 사과 상자의 무게를 재어보니 처음 사과 상자 3개의 무게와 같았습니다. 처음 사과 상자 1개의 무게를 구하시오.

Answer: 35

Solution (Python):
var_a = 20
var_b = 7
var_c = var_a * var_b
var_d = 7
var_e = 3
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g))
Category: Possibility

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

Answer: 432

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-1]
var_g = 3
var_h = list_b[var_g-1]
var_i = var_f - var_h
var_j = abs(var_i)
print(int(var_j))