philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): What is the largest natural number that can be formed using all 0, 1, and 3 once?
Question (KO): 0, 1, 3을 한 번씩 모두 사용하여 만들 수 있는 가장 큰 자연수는 무엇입니까?

Answer: 310

Solution (Python):
var_a = 0
var_b = 1
var_c = 3
list_a= []
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = len(list_a)
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f))
Category: Geometry

Question (EN): A toy car wheel with a diameter of 30 centimeters (cm) has a circumference of 94.2 centimeters (cm). How many times the circumference of a toy car wheel is greater than the diameter?
Question (KO): 지름이 30센티미터(㎝)인 장난감 자동차 바퀴의 둘레는 94.2센티미터(㎝)입니다. 장난감 자동차 바퀴의 둘레는 지름의 몇 배입니까?

Answer: 3.14

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

Question (EN): Eunji read 18 pages of the thesis on Wednesday, and also read it on Thursday. She read 23 pages of this thesis on Friday, resulting in 60 pages being read for 3 days. How many pages did Eunji read on Thursday?
Question (KO): 은지는 수요일에 논문을 18페이지 읽었고, 목요일에도 읽었습니다. 이 논문을 금요일에 23쪽 읽어서 3일 동안 모두 60쪽 읽었습니다. 은지는 목요일에 논문을 몇 쪽 읽었습니까?

Answer: 19

Solution (Python):
var_a = 60
var_b = 18
var_c = var_a - var_b
var_d = 23
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): A cuboid with a total volume of 57 cubic centimeters (cm3) is about to be filled with water until it reaches half of its height. If 32 milliliters (ml) of water flow out per minute when you open the faucet, find how many minutes you need to leave the faucet running.
Question (KO): 전체 부피가 57세제곱센티미터(㎤) 인 직육면체에 높이가 절반에 올 때 까지 물을 채우려고 한다. 수도꼭지를 열면 물이 분 당 32밀리리터(㎖)가 흘러나온다고 할 때 몇 분간 수도꼭지를 틀어놔야하는지 구하시오.

Answer: 36

Solution (Python):
var_a = 576
var_b = 2
var_c = var_a * var_b
var_d = 32
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): An additional 460 milliliters (ml) of water was poured into a bucket already containing 2 liters (L) of water. How many milliliters (ml) are there in the bucket?
Question (KO): 2리터(L)의 물이 들어있는 물통에 460밀리리터(㎖)의 물을 더 부었습니다. 물통에 들어있는 물은 모두 몇 밀리리터(㎖)입니까?

Answer: 2460

Solution (Python):
var_a = 2
var_b = 1000
var_c = var_a * var_b
var_d = 460
var_e = var_c + var_d
print(int(var_e))
Category: Comparison

Question (EN): There are 40 boxes of apples, 28 each, and 65 peaches, 15 each. Which is more, apples or peaches?
Question (KO): 사과는 한 상자에 28개씩 40상자 있고, 복숭아는 한 상자에 15개씩 65상자 있습니다. 사과와 복숭아 중에서 어느 것이 더 많습니까?

Answer: apples

Solution (Python):
var_a = 'apples'
var_b = 'peaches'
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 = 28
var_d = 40
var_e = var_c * var_d
var_f = 15
var_g = 65
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)
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: Geometry

Question (EN): If the length of the hypotenuse of a right triangle is 10 and the length of the non-hypotenuse is 6, what is the length of the other side?
Question (KO): 직각삼각형의 빗변의 길이가 10, 빗변이 아닌 한 변의 길이가 6이면 나머지 한 변의 길이는 얼마입니까?

Answer: 8

Solution (Python):
var_a = 10
var_b = 2
var_c = var_a ** var_b
var_d = 6
var_e = 2
var_f = var_d ** var_e
var_g = var_c - var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i))
Category: Comparison

Question (EN): There are 28 identical shelves in the warehouse. Each shelf has 6 spaces, and the number of books on each shelf is the same at 19. How many books are there in the warehouse?
Question (KO): 창고에 똑같은 선반이 28개 있습니다. 각 선반은 6칸이고, 각 칸마다 꽂혀 있는 책의 수는 19개로 같습니다. 창고에 있는 책은 모두 몇 권입니까?

Answer: 3192

Solution (Python):
var_a = 28
var_b = 6
var_c = var_a * var_b
var_d = 19
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Starting in March, Yoona decided to donate 20,000 won per month to an international child support organization. How much did Yoona donate until August?
Question (KO): 윤아는 3월부터 매월 20000원씩 국제 아동 후원 단체에 기부를 하기로 했습니다. 윤아가 8월까지 기부한 금액은 모두 얼마일까요?

Answer: 120000

Solution (Python):
var_a = 20000
var_b = 8
var_c = 3
var_d = var_b - var_c
var_e = 1
var_f = var_d + var_e
var_g = var_a * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Find how many grams (g) of water must be evaporated from 200 grams (g) of 5% sugar water to make it 8% sugar water.
Question (KO): 5%의 설탕물 200그램(g)에서 몇 그램(g)의 물을 증발시켜야 8%의 설탕물이 되는지 구하여라

Answer: 75

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

Question (EN): After receiving water in the water tank for 2 hours and 30 hours, 180 liters (L) were received in the water tank. Find how many liters (L) of water flowed out in 1 hour.
Question (KO): 2시간 30동안 수조에 물을 받았더니 180리터(L)를 수조에 받았다. 1시간 동안 몇 리터(L)의 물이 흘러나왔는지 구하시오.

Answer: 72

Solution (Python):
var_a = 180
var_b = 2
var_c = 30
var_d = 60
var_e = var_c / var_d
var_f = var_b + var_e
var_g = var_a / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): It is said that it takes 6.12 liters (L) of paint to paint a wall. How many milliliters (ml) are left after painting the 5 walls with 33.5 liters (L) of paint?
Question (KO): 담을 칠하는 데 페인트 6.12리터(L)가 필요하다고 합니다. 페인트 33.5리터(L)로 5개의 담을 모두 칠하고 남는 양은 몇 밀리리터(㎖)입니까?

Answer: 2900

Solution (Python):
var_a = 33.5
var_b = 6.12
var_c = var_a % var_b
var_d = 1000
var_e = var_c * var_d
print(int(eval('{:.2f}'.format(round(var_e+1e-10,2)))))
Category: Comparison

Question (EN): In the multiplication of two-digit numbers, number 3 was mistakenly calculated instead of 5 in the tens place, and the value turned out to be 1485. If the correct answer is 2385, write the larger number among those two-digit numbers.
Question (KO): 두 자리 수끼리의 곱셈에서 곱하는 수의 십의 자리 숫자 5를 3으로 잘못 보고 계산한 값이 1485가 되었습니다. 바르게 계산한 값이 2385일 때, 2개의 두 자리 수 중 더 큰 수를 쓰시오.

Answer: 45

Solution (Python):
var_a = 1485
var_b = 2385
var_c = var_a - var_b
var_d = 3
var_e = 5
var_f = var_d - var_e
var_g = 10
var_h = var_f * var_g
var_i = var_c / var_h
var_j = 2385
var_k = 1285
var_l = 2385
var_m = var_k - var_l
var_n = 3
var_o = 5
var_p = var_n - var_o
var_q = 10
var_r = var_p * var_q
var_s = var_m / var_r
var_t = var_j / var_s
list_a= []
if "/" in str(var_t):
    var_t = eval(str(var_t))
list_a.append(var_t)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_a.append(var_i)
list_a.reverse()
var_u = 1
list_b=list_a.copy()
list_b.sort()
var_v = list_b[-var_u]
print(int(var_v))
Category: Geometry

Question (EN): There is a prism with a nonagon base shape. How many edges does this prism have?
Question (KO): 밑면의 모양이 구각형인 각기둥이 있습니다. 이 각기둥의 모서리의 수는 몇 개입니까?

Answer: 27

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

Question (EN): You made a small square as much as possible by arranging the rectangular shape tiles of 3 centimeters (cm) wide and 4 centimeters (cm) long. How many centimeters (cm) is the length of one side of the square?
Question (KO): 가로 3센티미터(㎝), 세로 4센티미터(㎝)인 직사격형 모양의 타일을 늘어놓아 될 수 있는 대로 작은 정사각형을 만들었습니다. 이때 정사각형의 한 변의 길이는 몇 센티미터(㎝)입니까?

Answer: 12

Solution (Python):
var_a = 3
var_b = 4
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
print(int(var_c))
Category: Correspondence

Question (EN): Soccer teams in the K-League play one game against all other teams in the league in a year. If there are 91 matches in a year, how many soccer teams are there in the K-League?
Question (KO): k리그에 있는 축구팀들은 1년에 리그에 있는 서로 다른 팀들과 모두 1판씩 경기를 치룬다. 1년에 경기가 모두 91개 있다면 k리그에 있는 축구팀은 모두 몇 개입니까?

Answer: 14

Solution (Python):
var_a = 91
var_b = 2
var_c = var_a * var_b
var_d = 0.5
var_e = var_c ** var_d
var_f = 1
var_g=int(((var_e+9*10**(var_f-2))//(10**(var_f-1)))*10**(var_f-1))

print(int(var_g))
Category: Possibility

Question (EN): There are five different dinosaur dolls. Find the number of possible ways to give one each to two friends.
Question (KO): 다섯 개의 서로 다른 공룡 인형이 있다. 친구 두 명에게 하나씩 주기로 했을 때, 가능한 경우의 수를 구하시오.

Answer: 20

Solution (Python):
var_a = 5
var_b = 2
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
    var_c = var_c * (var_a-i)
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Hoseok had 18 flowers. Hoseok gave 5 flowers to Minyoung and 6 to Yoojeong. How many flowers does Hoseok have left?
Question (KO): 호석이는 꽃을 18송이 가지고 있었습니다. 호석이는 꽃을 민영이에게 5송이 주고, 유정이에게 6송이 주었습니다. 호석이에게 남은 꽃은 몇 송이입니까?

Answer: 7

Solution (Python):
var_a = 18
var_b = 5
var_c = var_a - var_b
var_d = 6
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): Find the number of odd numbers less than or equal to 300 out of the three-digit natural numbers which are formed by arranging three different digits chosen among 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Question (KO): 10개의 숫자 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 중 서로 다른 세 개를 택하여 일렬로 나열하여 만든 세 자리의 자연수 중 300 이하의 홀수의 개수를 구하시오.

Answer: 72

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
var_f = 5
var_g = 6
var_h = 7
var_i = 8
var_j = 9
list_a= []
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_a.append(var_j)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_a.append(var_i)
if "/" in str(var_h):
    var_h = eval(str(var_h))
list_a.append(var_h)
if "/" in str(var_g):
    var_g = eval(str(var_g))
list_a.append(var_g)
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_k = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_k))
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_l = 300
list_c = []
for i in list_b:
    if i <= var_l:
        list_c.append(i)
var_m = 2
list_d = []
var_m = int(var_m)
for i in list_c:
    i = int(i)
    if i % var_m == 0:
        list_d.append(i)
list_e = list(set(list_c) - set(list_d))
var_n = len(list_e)
print(int(var_n))
Category: Arithmetic calculation

Question (EN): There are 13 carnations and 7 tulips in the flower bed. How many more carnations are there than tulips?
Question (KO): 화단에 카네이션이 13송이, 튤립이 7송이 있습니다. 카네이션은 튤립보다 몇 송이 더 많습니까?

Answer: 6

Solution (Python):
var_a = 13
var_b = 7
var_c = var_a - var_b
print(int(var_c))
Category: Correspondence

Question (EN): Provided that the equation 32+A7B=705 is true, what number should go in B?
Question (KO): 등식 32+A7B=705이 성립한다고 합니다. B에 들어가야 하는 숫자는 무엇인가요?

Answer: 3

Solution (Python):
var_a = '32+A7B=705'
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): After solving 45 problems, 18 more problems were solved. What is the total number of problems solved?
Question (KO): 문제를 45문제 푼 뒤 다시 18문제를 더 풀었습니다. 푼 문제의 수는 총 몇 문제입니까?

Answer: 63

Solution (Python):
var_a = 45
var_b = 18
var_c = var_a + var_b
print(int(var_c))
Category: Possibility

Question (EN): You are trying to buy 2 fruits by combining apple, peach, pear, and melon. How many possible combinations allow for duplicates?
Question (KO): 사과, 복숭아, 배, 참외를 조합하여 2개의 과일을 사려고 합니다. 중복을 허용하여 조합할 수 있는 경우의 수는 모두 몇 가지입니까?

Answer: 10

Solution (Python):
var_a = 'apple'
var_b = 'peach'
var_c = 'pear'
var_d = 'melon'
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 = var_e + var_f
var_h = 1
var_i = var_g - var_h
var_j = 2
var_k = 1
var_i = int(var_i)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
    var_k = var_k * (var_i-i)
for i, elem in enumerate(range(var_j)):
    var_k = var_k / (i+1)
print(int(var_k))
Category: Correspondence

Question (EN): There are 40 matches and 34 cotton swabs. You are tying matches and cotton swabs together with rubber bands, tying 8 matches together and 12 cotton swabs together, and leaving the rest untied. If you use 2 rubber bands for one bundle, how many rubber bands do you need at least?
Question (KO): 40개의 성냥과 34개의 면봉이 있습니다. 고무줄로 성냥과 면봉을 묶는데 성냥은 8개씩 면봉은 12개씩 묶고 남는 것들은 묶지 않습니다. 한 묶음에 고무줄을 2개씩 사용한다고 할 때, 고무줄은 최소 몇 개가 필요합니까?

Answer: 14

Solution (Python):
var_a = 40
var_b = 8
var_c = var_a // var_b
var_d = 34
var_e = 12
var_f = var_d // var_e
var_g = var_c + var_f
var_h = 2
var_i = var_g * var_h
print(int(var_i))
Category: Geometry

Question (EN): You want to place points on the circumference of a circle with a radius of 50 centimeters (cm) so that they are spaced 7.85 centimeters (cm) apart. How many points can you put together when the pi is 3.14?
Question (KO): 반지름이 50센티미터(㎝)인 원의 둘레에 간격이 7.85센티미터(㎝)가 되도록 점을 찍으려고 합니다. 원주율이 3.14일 때 점을 모두 몇 개 찍을 수 있습니까?

Answer: 40

Solution (Python):
var_a = 50
var_b = 2
var_c = var_a * var_b
var_d = 3.14
var_e = var_c * var_d
var_f = 7.85
var_g = var_e // var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): My father has 45 chickens, and there are 8 more chickens than ducks. How many chickens and ducks does my father have in total?
Question (KO): 아버지는 닭 45마리를 기르는데 닭이 오리보다 8마리가 많습니다. 아버지가 기르는 닭과 오리는 모두 몇 마리입니까?

Answer: 82

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

Question (EN): Changhee received an average score of 83.1 in ten subjects in the midterm exam this semester, and an average score of 84 in eight subjects in the final exam. What is Changhee's average score this semester?
Question (KO): 창희는 이번 학기에 중간고사에서 열 과목의 평균 성적으로 83.1점을 받았고, 기말고사에서 여덟 과목의 평균 성적으로 84점을 받았습니다. 이번 학기 창희의 평균 성적은 몇 점입니까?

Answer: 83.5

Solution (Python):
var_a = 10
var_b = 83.1
var_c = var_a * var_b
var_d = 8
var_e = 84
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 10
var_i = 8
var_j = var_h + var_i
var_k = var_g / var_j
print('{:.2f}'.format(round(var_k+1e-10,2)))
Category: Comparison

Question (EN): 45 boxes of different sizes are placed in a row in order from largest to smallest. The red box is 29th from the left. If you put them back in a row in order starting from the smallest, how many places from the left should the red box be?
Question (KO): 각각의 크기가 다른 상자 45개를 크기가 큰 것부터 순서대로 한 줄로 놓았습니다. 빨간색 상자는 왼쪽에서 29번째에 있습니다. 크기가 작은 것부터 순서대로 다시 한 줄로 놓으면 이 빨간색 상자는 왼쪽에서 몇 번째에 놓입니까?

Answer: 17

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

Question (EN): Adding 8 consecutive even numbers gives 424. Find the largest among the 8 even numbers.
Question (KO): 연속하는 8개의 짝수를 더하였더니 424가 되었습니다. 8개의 짝수 중 가장 큰 수를 구하시오.

Answer: 60

Solution (Python):
var_a = 424
var_b = 0
var_c = 8
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e * var_f
var_h = 2
list_a = [i for i in range(var_b, var_g + 1, var_h)]
list_a = [float(i) for i in list_a]
var_i = sum(list_a)
var_j = var_a - var_i
var_k = 8
var_l = var_j / var_k
var_m = 8
var_n = 1
var_o = var_m - var_n
var_p = 2
var_q = var_o * var_p
var_r = var_l + var_q
print(int(var_r))
Category: Comparison

Question (EN): There is a reading room 4 floors higher than the academy which is on the 7th floor, and there is a bookstore that is 9 floors lower than the reading room. Find the floor where the bookstore is located.
Question (KO): 독서실은 7층에 있는 학원보다 4층 높고 독서실보다 9층 낮은 층에는 서점이 있습니다. 서점은 몇 층인지 구하시오.

Answer: 2

Solution (Python):
var_a = 7
var_b = 4
var_c = var_a + var_b
var_d = 9
var_e = var_c - var_d
print(int(var_e))
Category: Possibility

Question (EN): A company has 8 team members. What are the number of cases in which one of the members becomes the leader and another member becomes the assistant manager?
Question (KO): 회사에 8명의 팀원이 있다. 그 중 한 명은 팀장, 다른 한 명은 부팀장을 시키는 경우의 수는 얼마인가?

Answer: 56

Solution (Python):
var_a = 8
var_b = 1
var_c = 1
var_d = var_b + var_c
var_e = 1
var_a = int(var_a)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
    var_e = var_e * (var_a-i)
print(int(var_e))
Category: Correspondence

Question (EN): What number must be in A so that the equation of A45+2B3=418 becomes true?
Question (KO): A45+2B3=418라는 식이 성립하려면, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 1

Solution (Python):
var_a = 'A45+2B3=418'
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): Junsu read one book in three days. How much did Junsu read in a day?
Question (KO): 준수는 3일 동안 책 한권을 읽었다. 준수가 하루에 읽은 양은 전체 책의 얼마인가?

Answer: 0.33

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

Question (EN): My mother gave a brother and a younger brother 2800 won and 1500 won respectively. The older brother gave the younger brother some more money, and the younger brother had 360 won less than the older brother. How much money did the older brother give to the younger brother?
Question (KO): 어머니가 형과 동생에게 용돈을 각각 2800원, 1500원씩 주었습니다. 형이 동생에게 얼마를 더 주었더니 동생이 가진 돈은 형이 가진 돈보다 360원이 적었습니다. 형이 동생에게 준 돈은 얼마입니까?

Answer: 470

Solution (Python):
var_a = 2800
var_b = 1500
var_c = var_a - var_b
var_d = 360
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): I am going to melt one large iron ball to make several small iron balls. If the length of the radius of the small iron ball is 1/4 of the length of the radius of the large iron ball, how many small iron marbles can be made?
Question (KO): 큰 쇠구슬 1개를 녹여서 작은 쇠구슬 여러 개를 만들려고 한다. 작은 쇠구슬의 반지름의 길이가 큰 쇠구슬의 반지름의 길이의 1/4일 때, 작은 쇠구슬은 모두 몇 개까지 만들 수 있는지 구하여라.

Answer: 64

Solution (Python):
var_a = 1
var_b = 0.25
var_c = 3
var_d = var_b ** var_c
var_e = var_a / var_d
print(int(var_e))
Category: Geometry

Question (EN): A figure has a perimeter of 80 centimeters (cm) and a side length of 16 centimeters (cm), and all sides are the same length. How many sides are there in total?
Question (KO): 도형의 둘레가 80센티미터(㎝)이며 한 변의 길이가 16센티미터(㎝)로 모든 변의 길이가 같은 도형이 있습니다. 총 몇 개의 변이 있습니까?

Answer: 5

Solution (Python):
var_a = 80
var_b = 16
var_c = var_a / var_b
print(int(var_c))
Category: Geometry

Question (EN): There are 125 cube-shaped boxes with one edge 2 centimeters (cm) long. When all these boxes are stacked to form a large cube, find the volume of the large cube.
Question (KO): 한 모서리의 길이가 2센티미터(㎝)인 정육면체 모양의 상자가 125개 있습니다. 이 상자를 모두 쌓아 올려 큰 정육면체 모양을 만들었을 때, 큰 정육면체의 부피를 구하시오.

Answer: 1000

Solution (Python):
var_a = 2
var_b = 3
var_c = var_a ** var_b
var_d = 125
var_e = var_c * var_d
print(int(var_e))
Category: Geometry

Question (EN): The circumference of an equilateral triangle is said to be four times 21 centimeters (cm). What is the length of one side of this equilateral triangle?
Question (KO): 어떤 정삼각형의 둘레의 길이는 21센티미터(㎝)의 4배라고 합니다. 이 정삼각형의 한 변의 길이는 얼마입니까?

Answer: 28

Solution (Python):
var_a = 21
var_b = 4
var_c = var_a * var_b
var_d = 3
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): When three numbers are given: 10, 11 and 12, find the 2nd largest number divided by the 2nd smallest number.
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 2번째로 큰 수와 2번째로 작은 수로 나눈 값은 얼마입니까?

Answer: 1

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 = 2
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-1]
var_h = var_e / var_g
print(int(var_h))
Category: Correspondence

Question (EN): You need to find the sum of 9 and a certain number, but mistakenly calculated the difference of them and got 1 as the answer. If the number is less than 10, find the sum of 9 and the number.
Question (KO): 9와 어떤 수의 합을 구해야 하는데 잘못하여 차를 구했더니 1이었습니다. 어떤 수는 10보다 작은 수일 때, 9와 어떤 수의 합을 구하시오.

Answer: 17

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