philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Your older brother is 1/10 meter (m) taller than you, and your younger brother is 1.1 meter (m) shorter than you by 0.2 meter (m). How tall is your brother in meters (m)?
Question (KO): 형은 나보다 1/10미터(m) 더 크고, 동생은 나보다 0.2미터(m) 작은 1.1미터(m)입니다. 형의 키는 몇 미터(m)입니까?

Answer: 1.4

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

Question (EN): Among the students in the (a) class, 35 students like art, 32 students like music, and 19 students like both art and music. If there is no student who does not like both art and music, how many students are in the (a) class?
Question (KO): (가) 반 학생들 중에서 미술을 좋아하는 학생은 35명이고, 음악을 좋아하는 학생은 32명이고, 미술과 음악을 모두 좋아하는 학생은 19명입니다. 미술과 음악을 모두 좋아하지 않는 학생이 한 명도 없을 때, (가) 반 학생은 모두 몇 명입니까?

Answer: 48

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

Question (EN): Nine people are standing in a row in order from the short person. Hoseok is standing in the second place from the back, and Yuna is standing right behind Hoseok. If you line up again starting with the tall person, which place will Yuna stand from the front?
Question (KO): 키가 작은 사람부터 순서대로 9명이 한 줄로 서 있습니다. 호석이는 뒤에서부터 2번째에 서 있고, 유나는 호석이 바로 뒤에 서 있습니다. 키가 큰 사람부터 순서대로 다시 줄을 서면 유나는 앞에서부터 몇 번째에 서게 됩니까?

Answer: 1

Solution (Python):
var_a = 2
var_b = 1
var_c = var_a - var_b
print(int(var_c))
Category: Possibility

Question (EN): What is the value when you subtract the smallest three-digit number from the largest three-digit number that can be made by drawing three different numbers from 1, 2, 6, 7, or 8?
Question (KO): 1, 2, 6, 7, 8 중 서로 다른 3개의 숫자를 뽑아 만들 수 있는 세 자리 수 중 가장 큰 수에서 가장 작은 수를 뺀 값은 얼마입니까?

Answer: 750

Solution (Python):
var_a = 1
var_b = 2
var_c = 6
var_d = 7
var_e = 8
list_a= []
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = 1
list_d=list_b.copy()
list_d.sort()
var_j = list_d[var_i-1]
var_k = var_h - var_j
print(int(var_k))
Category: Geometry

Question (EN): You are planning to divide the tofu into three pieces, each in a rectangular shape, measuring 54 centimeters (cm) long and 20 centimeters (cm) wide when viewed from above. You want to cut all 3 pieces to have the same size of a square when viewed from above. Find the length in centimeters (cm) of one side to make the largest square. (However, tofu is only cut from top to bottom.)
Question (KO): 위에서 내려다 봤을 때 가로가 54센티미터(㎝), 세로가 20센티미터(㎝)인 직사각형 모양의 두부를 3조각으로 나누려고 합니다. 3조각 모두 위에서 내려다 봤을 때 같은 크기의 정사각형이 되도록 자르려고 합니다. 이때 가장 큰 정사각형을 만들려면 한 변의 길이를 몇 센티미터(㎝)로 해야 하는지 구하시오. (단, 두부는 위에서 아래로만 자릅니다.)

Answer: 18

Solution (Python):
var_a = 54
var_b = 3
var_c = var_a // var_b
var_d = 20
var_e = 3
var_f = var_d // var_e
list_a= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
list_a.reverse()
var_g = 1
list_b=list_a.copy()
list_b.sort()
var_h = list_b[-var_g]
print(int(var_h))
Category: Arithmetic calculation

Question (EN): The weight after using half of the milk was 5 kilograms (kg) and the weight of the first carton was 8 kilograms (kg). How many kilograms (kg) does an empty milk carton weigh?
Question (KO): 우유의 절반을 쓴 후의 무게가 5킬로그램(㎏)이고 처음 우유 한 통의 무게는 8킬로그램(㎏)이었다. 빈 우유 통의 무게는 몇 킬로그램(㎏)인가?

Answer: 2

Solution (Python):
var_a = 8
var_b = 8
var_c = 5
var_d = var_b - var_c
var_e = 1
var_f = var_d * var_e
var_g = 0.5
var_h = var_f / var_g
var_i = var_a - var_h
print(int(var_i))
Category: Correspondence

Question (EN): When A is divided by 5, the quotient is 2 and the remainder is B. A and B are both natural numbers. What is the largest possible value of A?
Question (KO): A를 5로 나누면 몫이 2가 되고, 나머지는 B가 됩니다. A와 B는 모두 자연수입니다. 가능한 A 중 가장 큰 값은?

Answer: 14

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a * var_b
var_d = 5
var_e = 1
var_f = var_d - var_e
var_g = var_c + var_f
print(int(var_g))
Category: Comparison

Question (EN): In a running race, Namjoon, Yoonki, and Hoseok crossed the finish line one after the other. If Namjoon is in 10th place, in which place is Hoseok?
Question (KO): 달리기 시합에서 남준, 윤기, 호석이가 차례대로 결승선을 넘었습니다. 남준이는 10등을 했을때, 호석이의 등수는 몇 등입니까?

Answer: 12

Solution (Python):
var_a = 10
var_b = 'Namjoon'
var_c = 'Yoongi'
var_d = 'Hoseok'
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)
list_a.reverse()
var_e = 'Hoseok'
var_f = list_a.index(var_e)+1
var_g = 'Namjoon'
var_h = list_a.index(var_g)+1
var_i = var_f - var_h
var_j = var_a + var_i
print(int(var_j))
Category: Correspondence

Question (EN): There is a certain number. If 2/9 of this number is 10, what is 2/5 of this number?
Question (KO): 어떤 수가 있다. 이 수의 2/9가 10이라고 할 때, 이 수의 2/5는 얼마인지 구하시오.

Answer: 18

Solution (Python):
var_a = 10
var_b = 0.2222222222222222
var_c = var_a / var_b
var_d = 0.4
var_e = var_c * var_d
print(int(var_e))
Category: Correspondence

Question (EN): There are 9 fish in each fisherman's bucket, but only 3 of them are mackerel. If there are 27 mackerels in total, how many buckets are there?
Question (KO): 어부의 양동이 안에 9마리씩 물고기가 들어있는데 그 중 3마리만 고등어라고 한다. 고등어가 모두 27마리가 있다면 양동이는 몇 개인지 구하시오.

Answer: 9

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

Question (EN): How many centimeters (cm) is the sum of the lengths of the edges of a cuboid measuring 10 centimeters (cm) wide, 8 centimeters (cm) long, and 5 centimeters (cm) high?
Question (KO): 가로 10센티미터(㎝), 세로 8센티미터(㎝), 높이 5센티미터(㎝)인 직육면체의 모서리의 길이의 합은 몇 센티미터(㎝)입니까?

Answer: 92

Solution (Python):
var_a = 10
var_b = 4
var_c = var_a * var_b
var_d = 8
var_e = 4
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 5
var_i = 4
var_j = var_h * var_i
var_k = var_g + var_j
print(int(var_k))
Category: Geometry

Question (EN): I'm trying to make a square shape as small as possible by sticking a rectangular photo of 12 centimeters (cm) in width and 15 centimeters (cm) in length without overlapping them on the wall. How many photos do you need?
Question (KO): 가로가 12센티미터(㎝), 세로가 15센티미터(㎝)인 직사각형 모양의 사진을 겹치지 않게 벽면에 붙여 최대한 작은 정사각형 모양으로 꾸미려고 합니다. 사진은 몇 장이 필요합니까?

Answer: 20

Solution (Python):
var_a = 12
var_b = 15
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
var_d = 2
var_e = var_c ** var_d
var_f = 12
var_g = 15
var_h = var_f * var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): There are five numbers 10, 11, 12, 13, and 14. What is the sum of the largest number and the second largest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 가장 큰 수와 2번째로 큰 수의 합은 얼마입니까?

Answer: 27

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
var_e = 14
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=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[-var_h]
var_j = var_g + var_i
print(int(var_j))
Category: Possibility

Question (EN): If 1, 3, 4, and 7 are used once to form the largest three-digit number with 1 in the tens place and the second largest three-digit number, what is the sum of these two numbers?
Question (KO): 1, 3, 4, 7을 한 번씩 사용하여 십의 자리 수가 1인 가장 큰 세 자리 수와 두 번째로 큰 세 자리 수를 만들 때, 둘의 합은 얼마인가?

Answer: 1427

Solution (Python):
var_a = 1
var_b = 3
var_c = 4
var_d = 7
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 = 10
var_g = 1
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 = 1
list_d=list_c.copy()
list_d.sort()
var_i = list_d[-var_h]
var_j = 2
list_e=list_c.copy()
list_e.sort()
var_k = list_e[-var_j]
var_l = var_i + var_k
print(int(var_l))
Category: Correspondence

Question (EN): A is a number satisfying 34.8A>34.84. What is the sum of all single-digit numbers that can fit in A?
Question (KO): A는 34.8A>34.84를 만족하는 숫자입니다. 한 자리 자연수 중 A에 들어갈 수 있는 숫자들의 합은 얼마입니까?

Answer: 35

Solution (Python):
var_a = '34.8A>34.84'
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] = []
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].append(int(c[i]))
list_a = list(set(ans_dict[var_b]))
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
print(int(var_c))
Category: Correspondence

Question (EN): If we add a certain number to 18, and then divide it by 3, and then add 10, and then divide by 5, we get 4 as a result. Find out the number in question.
Question (KO): 18에 어떤 수를 더하여 3으로 나눈 뒤 10을 더하여 5로 나눈 수가 4입니다. 어떤 수를 구하시오.

Answer: 12

Solution (Python):
var_a = 4
var_b = 5
var_c = var_a * var_b
var_d = 10
var_e = var_c - var_d
var_f = 3
var_g = var_e * var_f
var_h = 18
var_i = var_g - var_h
print(int(var_i))
Category: Correspondence

Question (EN): The equation 69A+53=748 is said to hold. What number should go in A, where 69A is three-digit number?
Question (KO): 등식 69A+53=748이 성립한다고 합니다. A에 들어가야 하는 숫자는 무엇인가요?

Answer: 5

Solution (Python):
var_a = '69A+53=748'
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: Possibility

Question (EN): How many two-digit numbers can be formed by selecting only two of the three natural numbers 1, 2, and 7? (The number can be used repeatedly)
Question (KO): 세 자연수 1, 2, 7 중 두 개만을 뽑아 만들 수 있는 두 자리 자연수의 개수는 몇 개입니까?

Answer: 9

Solution (Python):
var_a = 1
var_b = 2
var_c = 7
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.product(list_b, repeat=var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = len(list_b)
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are 4 tribes on the couple continent. There are 204 males and 468 females in Gaga tribe, and 334 males and 516 females in Nana tribe. There are 427 males and 458 females in Dada tribe, and 549 males and 239 females in Lala tribe. Find the difference between males and females on this couple continent.
Question (KO): 부부 대륙에는 4개의 부족이 있다. 가가 부족에는 남자가 204명, 여자가 468명이 있고 나나 부족에는 남자가 334명, 여자가 516명이 있다. 다다 부족에는 남자가 427명, 여자가 458명이 라라 부족에는 남자가 549명, 여자가 239명이 있다. 부부 대륙의 남자와 여자수의 차를 구하시오.

Answer: 167

Solution (Python):
var_a = 204
var_b = 334
var_c = 427
var_d = 549
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()
list_a = [float(i) for i in list_a]
var_e = sum(list_a)
var_f = 468
var_g = 516
var_h = 458
var_i = 239
list_b= []
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()
list_b = [float(i) for i in list_b]
var_j = sum(list_b)
var_k = var_e - var_j
var_l = abs(var_k)
print(int(var_l))
Category: Arithmetic calculation

Question (EN): Some machines make 2 cell phones per hour. If the factory has 7 machines in all, how many hours does it take to make 182 cell phones in the factory?
Question (KO): 어떤 기계는 시간당 휴대폰을 2대 만든다. 공장에 기계가 모두 7개 있다면, 공장에서 182대의 휴대폰을 만드는데 몇 시간이 걸리는가?

Answer: 13

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

Question (EN): You want to subtract three of the 4 numbers 0, 2, 4, and 6, and then create a three-digit number using each number only once. Find the difference between the largest and smallest possible numbers.
Question (KO): 0, 2, 4, 6 중 3개를 빼서 한 번만 사용하여 세 자리 수를 만들려고 합니다. 만들 수 있는 가장 큰 수와 가장 작은 수의 차이를 구하십시오.

Answer: 438

Solution (Python):
var_a = 0
var_b = 2
var_c = 4
var_d = 6
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
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 1
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: Correspondence

Question (EN): There are N consecutive natural numbers from 1 to N. The sum of the even numbers in these numbers is 90 and the sum of the odd numbers is 100. find N.
Question (KO): 1부터 N까지 연속된 자연수가 N개 있습니다. 이 수 중에서 짝수들의 합은 90이고 홀수들의 합은 100입니다. N을 구하시오.

Answer: 19

Solution (Python):
var_a = 100
var_b = 90
var_c = var_a - var_b
var_d = 2
var_e = var_c * var_d
var_f = 1
var_g = var_e - var_f
print(int(var_g))
Category: Correspondence

Question (EN): B+A+B=814.8. When the decimal point of A is shifted one place to the left, it  turns equivalent to B. Find the value of A-B including the decimal point.
Question (KO): B+A+B=814.8입니다. A의 소수점을 왼쪽으로 한 칸 옮기면 B와 같습니다. 소수점을 포함하여 A-B의 값을 구하시오

Answer: 611.1

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

Question (EN): A trapezoid is 8 centimeters (cm) high, the length of the top side is 6 centimeters (cm) shorter than the length of the bottom side, and it is 72 square centimeters (㎠) wide. What is the length of the top side of this trapezoid?
Question (KO): 어떤 사다리꼴의 높이가 8센티미터(㎝)이고, 윗변의 길이가 아랫변의 길이보다 6 센티미터(㎝) 짧으며, 넓이가 72제곱센티미터(㎠)라고 합니다. 이 사다리꼴의 윗변의 길이는?

Answer: 6

Solution (Python):
var_a = 72
var_b = 2
var_c = var_a * var_b
var_d = 8
var_e = var_c / var_d
var_f = 6
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i))
Category: Correspondence

Question (EN): This number minus 46 became 15. What is this number minus 29?
Question (KO): 어떤 수에서 46을 뺐더니 결과가 15가 되었습니다. 어떤 수에서 29를 빼면?

Answer: 32

Solution (Python):
var_a = 15
var_b = 46
var_c = var_a + var_b
var_d = 29
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): The number of first-year students is 695, of which 329 are female students. If the number of male second-year students is 254, find the number of male students in the first-year and second-year.
Question (KO): 1학년 학생수는 695명이고 그 중 여학생은 329명이다. 2학년 남학생의 수는 254명일 때, 1, 2학년 남학생 수를 구하시오.

Answer: 620

Solution (Python):
var_a = 695
var_b = 329
var_c = var_a - var_b
var_d = 254
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): Find the sum of the faces, edges, and vertices of an octagonal pyramid.
Question (KO): 팔각뿔의 면, 모서리, 꼭짓점의 수의 합을 구하시오.

Answer: 34

Solution (Python):
var_a = 8
var_b = 1
var_c = var_a + var_b
var_d = 8
var_e = 2
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 8
var_i = 1
var_j = var_h + var_i
var_k = var_g + var_j
print(int(var_k))
Category: Correspondence

Question (EN): 7/8 of a number is 28. What is that number added by 16 and multiplied by 5/16?
Question (KO): 어떤 수의 7/8은 28입니다. 어떤 수보다 16 큰 수의 5/16는 얼마입니까?

Answer: 15

Solution (Python):
var_a = 28
var_b = 8
var_c = 7
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 16
var_g = var_e + var_f
var_h = 5
var_i = 16
var_j = var_h / var_i
var_k = var_g * var_j
print(int(var_k))
Category: Possibility

Question (EN): Use each of the numbers 1, 2, 3, 4, and 5 once to make three-digit natural numbers. Find the sum of the digits of all possible numbers.
Question (KO): 1, 2, 3, 4, 5의 숫자를 한번씩 사용하여 3자리 자연수을 만든다. 가능한 모든 수들의 자리수의 총합을 구하여라.

Answer: 540

Solution (Python):
var_a = 1
var_b = 5
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
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]
list_c=[]
for i in list_b:
    var_e = 0
    i = int(i)
    while i//10 > 0:
        var_e = var_e + i%10
        i = i//10
    var_e = var_e + i%10
    list_c.append(var_e)
list_c = [float(i) for i in list_c]
var_f = sum(list_c)
print(int(var_f))
Category: Comparison

Question (EN): Hoseok placed 8th in the running event. Yoojung did better than Hoseok, but worse than Namjoon who came in 6th place. What rank is Yoojung in?
Question (KO): 호석이는 달리기 시합에서 8등을 했습니다. 유정이는 호석이보다는 잘 했지만, 6등을 한 남준이보다는 못했습니다. 유정이는 몇 등일까요?

Answer: 7

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

Question (EN): The sum of five consecutive natural numbers is 90. What is the second largest of these natural numbers?
Question (KO): 연속하는 5개의 자연수의 합이 90입니다. 이 자연수 중 가장 두 번째로 큰 수는 무엇입니까?

Answer: 19

Solution (Python):
var_a = 90
var_b = 0
var_c = 5
var_d = 1
var_e = var_c - var_d
var_f = 1
list_a = [i for i in range(var_b, var_e + 1, var_f)]
list_a = [float(i) for i in list_a]
var_g = sum(list_a)
var_h = var_a - var_g
var_i = 5
var_j = var_h / var_i
var_k = 5
var_l = 2
var_m = var_k - var_l
var_n = var_j + var_m
print(int(var_n))
Category: Possibility

Question (EN): Even numbers from 1 to 999 were written sequentially to make 2468101214...996998. Find the sum of each digit in this number.
Question (KO): 1에서 999까지의 숫자 중 짝수를 차례로 이어 써서 2468101214...996998를 만들었다. 이 수의 각 자리 숫자들의 총합을 구하여라.

Answer: 6500

Solution (Python):
var_a = 2
var_b = 999
var_c = 2
list_a = [i for i in range(var_a, var_b + 1, var_c)]
list_b=[]
for i in list_a:
    var_d = 0
    i = int(i)
    while i//10 > 0:
        var_d = var_d + i%10
        i = i//10
    var_d = var_d + i%10
    list_b.append(var_d)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print(int(var_e))
Category: Geometry

Question (EN): I drew a right triangle on a paper. In this right triangle, the length of the non-hypotenuse side is 6 and the other non-hypotenuse side length is 8. What is the length of the hypotenuse at this time?
Question (KO): 도화지에 직각삼각형을 그렸습니다. 이 직각삼각형은 빗변이 아닌 한 변의 길이가 6, 나머지 빗변이 아닌 한 변의 길이가 8이었습니다. 이 때 빗변의 길이는 얼마입니까?

Answer: 10

Solution (Python):
var_a = 6
var_b = 2
var_c = var_a ** var_b
var_d = 8
var_e = 2
var_f = var_d ** var_e
var_g = var_c + var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): If you light a rope that is 6 meters (m) long, it burns at 2 meters (m) per minute. When the length of the burnt rope is 2 meters (m), find how many minutes have passed after the rope is lighted.
Question (KO): 길이가 6 미터(m)인 밧줄에 불을 붙이면 1분에 2 미터(m)만큼 불에 탄다. 탄 밧줄의 길이가 2 미터(m)일 때, 불을 붙인지 몇 분 후인지 구하시오.

Answer: 1

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

Question (EN): A box contains a total of 240 red and blue ballpoint pens in total. There are 2 fewer blue ballpoint pens than red ballpoint pens. Find how many red ballpoint pens are in all.
Question (KO): 빨간 볼펜과 파란 볼펜이 합하여 모두 240개가 들어있는 상자가 있습니다. 파란 볼펜은 빨간 볼펜보다 2개 적게 들어있습니다. 빨간 볼펜은 모두 몇 개 들어있을지 구하세요.

Answer: 121

Solution (Python):
var_a = 240
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 2
var_g = var_e + var_f
print(int(var_g))