philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): Find the number of even numbers in a three-digit number that can be formed by using 5, 6, and 7 only once.
Question (KO): 5, 6, 7 중에서 한 번씩만 사용하여 만들 수 있는 세 자리 수 중에서 짝수의 개수를 구하시오.

Answer: 2

Solution (Python):
var_a = 5
var_b = 6
var_c = 7
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 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 = []
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i % var_e == 0:
        list_c.append(i)
var_f = len(list_c)
print(int(var_f))
Category: Comparison

Question (EN): Choose the second largest number among 5, 8, 4, 3, and 2.
Question (KO): 5, 8, 4, 3, 2 중에서 2번째로 큰 수를 고르세요.

Answer: 5

Solution (Python):
var_a = 5
var_b = 8
var_c = 4
var_d = 3
var_e = 2
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=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
print(int(var_g))
Category: Geometry

Question (EN): The 3rd-grade students from Sangyeon's school decided to plant one flower at an interval of 4 meters (m) on both sides of the 68-meter (m) road to create a flower path. How many flowers do they need? (Note that flowers must be planted at both ends of the road.)
Question (KO): 상연이네 학교의 3학년 학생들이 꽃길을 만들기 위하여 68미터(m)되는 도로의 양쪽에 4미터(m) 간격으로 꽃을 한 송이씩 심기로 하였습니다. 필요한 꽃은 몇 송이입니까? (단, 도로의 양 끝에는 반드시 꽃을 심습니다.)

Answer: 36

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

Question (EN): I made a Christmas wreath by connecting 16 wires of 10.4 centimeters (cm) in length, overlapping each other by 3.5 centimeters (cm). Find the total length of the wreath in centimeters (cm).
Question (KO): 길이가 10.4센티미터(㎝)인 철사 16개를 3.5센티미터(㎝)식 겹치게 이어 크리스마스 리스를 만들었습니다. 리스의 전체 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 113.9

Solution (Python):
var_a = 10.4
var_b = 16
var_c = var_a * var_b
var_d = 3.5
var_e = 16
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_c - var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Correspondence

Question (EN): Seungmin and Hyojoo went hiking. When Seungmin gave Hyojoo 0.43 liters (L) of water, the difference between the amount of water the two had was 0.88 liters (L). Find the difference in liters (l) before he gave her water. However, Seungmin has more water than Hyojoo.
Question (KO): 승민이와 효주가 등산을 갔다. 승민이가 효주에게 0.43리터(L)만큼의 물을 주었더니 두 사람이 가진 물의 양의 차이가 0.88리터(L)가 되었다고 한다. 물을 주기전에 차이는 몇 리터(L)였는지 구하시오. 단 승민이가 효주보다 더 많이 물을 가지고 있다.

Answer: 1.74

Solution (Python):
var_a = 0.88
var_b = 0.43
var_c = var_a + var_b
var_d = 0.43
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Comparison

Question (EN): Yuna, Eunji, and Minyoung are standing in order of height. Minyoung is shorter than Eunji, and Yuna is taller than Eunji. If the shortest student is standing at the front, find out who is standing at the front.
Question (KO): 유나, 은지, 민영이가 키 순서대로 서 있습니다. 민영이가 은지보다 키가 작고, 유나가 은지보다 키가 큽니다. 키가 작은 학생이 가장 앞에 서 있다면 맨 앞에 서 있는 학생은 누구인지 구하세요.

Answer: Minyoung

Solution (Python):
var_a = 'Yuna'
var_b = 'Eunji'
var_c = 'Minyoung'
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 = 'Yuna'
var_e = 'Eunji'
var_f = '>'
var_g = 'Minyoung'
var_h = 'Eunji'
var_i = '<'
list_b= []
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_b.append(var_f)
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()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
    if cond_ in ("<", ">", "="):
        operand_right = temp_stack.pop()
        operand_left = temp_stack.pop()
        if cond_ == "=":
            cond_ = "=="
        conditions.append(f"{operand_left} {cond_} {operand_right}")
    else:
        if not cond_.isdigit():
            cond_ = "{" + cond_ + "}"
        temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
    item_name_index_dict = dict(zip(items_name_list, perm))
    formatted_conditions = \
        [condition.format_map(item_name_index_dict) for condition in conditions]
    if all(map(eval, formatted_conditions)):
        break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_j = len(list_c)
var_k = list_c[var_j-1]
print(var_k)
Category: Geometry

Question (EN): How many triangles are formed when a line segment is drawn from one vertex of a nonagon to a non-neighboring vertex?
Question (KO): 구각형의 한 꼭짓점에서 이웃하지 않은 꼭짓점으로 선분을 그을 때 생기는 삼각형의 개수는 몇 개입니까?

Answer: 7

Solution (Python):
var_a = 9
var_b = 3
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): There are ribbons with lengths of 36 centimeters (cm), 42 centimeters (cm), and 48 centimeters (cm), respectively. I cut 1/6 of this ribbons and tied the remaining pieces together to make one long ribbon. The length of the ribbon made is 97 centimeters (cm). Find how many centimeters (cm) are used to tie the ribbons together.
Question (KO): 길이가 각각 36센티미터(㎝), 42센티미터(㎝), 48센티미터(㎝) 인 리본이 있다. 이 리본을 1/6을 잘라내고 남은 부분을 서로 묶어서 긴 리본을 하나 만들었다. 만들어진 리본의 길이가 97센티미터(㎝)이다. 리본을 서로 묶는데 몇 센티미터(㎝)가 사용되는지 구하시오.

Answer: 8

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
print(int(var_k))
Category: Comparison

Question (EN): Three fish caught by a fisherman were weighed. The mackerel was heavier than the flatfish, and the rockfish was heavier than the mackerel. How lightest is the rockfish among those three?
Question (KO): 어부가 잡은 물고기 3마리의 무게를 재었습니다. 광어보다 고등어가 더 무거웠고 고등어보다 우럭이 더 무거웠습니다. 우럭은 몇 번째로 가장 가벼운 물고기입니까?

Answer: 3

Solution (Python):
var_a = 'flatfish'
var_b = 'mackerel'
var_c = 'rockfish'
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 = 'rockfish'
var_e = list_a.index(var_d)+1
print(int(var_e))
Category: Correspondence

Question (EN): What number must go in B to make 38A-B1=364?
Question (KO): 38A-B1=364라는 식이 성립하려면, B에 들어가야 하는 숫자는 무엇인가요?

Answer: 2

Solution (Python):
var_a = '38A-B1=364'
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): Changhyeok's pocket money is 15,000 won. Using all of the pocket money he received, he bought a total of 12 snacks, each costing 1,000 won, and drinks, each costing 1,300 won. Find how many snacks Changhyeok bought.
Question (KO): 창혁이의 용돈은 15000원입니다. 받은 용돈을 남김없이 사용하여 하나에 1000원인 과자와 하나에 1300원인 음료수를 합하여 12개 샀습니다. 창혁이가 산 과자는 모두 몇 개인지 구하세요.

Answer: 2

Solution (Python):
var_a = 1300
var_b = 12
var_c = var_a * var_b
var_d = 15000
var_e = var_c - var_d
var_f = 1300
var_g = 1000
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): There are four numbers 10, 11, 12, and 13. Which number is the second smallest?
Question (KO): 4개의 수 10, 11, 12, 13이 있습니다. 그 중 2번째로 작은 수는 무엇입니까?

Answer: 11

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 = 2
list_b=list_a.copy()
list_b.sort()
var_f = list_b[var_e-1]
print(int(var_f))
Category: Arithmetic calculation

Question (EN): A large bucket contains 7 liters (L) of water and a small bucket contains 5 liters (L) of water. 2 liters (L) of water from the small bucket was poured into the large bucket. How many liters (L) more water is in the large bucket than in the small bucket?
Question (KO): 큰 통에 물이 7리터(L) 들어 있고 작은 통에 물이 5리터(L) 들어 있습니다. 작은 통에 들어 있던 물 2리터(L)를 큰 통에 따랐습니다. 큰 통의 물은 작은 통의 물보다 몇 리터(L) 더 많습니까?

Answer: 6

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

Question (EN): 3 bottles of 0.2 liters (L) of milk are delivered to Minjeong's house every day. Find how many liters (L) of all the milk was delivered to Minjeong's house for a week.
Question (KO): 민정이네 집에는 매일 0.2리터(L)짜리 우유가 3개씩 배달됩니다. 일주일 동안 민정이네 집에 배달되는 우유는 모두 몇 리터(L)인지 구하시오.

Answer: 4.2

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

Question (EN): Yesterday, Eunji's uncle gave Eunji some pocket money. Eunji bought a notebook with half of her pocket money, and when she received an additional 550 won from her mother today, her money became 1,000 won. How much money did she get from her uncle?
Question (KO): 어제 삼촌이 은지에게 용돈을 주셨습니다. 은지가 용돈의 절반으로 공책을 사고, 어머니에게 오늘 550원을 더 받았더니 가진 돈이 1,000원이 되었습니다. 삼촌에게 받았던 용돈은 얼마입니까?

Answer: 900

Solution (Python):
var_a = 1000
var_b = 550
var_c = var_a - var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e))
Category: Correspondence

Question (EN): Adding 8 to any number gives 88 as a result. What is the result of dividing a number by 10?
Question (KO): 어떤 수에 8을 더해 결과로 88을 얻었습니다. 10을 어떤 수에서 나눈 결과는 얼마입니까?

Answer: 8

Solution (Python):
var_a = 88
var_b = 8
var_c = var_a - var_b
var_d = 10
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): 55 students participated in A competition and B competition. Among them, 38 students participated in A  competition, and 42 students participated in B competition. If no student did not participate in neither competitions A nor B, how many students participated in both competitions?
Question (KO): 55명의 학생이 (가) 시합과 (나) 시합에 참가했습니다. 그중에서 38명의 학생이 (가) 시합에 참가하고, 42명의 학생이 (나) 시합에 참가했습니다. (가), (나) 두 시합에 모두 참가하지 않은 학생이 한 명도 없을 때, 두 시합에 모두 참가한 학생은 몇 명입니까?

Answer: 25

Solution (Python):
var_a = 38
var_b = 42
var_c = var_a + var_b
var_d = 55
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): There are three different natural numbers A, B, and C. When A+B=84, B+C=60, and A=B+B+B+B+B+B, find the value of A-C.
Question (KO): 서로 다른 세 자연수 A, B, C가 있습니다. A+B=84, B+C=60, A=B+B+B+B+B+B일 때, A-C의 값을 구하시오.

Answer: 24

Solution (Python):
var_a = 84
var_b = 7
var_c = var_a / var_b
var_d = 6
var_e = var_c * var_d
var_f = 60
var_g = 84
var_h = 7
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): Which three-digit number is the smallest among the common multiples of 3 and 5?
Question (KO): 세 자리 수 중 3과 5의 공배수 중 가장 작은 수는?

Answer: 105

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 = 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: Arithmetic calculation

Question (EN): In the relay, Siwon ran 3/10 of the track, and Dawon ran 4/10 of the track. If the distance Siwon and Dawon run is 140 meters (m), what is the total distance of the relay race?
Question (KO): 계주에서 시원이는 전체의 3/10을 달렸고 다원이는 전체의 4/10을 달렸습니다. 시원이와 다원이가 달린 거리가 140미터(m)라면 계주 전체 거리는 얼마입니까?

Answer: 200

Solution (Python):
var_a = 140
var_b = 0.3
var_c = 0.4
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Jiwon went to a snack bar with his friends. There are 4 friends, including Jiwon, and they want to buy 5 fish cakes at 200 won each and 7 servings of tteokbokki at 800 won each. How much does one person have to pay if all of his friends pay the same?
Question (KO): 지원이는 친구들과 분식집에 갔습니다. 지원이를 포함한 친구는 모두 4명이고 하나에 200원인 어묵 5개와 하나에 800원인 떡볶이 7인분을 사먹으려고 합니다. 친구들이 모두 같은 돈을 내려면 한 사람이 내야하는 돈은 얼마입니까?

Answer: 1650

Solution (Python):
var_a = 200
var_b = 5
var_c = var_a * var_b
var_d = 800
var_e = 7
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 4
var_i = var_g / var_h
print(int(var_i))
Category: Correspondence

Question (EN): 50 is 26 greater than a number. What is the value of the number multiplied by 9?
Question (KO): 50은 어떤 수보다 26 큰 수입니다. 어떤 수에 9를 곱하면 얼마가 되나요?

Answer: 216

Solution (Python):
var_a = 50
var_b = 26
var_c = var_a - var_b
var_d = 9
var_e = var_c * var_d
print(int(var_e))
Category: Correspondence

Question (EN): When 45 is divided by a number, the quotient is 11 and the remainder is 1. Find the value of the number.
Question (KO): 45를 어떤 수로 나누었더니 몫이 11이고 나머지가 1이었다. 어떤 수는 얼마인지 구하시오.

Answer: 4

Solution (Python):
var_a = 45
var_b = 1
var_c = var_a - var_b
var_d = 11
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): How many times does the number 1 appear on a test sheet with 5 multiple choice 20 questions? (However, there are no numbers other than the question number and the answer number.)
Question (KO): 5지선다형 20문제가 적힌 시험지에 1이 몇 번 등장합니까? (단, 문제 번호와 답 번호 외에 다른 숫자는 없습니다.)

Answer: 32

Solution (Python):
var_a = 1
var_b = 20
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 = 1
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
var_g = 20
var_h = var_f + var_g
print(int(var_h))
Category: Possibility

Question (EN): When you write numbers no more than 100 that have a remainder of 2 when divided by 3 in order, how many times 4 is written?
Question (KO): 100이하의 자연수 중 3으로 나눈 나머지가 2인 수들을 순서대로 적을 때, 4는 몇 번 적는지 구하시오.

Answer: 6

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 = 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=""
for i in list_b:
    i = str(i)
    var_f = var_f + i
list_c = []
var_f = int(var_f)
while var_f//10 > 0:
    list_c.append(var_f%10)
    var_f = var_f//10
list_c.append(var_f%10)
list_c = list_c[::-1]
var_g = 4
var_h = 0
var_g = int(var_g)
for i in list_c:
    i = int(i)
    if i == var_g:
        var_h = var_h + 1
print(int(var_h))
Category: Correspondence

Question (EN): The five-digit number 6AB87 is a multiple of 9. When creating the pair of numbers by putting the right numbers for A and B, how many possible number pairs can be made?
Question (KO): 다섯 자리 수 6AB87은 9의 배수이다. A, B에 알맞은 숫자를 찾아 숫자 쌍을 만들 때, 가능한 숫자 쌍은 모두 몇 가지인가?

Answer: 11

Solution (Python):
var_a = '6AB87'
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 = 9
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 = len(list_b)
print(int(var_c))
Category: Comparison

Question (EN): 20 students lined up in a single line. Jungkook is standing behind Yoongi, and 11 students are standing in front of Jungkook. How many students are standing behind Yoongi?
Question (KO): 20명의 학생들이 한 줄로 줄을 섰습니다. 윤기의 뒤에는 정국이가 서있고, 정국이 앞에는 11명의 학생들이 서 있습니다. 윤기의 뒤에 서 있는 학생은 몇 명입니까?

Answer: 9

Solution (Python):
var_a = 20
var_b = 11
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
var_f = 1
var_g = var_e - var_f
print(int(var_g))
Category: Correspondence

Question (EN): You made a mistake in multiplying 36 by a number, so I added a number to 63 instead. Suppose that you got 70. How much is it if you calculate it correctly?
Question (KO): 36에 어떤 수를 곱해야 할 것을 잘못하여 63에 어떤 수를 더했더니 70이 되었습니다. 바르게 계산하면 얼마인지 구하시오.

Answer: 252

Solution (Python):
var_a = 36
var_b = 70
var_c = 63
var_d = var_b - var_c
var_e = var_a * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Snails A and B travel at 10 meters (m) and 15 meters (m) per hour respectively when they go to the flower to eat. A arrives 30 minutes after B arrives. Find the distance between the flower and the starting points of the two snails.
Question (KO): 달팽이 A와 B는 밥을 먹으러 꽃으로 갈 때 시속 10미터(m), 15미터(m)로 간다. B가 도착하고 30분 후 A가 도착했다. 꽃과 두 달팽이의 출발 지점 간의 거리를 구하라.

Answer: 15

Solution (Python):
var_a = 30
var_b = 60
var_c = var_a / var_b
var_d = 1
var_e = 10
var_f = var_d / var_e
var_g = 1
var_h = 15
var_i = var_g / var_h
var_j = var_f - var_i
var_k = var_c / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2)))))
Category: Correspondence

Question (EN): When a number is divided by 0.06, it results 426. Find the inital unknown number.
Question (KO): 어떤 수를 0.06으로 나누었더니 426이 되었습니다. 어떤 수를 구하시오.

Answer: 25.56

Solution (Python):
var_a = 426
var_b = 0.06
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2)))
Category: Possibility

Question (EN): There are three different types of boxes. Find the number of ways in which there are no empty boxes when putting 5 balls of the same size into these boxes.
Question (KO): 서로 다른 세 종류의 상자가 있습니다. 서로 같은 공 5개를 상자에 나눠 담으려고 할 때, 빈 상자가 없게 하는 경우의 수를 구하시오.

Answer: 6

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

Question (EN): Among the people who entered the amusement park, 1518 were women, and among them, 536 were elementary school students. There were 525 more males than females, and 1257 of them were not in elementary school. How many elementary school students entered the amusement park in total?
Question (KO): 놀이 공원에 입장한 사람 중 여자는 1518명이고, 이 중에서 초등학생은 536명이었습니다. 남자는 여자보다 525명이 더 많았고, 이 중에서 초등학생에 아닌 사람은 1257명이었습니다. 놀이 공원에 입장한 초등학생은 모두 몇 명입니까?

Answer: 1322

Solution (Python):
var_a = 1518
var_b = 525
var_c = var_a + var_b
var_d = 1257
var_e = var_c - var_d
var_f = 536
var_g = var_e + var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): A car needs 0.14 liters (l) of diesel to run 1 kilometer (km). If this car ran for 2 hours and 30 minutes at 93.6 kilometers (km) per hour, how many liters (L) of diesel were used?
Question (KO): 1킬로미터(㎞)를 달리는 데 경유 0.14리터(L)가 필요한 자동차가 있습니다. 이 자동차로 1시간에 93.6킬로미터(㎞)씩 2시간 30분을 달렸다면, 사용한 경유는 모두 몇 리터(L)일까요?

Answer: 32.76

Solution (Python):
var_a = 0.14
var_b = 93.6
var_c = var_a * var_b
var_d = 2
var_e = 30
var_f = 60
var_g = var_e / var_f
var_h = var_d + var_g
var_i = var_c * var_h
print('{:.2f}'.format(round(var_i+1e-10,2)))
Category: Correspondence

Question (EN): When Hoseok divides a number by 6, he gets 11. Find what number is used by Hoseok.
Question (KO): 호석이는 6으로 어떤 수를 나누었더니 11을 얻었습니다. 어떤 수를 구하시오.

Answer: 66

Solution (Python):
var_a = 11
var_b = 6
var_c = var_a * var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Jihye and Yonghee shared 85 marbles. If Jihye got 11 more marbles than Yonghee, how many marbles did Jihye got?
Question (KO): 구슬 85개를 지혜와 용희가 나누어 가졌습니다. 지혜가 용희보다 구슬을 11개 더 가졌다면 지혜는 구슬을 몇 개 가졌습니까?

Answer: 48

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

Question (EN): When two out of nine cards numbered 1 through 9 are selected at the same time, find the number of cases in which the sum of the two cards is 3 or 14.
Question (KO): 1부터 9까지 적혀 있는 카드 9장 중 2장을 동시에 뽑을 때, 두 장의 합이 3 또는 14가 나오는 경우의 수를 구하시오.

Answer: 3

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 = 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]
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 = 14
var_g = 0
var_f = int(var_f)
for i in list_c:
    i = int(i)
    if i == var_f:
        var_g = var_g + 1
var_h = 2
var_i = var_g / var_h
var_j = 3
var_k = 0
var_j = int(var_j)
for i in list_c:
    i = int(i)
    if i == var_j:
        var_k = var_k + 1
var_l = 2
var_m = var_k / var_l
var_n = var_i + var_m
print(int(var_n))