philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): When 35 students including Minyoung are standing in a line, 27 students are standing in front of Minyeong. How many students are behind Minyoung?
Question (KO): 민영이를 포함한 35명의 학생이 한 줄로 서 있을 때, 민영이의 앞에 27명의 학생들이 서 있습니다. 민영이 뒤에는 몇 명의 학생이 있습니까?

Answer: 7

Solution (Python):
var_a = 35
var_b = 27
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Jiyeol took Korean, Math, and English tests in the midterm exam. If the mean between the two different test scores is 26.5, 34.5, and 29 respectively, what is Jiyeol's whole average score?
Question (KO): 지열이가 중간고사에서 국어, 수학, 영어 시험을 봤다. 서로 다른 두 시험 간의 평균이 각각 26.5, 34.5, 29 일 때, 지열이의 전체 평균은 얼마인지 구하시오

Answer: 30

Solution (Python):
var_a = 26.5
var_b = 34.5
var_c = var_a + var_b
var_d = 29
var_e = var_c + var_d
var_f = 3
var_g = var_e / var_f
print(int(var_g))
Category: Possibility

Question (EN): If you are trying to decorate a fruit basket with 5 different fruits, including 2 pineapples, what is the number of cases that pineapples are placed at both ends?
Question (KO): 파인애플 2개를 포함한 서로 다른 과일 5개를 이용해 과일 바구니를 꾸미려고 할 때, 파일애플이 양 끝에 비치되는 경우의 수는?

Answer: 12

Solution (Python):
var_a = 5
var_b = 2
var_c = var_a - var_b
var_d = 5
var_e = 2
var_f = var_d - var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
    var_g = var_g * (var_c-i)
var_h = 2
var_i = var_g * var_h
print(int(var_i))
Category: Possibility

Question (EN): There is a volleyball, soccerball, basketball, and baseball. If Youngbin buys two different balls, how many ways can he choose the ball?
Question (KO): 4개의 서로 다른 배구공, 축구공, 농구공, 야구공이 있다. 영빈이가 서로 다른 2개의 공을 산다고 할때 공을 고르는 방법의 경우는 몇가지인가?

Answer: 6

Solution (Python):
var_a = 'volleyball'
var_b = 'soccerball'
var_c = 'basketball'
var_d = 'baseball'
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: Correspondence

Question (EN): Minsu plans to go on a bicycle trip for 28 days. If the total distance to be traveled is 82.04 kilometers (km) and he travels an equal distance every day, find how many kilometers (km) must be traveled per day.
Question (KO): 민수는 28일 동안 자전거 여행을 하려고 한다. 총 이동해야 하는 거리가 82.04킬로미터(㎞)이고 하루에 동일한 거리를 이동한다고 하면 하루에 몇 킬로미터(㎞)를 이동해야하는지 구하시오.

Answer: 2.93

Solution (Python):
var_a = 82.04
var_b = 28
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Arithmetic calculation

Question (EN): There are four numbers 10, 11, 12, and 13. Divide the smallest number by the second smallest number.
Question (KO): 4개의 수 10, 11, 12, 13이 있습니다. 그 중에서 가장 작은 수와 2번째로 작은 수로 나눈 값은 얼마입니까?

Answer: 0.91

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[var_e-1]
var_g = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f / var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Correspondence

Question (EN): When 6A+B2=77, what is B?
Question (KO): 6A+B2=77일 때 B는 무엇인지 답하시오

Answer: 1

Solution (Python):
var_a = '6A+B2=77'
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): There are three numbers 10, 11, and 12. What is the 3rd largest number divided by the 2nd largest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 3번째로 큰 수와 2번째로 큰 수로 나눈 값은 얼마입니까?

Answer: 0.91

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b=list_a.copy()
list_b.sort()
var_e = list_b[-var_d]
var_f = 2
list_c=list_a.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = var_e / var_g
print('{:.2f}'.format(round(var_h+1e-10,2)))
Category: Comparison

Question (EN): The distance from the house to the library is 2 + 13/40 kilometers (km), and from the house to the bank is 2.56 kilometers (km). Which is farther from home, the library or the bank?
Question (KO): 집에서 도서관까지의 거리는 2 + 13/40킬로미터(㎞)이고 집에서 은행까지의 거리는 2.56킬로미터(㎞)입니다. 집에서 도서관, 은행 중 어느 것이 더 멀까요?

Answer: bank

Solution (Python):
var_a = 'library'
var_b = 'bank'
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 = 13
var_e = 40
var_f = var_d / var_e
var_g = var_c + var_f
var_h = 2.56
list_b= []
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)
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: Comparison

Question (EN): 20 ducks are waiting their turn to drink. If 11 ducks drank before the (a) duck, how many ducks drank after the (a) duck?
Question (KO): 오리 20마리가 물을 마시기 위해 순서를 기다리고 있습니다. (가) 오리보다 11마리의 오리가 먼저 물을 마셨을 때, (가) 오리보다 늦게 물을 마시는 오리는 몇 마리입니까?

Answer: 8

Solution (Python):
var_a = 20
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): A large square was created by arranging the square-shaped ttakji regularly without gaps. If the number of ttakjis placed at the perimeter was 240, how many ttakjis in total were used?
Question (KO): 정사각형 모양의 딱지를 빈틈없이 규칙적으로 늘어놓아 큰 정사각형을 만들었습니다. 둘레에 놓인 딱지의 개수가 240개였다면, 사용한 딱지 전체의 수는 몇 개입니까?

Answer: 3721

Solution (Python):
var_a = 240
var_b = 4
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: Comparison

Question (EN): What is the probability of getting a card with a number less than or equal to 9 when you draw one of the number cards 1, 3, 4, 6, 7, or 9?
Question (KO): 1, 3, 4, 6, 7, 9의 숫자 카드 중에서 하나를 뽑을 때 9 이하의 수가 적힌 카드가 나올 확률은 어떻게 될까요?

Answer: 1

Solution (Python):
var_a = 1
var_b = 3
var_c = 4
var_d = 6
var_e = 7
var_f = 9
list_a= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_g = 9
list_b = []
for i in list_a:
    if i <= var_g:
        list_b.append(i)
var_h = len(list_b)
var_i = 1
var_j = 3
var_k = 4
var_l = 6
var_m = 7
var_n = 9
list_c= []
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_c.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_c.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_c.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_c.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_c.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_c.append(var_i)
list_c.reverse()
var_o = len(list_c)
var_p = var_h / var_o
print(int(var_p))
Category: Correspondence

Question (EN): I need to divide a number by 5, but I mistakenly multiplied it by 7 and then added 2/9 to get 5 and 4/9. If you calculate correctly, show how much it is to 2 decimal places.
Question (KO): 어떤 수를 5로 나누어야 할 것을 잘못하여 7을 곱한 후 2/9를 더했더니 5와 4/9가 되었습니다. 바르게 계산하면 얼마인지 소수 2번째 자리까지 나타내어 보세요.

Answer: 0.15

Solution (Python):
var_a = 5
var_b = 0.4444444444444444
var_c = var_a + var_b
var_d = 0.2222222222222222
var_e = var_c - var_d
var_f = 7
var_g = var_e / var_f
var_h = 5
var_i = var_g / var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Possibility

Question (EN): There are 3 pairs of birds. How many birds are there in total?
Question (KO): 3쌍의 새가 있습니다. 새는 총 몇마리 인가요?

Answer: 6

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

Question (EN): In the division process, Namjoon omitted the 0 in the one's place of the three-digit divisor and misrepresented it as 12. After calculating, the quotient is divided by 210. Find the correctly calculated quotient.
Question (KO): 남준이가 나눗셈을 하는 과정에서 나누는 세 자리 수의 일의 자리에 있는 0을 빠뜨려서 12로 잘못 보고 계산하였더니 몫이 210으로 나누어떨어졌습니다. 바르게 계산한 몫을 구하시오.

Answer: 21

Solution (Python):
var_a = 210
var_b = 12
var_c = var_a * var_b
var_d = 120
var_e = var_c // var_d
print(int(var_e))
Category: Geometry

Question (EN): If the area of a piece of paper in the shape of a rhombus is 80 square centimeters (cm2) and one diagonal is 16 centimeters (cm), how long is the other diagonal in centimeters (cm)?
Question (KO): 어느 마름모 모양의 종이 조각의 넓이가 80제곱센티미터(㎠), 한 대각선의 길이가 16 센티미터(㎝)일 때 다른 대각선의 길이는 몇 센티미터(㎝)일까요?

Answer: 10

Solution (Python):
var_a = 80
var_b = 2
var_c = var_a * var_b
var_d = 16
var_e = var_c / var_d
print(int(var_e))
Category: Comparison

Question (EN): Find the number of numbers less than 0.4 among 0.8, 1/2, 0.3, and 1/3.
Question (KO): 0.8, 1/2, 0.3, 1/3 중 0.4보다 작은 수의 개수를 구하시오.

Answer: 2

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.3
var_d = 0.3333333333333333
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 = 0.4
list_b = []
for i in list_a:
    if i < var_e:
        list_b.append(i)
var_f = len(list_b)
print(int(var_f))
Category: Arithmetic calculation

Question (EN): There is a box with a width of 24 centimeters (cm), a length of 15 centimeters (cm), and a height of 28 centimeters (cm). If you fill this box with as many milk cartons as possible, with a width of 4 centimeters (cm), a length of 5 centimeters (cm), and a height of 7 centimeters (cm), how many milk cartons will it fit?
Question (KO): 가로 24센티미터(㎝), 세로 15센티미터(㎝), 높이 28센티미터(㎝)인 상자가 있습니다. 이 상자에 가로 4센티미터(㎝), 세로 5센티미터(㎝), 높이 7센티미터(㎝)인 우유팩을 최대한 많이 채운다면, 우유팩은 몇 개가 들어가겠습니까?

Answer: 72

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

Question (EN): Find the difference between the second largest and the third smallest three-digit numbers, each of which has 1, 6, and 8 on each digit.
Question (KO): 각 자리수가 1, 6, 8로 이루어져 있고 각각 다른 숫자로 되어 있는 세 자리 수 중 두 번째로 큰 것과 세 번째로 작은 것의 차를 구하시오.

Answer: 198

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

Question (EN): Jungkook has 10 pieces of colored paper, and Hoseok has 7 pieces of colored paper. Seokjin has 2 fewer pieces of colored paper than Jungkook. Who has the least colored paper?
Question (KO): 정국이는 색종이를 10장, 호석이는 색종이를 7장 가지고 있습니다. 석진이는 정국이보다 색종이를 2장 더 적게 가지고 있습니다. 색종이를 가장 적게 가지고 있는 사람은 누구입니까?

Answer: Hoseok

Solution (Python):
var_a = 'Jungkook'
var_b = 'Hoseok'
var_c = 'Seokjin'
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 = 10
var_e = 7
var_f = 10
var_g = 2
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-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Correspondence

Question (EN): There are two different numbers A and B. Find A in the two-digit subtraction formula A7-3B=55.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 두 자리 수끼리의 뺄셈식 A7-3B=55에서 A를 구하시오.

Answer: 8

Solution (Python):
var_a = 'A7-3B=55'
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: Arithmetic calculation

Question (EN): If 5 pieces of 400 centimeters (cm) long tape are joined together and the total length is 1904 centimeters (cm), how many millimeters (mm) is the length of each overlapping part?
Question (KO): 길이가 400센티미터(㎝)인 테이프를 5개 만큼 이어 붙였는데 전체 길이는 1904센티미터(㎝)가 되었다면, 겹친 부분의 길이는 각각 몇 밀리미터(㎜)입니까?

Answer: 2400

Solution (Python):
var_a = 400
var_b = 5
var_c = var_a * var_b
var_d = 1904
var_e = var_c - var_d
var_f = 5
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 100
var_k = var_i * var_j
print(int(var_k))
Category: Arithmetic calculation

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

Answer: 156

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

Question (EN): On the first day, 318 liters (L) of water were added to the pool, and on the second day, 312 liters (L) of water were added. On the third day, 180 liters (L) of water were added in the morning and 162 liters (L) in the afternoon. How many liters (L) of water were added to the pool on average each day?
Question (KO): 수영장에 1번째 날에는 318리터(L)의 물을 넣고, 2번째 날에는 312리터(L)의 물을 넣었습니다. 3번째 날 오전에는 180리터(L), 오후에는 162리터(L)의 물을 넣었습니다. 매일 평균 몇 리터(L)의 물을 넣었습니까?

Answer: 324

Solution (Python):
var_a = 318
var_b = 312
var_c = var_a + var_b
var_d = 180
var_e = 162
var_f = var_d + var_e
var_g = var_c + var_f
var_h = 3
var_i = var_g / var_h
print(int(var_i))
Category: Comparison

Question (EN): There are 28 identical egg containers in the mart. Each egg container has the same number of eggs. When you select the 14th egg from the front, the 20th from the back, the 3rd from the left, and the 2nd from the right in an egg container, find all the number of eggs in the egg containers at this mart.
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): Subtracting some number from 88 gives 54. Find the number.
Question (KO): 88에 어떤 수를 뺐더니 54가 되었습니다. 어떤 수를 구하시오.

Answer: 34

Solution (Python):
var_a = 88
var_b = 54
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): A and B are single-digit numbers. If A56B is a multiple of 36, how many digits can A be?
Question (KO): A, B는 한 자리 수입니다. A56B가 36의 배수일 때 A가 될 수 있는 숫자의 개수를 구하시오.

Answer: 3

Solution (Python):
var_a = 'A56B'
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 = 36
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 = 'A56B'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
    elem = str(elem)
    list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_e = len(list_c)
print(int(var_e))
Category: Comparison

Question (EN): Jihee collected 7 and 8. Seokjin collected 3 and 10. Suzy collected 9 and 2. Who is the person whose sum of the collected numbers is less than Seokjin?
Question (KO): 지희는 7과 8을 모았습니다. 석진이는 3과 10을 모았습니다. 수지는 9와 2를 모았습니다. 모은 수의 합이 석진이보다 더 작은 사람은 누구입니까?

Answer: Suzy

Solution (Python):
var_a = 'Jihee'
var_b = 'Seokjin'
var_c = 'Suzy'
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 = 'Seokjin'
var_e = list_a.index(var_d)+1
var_f = 7
var_g = 8
var_h = var_f + var_g
var_i = 3
var_j = 10
var_k = var_i + var_j
var_l = 9
var_m = 2
var_n = var_l + var_m
list_b= []
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
var_o = list_b[var_e-1]
list_c = []
for i in list_b:
    if i < var_o:
        list_c.append(i)
var_p = 1
var_q = list_c[var_p-1]
var_r = list_b.index(var_q)+1
var_s = list_a[var_r-1]
print(var_s)
Category: Geometry

Question (EN): The lengths of the two wires are 36 centimeters (cm) and 38 centimeters (cm), respectively. Make a square with the 36 centimeters (cm) wire and a rectangle 15 centimeters (cm) wide with the 38 centimeters (cm) wire. Find the difference between the area of the square and the rectangle.
Question (KO): 두 개의 철사의 길이가 각각 36센티미터(㎝), 38센티미터(㎝)이다. 36센티미터(㎝)의 철사로 정사각형을 만들고 38센티미터(㎝)의 철사로 가로가 15센티미터(㎝)인 직사각형을 만든다. 정사각형과 직사각형의 넓이의 차이를 구하시오.

Answer: 21

Solution (Python):
var_a = 36
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
var_f = 38
var_g = 2
var_h = var_f / var_g
var_i = 15
var_j = var_h - var_i
var_k = 15
var_l = var_j * var_k
var_m = var_e - var_l
var_n = abs(var_m)
print(int(var_n))
Category: Comparison

Question (EN): There are three triangles (A), (B), and (C). Triangle (A) has a base length of 8 centimeters (cm) and a height of 6 centimeters (cm), triangle (B) has a base length of 5 centimeters (cm) and a height of 9 centimeters (cm), triangle (C) has a base of 7 centimeters (cm) and a height of 7 centimeters (cm). Which triangle has the largest area among (A), (B), and (C)?
Question (KO): 세 삼각형 (가), (나), (다)가 있습니다. (가) 삼각형은 밑변의 길이가 8센티미터(㎝), 높이가 6센티미터(㎝)이고, (나) 삼각형은 밑변의 길이가 5센티미터(㎝), 높이가 9센티미터(㎝)이고, (다) 삼각형은 밑변의 길이가 7센티미터(㎝), 높이가 7센티미터(㎝)입니다. (가), (나), (다) 중에서 넓이가 가장 넓은 삼각형은 어느 것입니까?

Answer: (C)

Solution (Python):
var_a = '(A)'
var_b = '(B)'
var_c = '(C)'
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 = 8
var_e = 6
var_f = var_d * var_e
var_g = 2
var_h = var_f / var_g
var_i = 5
var_j = 9
var_k = var_i * var_j
var_l = 2
var_m = var_k / var_l
var_n = 7
var_o = 7
var_p = var_n * var_o
var_q = 2
var_r = var_p / var_q
list_b= []
if "/" in str(var_r):
    var_r = eval(str(var_r))
list_b.append(var_r)
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_s = 1
list_c=list_b.copy()
list_c.sort()
var_t = list_c[-var_s]
var_u = list_b.index(var_t)+1
var_v = list_a[var_u-1]
print(var_v)