philschmid/DMath huggingface dataset:
Category: Possibility

Question (EN): You want to make a three-digit number as a result of throwing a dice with 0, 1, 2, 3, 4, and 5 written on it three times. How many number of cases to have common multiples of 6 and 9 are there?
Question (KO): 0, 1, 2, 3, 4, 5 여섯개의 숫자가 적힌 주사위를 3번 던져 나온 결과로 세 자리 수를 만들고자 한다. 이 때, 6과 9의 공통 배수인 경우는 모두 몇 가지가 나올 수 있는가?

Answer: 11

Solution (Python):
var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
var_f = 5
list_a= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_g = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_g))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_h = 6
var_i = 9
var_j = var_i * var_h / math.gcd(int(var_i), int(var_h))
list_c = []
var_j = int(var_j)
for i in list_b:
    i = int(i)
    if i % var_j == 0:
        list_c.append(i)
var_k = len(list_c)
print(int(var_k))
Category: Arithmetic calculation

Question (EN): There is a train that runs at 95 kilometers (km) per hour and a car that runs at 65 kilometers (km) per hour. If the train and the car travel for 8 hours at a constant speed, by how many kilometers (km) does the train travel more than the car?
Question (KO): 1시간에 95킬로미터(㎞) 달리는 기차와 1시간에 65킬로미터(㎞) 달리는 자동차가 있습니다. 이 기차와 자동차가 같은 빠르기로 8시간 동안 달렸을 때, 기차는 자동차보다 몇 킬로미터(㎞) 더 갔습니까?

Answer: 240

Solution (Python):
var_a = 95
var_b = 65
var_c = var_a - var_b
var_d = 8
var_e = var_c * var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are 85 pigs and cows in total. When there are 48 pigs, how many more cows are there than pigs?
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: Arithmetic calculation

Question (EN): There are 9 girls and 16 boys in Jungkook's class. What is the total number of students in the class?
Question (KO): 정국이네 반에 여자는 9명, 남자는 16명 있습니다. 정국이네 반 학생은 모두 몇 명입니까?

Answer: 25

Solution (Python):
var_a = 16
var_b = 9
var_c = var_a + var_b
print(int(var_c))
Category: Geometry

Question (EN): How many diagonals can be drawn from one vertex of a 12-angle figure?
Question (KO): 12개의 각으로 이루어진 도형의 한 꼭짓점에서 그을 수 있는 대각선의 개수는 몇 개입니까?

Answer: 9

Solution (Python):
var_a = 12
var_b = 3
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Minyoung's average score for Korean and English is 89 points. If his average score in Korean, Mathematics, and English is 91, what is Minyoung's math score?
Question (KO): 민영이의 국어와 영어 두 과목의 평균 점수는 89점입니다. 국어, 수학, 영어 세 과목의 평균 점수가 91점일 때, 민영이의 수학 점수는 몇 점입니까?

Answer: 95

Solution (Python):
var_a = 91
var_b = 3
var_c = var_a * var_b
var_d = 89
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g))
Category: Geometry

Question (EN): One side of a cube with a surface area of 54.3 square centimeters (cm2) was painted. Find the area of the painted side.
Question (KO): 겉넓이가 54.3제곱센티미터(㎠) 정육면체의 한 면에 색을 칠했다. 색칠된 부분의 넓이를 구하시오.

Answer: 9.05

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

Question (EN): Min-Young bought 7 boxes of 12.34 kg (kg) of sugar and wants to share them equally with 3 people. How many kilograms (kg) of sugar can one person get?
Question (KO): 민영이가 12.34킬로그램(㎏)짜리 설탕을 7통 사서 3명에게 똑같이 나누어 주려고 합니다. 한 명에게 설탕 몇 킬로그램(㎏)을 줄 수 있습니까?

Answer: 28

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

Question (EN): Yuna is 9 years old this year. Her father is 27 years older than Yuna and her grandfather is 23 years older than her father. How old is Yuna's grandfather this year?
Question (KO): 올해 유나는 9살입니다. 아버지는 유나보다 27살이 많고 할아버지는 아버지보다 23살이 많습니다. 올해 할아버지의 나이는 몇 살입니까?

Answer: 59

Solution (Python):
var_a = 9
var_b = 27
var_c = var_a + var_b
var_d = 23
var_e = var_c + var_d
print(int(var_e))
Category: Possibility

Question (EN): There are five types of milk sold at a store: chocolate milk, strawberry milk, banana milk, coffee milk, and white milk. When selecting milk from this store, find the number of ways to select 2 cartons of milk, allowing duplicates.
Question (KO): 어느 상점에서 판매하는 우유는 초코우유, 딸기우유, 바나나우유, 커피우유, 흰우유 5종류이다. 이 상점에서 우유를 선택할 때, 중복을 허용하여 우유 2팩을 선택하는 방법의 수를 구하시오.

Answer: 15

Solution (Python):
var_a = 'chocolate'
var_b = 'strawberry'
var_c = 'banana'
var_d = 'coffee'
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 = 2
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = 2
var_l = 1
var_j = int(var_j)
var_k = int(var_k)
for i, elem in enumerate(range(var_k)):
    var_l = var_l * (var_j-i)
for i, elem in enumerate(range(var_k)):
    var_l = var_l / (i+1)
print(int(var_l))
Category: Geometry

Question (EN): The radius of the larger circle is 80 centimeters (cm), and the radius of the larger circle is said to be 4 times the radius of the smaller circle. What is the radius of the small circle in centimeters (cm)?
Question (KO): 큰 원의 반지름은 80센티미터(㎝)이고, 큰 원의 반지름은 작은 원의 반지름의 4배라고 합니다. 작은 원의 반지름은 몇 센티미터(㎝)입니까?

Answer: 20

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

Question (EN): There is a box in the shape of a hexahedron. How many sides does this box have?
Question (KO): 육면체 모양의 상자가 있습니다. 이 상자의 면의 수는?

Answer: 6

Solution (Python):
var_a = 6
print(int(var_a))
Category: Arithmetic calculation

Question (EN): What is the total length in centimeters (cm) of 30 straws when each of the straw is 25 centimeters (cm) long, and the overlapped area 6 centimeters (cm) long?
Question (KO): 25센티미터(㎝) 길이의 빨대 30장을 6센티미터(㎝) 겹쳐 이어 붙였을 시 전체 길이는 몇 센티미터(㎝)입니까?

Answer: 576

Solution (Python):
var_a = 25
var_b = 25
var_c = 6
var_d = var_b - var_c
var_e = 30
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_a + var_h
print(int(var_i))
Category: Possibility

Question (EN): You are trying to create a signal using the front and back sides of 3 cards. How many signals can you create?
Question (KO): 3장의 카드의 앞면과 뒷면을 사용해서 신호를 만드려고 합니다. 만들 수 있는 신호는 몇 가지입니까?

Answer: 8

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

Question (EN): There are five numbers: 10, 11, 12, 13, and 14. What is the quotient of the smallest number divided by the next smallest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 가장 작은 수를 그 다음으로 작은 수로 나눈 몫은 얼마입니까?

Answer: 0

Solution (Python):
var_a = 10
var_b = 11
var_c = 12
var_d = 13
var_e = 14
list_a= []
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 1
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g // var_i
print(int(var_j))
Category: Arithmetic calculation

Question (EN): There are 4 consecutive odd numbers whose sum is 112. Which of these numbers is the 2nd smallest?
Question (KO): 합이 112인 연속된 4개의 홀수가 있습니다. 이 숫자들 중에서 2번째로 작은 숫자는 무엇입니까?

Answer: 27

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

Question (EN): I attached 15 sheets of colored tape, overlapping by 5 centimeters (cm). If the length of one piece of tape is 20 centimeters (cm), how many centimeters (cm) is the total length?
Question (KO): 5센티미터(㎝)씩 겹쳐서 색 테이프 15장을 이어 붙였습니다. 색 테이프 하나의 길이가 20센티미터(㎝)일 때 총 길이는 몇 센티미터(㎝)인지 구하시오

Answer: 230

Solution (Python):
var_a = 20
var_b = 20
var_c = 5
var_d = var_b - var_c
var_e = 15
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_a + var_h
print(int(var_i))
Category: Geometry

Question (EN): The perimeter of a square is 34.8 centimeters (cm). Find the length of one side.
Question (KO): 어떤 정사각형의 둘레가 34.8센티미터(㎝)입니다. 한 변의 길이를 구하시오.

Answer: 8.7

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

Question (EN): If 6 diagonals can be drawn from one vertex, find the number of vertices in this polygon.
Question (KO): 한 꼭짓점에서 6개의 대각선을 그을 수 있을 때, 이 다각형의 꼭짓점의 개수를 구하시오.

Answer: 9

Solution (Python):
var_a = 6
var_b = 3
var_c = var_a + var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): The age difference between Taehyung and his mother is 31 years, and the age difference between Taehyung and his younger brother is 5 years. If Taehyung's younger brother is 7 years old this year, how old is his mother?
Question (KO): 태형이와 어머니 나이의 차는 31살이고, 태형이와 동생의 나이의 차는 5살입니다. 올해 태형이 동생이 7살이라면 어머니의 나이는 몇 살입니까?

Answer: 43

Solution (Python):
var_a = 7
var_b = 5
var_c = var_a + var_b
var_d = 31
var_e = var_c + var_d
print(int(var_e))
Category: Correspondence

Question (EN): Find the number that has a units digit of 2 and is a two-digit number between 30 and 40.
Question (KO): 30과 40 사이의 두 자리 수 중 일의 자리 숫자가 2인 수를 구하시오.

Answer: 32

Solution (Python):
var_a = 30
var_b = 40
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 10
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 = 1
var_g = list_b[var_f-1]
print(int(var_g))
Category: Correspondence

Question (EN): I threw away 16 sets of summer clothes this fall and bought winter clothes that much. If there are 64 more winter clothes than summer clothes in your closet, find the difference between winter clothes and summer clothes in summer.
Question (KO): 이번 가을에 여름 옷을 16벌 버리고 그만큼 겨울 옷을 사서 넣어놓았다. 옷장에 겨울 옷이 여름 옷보다 64벌 많다면 여름에는 겨울 옷과 여름 옷의 차이가 몇 벌이었는지 구하시오.

Answer: 32

Solution (Python):
var_a = 64
var_b = 16
var_c = var_a - var_b
var_d = 16
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): A and B are single digit numbers. A375B is a five digit number and is a multiple of 24. What is the number of all numbers that can be A?
Question (KO): A, B는 한 자리 수입니다. A375B는 다섯 자리 수이고 24의 배수입니다. A가 될 수 있는 모든 숫자의 개수는 무엇입니까?

Answer: 3

Solution (Python):
var_a = 'A375B'
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 = 24
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 = 'A375B'
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: Correspondence

Question (EN): When 691-68A=4, what number should go in A?
Question (KO): 691-68A=4일 때, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 7

Solution (Python):
var_a = '691-68A=4'
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): Find the number of natural numbers among 1 to 30 that are not odd.
Question (KO): 1부터 30까지의 자연수 중 홀수가 아닌 수는 몇 개인지 구하시오.

Answer: 15

Solution (Python):
var_a = 1
var_b = 30
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 1
var_e = 30
list_b = []
if var_d%2==0:
    for i in range(var_d+1, var_e+1, 2):
        list_b.append(i)
else:
    for i in range(var_d, var_e+1, 2):
        list_b.append(i)
list_c = list(set(list_a) - set(list_b))
var_f = len(list_c)
print(int(var_f))
Category: Correspondence

Question (EN): I want to subtract a number from 20. I mistakenly multiplied 4 by a number, and the result was 52. What is the correct calculation result?
Question (KO): 20에 어떤 수를 빼려고 합니다. 잘못하여 4에 어떤 수를 곱하였더니 결과는 52가 되었습니다. 바르게 계산한 결과는 얼마일까요?

Answer: 7

Solution (Python):
var_a = 20
var_b = 52
var_c = 4
var_d = var_b / var_c
var_e = var_a - var_d
print(int(var_e))
Category: Correspondence

Question (EN): I needed to subtract 46 from a certain number, but I mistakenly subtracted 59, so I got 43. Find the result of the correct calculation.
Question (KO): 어떤 수에서 46을 빼야 하는데 잘못하여 59를 뺐더니 43이 되었습니다. 바르게 계산한 결과를 구하시오.

Answer: 56

Solution (Python):
var_a = 43
var_b = 59
var_c = var_a + var_b
var_d = 46
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): There are two strings of unequal length. If the difference in length of the two strings is 48 centimeters (cm) and the sum of the lengths of the two strings is 64 centimeters (cm), how many strings can you make that are the same length as the shorter string by cutting the longer string?
Question (KO): 길이가 같지 않은 끈이 두 개 있습니다. 두 끈의 길이 차이는 48센티미터(㎝)이고 두 끈의 길이 합은 64센티미터(㎝)일때 긴 끈을 잘라서 짧은 끈과 길이가 같은 끈을 몇 개 만들 수 있나요?

Answer: 7

Solution (Python):
var_a = 64
var_b = 48
var_c = var_a + var_b
var_d = 2
var_e = var_c / var_d
var_f = 64
var_g = 48
var_h = var_f - var_g
var_i = 2
var_j = var_h / var_i
var_k = var_e // var_j
print(int(var_k))
Category: Correspondence

Question (EN): A certain number multiplied by 5 equals 100. Yoongi divided that certain number by 10 and got an answer. What is his answer?
Question (KO): 5를 어떤 수에 곱하면 100이 됩니다. 윤기는 어떤 수를 10으로 나누어 결과를 얻었습니다. 이 결과값을 구하시오.

Answer: 2

Solution (Python):
var_a = 100
var_b = 5
var_c = var_a / var_b
var_d = 10
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): What is the total number of three-digit numbers that are greater than 137 and less than 151?
Question (KO): 137보다 크고 151보다 작은 세 자리 수는 모두 몇 개입니까?

Answer: 13

Solution (Python):
var_a = 137
var_b = 1
var_c = var_a + var_b
var_d = 151
var_e = 1
var_f = var_d - var_e
var_g = 1
list_a = [i for i in range(var_c, var_f + 1, var_g)]
var_h = len(list_a)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): There are three numbers 10, 11 and 12. What is the quotient of the smallest number divided by the second smallest number?
Question (KO): 3개의 수 10, 11, 12가 있습니다. 그 중에서 가장 작은 수를 2번째로 작은 수로 나눈 몫은 얼마입니까?

Answer: 0

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 = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
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: Comparison

Question (EN): The red car traveled 147 kilometers (km) in 1 hour and 45 minutes, and the black car traveled 162 kilometers (km) in 2 hours and 15 minutes. Which car is faster?
Question (KO): 빨간색 승용차는 1시간 45분 동안 147킬로미터(㎞)를 갔고, 검정색 승용차는 2시간 15분 동안 162킬로미터(㎞)를 갔습니다. 어느 승용차가 더 빠릅니까?

Answer: red

Solution (Python):
var_a = 'red'
var_b = 'black'
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 = 147
var_d = 1
var_e = 60
var_f = var_d * var_e
var_g = 45
var_h = var_f + var_g
var_i = var_c / var_h
var_j = 162
var_k = 2
var_l = 60
var_m = var_k * var_l
var_n = 15
var_o = var_m + var_n
var_p = var_j / var_o
list_b= []
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
list_b.reverse()
var_q = 1
list_c=list_b.copy()
list_c.sort()
var_r = list_c[-var_q]
var_s = list_b.index(var_r)+1
var_t = list_a[var_s-1]
print(var_t)
Category: Arithmetic calculation

Question (EN): The natural number 100 is the sum of five consecutive natural numbers. Find the smallest of these five consecutive natural numbers.
Question (KO): 자연수 100은 연속된 5개의 자연수의 합이다. 이 연속된 5개의 자연수 중 제일 작은 수가 무엇인지 구하여라.

Answer: 18

Solution (Python):
var_a = 100
var_b = 5
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): The village youth association presented 4 boxes of pears, each containing 16 pears, to grandpas and grandmas. How many pears did they present?
Question (KO): 마을 청년회에서 한 상자에 16개씩 들어 있는 배 4상자를 할아버지와 할머니께 선물했습니다. 선물한 배는 모두 몇 개인가?

Answer: 64

Solution (Python):
var_a = 16
var_b = 4
var_c = var_a * var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There were 37 chicks on the farm. If a farmer bought 23 more chicks on day 1 and 12 more chicks on day 2, how many more chicks were on the farm?
Question (KO): 농장에 병아리가 37마리 있었습니다. 1번째 날 병아리 23마리를 더 사 오고, 2번째 날 병아리 12마리를 더 사 왔다면 병아리는 모두 몇 마리가 늘어났습니까?

Answer: 35

Solution (Python):
var_a = 23
var_b = 12
var_c = var_a + var_b
print(int(var_c))
Category: Comparison

Question (EN): There are numbers 0.8, 1/2, 0.9, and 1/3. Find the smallest of these numbers greater than 0.6.
Question (KO): 0.8, 1/2, 0.9, 1/3의 숫자가 있다. 이 중 0.6보다 큰 숫자들 중 가장 작은 숫자를 구하시오.

Answer: 0.8

Solution (Python):
var_a = 0.8
var_b = 0.5
var_c = 0.9
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.6
list_b = []
for i in list_a:
    if i > var_e:
        list_b.append(i)
var_f = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Correspondence

Question (EN): 27A8 plus 3403 is less than 6153. How many digits from 0 to 9 can be A?
Question (KO): 27A8에 3403를 더한 값은 6153보다 작습니다. 0부터 9까지의 숫자 중 A에 쓸 수 있는 숫자는 모두 몇 개입니까?

Answer: 5

Solution (Python):
var_a = '27A8'
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 = 6153
var_c = 3403
var_d = var_b - var_c
list_b = []
for i in list_a:
    if i < var_d:
        list_b.append(i)
var_e = '27A8'
var_f = 'A'
var_e = str(var_e)
var_f = str(var_f)
unk_idx = var_e.index(var_f)
list_c = []
for elem in list_b:
    elem = str(elem)
    list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_g = len(list_c)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Of natural numbers greater than 14 and less than 105, what is the quotient of the largest divided by the smallest?
Question (KO): 14 초과 105 이하인 자연수 중에서 가장 큰 수를 가장 작은 수로 나눈 몫은 얼마입니까?

Answer: 7

Solution (Python):
var_a = 105
var_b = 14
var_c = 1
var_d = var_b + var_c
var_e = var_a // var_d
print(int(var_e))
Category: Correspondence

Question (EN): For two natural numbers A and B, the quotient and the remainder are 9 and 13 when A is divided by B. What is the remainder when A is divided by 9?
Question (KO): 두 자연수 A와 B에 대해 A를 B로 나누었을 때 몫은 9이고 나머지는 13입니다. A를 9로 나누었을 때 나머지는 얼마입니까?

Answer: 4

Solution (Python):
var_a = 13
var_b = 9
var_c = var_a - var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): Find the largest two-digit number that has a remainder of 2 when divided by 13.
Question (KO): 두 자리 수 중에서 13으로 나누었을 때 나머지가 2인 가장 큰 수를 구하시오.

Answer: 93

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 = 13
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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
print(int(var_g))
Category: Comparison

Question (EN): 20 rabbits are lined up. How many rabbits are there between the 13th and 19th rabbits from the left?
Question (KO): 20마리의 토끼가 줄을 서 있습니다. 왼쪽에서 13번째와 19번째 토끼 사이에는 몇 마리의 토끼가 있습니까?

Answer: 5

Solution (Python):
var_a = 19
var_b = 13
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))