philschmid/DMath huggingface dataset:
Category: Geometry

Question (EN): There are 3 apples and 2 persimmons in the box. How many persimmons are in the box?
Question (KO): 서희네 도시에서 제주도까지 가는 비행기 노선은 3개, 배 노선은 2개일 때, 배로 가는 경우의 수를 구하시오.

Answer: 2

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

Question (EN): Yoongi has 4, Yuna has 5, and Jungkook has the number 6 multiplied by 3. Who got the biggest number?
Question (KO): 윤기는 4, 유나는 5, 정국이는 6에서 3을 곱한 수를 모았습니다. 누가 가장 큰 수를 모았나요?

Answer: Jungkook

Solution (Python):
var_a = 'Yoongi'
var_b = 'Yuna'
var_c = 'Jungkook'
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 = 4
var_e = 5
var_f = 6
var_g = 3
var_h = var_f * var_g
list_b= []
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Arithmetic calculation

Question (EN): Find how many times the number 2 appears on the train timetable for the station where trains stop every hour from 6:00 am to 11:00 pm. (However, 11 o'clock at night is indicated as 23 o'clock.)
Question (KO): 아침 6시부터 밤 11시까지 1시간 간격으로 기차가 서는 역의 기차 시간표에는 숫자 2가 몇 번 등장하는지 구하시오. (단, 밤 11시는 23시와 같이 표기합니다.)

Answer: 6

Solution (Python):
var_a = 6
var_b = 23
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
list_b = []
var_d = int(var_d)
while var_d//10 > 0:
    list_b.append(var_d%10)
    var_d = var_d//10
list_b.append(var_d%10)
list_b = list_b[::-1]
var_e = 2
var_f = 0
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i == var_e:
        var_f = var_f + 1
print(int(var_f))
Category: Arithmetic calculation

Question (EN): Among the natural numbers from 1 to 100, what is the third largest number with a remainder of 2 when divided by 5?
Question (KO): 1부터 100까지의 자연수 중 5로 나누었을 때 나머지가 2인 수 중에서 세 번째로 큰 수는 얼마인지 구하시오.

Answer: 87

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 = 5
var_e = 2
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 = 3
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
print(int(var_g))
Category: Correspondence

Question (EN): When 9 is multiplied by a number, the result is 36. Find out the number exactly.
Question (KO): 9에 어떤 수를 곱했더니 결과가 36이 나왔습니다. 어떤 수를 정확히 구하시오.

Answer: 4

Solution (Python):
var_a = 36
var_b = 9
var_c = var_a / var_b
print(int(var_c))
Category: Geometry

Question (EN): Building blocks are laid out to form a square. The number of building blocks on the outermost sides of the square is 52. Find the number of building blocks on the outermost of one side.
Question (KO): 쌓기 나무를 늘어놓아 정사각형을 만들었습니다. 정사각형의 가장 바깥쪽에 놓인 쌓기 나무의 개수는 52개 이다. 가장 바깥쪽의 한 변에 놓인 쌓기 나무의 개수는 몇 개인지 구하시오.

Answer: 14

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

Question (EN): Each box contains 6 balls, and there are 30 white balls and 18 red balls. How many more boxes are there in white ball boxes than red ball boxes?
Question (KO): 각 상자마다 6개의 공이 들어있으며 총 흰색 공이 30개, 빨간색 공이 18개 있다. 흰색 공이 든 상자는 빨간색 공이 든 상자보다 몇 상자 더 많습니까?

Answer: 2

Solution (Python):
var_a = 30
var_b = 6
var_c = var_a / var_b
var_d = 18
var_e = 6
var_f = var_d / var_e
var_g = var_c - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): You want to print the text '29/12/2020'. Find how many times the number '2' is printed.
Question (KO): 2020년 12월 29일이라는 글자를 인쇄하려고 한다. 숫자 '2'는 몇 번 인쇄되는지 구하시오.

Answer: 4

Solution (Python):
var_a = 2020
var_b = 12
var_c = 29
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=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
list_b = []
var_d = int(var_d)
while var_d//10 > 0:
    list_b.append(var_d%10)
    var_d = var_d//10
list_b.append(var_d%10)
list_b = list_b[::-1]
var_e = 2
var_f = 0
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i == var_e:
        var_f = var_f + 1
print(int(var_f))
Category: Arithmetic calculation

Question (EN): Giyoon prepared some chocolates to distribute equally to 8 of her friends who decided to do volunteering together. But 2 people didn't come, so she gave one more chocolate to each person, and there were 4 chocolates left. How many chocolates did Giyoon prepare?
Question (KO): 기윤이는 함께 봉사 활동에 참여하기로 한 친구 8명에게 똑같이 나누어 주기 위해 초콜릿을 몇 개 준비하였습니다. 그런데 2명이 오지 않아서 한 사람당 1개씩 더 주었더니 초콜릿이 4개 남았습니다. 기윤이가 처음에 가져온 초콜릿은 몇 개였을까요?

Answer: 40

Solution (Python):
var_a = 8
var_b = 2
var_c = var_a - var_b
var_d = 4
var_e = var_c + var_d
var_f = 8
var_g = 8
var_h = 2
var_i = var_g - var_h
var_j = var_f - var_i
var_k = var_e // var_j
var_l = 8
var_m = var_k * var_l
print(int(var_m))
Category: Geometry

Question (EN): After making a large square out of several small square-shaped pieces of paper, there were 20 pieces of paper left. When I tried to increase a horizontal side and a vertical side by one row each, nine pieces of paper were short. How many pieces of paper are there?
Question (KO): 작은 정사각형 모양의 종이 조각 여러개로 큰 정사각형을 만들고 보니 20개의 종이조각이 남았다. 가로 한 변과 세로 한 변을 1열씩 늘리려고 하였더니 9개의 종이 조각이 부족하였다. 종이 조각의 개수는 총 개일까?

Answer: 216

Solution (Python):
var_a = 20
var_b = 9
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
var_i = var_g ** var_h
var_j = 20
var_k = var_i + var_j
print(int(var_k))
Category: Comparison

Question (EN): There are 28 identical vending machines in the arcade. Each vending machine has the same number of beverages. When you selected the beverage that is 14th from the front, 20th from the back, 3rd from the top and 2nd from the bottom in a vending machine, find the total number of drinks in these arcade vending machines.
Question (KO): 오락실에 똑같은 자판기가 28대 있습니다. 각 자판기마다 가진 음료수의 수는 같습니다. 어느 자판기에서 앞에서 14번째, 뒤에서 20번째, 위에서 3번째, 아래에서 2번째 음료수를 선택했을 때, 이 오락실 자판기들 안에 있는 음료수의 수를 모두 구하시오.

Answer: 3696

Solution (Python):
var_a = 14
var_b = 20
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 3
var_g = 2
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
var_l = 28
var_m = var_k * var_l
print(int(var_m))
Category: Correspondence

Question (EN): I took B6 away from 7A, and it became 23. What is A+B?
Question (KO): 7A에서 B6을 뺐더니 23이 되었습니다. A+B는 무엇인가요?

Answer: 14

Solution (Python):
var_a = '7A-B6=23'
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]
var_d = '7A-B6=23'
var_e = 'B'
ans_dict = dict()
var_d = var_d.replace('×','*')
var_d = var_d.replace('x','*')
var_d = var_d.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_d):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_d
    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_d):
        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_f = ans_dict[var_e]
var_g = var_c + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): I bought 16 pencils at a stationery store, but I lost a few on the way back home. When I counted the number of remaining pencils, there were 8. How many pencils were lost?
Question (KO): 문방구에서 연필 16자루를 샀는데 오는길에 몇 자루를 잃어버리고 남아 있는 연필의 수를 세보니 8자루였습니다. 잃어버린 연필은 몇 자루입니까?

Answer: 8

Solution (Python):
var_a = 16
var_b = 8
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): You weighed the bag at the airport and it was 35 kilograms (kg) and 500 grams (g). After that, if you take out a laptop weighing 1 kg (kg) and 750 grams (g) from the bag and there is another bag weighing 27 kilograms (kg) and 200 grams (g), what is the total weight of the bags in kilograms (kg)?
Question (KO): 공항에서 가방의 무게를 달았는데 35킬로그램(㎏) 500그램(g) 이었습니다. 그 이후 가방 안에서 1킬로그램(㎏) 750그램(g)인 노트북을 꺼내고 27킬로그램(㎏) 200그램(g)의 무게인 다른 가방이 있다면 가방들의 무게의 합은 몇 킬로그램(㎏)입니까?

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): How many four-digit numbers are the common multiples of 5, 6, and 2?
Question (KO): 네 자리 수 중 5, 6, 2의 공배수인 수는 모두 몇 개 입니까?

Answer: 300

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 = 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 = 6
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 = len(list_d)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): If there are 8 boxes of 12 soccer balls and 5 boxes of 12 basketballs, how many basketballs are fewer than soccer balls?
Question (KO): 축구공이 12개씩 담겨있는 상자가 8개 있고 농구공이 12개씩 담겨있는 상자는 5개 있습니다. 농구공은 축구공보다 몇 개 더 적습니까?

Answer: 36

Solution (Python):
var_a = 12
var_b = 8
var_c = var_a * var_b
var_d = 12
var_e = 5
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g))
Category: Correspondence

Question (EN): A and B are single digit numbers. When A15B94 is divisible by 99, find the appropriate value for B.
Question (KO): A, B는 한 자리 수입니다. A15B94가 99로 나누어 떨어질 때, B에 알맞은 값을 구하시오.

Answer: 3

Solution (Python):
var_a = 'A15B94'
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 = 99
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 = 'A15B94'
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): You are going to hand out notebooks to a few students. If you give each student 4 notebooks, 3 notebooks will be left, and if you give each student 5 notebooks, 6 noteboks will be in short. Find the number of notebooks.
Question (KO): 몇 명의 학생들에게 공책을 나누어 주려고 한다. 한 학생에게 4권씩 나누어 주면 3권이 남고, 5권씩 나누어 주면 6권이 부족하다고 할 때, 공책의 수를 구하시오.

Answer: 39

Solution (Python):
var_a = 3
var_b = 6
var_c = var_a + var_b
var_d = 5
var_e = 4
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 4
var_i = var_g * var_h
var_j = 3
var_k = var_i + var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): There are 85 apples and pears in total. How many more apples are there than pears when there are 48 apples?
Question (KO): 사과와 배가 모두 85개 있습니다. 사과가 48개일 때 사과는 배보다 몇 개 더 많습니까?

Answer: 11

Solution (Python):
var_a = 48
var_b = 85
var_c = 48
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e))
Category: Possibility

Question (EN): Find the number of cases to put A and B next to each other in a situation where 6 people A, B, C, D, E, and F are lined up in a line.
Question (KO): A, B, C, D, E, F 6명을 한 줄로 세울 때, A, B를 서로 이웃하게 하여 세우는 경우의 수를 구하시오.

Answer: 240

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 = 'A'
list_b= []
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_h = len(list_c)
var_i = len(list_c)
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
    var_j = var_j * (var_h-i)
var_k = 'A'
var_l = 'B'
list_d= []
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_d.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_d.append(var_k)
list_d.reverse()
var_m = len(list_d)
var_n = len(list_d)
var_o = 1
var_m = int(var_m)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
    var_o = var_o * (var_m-i)
var_p = var_j * var_o
print(int(var_p))
Category: Comparison

Question (EN): Yujeong arranged colored balls in a row on the desk in the following order: red, blue, yellow, purple, and white. What color comes last?
Question (KO): 유정은 책상 위에 색색의 공을 일렬로 늘어놓았다. 빨간색, 파란색, 노란색, 보라색, 흰색 공을 순서대로 놓았을 때 마지막 공은 무슨 색입니까?

Answer: white

Solution (Python):
var_a = 'red'
var_b = 'blue'
var_c = 'yellow'
var_d = 'purple'
var_e = 'white'
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 = len(list_a)
var_g = list_a[var_f-1]
print(var_g)
Category: Possibility

Question (EN): How many 4-digit numbers are there where the sum of all digits is 35?
Question (KO): 모든 자리 수의 합이 35인 네 자리 수는 모두 몇 개입니까?

Answer: 4

Solution (Python):
var_a = 1000
var_b = 10000
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
list_b=[]
for i in list_a:
    var_f = 0
    i = int(i)
    while i//10 > 0:
        var_f = var_f + i%10
        i = i//10
    var_f = var_f + i%10
    list_b.append(var_f)
var_g = 35
list_c = []
for i in list_b:
    if i >= var_g:
        list_c.append(i)
var_h = 35
list_d = []
for i in list_c:
    if i <= var_h:
        list_d.append(i)
var_i = len(list_d)
print(int(var_i))
Category: Possibility

Question (EN): How many 2-digit numbers can you make by selecting 2 of the cookies numbered 0, 1, and 5?
Question (KO): 0, 1, 5가 적힌 과자 중 2가지를 뽑아 만들 수 있는 두 자리 수는 모두 몇 개인가?

Answer: 4

Solution (Python):
var_a = 0
var_b = 1
var_c = 5
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.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 = len(list_b)
print(int(var_e))
Category: Correspondence

Question (EN): Subtracting 46 from a number gives 15 as a result. What would be the result if 29 is subtracted from this number?
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): A number divided by 2 and dividing it by 2 again equals 85 plus 45. What is the value of subtracting 45 from the number?
Question (KO): 어떤 수를 2로 나눈 값을 다시 2로 나눈 값이 85에 45를 더한 값과 같다고 한다. 어떤 수에서 45를 뺀 값을 구하시오.

Answer: 475

Solution (Python):
var_a = 85
var_b = 45
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
var_f = 2
var_g = var_e * var_f
var_h = 45
var_i = var_g - var_h
print(int(var_i))
Category: Comparison

Question (EN): Several children are sitting in a circle. A child is facing the fifteenth child sitting clockwise from that child. Find the number of children sitting.
Question (KO): 여러 명의 아이들이 동그랗게 앉아 있습니다. 어떤 아이는 그 아이로부터 시계 방향으로 15번째에 있는 아이와 마주보고 있습니다. 앉아있는 아이들의 숫자를 구하시오.

Answer: 30

Solution (Python):
var_a = 15
var_b = 1
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))
Category: Arithmetic calculation

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

Answer: 15

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

Question (EN): There are two numbers 0.8, 1/2. How many numbers are less than 3?
Question (KO): 2개의 숫자 0.8, 1/2가 있습니다. 3보다 작은 수는 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 0.8
var_b = 0.5
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 = 3
list_b = []
for i in list_a:
    if i < var_c:
        list_b.append(i)
var_d = len(list_b)
print(int(var_d))
Category: Possibility

Question (EN): We are going to divide the students into 2 groups. How many ways are there to divide Jungkook, Jimin, Yoongi, and Yuna? The number of students in each group is the same.
Question (KO): 학생들을 2그룹으로 나누려고 합니다. 정국, 지민, 윤기, 유나를 나누는 경우는 모두 몇 가지입니까? 각 그룹에 포함된 학생 수는 같습니다.

Answer: 6

Solution (Python):
var_a = 'Jungkook'
var_b = 'Jimin'
var_c = 'Yoongi'
var_d = 'Yuna'
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 = len(list_a)
var_f = 2
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: Comparison

Question (EN): When 19 toys are placed in a row, if the toy (A) is placed 8th from the right, in which place is toy (A) placed from the left?
Question (KO): 19개의 장난감이 한 줄로 놓여있을 때, 오른쪽에서 8번째에 (가) 장난감이 놓여있다면 왼쪽에서는 몇 번 째입니까?

Answer: 12

Solution (Python):
var_a = 19
var_b = 8
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): You made the mistake of subtracting 63 instead of multiplying a number by 8, and got 8. What is the correct calculation result?
Question (KO): 어떤 수에 8을 곱해야 할 것을 잘못하여 63을 뺀 결과는 8이 되었습니다. 바르게 계산한 결과는 얼마인가요?

Answer: 568

Solution (Python):
var_a = 8
var_b = 63
var_c = var_a + var_b
var_d = 8
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): I stacked 10 rows of chips. 9 rows are stacked 8 each, and the other 1 row is stacked 4 each. How many chips are there in total?
Question (KO): 칩을 10줄 쌓았습니다. 그중 9줄에는 8개씩 쌓았고, 나머지 1줄에는 4개씩 쌓았습니다. 칩은 모두 몇 개입니까?

Answer: 76

Solution (Python):
var_a = 9
var_b = 8
var_c = var_a * var_b
var_d = 1
var_e = 4
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g))
Category: Comparison

Question (EN): There are 32 students in Jimin's class, and each has a different height. If you line up these students in order from shortest to tallest, Jimin will be 11th from the front and Yuna will be 27th from the front. How many students are standing between Jimin and Yuna?
Question (KO): 지민이네 반 학생은 32명이고 각각의 키가 다릅니다. 이 학생들을 키가 작은 학생부터 순서대로 줄을 세우면 지민이는 앞에서 11번째에 서고, 유나는 앞에서 27번째에 섭니다. 지민이와 유나 사이에 서 있는 학생은 몇 명입니까?

Answer: 15

Solution (Python):
var_a = 27
var_b = 11
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): You gathered several pieces of paper in the shape of an square with a side length of 8 centimeters (cm). If you put as many of these papers as possible without overlapping them in a 72 centimeters (cm) square bin, how many can you fit?
Question (KO): 한 변의 길이가 8센티미터(㎝)인 정사각형 모양의 종이들을 몇 개 모았습니다. 이 종이들을 한 변의 길이가 72센티미터(㎝)인 정사각형 모양의 통에 겹치지 않도록 최대한 많이 넣는다면, 몇 개까지 넣을 수 있습니까?

Answer: 81

Solution (Python):
var_a = 72
var_b = 8
var_c = var_a / var_b
var_d = 72
var_e = 8
var_f = var_d / var_e
var_g = var_c * var_f
print(int(var_g))