philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): A is a single digit number. Find the sum of all possible numbers that can be A in division 9A5÷5<197.
Question (KO): A는 한 자리 수입니다. 나눗셈 9A5÷5<197에서 A가 될 수 있는 모든 숫자의 합을 구하시오.

Answer: 28

Solution (Python):
var_a = '9A5÷5<197'
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] = []
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].append(int(c[i]))
list_a = list(set(ans_dict[var_b]))
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
print(int(var_c))
Category: Correspondence

Question (EN): There is a machine that makes 4 tops per minute and a machine that makes 7 bottoms per minute. Adding 12 existing tops to the machine-made tops in a few minutes resulted in 36 pieces. Find how many bottoms the machine made during that time.
Question (KO): 1분에 4개의 상의를 만드는 기계와 1분에 7개의 하의를 만드는 기계가 있다. 몇 분동안 기계가 만든 상의에 기존에 있던 상의 12벌을 더하니 36벌이 되었다. 그 시간동안 기계가 만든 하의는 몇 개인지 구하시오.

Answer: 42

Solution (Python):
var_a = 36
var_b = 12
var_c = var_a - var_b
var_d = 7
var_e = var_c * var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Find the number of natural numbers from 1 to 100 in which the units digit is 0.
Question (KO): 1부터 100까지의 자연수 중 일의 자리 수가 0인 수의 개수를 구하시오.

Answer: 10

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 = 1
var_e = 0
list_b = [] 
var_d = int(var_d)
var_e = int(var_e)
for i in list_a:
    i = int(i)
    if (i//var_d)%10 == var_e:
        list_b.append(i)
var_f = len(list_b)
print(int(var_f))
Category: Correspondence

Question (EN): Given the expression AB4C+17D8=5671 containing the different numbers A, B, C, and D, find B, not A.
Question (KO): 서로 다른 숫자 A, B, C, D를 포함한 식 AB4C+17D8=5671이 있을 때 A가 아니라 B를 구하시오.

Answer: 9

Solution (Python):
var_a = 'AB4C+17D8=5671'
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: Correspondence

Question (EN): There are candies inside a box. When packed in sets of 20, there are 4 left over; when packed in sets of 30, there are 14 left over; when packed in sets of 50, there are 24 left over; and when packed in sets of 70, there are 34 left over. Determine the minimum number of candies inside the box.
Question (KO): 상자 안에 사탕이 들어 있습니다. 이 사탕을 20개씩 포장하면 4 개가 남고, 30개씩 포장하면 14개가 남고, 50개씩 포장하면 24개가 남고, 70개씩 포장하면 34개가 남습니다. 상자 안에 들어있는 사탕은 최소 몇 개인지 구하시오.

Answer: 524

Solution (Python):
var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 20
var_e = 4
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 = 30
var_g = 14
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
    var_g = var_g + var_f
for i in list_b:
    i = int(i)
    if i%var_f == var_g:
        list_c.append(i)
var_h = 50
var_i = 24
list_d = [] 
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
    var_i = var_i + var_h
for i in list_c:
    i = int(i)
    if i%var_h == var_i:
        list_d.append(i)
var_j = 70
var_k = 34
list_e = [] 
var_j = int(var_j)
var_k = int(var_k)
if var_k < 0:
    var_k = var_k + var_j
for i in list_d:
    i = int(i)
    if i%var_j == var_k:
        list_e.append(i)
var_l = 1
list_f=list_e.copy()
list_f.sort()
var_m = list_f[var_l-1]
print(int(var_m))
Category: Correspondence

Question (EN): A and B are single-digit numbers. If A2468B is a multiple of 55, how many possible numbers can this number be?
Question (KO): A, B는 한 자리 수입니다. A2468B가 55의 배수일 때, 이 수가 될 수 있는 수는 모두 몇 개입니까?

Answer: 2

Solution (Python):
var_a = 'A2468B'
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 = 55
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: Geometry

Question (EN): How many sides are there on the face of an icosahedron?
Question (KO): 정이십면체의 면의 변의 개수는?

Answer: 3

Solution (Python):
var_a = 3
print(int(var_a))
Category: Geometry

Question (EN): The lengths of the hypotenuse and non-hypotenuse of a right triangle are 13 and 12, respectively. What is the length of the other side?
Question (KO): 직각삼각형의 빗변과 빗변이 아닌 한변의 길이는 각각 13과 12입니다. 나머지 한 변의 길이는?

Answer: 5

Solution (Python):
var_a = 13
var_b = 2
var_c = var_a ** var_b
var_d = 12
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: Arithmetic calculation

Question (EN): Seoyoon traveled by train that goes 120 kilometers (km) per hour to get from her house to her grandmother's house. After traveling for 2 hours by train, the remaining distance to her grandmother's house was 2.4 kilometers (km). If it took 3 hours by car to go from Seoyoon's house to grandmother's house at a constant speed, how many kilometers (km) does the car travel per hour?
Question (KO): 서윤이네 집에서 할머니 댁까지 가는 데 한 시간에 120 킬로미터(㎞)를 가는 기차로 2시간 동안 갔더니 할머니 댁까지 남은 거리가 2.4 킬로미터(㎞)였습니다. 서윤이네 집에서 할머니 댁까지 일정한 빠르기로 가는 자동차로 3시간이 걸렸다면 자동차는 한 시간 동안 몇 킬로미터(㎞)를 간 것입니까?

Answer: 80.8

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

Question (EN): Find the smallest five-digit number that can be formed using 0, 4, 6, 7, and 8 once.
Question (KO): 0, 4, 6, 7, 8 중에 한 번씩만 사용하여 만들 수 있는 다섯 자리 수 중에서 가장 작은 수를 구하시오.

Answer: 40678

Solution (Python):
var_a = 0
var_b = 4
var_c = 6
var_d = 7
var_e = 8
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 = 5
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
print(int(var_h))
Category: Arithmetic calculation

Question (EN): There is a same number of 10-won and 50-won coins, and there are a total 12 of 10-won, 50-won, and 100-won coins. If the total amount is 500-won, how many 100-won coins are there?
Question (KO): 10원짜리 50원짜리 동전의 개수가 같으며 10원짜리, 50원짜리, 100원짜리 동전이 모두 12개 있습니다. 총 금액이 500원이라면 100원짜리는 몇 개 있습니까?

Answer: 2

Solution (Python):
var_a = 12
var_b = 500
var_c = 100
var_d = 12
var_e = var_c * var_d
var_f = var_b - var_e
var_g = 10
var_h = 50
var_i = var_g + var_h
var_j = 100
var_k = 2
var_l = var_j * var_k
var_m = var_i - var_l
var_n = var_f / var_m
var_o = 2
var_p = var_n * var_o
var_q = var_a - var_p
print(int(var_q))
Category: Geometry

Question (EN): If the surface area of a cube is 486 square centimeters (cm2), how many centimeters (cm) is the sum of the lengths of all its edges?
Question (KO): 어떤 정육면체의 겉넓이는 486제곱센티미터(㎠)일 때, 모든 모서리의 길이의 합은 몇 센티미터(㎝)인지 구하시오

Answer: 108

Solution (Python):
var_a = 486
var_b = 6
var_c = var_a / var_b
var_d = 0.5
var_e = var_c ** var_d
var_f = 12
var_g = var_e * var_f
print(int(var_g))
Category: Correspondence

Question (EN): A is a single digit number. What is A that satisfies 3.4<3.A<4, 4/3>4/A>4/6?
Question (KO): A는 1자리 수입니다. 3.4<3.A<4, 4/3>4/A>4/6인 A는 무엇입니까?

Answer: 5

Solution (Python):
var_a = '3.4<3.A<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] = []
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].append(int(c[i]))
list_a = list(set(ans_dict[var_b]))
var_c = '4/3>4/A>4/6'
var_d = 'A'
ans_dict = dict()
var_c = var_c.replace('×','*')
var_c = var_c.replace('x','*')
var_c = var_c.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_c):
    if v in variable_candi:
        ans_dict[v] = []
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_c
    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_c):
        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].append(int(c[i]))
list_b = list(set(ans_dict[var_d]))
list_c = list(set(list_a) & set(list_b))
var_e = 1
var_f = list_c[var_e-1]
print(int(var_f))
Category: Comparison

Question (EN): Namjoon has fewer marbles than Eunji. Namjoon has fewer marbles than Taehyung. Eunji has fewer marbles than Taehyung. Who has the most marbles?
Question (KO): 남준이는 은지보다 구슬을 더 적게 가지고 있습니다. 남준이는 태형이보다 구슬을 더 적게 가지고 있습니다. 은지는 태형이보다 구슬을 더 적게 가지고 있습니다. 구슬을 가장 많이 가지고 있는 사람은 누구입니까?

Answer: Taehyung

Solution (Python):
var_a = 'Namjoon'
var_b = 'Eunji'
var_c = 'Taehyung'
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 = 'Namjoon'
var_e = 'Eunji'
var_f = '<'
var_g = 'Namjoon'
var_h = 'Taehyung'
var_i = '<'
var_j = 'Eunji'
var_k = 'Taehyung'
var_l = '<'
list_b= []
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)
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_m = 1
var_n = list_c[var_m-1]
print(var_n)
Category: Geometry

Question (EN): When you open a faucet, it is said that 36 milliliters (ml) of water comes out per second. If the volume of the tank is 252 cubic centimeters (cm3), how many seconds will it take to fill the tank?
Question (KO): 수도꼭지를 열면 초 당 36밀리리터(㎖)의 물이 나온다고 합니다. 수조의 부피가 252세제곱센티미터(㎤)이면 이 수조를 다 체우는데 몇 초가 걸리는지 구하시오.

Answer: 7

Solution (Python):
var_a = 252
var_b = 36
var_c = 1
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): A year ago, Hoseok's mother was 35 years old and Hoseok was 5 years old. Find how many times his mother's age is Hoseok's age 4 years from now.
Question (KO): 1년 전 어머니의 나이는 35살이었고 호석이의 나이는 5살이었습니다. 현재로부터 4년 후 어머니의 나이는 호석이 나이의 몇 배가 되는지 구하시오.

Answer: 4

Solution (Python):
var_a = 35
var_b = 1
var_c = var_a + var_b
var_d = 4
var_e = var_c + var_d
var_f = 5
var_g = 1
var_h = var_f + var_g
var_i = 4
var_j = var_h + var_i
var_k = var_e / var_j
print(int(var_k))
Category: Comparison

Question (EN): Jimin has a 59 centimeters (cm) string. Yoojeong has a 53 centimeters (cm) string. Who has the shorter string?
Question (KO): 지민이는 끈을 59센티미터(㎝) 가지고 있습니다. 유정이는 끈을 53센티미터(㎝) 가지고 있습니다. 더 짧은 끈을 가지고 있는 사람은 누구입니까?

Answer: Yoojeong

Solution (Python):
var_a = 'Jimin'
var_b = 'Yoojeong'
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 = 59
var_d = 53
list_b= []
if "/" in str(var_d):
    var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h)
Category: Arithmetic calculation

Question (EN): There are 15 cucumbers in the mart. The number of radishes is 3 times the number of cucumbers, and there are 9 carrots. How many times the number of radishes is equal to the number of carrots?
Question (KO): 마트에 오이가 15개 있습니다. 무의 수는 오이 수의 3배이고, 당근은 9개 있습니다. 무의 수는 당근 수의 몇 배입니까?

Answer: 5

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

Question (EN): 1 Chinese Yuan is equal to 161.5 Won in Korean money. I'm trying to change 170,000 won in Korean money into 1000 yuan and 10 yuan in Chinese money. If you change as many 1000 yuan as possible, how many 10 yuan can you get?
Question (KO): 중국 돈 1 위안은 우리나라 돈으로 161.5 원입니다. 우리나라 돈 17만원을 중국 돈 1000 위안과 10 위안 짜리로 바꾸려고 합니다. 1000 위안짜리를 될 수 있는 대로 많이 바꾼다면 10 위안짜리는 몇 장으로 바꿀 수 있습니까?

Answer: 5

Solution (Python):
var_a = 17
var_b = 10000
var_c = var_a * var_b
var_d = 161.5
var_e = 1000
var_f = var_d * var_e
var_g = var_c % var_f
var_h = 161.5
var_i = 10
var_j = var_h * var_i
var_k = var_g // var_j
print(int(var_k))
Category: Arithmetic calculation

Question (EN): Find the odd number between 30 and 50 with a remainder of 2 when divided by 7.
Question (KO): 30부터 50사이의 홀수 중에서 7로 나눈 나머지가 2인 수를 구하시오.

Answer: 37

Solution (Python):
var_a = 30
var_b = 50
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 = 7
var_d = 2
list_b = [] 
var_c = int(var_c)
var_d = int(var_d)
if var_d < 0:
    var_d = var_d + var_c
for i in list_a:
    i = int(i)
    if i%var_c == var_d:
        list_b.append(i)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print(int(var_e))
Category: Comparison

Question (EN): What is the sum of the numbers less than 0.4 among 0.8, 1/2, 0.3, and 1/3?
Question (KO): 0.8, 1/2, 0.3, 1/3 중 0.4보다 작은 수의 총합은?

Answer: 0.63

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)
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print('{:.2f}'.format(round(var_f+1e-10,2)))
Category: Arithmetic calculation

Question (EN): Which three-digit number is the smallest common multiple of 5, 8, and 2?
Question (KO): 세 자리 수 중 5, 8, 2의 공배수 중 가장 작은 수는 무엇입니까?

Answer: 120

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 = 5
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 = 8
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 = 2
list_d = []
var_f = int(var_f)
for i in list_c:
    i = int(i)
    if i % var_f == 0:
        list_d.append(i)
var_g = 1
list_e=list_d.copy()
list_e.sort()
var_h = list_e[var_g-1]
print(int(var_h))
Category: Arithmetic calculation

Question (EN): The subway travels at 1.6 kilometers (km) per minute. If it took 3 minutes and 15 seconds to completely cross a bridge that is 4.85 kilometers (km) long, how long is the subway in meters (m)?
Question (KO): 지하철은 1분에 1.6킬로미터(㎞)씩 이동합니다. 길이가 4.85킬로미터(㎞)인 다리를 완전히 건너는 데 3분 15초가 걸렸다면, 지하철의 길이는 몇 미터(m)입니까?

Answer: 350

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

Question (EN): How many meters (m) is the length of a side of an equilateral triangle with a perimeter of 2 meters (m) in decimal numbers?
Question (KO): 둘레가 2미터(m)인 정삼각형의 한 변의 길이는 몇 미터(m)인지 소수로 나타내시오.

Answer: 0.67

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

Question (EN): Subtract 62 from any number and add 45 to get 55. Find the value of a number multiplied by 7.
Question (KO): 어떤 수에서 62를 빼고 45를 더했더니 55가 되었습니다. 어떤 수에 7을 곱한 값을 구하시오.

Answer: 504

Solution (Python):
var_a = 55
var_b = 45
var_c = var_a - var_b
var_d = 62
var_e = var_c + var_d
var_f = 7
var_g = var_e * var_f
print(int(var_g))
Category: Possibility

Question (EN): Find the sum of the largest and smallest three-digit number that can be formed by using 5, 6, and 7 only once.
Question (KO): 5, 6, 7 중에서 한 번씩만 사용하여 만들 수 있는 세 자리 수중에서 가장 큰 수와 가장 작은 수의 합을 구하시오.

Answer: 1332

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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 1
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Jungkook has 3 red balls and Yoongi has 2 blue balls. When Yoongi gave 1 blue ball to Jungkook, how many balls does Jungkook have now?
Question (KO): 정국이는 빨간 공 3개, 윤기는 파란 공 2개를 가지고 있습니다. 윤기가 파란 공 1개를 정국이에게 주었을 때, 정국이가 가지고 있는 공의 개수는?

Answer: 4

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

Question (EN): Find the remainder when 256 is divided by 13.
Question (KO): 256을 13으로 나누었을 때의 나머지를 구하시오.

Answer: 9

Solution (Python):
var_a = 256
var_b = 13
var_c = var_a % var_b
print(int(var_c))
Category: Geometry

Question (EN): There is a rectangular drawing paper measuring 25 centimeters (cm) wide and 20 centimeters (cm) long. What is the area of this sheet of paper?
Question (KO): 가로가 25센티미터(㎝), 세로가 20센티미터(㎝)인 직사각형 모양의 도화지가 있습니다. 이 도화지의 넓이는 얼마입니까?

Answer: 500

Solution (Python):
var_a = 25
var_b = 20
var_c = var_a * var_b
print(int(var_c))