philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): What is the smallest four-digit number divisible by two numbers - 3 and 5?
Question (KO): 2개의 수 3, 5로 나누어 떨어질 수 있는 수 중 가장 작은 네 자리 수는?

Answer: 1005

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 = 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-1]
print(int(var_g))
Category: Geometry

Question (EN): Find the sum of the areas of two squares with side lengths of 8 and 10 respectively.
Question (KO): 한 변의 길이가 각각 8, 10인 두 정사각형의 넓이의 합을 구하시오.

Answer: 164

Solution (Python):
var_a = 8
var_b = 2
var_c = var_a ** var_b
var_d = 10
var_e = 2
var_f = var_d ** var_e
var_g = var_c + var_f
print(int(var_g))
Category: Geometry

Question (EN): If the sum of the lengths of the four sides of a square is 24 meters (m), what is the length of one side of the square in meters (m)?
Question (KO): 정사각형의 네 변의 길이의 합이 24미터(m)라면 한 변의 길이는 몇 미터(m)입니까?

Answer: 6

Solution (Python):
var_a = 24
var_b = 4
var_c = var_a / var_b
print(int(var_c))
Category: Possibility

Question (EN): There are four pieces of paper with the numbers 1, 3, 7, and 8 written on them. If two cards are drawn in order and the first number drawn is the tens place, and the second number drawn is the ones place, how many total numbers are less than 40?
Question (KO): 1, 3, 7, 8의 숫자가 적혀진 종이 네 장이 있다. 이 중 2 장을 차례로 뽑아 처음 뽑은 것을 십의 자리로, 두 번째 뽑은 수를 일의 자리로 할 때 40이하의 수가 나오는 경우는 총 몇가지인지 구하시오.

Answer: 6

Solution (Python):
var_a = 1
var_b = 3
var_c = 7
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 = 2
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 = 40
list_c = []
for i in list_b:
    if i <= var_f:
        list_c.append(i)
var_g = len(list_c)
print(int(var_g))
Category: Correspondence

Question (EN): A certain number needs to be multiplied by 1.36, but you mistakenly divided it and the quotient is 0.5. How much do you calculate correctly?
Question (KO): 어떤 수에 1.36 을 곱해야 하는데 잘못하여 나누었더니 몫이 0.5 가 되었습니다. 바르게 계산하면 얼마입니까?

Answer: 0.92

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

Question (EN): How many 3-digit numbers are there where each digit is different and the sum of each digit is 9?
Question (KO): 각 자리의 수가 모두 다르고, 각 자리 수의 합은 9인 세 자리 수는 모두 몇 개입니까?

Answer: 34

Solution (Python):
var_a = 0
var_b = 9
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)
var_f = 9
list_d = []
for i in list_c:
    if i >= var_f:
        list_d.append(i)
var_g = 9
list_e = []
for i in list_d:
    if i <= var_g:
        list_e.append(i)
var_h = len(list_e)
print(int(var_h))
Category: Correspondence

Question (EN): When a number plus 2 is 8 less than 3 times the number, find the number.
Question (KO): 어떤 수에 2를 더한 값은 어떤 수의 3배보다 8만큼 작다고 할 때, 어떤 수를 구하시오.

Answer: 5

Solution (Python):
var_a = 2
var_b = 8
var_c = var_a + var_b
var_d = 3
var_e = 1
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g))
Category: Correspondence

Question (EN): Seungwoo took 35 liters (L) and 500 milliliters (㎖) of coke and 27 liters (L) and 200 milliliters (㎖) of cider while traveling. Among them, he drank 1 liter (L) and 750 milliliters (㎖) of coke. How many liters (L) are all the drinks left for Seungwoo?
Question (KO): 승우는 여행을 가면서 35리터(L) 500밀리리터(㎖)의 콜라와 27리터(L) 200밀리리터(㎖)의 사이다를 가져갔다. 그 중 콜라 1리터(L) 750밀리리터(㎖)를 마셨다. 승우에게 남은 음료수는 모두 몇 리터(L) 입니까?

Answer: 60.95

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

Question (EN): With 25,000 won, you bought two roses for 3,000 won and several lilies for 2,800 won. To get 2,200 won in change, find how many lilies you need to buy.
Question (KO): 25,000원으로 3,000원짜리 장미 2송이와 2,800원짜리 백합 몇 송이를 샀습니다. 거스름돈으로 2,200원을 받으려면, 백합은 몇 송이를 사야 하는지 구하시오.

Answer: 6

Solution (Python):
var_a = 25000
var_b = 2200
var_c = var_a - var_b
var_d = 3000
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 2800
var_i = var_g / var_h
print(int(var_i))
Category: Geometry

Question (EN): What is the perimeter of a regular hexagon with a side length of 5 centimeters (cm), in centimeters (cm)?
Question (KO): 한 변의 길이가 5센티미터(㎝)인 정육각형의 둘레는 몇 센티미터(㎝)입니까?

Answer: 30

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

Question (EN): Which circle has the greater area: circle A with a diameter of 10 centimeters (cm) and circle B with a radius of 4 centimeters (cm)?
Question (KO): 지름의 길이가 10센티미터(㎝)인 원 A와 반지름의 길이가 4센티미터(㎝)인 원 B 중 넓이가 더 넓은 원은 무엇인가요?

Answer: A

Solution (Python):
var_a = 'A'
var_b = 'B'
list_a= []
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 10
var_d = 2
var_e = var_c / var_d
var_f = 4
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)
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): Find the difference between the sum of even numbers less than or equal to 100 and the sum of odd numbers less than or equal to 30.
Question (KO): 100이하의 짝수들의 합과, 30이하의 홀수들의 합의 차를 구하시오.

Answer: 2325

Solution (Python):
var_a = 0
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 = 0
var_e = 30
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): Nine digits from 1 to 9 are used once to form a nine-digit number. If this number is a multiple of 55, find the smallest 9-digit number.
Question (KO): 1부터 9까지 9개의 숫자를 한 번씩 사용하여 아홉 자리 수를 만들었다. 이 수가 55의 배수일 때, 가장 작은 아홉자리 수를 구하여라.

Answer: 126374985

Solution (Python):
var_a = 1
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 9
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 55
list_c = []
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i % var_e == 0:
        list_c.append(i)
var_f = 1
list_d=list_c.copy()
list_d.sort()
var_g = list_d[var_f-1]
print(int(var_g))
Category: Possibility

Question (EN): The toy robot can transform into 3 different shapes and can be painted in 4 different colors. How many possible types of robots are there in all?
Question (KO): 장난감 로봇은 3가지의 형태로 변신할 수 있고, 4가지의 다른 색을 칠할 수 있습니다. 모두 몇 가지의 모양의 로봇이 있습니까?

Answer: 12

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

Question (EN): The height of a rectangle is 36 centimeters (cm) and the length of its width is 64 centimeters (cm). There is a square with a perimeter equal to the perimeter of this rectangle. Find the value of dividing the perimeter of this square into 4 equal parts.
Question (KO): 어떤 직사각형의 세로의 길이는 36센티미터(㎝)이고 가로의 길이는 64센티미터(㎝)입니다. 이 직사각형의 둘레의 길이와 같은 둘레의 길이를 갖는 정사각형이 있습니다. 이 정사각형의 둘레의 길이를 4등분했을 때의 값을 구하시오.

Answer: 50

Solution (Python):
var_a = 36
var_b = 64
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g))
Category: Correspondence

Question (EN): There are equations of 3×A-A=10, B+A=12, C-B=6. If A, B, and C are different natural numbers, what value of C satisfies the equation?
Question (KO): 3×A-A=10, B+A=12, C-B=6의 방정식들이 있습니다. A, B, C가 서로 다른 자연수 일때, 방정식을 만족하는 C의 값은 무엇인가요?

Answer: 13

Solution (Python):
var_a = 12
var_b = '3×A-A=10'
var_c = 'A'
ans_dict = dict()
var_b = var_b.replace('×','*')
var_b = var_b.replace('x','*')
var_b = var_b.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_b):
    if v in variable_candi:
        ans_dict[v] = 0
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, repeat=len(ans_dict)))
for c in candi:
    temp = var_b
    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] = int(c[i])
var_d = ans_dict[var_c]
var_e = var_a - var_d
var_f = 6
var_g = var_e + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Among the 6 numbers 3/2, 2.3, 1/5, 1.1, 5/2, and 4/5, select the numbers greater than 1 and less than 2 and count them.
Question (KO): 3/2, 2.3, 1/5, 1.1, 5/2, 4/5의 6 숫자 중 1보다는 크고 2보다는 작은 숫자만 골라서 개수를 세시오.

Answer: 2

Solution (Python):
var_a = 1.5
var_b = 2.3
var_c = 0.2
var_d = 1.1
var_e = 2.5
var_f = 0.8
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 = 1
list_b = []
for i in list_a:
    if i > var_g:
        list_b.append(i)
var_h = 2
list_c = []
for i in list_b:
    if i < var_h:
        list_c.append(i)
var_i = len(list_c)
print(int(var_i))
Category: Possibility

Question (EN): You chose two of the five numbers 0, 1, 2, 3, 4, and 5 to make two-digit numbers. If you can use the same number multiple times, how many numbers can you make in total?
Question (KO): 다섯 개의 숫자 0, 1, 2, 3, 4, 5 중에서 2개를 골라 두 자리의 수를 만들었다. 같은 수를 여러 번 사용해도 된다면, 만들 수 있는 모든 수들은 모두 몇개인가?

Answer: 30

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
var_f = 5
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.product(list_b, repeat=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: Arithmetic calculation

Question (EN): From 1 to 100, A is the sum of all even numbers, and B is the sum of all odd numbers. What is the difference of A and B?
Question (KO): 1이상 100이하의 모든 짝수의 합을 A, 모든 홀수의 합을 B라고 할 때 A와 B의 차는 얼마인가?

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

Question (EN): There are 8 rectangular fields with a length of 300 meters (m). If the area of each field is the same and the total area of the fields is 0.6 square kilometers (km2), how many meters (m) is the width of the field?
Question (KO): 세로의 길이가 300미터(m)인 직사각형 모양의 밭이 8개 있습니다. 각각의 밭의 넓이가 모두 같고 밭의 전체 넓이가 0.6제곱킬로미터(㎢)라면 밭의 가로의 길이는 몇 미터(m)입니까?

Answer: 250

Solution (Python):
var_a = 0.6
var_b = 1000
var_c = 1000
var_d = var_b * var_c
var_e = var_a * var_d
var_f = 8
var_g = var_e / var_f
var_h = 300
var_i = var_g / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Seonho has 2,500 won after spending 1/4 of the money in his wallet to buy snacks and 2/3 of the remaining money to buy food. How much money is in his wallet?
Question (KO): 선호는 지갑에 있던 돈의 1/4로 간식을 사 먹고, 남은 돈의 2/3은 준비물을 사는 데 썼을 때, 지금 선호가 가진 돈이 2500원이라면 처음 선호의 지갑에 있던 돈은 얼마입니까?

Answer: 10000

Solution (Python):
var_a = 2500
var_b = 1
var_c = 0.25
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 1
var_g = 0.6666666666666666
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Yoojung folded two fingers, and Yuna folded five. How many fingers do two people fold?
Question (KO): 유정이는 손가락을 2개 접었고, 유나는 5개 접었습니다. 두 사람이 접은 손가락은 몇 개입니까?

Answer: 7

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

Question (EN): Hoseok's average score in Korean and Mathematics is 88 points. If the average score of Korean, Mathematics, and English is 90, what is Hoseok's English score?
Question (KO): 호석이의 국어와 수학 두 과목의 평균 점수는 88점입니다. 국어, 수학, 영어 세 과목의 평균 점수가 90점일 때, 호석이의 영어 점수는 몇 점입니까?

Answer: 94

Solution (Python):
var_a = 90
var_b = 3
var_c = var_a * var_b
var_d = 88
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Three 217 centimeters (cm) long strings are tied together. If the length of the string at the tied part is the same and the length of the tied string is 627 centimeters (cm), find how many centimeters (cm) is the length of one part of the tied part.
Question (KO): 길이가 217센티미터(㎝)인 줄 3개를 묶어 길게 이었습니다. 묶인 부분의 줄의 길이는 같고, 이은 줄의 길이가 627센티미터(㎝)이면, 줄이 묶인 부분의 한 개의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 12

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

Question (EN): 48 objects which weigh a one-metric ton (m/t) have to be moved. How many moves are needed to make if trucks can carry up to 4 metric tons (m/t) at a time and 6 trucks move at once?  
Question (KO): 1톤짜리 물건 48개를 옮기려고 합니다. 4톤까지 실을 수 있는 트럭을 가득 채워 6대씩 한 번에 이동하여 물건을 나르려면 모두 몇 번 날라야 합니까?

Answer: 2

Solution (Python):
var_a = 48
var_b = 4
var_c = 6
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e))
Category: Correspondence

Question (EN): When you multiply a number by 17, you get 493. Find the number.
Question (KO): 어떤 수에 17을 곱했더니 493이 되었습니다. 어떤 수를 구하시오.

Answer: 29

Solution (Python):
var_a = 493
var_b = 17
var_c = var_a / var_b
print(int(var_c))
Category: Geometry

Question (EN): The area of a circle is equal to four times the area of the other circle with a radius of 2 cm. Find the size of the radius of the other circle.
Question (KO): 반지름이 2센티미터(㎝)인 원의 넓이의 4배가 어떤 원의 넓이와 같다. 어떤 원의 반지름의 크기를 구하시오.

Answer: 4

Solution (Python):
var_a = 4
var_b = 2
var_c = 2
var_d = var_b ** var_c
var_e = var_a * var_d
var_f = 0.5
var_g = var_e ** var_f
print(int(var_g))
Category: Possibility

Question (EN): If there are 3 types of pencils, 2 types of erasers, and 5 types of notebooks, find how many ways there are to buy 1 type of pencil, 1 type of eraser, and 1 type of notebook.
Question (KO): 연필이 3 종류, 지우개가 2종류, 공책이 5종류가 있을 때, 연필, 지우개, 공책을 각각 1 종류씩 사는 방법을 모두 몇 가지인지 구하시오.

Answer: 30

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

Question (EN): There is a train that runs at 400 meters (m) per minute. How many minutes does it take to completely cross the 1.625 kilometer (km) bridge? The length of the train is 115 meters (m).
Question (KO): 분속 400미터(m)를 달리는 기차가 있습니다. 1.625킬로미터(㎞)인 다리를 완전히 통과하려면 몇 분 걸리나요? 기차의 길이는 115미터(m)입니다.

Answer: 4.35

Solution (Python):
var_a = 115
var_b = 1.625
var_c = 1000
var_d = var_b * var_c
var_e = var_a + var_d
var_f = 400
var_g = var_e / var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Possibility

Question (EN): If there are 6 citizens A, B, C, D, E, and F, find the number of ways to elect 3 members for the National Assembly.
Question (KO): A, B, C, D, E, F 6명의 시민이 있을 때, 국회의원 3명을 뽑는 경우의 수를 구하시오.

Answer: 20

Solution (Python):
var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
var_e = 'E'
var_f = 'F'
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)
var_h = 3
var_i = 1
var_g = int(var_g)
var_h = int(var_h)
for i, elem in enumerate(range(var_h)):
    var_i = var_i * (var_g-i)
for i, elem in enumerate(range(var_h)):
    var_i = var_i / (i+1)
print(int(var_i))
Category: Possibility

Question (EN): Find the number of natural numbers that can be made by picking four of the number cards 0, 1, 2, 4, and 9.
Question (KO): 숫자 카드 0, 1, 2, 4, 9 중에서 4장을 뽑아 만들 수 있는 자연수의 개수를 구하시오.

Answer: 96

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 4
var_e = 9
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 = 4
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: Arithmetic calculation

Question (EN): There are five numbers 10, 11, 12, 13, and 14. What is the remainder when the 3rd smallest number is divided by the 2nd smallest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 3번째로 작은 수와 2번째로 작은 수로 나눈 나머지는 얼마입니까?

Answer: 1

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 = 3
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g % var_i
print(int(var_j))
Category: Correspondence

Question (EN): When 132.6 kilograms (kg) of apples harvested from the orchard were divided into equal weights in each truck, each truck loaded 13.26 kilograms (kg). If 6.4 kilograms (kg) of bananas are divided among these trucks, how many kilograms (kg) of bananas will be loaded per truck?
Question (KO): 과수원에서 수확한 132.6킬로그램(㎏)의 사과를 각 트럭에 동일한 무게로 나누어 담았더니 한 트럭당 13.26킬로그램(㎏)을 실었다. 만약 이 트럭들에 6.4킬로그램(㎏)의 바나나를 나눠 담는다면 한 트럭당 몇 킬로그램(㎏)의 바나나를 실겠는가?

Answer: 0.64

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

Question (EN): 63 is the result of subtracting 29 from a number. Find the value which is 47 less than this number.
Question (KO): 63는 어떤 수에서 29를 빼서 나온 결과입니다. 어떤 수보다 47작은 수를 구하시오.

Answer: 45

Solution (Python):
var_a = 63
var_b = 29
var_c = var_a + var_b
var_d = 47
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): A rectangle has a sum of four sides equal to 52 centimeters (cm). If the length of one of the sides is 11 centimeters (cm), what is the area?
Question (KO): 네 변의 길이의 합이 52센티미터(㎝)인 직사각형이 있습니다. 이 중 한 변의 길이가 11센티미터(㎝)라면 넓이는 얼마일지 구하시오.

Answer: 165

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

Question (EN): A set of boxes contains 2 balls. With a set of 3, how many balls are there?
Question (KO): 상자 한 세트에는 2개의 공이 들어 있습니다. 3개의 세트를 가졌을 때, 공의 개수는?

Answer: 6

Solution (Python):
var_a = 2
var_b = 3
var_c = var_a * var_b
print(int(var_c))
Category: Correspondence

Question (EN): 3/10 of this number minus 8 is 12. Find what 1/5 of this number is.
Question (KO): 어떤 수의 3/10에서 8을 뺀 값은 12입니다. 어떤 수의 1/5은 얼마인지 구해 보시오.

Answer: 13.33

Solution (Python):
var_a = 12
var_b = 8
var_c = var_a + var_b
var_d = 0.3
var_e = var_c / var_d
var_f = 0.2
var_g = var_e * var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))