philschmid/DMath huggingface dataset:
Category: Comparison

Question (EN): There are 5 people: Juri, Jungwoo, Myunghyun, Seokjin, and Jungkook. Jungwoo is smaller than Juri and Seokjin is smaller than Myunghyun. Juri is shorter than Jungkook. Myunghyun is shorter than Jungwoo. Who is the tallest?
Question (KO): 5명의 사람 주리, 정우, 명현, 석진, 정국이 있습니다. 정우는 주리보다 작고 석진이는 명현이보다 작습니다. 주리는 정국이보다 작습니다. 명현이는 정우보다 작습니다. 키가 가장 큰 사람은 누구입니까?

Answer: Jungkook

Solution (Python):
var_a = 'Juri'
var_b = 'Jungwoo'
var_c = 'Myunghyun'
var_d = 'Seokjin'
var_e = 'Jungkook'
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 = 'Juri'
var_g = 'Jungwoo'
var_h = '>'
var_i = 'Myunghyun'
var_j = 'Seokjin'
var_k = '>'
var_l = 'Juri'
var_m = 'Jungkook'
var_n = '<'
var_o = 'Myunghyun'
var_p = 'Jungwoo'
var_q = '<'
list_b= []
if "/" in str(var_q):
    var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
    var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
    var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
    var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
    var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
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)
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_r = 1
var_s = list_c[var_r-1]
print(var_s)
Category: Correspondence

Question (EN): The result of dividing a certain number by 7 mistake of dividing a certain number by 6 is 42. How much is it if you calculate it correctly?
Question (KO): 6을 어떤 수에 나누어 줘야 할 것을 잘못하여 7을 어떤 수에 나눈한 결과는 42가 나옵니다. 바르게 계산하면 얼마인가요?

Answer: 49

Solution (Python):
var_a = 42
var_b = 7
var_c = var_a * var_b
var_d = 6
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): Subtracting 17 from a number gives 55. If Yoongi wants to divide the number by 9, how much does Yoongi get?
Question (KO): 어떤 수에서 17을 빼면 55가 됩니다. 윤기는 어떤 수를 9로 나누고자 합니다. 윤기가 구한 값은 얼마입니까?

Answer: 8

Solution (Python):
var_a = 55
var_b = 17
var_c = var_a + var_b
var_d = 9
var_e = var_c / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): What is the smallest 4-digit number that is a multiple of 3 and a multiple of 5?
Question (KO): 3의 배수이면서 5의 배수인 수 중 가장 작은 네 자리 수는?

Answer: 1005

Solution (Python):
var_a = 1000
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 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: Correspondence

Question (EN): Sunye's house has no electricity, so she has to rely on matches. There are 8 matches in a matchbox. Sunye has 9 matchboxes and 7 single matches. If she uses 6 matches a day, find the maximum number of days she can last completely.
Question (KO): 선예네 집에 전기가 들어오지않아 성냥에 의존해야한다. 성냥곽 안에는 8개의 성냥이 들어있다고 한다. 선예는 9개의 성냥곽과 7개의 낱개 성냥을 가지고 있다. 하루에 6개씩 성냥을 쓴다면 최대 며칠을 온전히 버틸 수 있을지 구하시오

Answer: 13

Solution (Python):
var_a = 8
var_b = 9
var_c = var_a * var_b
var_d = 7
var_e = var_c + var_d
var_f = 6
var_g = var_e // var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): You want to drink 19 liters (L) of water equally over 9 days. Find how many liters (l) of water you need to drink per day.
Question (KO): 물 19리터(L)를 9일 동안 똑같이 나누어 마시려고 합니다. 하루에 마셔야 할 물은 몇 리터(L)인지 구하세요.

Answer: 2.11

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

Question (EN): Suppose several monsters are trying to attack. If you shoot 4 times at a monster, 3 shots remain, and if you try to shoot 5 times, then you lack 6 shots. How many monsters are there?
Question (KO): 몬스터 여러 마리가 공격해서 총을 쏘려고 한다. 몬스터에게 4발씩 쏘니 3발이 남고, 5발씩 쏘니 6발이 부족했다. 몇 마리의 몬스터가 공격하는가?

Answer: 9

Solution (Python):
var_a = 3
var_b = 6
var_c = var_a + var_b
var_d = 5
var_e = 4
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g))
Category: Geometry

Question (EN): A parallelogram has an area of 44 square centimeters (cm2) and a height of 11 centimeters (cm). What is the length of the base?
Question (KO): 어떤 평행사변형은 44제곱센티미터(㎠)의 넓이와 11센티미터(㎝)의 높이를 가지고 있습니다. 밑변의 길이는?

Answer: 4

Solution (Python):
var_a = 44
var_b = 11
var_c = var_a / var_b
print(int(var_c))
Category: Correspondence

Question (EN): You mistakenly added what should have subtracted 0.42 from a number, and ended up with 0.9. What is 0.5 added to the correctly calculated value?
Question (KO): 어떤 수에서 0.42를 빼야 할 것을 잘못하여 더했더니 0.9가 되었습니다. 바르게 계산한 값에 0.5를 더한다면 얼마입니까?

Answer: 0.56

Solution (Python):
var_a = 0.9
var_b = 0.42
var_c = var_a - var_b
var_d = 0.42
var_e = var_c - var_d
var_f = 0.5
var_g = var_e + var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Correspondence

Question (EN): When A is divided by 7, the quotient is 5 and the remainder is 3. Get A.
Question (KO): A를 7로 나누면 몫은 5이고 나머지는 3이 됩니다. A를 구하시오.

Answer: 38

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

Question (EN): A bucket full of water weighs 320 kilograms (kg). After using 1/2 of the water, the bucket weighs 175 kilograms (kg). What is the weight of the empty bucket in kilograms (kg)?
Question (KO): 물이 가득 담긴 통의 무게는 320킬로그램(㎏)입니다. 이 중 물 1/2을 쓴 후 통의 무게를 다시 재어 보니 175킬로그램(㎏)입니다. 통만의 무게는 몇 킬로그램(㎏)입니까?

Answer: 30

Solution (Python):
var_a = 320
var_b = 320
var_c = 175
var_d = var_b - var_c
var_e = 2
var_f = var_d * var_e
var_g = var_a - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): I bought 7 boxes of soda, each box containing 16 cans. Thirteen of them were discarded because the cans were crushed during transport. I plan to distribute the remaining beverages equally among the eight boxes. How many pieces should I put in each box?
Question (KO): 한 상자에 16캔씩 들어있는 음료수를 7상자 샀습니다. 그중에서 13개는 운반 도중 캔이 찌그러져서 버리고, 남은 음료수를 8상자에 똑같이 나누어 담으려고 합니다. 한 상자에 몇 개씩 나누어 담으면 됩니까?

Answer: 12

Solution (Python):
var_a = 16
var_b = 7
var_c = var_a * var_b
var_d = 13
var_e = var_c - var_d
var_f = 8
var_g = var_e // var_f
print(int(var_g))
Category: Geometry

Question (EN): There is a cube with 6 centimeters (cm) edge. If a smaller cube whose edge is 2 centimeters (cm) is cut out from the middle of each side of the original one, what will be the surface area in square centimeters (cm2)?
Question (KO): 한 모서리의 길이가 6㎝인 정육면체가 있습니다. 각 면의 한가운데서 한 모서리의 길이가 2㎝인 정육면체를 파내었을 때, 남은 부분의 겉넓이는 몇 제곱센티미터입니까?

Answer: 312

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

Question (EN): The box contains 23 green and 23 purple marbles. If there are 7 more green marbles than purple marbles, how many green marbles are there?
Question (KO): 상자에 초록색 구슬과 보라색 구슬이 모두 23개 들어 있습니다. 초록색 구슬이 보라색 구슬보다 7개 더 많을 때, 초록색 구슬은 몇 개입니까?

Answer: 8

Solution (Python):
var_a = 23
var_b = 7
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Possibility

Question (EN): Seven classes play soccer. If they play against each other once, how many matches are there in total?
Question (KO): 7개 반이 축구 경기를 한다. 서로 다른 반과 한번씩 경기를 진행한다면 경기는 총 몇번 진행되는가?

Answer: 21

Solution (Python):
var_a = 7
var_b = 7
var_c = 1
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g))
Category: Comparison

Question (EN): If a cinema has 4 rows of 8 chairs each, what is the total number of chairs in the cinema?
Question (KO): 한 영화관에 의자가 8개씩 4열이 있을 때, 이 영화관에 있는 모든 의자의 개수는 몇 개 입니까?

Answer: 32

Solution (Python):
var_a = 8
var_b = 4
var_c = var_a * var_b
print(int(var_c))
Category: Comparison

Question (EN): The average number of books the three had was 23 fewer than the average of the first and second persons, and 17 more than the average of the second and third persons. If the second person has 66 books, find the sum of the number of books the first person and the third person have.
Question (KO): 세 사람이 가진 책의 평균은 첫 번째 사람과 두 번째 사람이 가진 책의 평균보다 23권 더 적았고, 두 번째 사람과 세 번째 사람이 가진 책의 평균보다 17권 더 많았다. 두 번째 사람이 가진 책이 66권이었을 때, 첫 번째 사람과 세 번째 사람이 가진 책 권수의 합을 구하여라.

Answer: 96

Solution (Python):
var_a = 66
var_b = 23
var_c = var_a - var_b
var_d = 17
var_e = var_c + var_d
var_f = 2
var_g = 3
var_h = var_f / var_g
var_i = 66
var_j = var_h * var_i
var_k = var_e - var_j
var_l = 2
var_m = 3
var_n = var_l / var_m
var_o = 1
var_p = 2
var_q = var_o / var_p
var_r = var_n - var_q
var_s = var_k / var_r
print(int(eval('{:.2f}'.format(round(var_s+1e-10,2)))))
Category: Possibility

Question (EN): The number cards have numbers from 1 to 12 written on them. When a number card is drawn, find the number of cases where the number on the card is a multiple of 3.
Question (KO): 숫자 카드에 1부터 12까지의 숫자가 적혀있습니다. 숫자카드 하나를 뽑았을 때 카드에 적힌 숫자가 3의 배수인 경우의 수는 모두 몇 개인지 구하세요.

Answer: 4

Solution (Python):
var_a = 1
var_b = 12
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 = len(list_b)
print(int(var_e))
Category: Possibility

Question (EN): You have two chances to pick fruit from a basket that contains one apple, one peach, one pear, one melon, and one strawberry. How many orders of fruit can there be?
Question (KO): 사과, 복숭아, 배, 참외, 딸기가 각각 하나씩 있는 바구니에서 과일을 꺼낼 기회는 두 번입니다. 나올 수 있는 과일의 순서는 모두 몇 가지입니까?

Answer: 20

Solution (Python):
var_a = 'apple'
var_b = 'peach'
var_c = 'pear'
var_d = 'melon'
var_e = 'strawberry'
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 = 1
var_f = int(var_f)
var_g = int(var_g)
for i, elem in enumerate(range(var_g)):
    var_h = var_h * (var_f-i)
print(int(var_h))
Category: Arithmetic calculation

Question (EN): Multiplying product (a) produced in August by 8 gives you the number of product (a) produced in September. If you produced 72 items in September, how many items did you produce in August and September in total?
Question (KO): 8월에 만든 (가) 물건을 8배하면 9월에 만든 (가) 물건의 수가 됩니다. 9월에 (가) 물건 72개를 만들었다면 8월 9월 두달 동안 만든 (가) 물건은 모두 몇 개입니까?

Answer: 648

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

Question (EN): The average of 7 numbers is 7. If you take one of these numbers and change it to 9, the average is 8. What was the original number before changing?
Question (KO): 7개의 수의 평균은 7입니다. 이 중 한 개의 수를 골라 9로 바꾸었더니 평균이 8이 되었습니다. 바꾼 수는 원래 얼마입니까?

Answer: 2

Solution (Python):
var_a = 7
var_b = 7
var_c = var_a * var_b
var_d = 7
var_e = 8
var_f = var_d * var_e
var_g = 9
var_h = var_f - var_g
var_i = var_c - var_h
print(int(var_i))
Category: Correspondence

Question (EN): While Yoongi was subtracting 57 from the three-digit number, Yoongi mistakenly saw the units digit of the three-digit number 9 as 6. When Yoongi got the result of 819, what is the three-digit number?
Question (KO): 윤기는 세 자리 수에 57을 빼던 중, 윤기는 두 자리 수의 일의 자리 숫자 9를 6으로 잘못 보았습니다. 윤기가 구한 차가 819 일 때, 세 자리 수는 무엇일까요?

Answer: 879

Solution (Python):
var_a = 819
var_b = 57
var_c = var_a + var_b
var_d = 6
var_e = 9
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): The stationery shop sold all 15 bundles of notebooks in 5 days. If each bundle contained 40 notebooks, how many notebooks did you sell on average per day?
Question (KO): 문구점에서 공책 15묶음을 5일 만에 전부 팔았습니다. 각 묶음에 공책이 40권씩 들어 있었다면, 매일 평균 몇 권씩 팔았습니까?

Answer: 120

Solution (Python):
var_a = 15
var_b = 40
var_c = var_a * var_b
var_d = 5
var_e = var_c // var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): When Young-soo held the puppy and weighed it, it was 31 kilograms (kg), and when Ga-young held the same puppy and weighed it, it was 27 kilograms (kg) and 350 grams (g). If the weight of the dog is 1 kilogram (kg) and 400 grams (g), how many kilograms (kg) is the sum of the weights of Youngsoo, Gayoung, and the dog?
Question (KO): 영수가 강아지를 안고 무게를 달았더니 31킬로그램(㎏)이었고, 가영이가 같은 강아지를 안고 무게를 달았더니 27킬로그램(㎏) 350그램(g)이었습니다. 강아지의 무게가 1킬로그램(㎏) 400그램(g)이라면 영수, 가영, 강아지의 무게의 합은 몇 킬로그램(㎏)입니까?

Answer: 56.95

Solution (Python):
var_a = 31
var_b = 27
var_c = 350
var_d = 1000
var_e = var_c / var_d
var_f = var_b + var_e
var_g = var_a + var_f
var_h = 1
var_i = 400
var_j = 1000
var_k = var_i / var_j
var_l = var_h + var_k
var_m = var_g - var_l
print('{:.2f}'.format(round(var_m+1e-10,2)))
Category: Arithmetic calculation

Question (EN): The airport is 300 kilometers (km) away from the house. Find the remaining distance after 2 hours when Jinwoo leaves home in a car traveling at 60 kilometers (km) per hour.
Question (KO): 집에서 공항까지는 300킬로미터(㎞) 떨어져있습니다. 진우가 시속 60킬로미터(㎞)의 자동차를 타고 집에서 출발했을 때 2시간 후의 남은 거리는 얼마인지 구하세요.

Answer: 180

Solution (Python):
var_a = 300
var_b = 60
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e))
Category: Arithmetic calculation

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

Answer: 143

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 = 2
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
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: Correspondence

Question (EN): You need to add 41 to a number, but mistakenly added 14, and got 68. Find the sum of a number and its correctly calculated value.
Question (KO): 어떤 수에 41을 더해야 하는데 잘못해서 14를 더했더니 68이 되었습니다. 어떤 수와 바르게 계산한 값의 합을 구하시오.

Answer: 149

Solution (Python):
var_a = 68
var_b = 14
var_c = var_a - var_b
var_d = 68
var_e = 14
var_f = var_d - var_e
var_g = 41
var_h = var_f + var_g
var_i = var_c + var_h
print(int(var_i))
Category: Correspondence

Question (EN): 14A+2B3=418. How much is A?
Question (KO): 14A+2B3=418입니다. A는 얼마인가요?

Answer: 5

Solution (Python):
var_a = '14A+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: Comparison

Question (EN): Find the number of numbers less than or equal to 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: Geometry

Question (EN): When tossing two different coins, calculate the numbers of cases where both tails come up.
Question (KO): 서로 다른 동전 2개를 던졌을 때, 둘 다 뒷면이 나오는 경우는 몇 가지 입니까?

Answer: 1

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

Question (EN): Namjoon rode his bike and traveled 96.967 kilometers (km) in 1.3 hours. If Namjoon went at a steady speed, how many kilometers (km) did he travel in 1 hour?
Question (KO): 남준이는 자전거를 타고 1.3시간 동안 96.967킬로미터(㎞)를 갔습니다. 남준이가 일정한 빠르기로 갔다면 1 시간 동안 간 거리는 몇 킬로미터(㎞) 입니까?

Answer: 74.59

Solution (Python):
var_a = 96.967
var_b = 1.3
var_c = var_a / var_b
var_d = 1
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))
Category: Possibility

Question (EN): How many three-digit numbers are there in which each digit has only odd numbers less than or equal to 3?
Question (KO): 각 자리수가 3이하의 홀수로만 이루어진 세 자리 수는 총 몇개입니까?

Answer: 8

Solution (Python):
var_a = 0
var_b = 3
list_a = []
if var_a%2==0:
    for i in range(var_a+1, var_b+1, 2):
        list_a.append(i)
else:
    for i in range(var_a, var_b+1, 2):
        list_a.append(i)
var_c = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_c))
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_d = len(list_b)
print(int(var_d))
Category: Comparison

Question (EN): Jimin drank 0.7 liters (L) of juice. Eunji drank 1/10 liter (L) less than Jimin. Yoongi drank 4/5 liters (L), and Yuna drank 0.2 liters (L) more than Jimin. Who drank the most juice?
Question (KO): 지민이는 주스를 0.7리터(L) 마셨습니다. 은지는 지민이보다 1/10리터(L) 더 적게 마셨습니다. 윤기는 4/5리터(L) 마셨고, 유나는 지민이보다 0.2리터(L) 더 많이 마셨습니다. 주스를 가장 많이 마신 사람은 누구입니까?

Answer: Yuna

Solution (Python):
var_a = 'Jimin'
var_b = 'Eunji'
var_c = 'Yoongi'
var_d = 'Yuna'
list_a= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
    var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
    var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 0.7
var_f = 0.7
var_g = 1
var_h = 10
var_i = var_g / var_h
var_j = var_f - var_i
var_k = 4
var_l = 5
var_m = var_k / var_l
var_n = 0.7
var_o = 0.2
var_p = var_n + var_o
list_b= []
if "/" in str(var_p):
    var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_m):
    var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_j):
    var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_e):
    var_e = eval(str(var_e))
list_b.append(var_e)
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: Comparison

Question (EN): Jian has 5,000 won, Doyun has 2,000 won, Harin has 8,000 won, and Joowon has 4,000 won. Who is the 3rd richest person?
Question (KO): 지안이는 5000원, 도윤이는 2000원, 하린이는 8000원, 주원이는 4000원을 가지고 있습니다. 3번째로 돈이 많은 사람은 누구인가요?

Answer: Joowon

Solution (Python):
var_a = 'Jian'
var_b = 'Doyun'
var_c = 'Harin'
var_d = 'Joowon'
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 = 5000
var_f = 2000
var_g = 8000
var_h = 4000
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)
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)
list_b.reverse()
var_i = 3
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: Correspondence

Question (EN): 10 times a number is 17, what is 1/100 times the number?
Question (KO): 어떤 수의 10배는 17입니다, 어떤 수의 1/100배는 얼마입니까?

Answer: 0.02

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

Question (EN): Bottles of milk are 18 less than slices of bread, and cookies are 27 more than slices of bread. If there are 58 slices of bread, how many bread, bottles of milk, and cookies are there in total?
Question (KO): 우유는 빵보다 18개 적고, 과자는 빵보다 27개 더 많습니다. 빵이 58개 있을 때 빵, 우유, 과자는 모두 몇 개입니까?

Answer: 183

Solution (Python):
var_a = 58
var_b = 58
var_c = 18
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 58
var_g = 27
var_h = var_f + var_g
var_i = var_e + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): A hardware store sells wire for 200 won for 0.1 meter (m). How many meters (m) of wire can you buy with 1200 won?
Question (KO): 어느 철물점에서 철사를 0.1미터(m)에 200원씩 판매합니다. 1200원으로는 몇 미터(m)의 철사를 살 수 있습니까?

Answer: 0.6

Solution (Python):
var_a = 1200
var_b = 200
var_c = var_a / var_b
var_d = 0.1
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2)))