philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): I am trying to make a three-digit number by drawing three out of four number cards with the numbers 2, 4, 6, and 8 written on them. If you can use the same card multiple times, what is the sum of all possible numbers?
Question (KO): 2, 4, 6, 8이 적힌 숫자 카드 4장 중 3장을 뽑아 세 자리수를 만들려고 한다. 같은 카드를 여러 번 사용해도 될 때, 만들 수 있는 모든 수들의 합은 얼마인가?

Answer: 35520

Solution (Python):
var_a = 2
var_b = 4
var_c = 6
var_d = 8
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=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: Geometry

Question (EN): Find the value of the sum of the vertices of the rectangle and the pentagon.
Question (KO): 사각형과 오각형의 꼭짓점을 더한 값은 몇입니까?

Answer: 9

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

Question (EN): Gyeong-seok studies Korean 7 times a week, 2/3 hours each, and Math 5 times a week, 3/4 hours each. Find out which subject Kyung-seok studies more during the week, Korean or math.
Question (KO): 경석은 국어를 주 7회, 각각 2/3시간씩, 수학을 주 5회, 각각 3/4시간씩 공부한다. 주중에 경석이가 국어와 수학 중 어떤 과목을 더 많이 공부하는지 구하세요.

Answer: Korean

Solution (Python):
var_a = 'Korean'
var_b = 'Math'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 2
var_d = 3
var_e = var_c / var_d
var_f = 7
var_g = var_e * var_f
var_h = 3
var_i = 4
var_j = var_h / var_i
var_k = 5
var_l = var_j * var_k
list_b= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p)
Category: Geometry

Question (EN): If the base of a pyramid is an octagon, find the number of sides.
Question (KO): 어떤 각뿔의 밑면이 팔각형일 때, 옆면의 수를 구하시오.

Answer: 8

Solution (Python):
var_a = 8
print(int(var_a))
Category: Comparison

Question (EN): The distance from the school to the park is 396 meters (m), and the distance from the school to the pharmacy is 0.389 kilometers (km). Which park or pharmacy is closer to the school?
Question (KO): 학교에서 공원까지의 거리는 396미터(m)이고, 학교에서 약국까지의 거리는 0.389킬로미터(㎞)입니다. 공원과 약국 중 학교에서 더 가까운 곳은 어디입니까?

Answer: pharmacy

Solution (Python):
var_a = 'park'
var_b = 'pharmacy'
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 = 396
var_d = 0.389
var_e = 1000
var_f = var_d * var_e
list_b= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_g = 1
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: Arithmetic calculation

Question (EN): The number of first-year female students at Hyunjin's school is 3/5 of the number of first-year male students. If there are 240 first-year students, how many first-year male students are there?
Question (KO): 현진이네 학교 1학년 여학생의 수는 1학년 남학생의 수의 3/5입니다. 1학년 학생은 모두 240명일 때 1학년 남학생은 몇 명입니까?

Answer: 150

Solution (Python):
var_a = 240
var_b = 1
var_c = 0.6
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e))
Category: Geometry

Question (EN): There are 1 piece of paper tape each measuring 36 centimeters (cm), 42 centimeters (cm), and 48 centimeters (cm). Each of these paper tapes was cut into 1/6 pieces, and the remaining portion was connected in a way that the overlapping portion became the same, and it resulted in a length of 97 centimeters (cm). How many centimeters (cm) did you overlap?
Question (KO): 길이가 36센티미터(㎝), 42센티미터(㎝), 48센티미터(㎝)인 종이 테이프가 1장씩 있습니다. 이 종이 테이프를 각각 1/6씩 잘라내고, 남은 부분을 겹치는 부분이 같게 하여 길게 이었더니 그 길이가 97센티미터(㎝)가 되었습니다. 몇 센티미터(㎝)씩 겹쳐지게 이었습니까?

Answer: 4

Solution (Python):
var_a = 36
var_b = 42
var_c = var_a + var_b
var_d = 48
var_e = var_c + var_d
var_f = 1
var_g = 0.16666666666666666
var_h = var_f - var_g
var_i = var_e * var_h
var_j = 97
var_k = var_i - var_j
var_l = 3
var_m = 1
var_n = var_l - var_m
var_o = var_k / var_n
print(int(var_o))
Category: Arithmetic calculation

Question (EN): You want to plant trees at intervals of 10 meters (m) on a 100-meter (m) long road. If trees are planted at the beginning and end of the road, how many trees are needed if planted on both sides of the road?
Question (KO): 100미터(m) 길이의 도로에 10미터(m) 간격으로 나무를 심으려고 합니다. 도로의 처음과 끝에도 나무를 심는다고 할 때, 도로 양쪽에 모두 심는다면 몇 그루가 필요합니까?

Answer: 22

Solution (Python):
var_a = 100
var_b = 10
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
var_f = 2
var_g = var_e * var_f
print(int(var_g))
Category: Possibility

Question (EN): You want to create a two-digit number by picking two different numbers from 1, 2, 3, 4, 5, and 6. How many different two-digit numbers can you make?
Question (KO): 1, 2, 3, 4, 5, 6 중에서 서로 다른 숫자 2개를 뽑아서 두 자리 수를 만들려고 합니다. 서로 다른 두 자리 수를 모두 몇 개 만들 수 있습니까?

Answer: 30

Solution (Python):
var_a = 1
var_b = 2
var_c = 3
var_d = 4
var_e = 5
var_f = 6
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 = 2
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 = len(list_b)
print(int(var_h))
Category: Comparison

Question (EN): Dongguk drinks 0.2 liters (L) of water five times a day. Yoonji drinks 0.3 liters (L) of water six times a day. Heejin drinks 500 milliliters (ml) of water four times a day. Who drinks the most water per day?
Question (KO): 동국은 물을 하루 5번, 1회 0.2리터(L)씩 마신다. 윤지는 물을 하루 6번, 1회 0.3리터(L)씩 마신다. 희진은 물을 하루 4번, 1회 500밀리리터(㎖)씩 마신다. 하루에 물을 가장 많이 마시는 사람은?

Answer: Heejin

Solution (Python):
var_a = 'Dongguk'
var_b = 'Yoonji'
var_c = 'Heejin'
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 = 5
var_e = 0.2
var_f = 1000
var_g = var_e * var_f
var_h = var_d * var_g
var_i = 6
var_j = 0.3
var_k = 1000
var_l = var_j * var_k
var_m = var_i * var_l
var_n = 4
var_o = 500
var_p = var_n * var_o
list_b= []
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
var_q = 1
list_c=list_b.copy()
list_c.sort()
var_r = list_c[-var_q]
var_s = list_b.index(var_r)+1
var_t = list_a[var_s-1]
print(var_t)
Category: Arithmetic calculation

Question (EN): Seven students are jumping rope, and the number of students doing hula hoops is five times the number of students jumping rope. How many students are doing hula hoops?
Question (KO): 7명의 학생이 줄넘기를 하고 있고, 훌라후프를 하는 학생 수는 줄넘기를 하는 학생 수의 5배입니다. 훌라후프를 하는 학생은 몇 명입니까?

Answer: 35

Solution (Python):
var_a = 7
var_b = 5
var_c = var_a * var_b
print(int(var_c))
Category: Correspondence

Question (EN): There is a question to divide a number by 5. I misread this question and divided it by two and submitted 0.65 as an answer. What is the correct answer?
Question (KO): 어떤 수를 5로 나누는 문제가 있다. 이 문제를 잘못보고 8로 나누어 답을 0.65로 제출했다면 원래 답은 얼마입니까?

Answer: 1.04

Solution (Python):
var_a = 0.65
var_b = 8
var_c = var_a * var_b
var_d = 5
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Correspondence

Question (EN): When a number is divided by 8, the remainder is 7, and when divided by 7, the remainder is 6. Also, if you add 1 to this number, it is said to be divisible by 5. Find the smallest four-digit number among these numbers.
Question (KO): 어떤 수를 8로 나누면 나머지가 7이고, 7로 나누면 나머지가 6이다. 또, 이 수에 1을 더하면 5로 나누어 떨어진다고 한다. 이러한 수 중 가장 작은 네 자리 수를 구하여라.

Answer: 1119

Solution (Python):
var_a = 1000
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 8
var_e = 7
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 7
var_g = 6
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 5
var_i = -1
list_d = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_c:
    i = int(i)
    if i%var_h == var_i:
        list_d.append(i)
var_j = 1
list_e=list_d.copy()
list_e.sort()
var_k = list_e[var_j-1]
print(int(var_k))
Category: Arithmetic calculation

Question (EN): Find the sum of all numbers from 1 to 100 that are multiples of 4 and have a remainder of 1 when divided by 3.
Question (KO): 1부터 100까지의 수 중 3으로 나눈 나머지가 1이면서 4의 배수인 값들의 합을 구하시오.

Answer: 468

Solution (Python):
var_a = 1
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
var_e = 1
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
    var_e = var_e + var_d
for i in list_a:
    i = int(i)
    if i%var_d == var_e:
        list_b.append(i)
var_f = 4
list_c = []
var_f = int(var_f)
for i in list_b:
    i = int(i)
    if i % var_f == 0:
        list_c.append(i)
list_c = [float(i) for i in list_c]
var_g = sum(list_c)
print(int(var_g))
Category: Geometry

Question (EN): Find the number of sides of the quadrangular pyramid.
Question (KO): 사각뿔의 면의 수를 구하시오.

Answer: 5

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

Question (EN): There is an expression 3A1+2B=327. Find the number that goes into B
Question (KO): 식 3A1+2B=327이 있습니다. B에 들어가야 하는 숫자를 구하시오

Answer: 6

Solution (Python):
var_a = '3A1+2B=327'
var_b = 'B'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_a
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    term_list = []
    op_list = []
    temp_c = ''
    for tc in temp:
        if tc not in '+-*/=><().':
            temp_c += tc
        else:
            op_list.append(tc)
            term_list.append(temp_c)
            temp_c = ''
    term_list.append(temp_c)
    new_eq = ''
    for i in range(len(op_list)):
        new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    if len(new_eq) == len(var_a):
        new_eq=new_eq.replace('=', '==')
        new_eq=new_eq.replace('>==', '>=')
        new_eq=new_eq.replace('<==', '<=')
        eval_result = False
        try:
            eval_result = eval(new_eq)
        except:
            pass
        if eval_result:
            for i, (k, _) in enumerate(ans_dict.items()):
                ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c))
Category: Arithmetic calculation

Question (EN): 247 people entered the museum yesterday. 131 more people entered today than yesterday. How many people entered the museum yesterday and today in total?
Question (KO): 박물관에 어제 입장한 사람은 247명입니다. 오늘 입장한 사람은 어제보다 131명 더 많습니다. 박물관에 어제와 오늘 입장한 사람은 모두 몇 명입니까?

Answer: 625

Solution (Python):
var_a = 247
var_b = 247
var_c = 131
var_d = var_b + var_c
var_e = var_a + var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): A bag containing 6 apples weighs 1.82 kilograms (kg). How many kilograms (kg) does one apple weigh if the empty bag weighs 0.5 kilograms (kg)?
Question (KO): 사과 6개를 담은 가방의 무게는 1.82킬로그램(㎏)입니다. 빈 가방의 무게가 0.5킬로그램(㎏)일때 사과 한개의 무게는 몇 킬로그램(㎏)입니까?

Answer: 0.22

Solution (Python):
var_a = 1.82
var_b = 0.5
var_c = var_a - var_b
var_d = 6
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Possibility

Question (EN): You want to create a five-digit number using the five numbers 7, 3, 9, 8, and 1 only once. How many five-digit numbers can you make?
Question (KO): 5개의 숫자 7, 3, 9, 8, 1을 한 번씩만 사용하여 다섯 자리 수를 만들려고 합니다. 만들 수 있는 다섯 자리 수는 모두 몇 개입니까?

Answer: 120

Solution (Python):
var_a = 7
var_b = 3
var_c = 9
var_d = 8
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 = 5
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 = len(list_b)
print(int(var_g))
Category: Geometry

Question (EN): Sangwoo is going to cut paper to make several round-shaped tickets. The paper is rectangular, 20 centimeters (cm) wide and 16 centimeters (cm) long, respectively. If Sangwoo wants to make a ticket with a radius of 2 centimeters (cm), how many can he make?
Question (KO): 상우는 종이를 잘라 원 모양의 딱지를 여러 장 만드려고 합니다. 종이는 직사각형 모양으로, 가로, 세로가 각각 20센티미터(㎝), 16센티미터(㎝)입니다. 상우는 반지름이 2센티미터(㎝)인 딱지를 만들고자 할 때, 몇 개까지 만들 수 있습니까?

Answer: 20

Solution (Python):
var_a = 20
var_b = 2
var_c = 2
var_d = var_b * var_c
var_e = var_a // var_d
var_f = 16
var_g = 2
var_h = 2
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): Jungkook has 3 red balls and Yoongi has 4 blue balls. What is the total number of balls?
Question (KO): 정국이는 빨간 공 3개, 윤기는 파란 공 4개를 가지고 있습니다. 전체 공의 개수는?

Answer: 7

Solution (Python):
var_a = 3
var_b = 4
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): A square with a side of 20 centimeters (cm) was made using thread. I made a rectangle using the same thread. If the width of this rectangle is 14 centimeters (cm), how many centimeters (cm) is the length?
Question (KO): 한 변이 20센티미터(㎝)인 정사각형을 실을 사용하여 만들었습니다. 이 실을 똑같이 사용하여 직사각형을 만들었습니다. 이 직사각형의 가로가 14센티미터(㎝)라면 세로는 몇 센티미터(㎝)입니까?

Answer: 26

Solution (Python):
var_a = 20
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
var_f = 14
var_g = var_e - var_f
print(int(var_g))
Category: Geometry

Question (EN): A trapezoid with a base of 25 centimeters (cm) and a height of 13 centimeters (cm) has an area of 286 square centimeters (cm2). How many centimeters (cm) is the length of the upper side of this trapezoid?
Question (KO): 밑변이 25센티미터(㎝)이고 높이가 13센티미터(㎝)인 사다리꼴의 넓이는 286제곱센티미터(㎠)입니다. 이 사다리꼴의 윗변의 길이는 몇 센티미터(㎝)인가요?

Answer: 19

Solution (Python):
var_a = 286
var_b = 13
var_c = var_a / var_b
var_d = 2
var_e = var_c * var_d
var_f = 25
var_g = var_e - var_f
print(int(var_g))
Category: Possibility

Question (EN): In how many ways can you choose and buy two different fruits among an apple, a peach, and a melon?
Question (KO): 사과, 복숭아, 참외 중 서로 다른 2가지 과일을 골라서 사는 경우는 모두 몇 가지 입니까?

Answer: 3

Solution (Python):
var_a = 'apple'
var_b = 'peach'
var_c = 'melon'
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = len(list_a)
var_e = 2
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
    var_f = var_f * (var_d-i)
for i, elem in enumerate(range(var_e)):
    var_f = var_f / (i+1)
print(int(var_f))
Category: Comparison

Question (EN): In the running match, Jungkook placed 7th and Minyoung placed 5th. Taehyung was worse than Minyoung but better than Jungkook. What's Taehyung's ranking?
Question (KO): 달리기 시합에서 정국이는 7등을 했고, 민영이는 5등을 했습니다. 태형이는 민영이보다 못했지만 정국이보다는 잘했습니다. 태형이는 몇 등입니까?

Answer: 6

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

Question (EN): A cuboid has a base area of 14/5 square centimeter (cm2) and a volume of 28/3 cubic centimeter (cm3). Find the height of this cuboid.
Question (KO): 밑면의 넓이가 14/5제곱센티미터(㎠)이고 부피가 28/3세제곱센티미터(㎤)인 어떤 직육면체가 있다. 이 직육면체의 높이를 구하시오.

Answer: 3.33

Solution (Python):
var_a = 9.333333333333334
var_b = 2.8
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Geometry

Question (EN): There is a pyramid whose sum of the number of faces and the number of vertices is 16. How many edges does this pyramid have?
Question (KO): 면의 수와 꼭짓점의 수의 합이 16개인 각뿔이 있습니다. 이 각뿔의 모서리의 수는 몇 개입니까?

Answer: 14

Solution (Python):
var_a = 16
var_b = 2
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): What is the result of subtracting the sum of all natural numbers less than or equal to 99 from the sum of all natural numbers less than or equal to 999?
Question (KO): 999 이하의 모든 자연수의 합에서 99 이하의 모든 자연수들의 합을 빼면 어떤 값이 나오는지 구하시오.

Answer: 494550

Solution (Python):
var_a = 1
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
list_a = [float(i) for i in list_a]
var_d = sum(list_a)
var_e = 1
var_f = 99
var_g = 1
list_b = [i for i in range(var_e, var_f + 1, var_g)]
list_b = [float(i) for i in list_b]
var_h = sum(list_b)
var_i = var_d - var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): A box containing 16 watermelons of equal weight weighs 17.88 kilograms (kg). If the empty box weighs 0.6 kilograms (kg), how many kilograms (kg) do 7 watermelons weigh?
Question (KO): 무게가 똑같은 수박 16개가 들어있는 상자의 무게는 17.88킬로그램(㎏)입니다. 빈 상자의 무게가 0.6킬로그램(㎏)일 때, 수박 7개의 무게는 몇 킬로그램(㎏)입니까?

Answer: 7.56

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

Question (EN): There are two numbers 5.5 and 9/2. How much is it when you add them up to?
Question (KO): 2개의 숫자 5.5, 9/2가 있습니다. 이들을 더하면 얼마인가요?

Answer: 10

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

Question (EN): While Seokjin took the stairs to the 5th floor, Hoseok took the elevator to the 8th floor. Who climbed higher?
Question (KO): 석진이가 계단으로 5층까지 가는 동안 호석이는 엘리베이터를 타고 8층에 도착했습니다. 누가 더 높이 올라갔습니까?

Answer: Hoseok

Solution (Python):
var_a = 'Seokjin'
var_b = 'Hoseok'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 5
var_d = 8
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: Possibility

Question (EN):  Find how many odd numbers there are when two cards are drawn from a deck of five, each with the numbers 0, 1, 2, 3, and 4, to form a two-digit integer.
Question (KO): 0, 1, 2, 3, 4의 수가 각각 적힌 5장의 카드에서 2장을 뽑아 두 자리 정수를 만들 때 홀수는 모두 몇 개인지 구하시오

Answer: 6

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
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 = 2
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 = 2
list_c = []
var_g = int(var_g)
for i in list_b:
    i = int(i)
    if i % var_g == 0:
        list_c.append(i)
list_d = list(set(list_b) - set(list_c))
var_h = len(list_d)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): What is the smallest three-digit number divisible by 5, 8, and 2?
Question (KO): 3개의 수 5, 8, 2로 나누어 떨어질 수 있는 수 중 가장 작은 세 자리 수는 무엇입니까?

Answer: 120

Solution (Python):
var_a = 100
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 5
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 = 8
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 = 2
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 = 1
list_e=list_d.copy()
list_e.sort()
var_h = list_e[var_g-1]
print(int(var_h))
Category: Arithmetic calculation

Question (EN): There are 57 rocks in box A, 25 of which are basalt. There are 49 rocks in box B, 19 of which are basalt. Find out the total number of the rocks in the box A and B that are not basalt.
Question (KO): (가) 통에 들어있는 돌은 57개이고 그중 25개가 현무암입니다. (나) 통에 돌이 49개 들어있는데 그중 19개가 현무암입니다. (가), (나) 통에 들어있는 돌 중 현무암이 아닌 돌은 모두 몇 개입니까?

Answer: 62

Solution (Python):
var_a = 57
var_b = 25
var_c = var_a - var_b
var_d = 49
var_e = 19
var_f = var_d - var_e
var_g = var_c + var_f
print(int(var_g))
Category: Geometry

Question (EN): What is the sum of the vertices of the rectangle and the pentagon?
Question (KO): 사각형과 오각형의 꼭짓점의 수의 합은 몇 개입니까?

Answer: 9

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

Question (EN): The eight-digit number 757AB384 is divisible by 357. Get B.
Question (KO): 여덟 자리 수 757AB384는 357로 나누어떨어지는 수이다. B를 구하시오.

Answer: 5

Solution (Python):
var_a = '757AB384'
ans_dict = dict()
var_a = str(var_a)
list_a = []
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] = 0
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]))
    if len(var_a) == len(str(int(temp))):
        new_elem = int(temp)
        list_a.append(new_elem)
var_b = 357
list_b = []
var_b = int(var_b)
for i in list_a:
    i = int(i)
    if i % var_b == 0:
        list_b.append(i)
var_c = '757AB384'
var_d = 'B'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
var_e = 0
for elem in list_b:
    elem = str(elem)
    var_e = int(elem[unk_idx])
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Jungkook raises 5 rabbits and 2 puppies. How many rabbits and puppies does Jungkook raise?
Question (KO): 정국이는 토끼 5마리, 강아지 2마리를 키웁니다. 정국이가 키우는 토끼와 강아지는 총 몇 마리 인가요?

Answer: 7

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