philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): When Minhyuk asked Kihyun's math test score, Kihyun answered it would be 90 if he rounded it off to 10 digits. What is the biggest number possible with Kihyun's math score?
Question (KO): 민혁이가 기현이의 수학 시험 점수를 물어보자 기현이는 반올림하여 십의 자리까지 나타내면 90이라고 답하였습니다. 기현이의 수학 점수로 가능한 가장 큰 수는 무엇입니까?

Answer: 94

Solution (Python):
var_a = 9
var_b = 'A'
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=""
for i in list_a:
    i = str(i)
    var_c = var_c + i
ans_dict = dict()
var_c = str(var_c)
list_b = []
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] = 0
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]))
    if len(var_c) == len(str(int(temp))):
        new_elem = int(temp)
        list_b.append(new_elem)
var_d = 90
var_e = 5
var_f = var_d + var_e
list_c = []
for i in list_b:
    if i < var_f:
        list_c.append(i)
var_g = 1
list_d=list_c.copy()
list_d.sort()
var_h = list_d[-var_g]
print(int(var_h))
Category: Possibility

Question (EN): You can place a magnet with the natural numbers 6 and 3 on it, one in the tens place and one in the ones place. What is the largest number you can make?
Question (KO): 자연수 6, 3이 그려진 자석을 하나는 십의 자리에, 하나는 일의 자리에 놓을 수 있습니다. 만들 수 있는 가장 큰 수는 무엇입니까?

Answer: 63

Solution (Python):
var_a = 6
var_b = 3
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 = len(list_a)
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, 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 = 1
list_c=list_b.copy()
list_c.sort()
var_e = list_c[-var_d]
print(int(var_e))
Category: Possibility

Question (EN): How many two-digit numbers can be made with 0, 6, and 3? Note that the tens and ones places must be different.
Question (KO): 두 자리 수 중 0, 6, 3으로 만들 수 있는 것은 몇 가지입니까? 단, 십의 자리와 일의 자리의 숫자는 달라야 합니다.

Answer: 4

Solution (Python):
var_a = 6
var_b = 0
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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = len(list_b)
print(int(var_e))
Category: Correspondence

Question (EN): There are 3 boxes of carrots which contains 32 of them each, and you are going to put 4 of these carrots in each basket. How many baskets do you need to put carrots in?
Question (KO): 한 상자에 32개씩 3상자에 들어 있는 당근을 한 바구니에 4개씩 다시 담으려고 합니다. 당근을 담는 데 필요한 바구니는 모두 몇 개입니까?

Answer: 24

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

Question (EN): There is a box with 3 cabbages and 2 radishes. How many vegetables are in the box?
Question (KO): 상자에 배추 3포기와 무 2개가 들어 있는 상자가 있습니다. 상자 안에 채소는 몇 개 있습니까?

Answer: 5

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

Question (EN): One pear weighs 0.36 kilograms (kg). When a basket contains 30 pears, the weight of the entire basket is 11.26 kilograms (kg). Find the weight in kilograms (kg) of the empty basket.
Question (KO): 한 개의 무게가 0.36킬로그램(㎏)인 공 30개가 상자 안에 들어있습니다. 공이 들어있는 상자의 무게를 재었더니 11.26킬로그램(㎏)이었다면 공이 들어있지 않은 상자는 몇 킬로그램(㎏)인지 구하세요.

Answer: 0.46

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

Question (EN): The bag contains 2 fewer blue marbles than yellow marbles. If the sum of the yellow and blue marbles is 240, how many yellow marbles are there?
Question (KO): 주머니에 파란 구슬은 노란 구슬보다 2개 적게 들어있습니다. 노란 구슬과 파란 구슬 개수의 합이 240이라면 노란 구슬의 개수는 몇 개인지 구하세요.

Answer: 121

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

Question (EN): Hyeonil rode a bicycle and moved for an hour at a speed of 4.25 meters (m) per minute. After that, if he moved 29.75 meters (m) at the same speed, find how many minutes Hyunil rode the bicycle.
Question (KO): 현일이는 자전거를 타고 1분에 4.25미터(m)의 속도로 1시간 동안 움직였다. 그 이후에 같은 속도로 29.75미터(m)만큼 움직였다면 현일이는 자전거를 몇 분동안 탔는지 구하시오.

Answer: 67

Solution (Python):
var_a = 29.75
var_b = 4.25
var_c = var_a / var_b
var_d = 1
var_e = 60
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g))
Category: Possibility

Question (EN): If all divisors of 75 are written once, how many times the number 5 must be written?
Question (KO): 75의 약수를 모두 한번씩 적으면 숫자 5를 모두 몇 번 적어야 하는지 구하시오.

Answer: 4

Solution (Python):
var_a = 75
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
    if var_a % i == 0:
        list_a.append(i)
        list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b=""
for i in list_a:
    i = str(i)
    var_b = var_b + i
list_b = []
var_b = int(var_b)
while var_b//10 > 0:
    list_b.append(var_b%10)
    var_b = var_b//10
list_b.append(var_b%10)
list_b = list_b[::-1]
var_c = 5
var_d = 0
var_c = int(var_c)
for i in list_b:
    i = int(i)
    if i == var_c:
        var_d = var_d + 1
print(int(var_d))
Category: Geometry

Question (EN): 
There is a rhombic hairpin with two diagonals measuring 9 centimeters (cm) and 14 centimeters (cm), respectively. How wide is this hairpin?
Question (KO): 두 대각선의 길이가 각각 9센티미터(㎝), 14센티미터(㎝)인 마름모 모양의 머리핀이 있습니다. 이 머리핀의 넓이는 얼마입니까?

Answer: 63

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

Question (EN): There are 2180 tangerines. You distribute them in boxes of 200 and 150 to have organized 12 boxes in total, and then 30 tangerines are left. How many boxes of 200 are there?
Question (KO): 2180개의 귤이 있습니다. 이것을 200개짜리와 150개짜리 상자에 담아 모두 12상자가 되도록 하였더니 30개의 귤이 남았습니다. 200개짜리 상자는 몇 상자입니까?

Answer: 7

Solution (Python):
var_a = 2180
var_b = 30
var_c = var_a - var_b
var_d = 150
var_e = 12
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 200
var_i = 150
var_j = var_h - var_i
var_k = var_g / var_j
print(int(var_k))
Category: Comparison

Question (EN): There are 9/10 liters (L) of milk. Suyeon drank 1/3 of the total, and Hyunwoo 4/9 of the total. Who drank more milk, Suyeon or Hyunwoo?
Question (KO): 9/10리터(L)의 우유가 있습니다. 수연은 전체의 1/3을, 현우는 전체의 4/9를 마셨습니다. 우유를 더 많이 마신 수연과 현우 중 누구입니까?

Answer: Hyunwoo

Solution (Python):
var_a = 'Suyeon'
var_b = 'Hyunwoo'
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 = 1
var_d = 3
var_e = var_c / var_d
var_f = 4
var_g = 9
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: Correspondence

Question (EN): 6A5+B03=748. How much is B?
Question (KO): 6A5+B03=748입니다. B는 얼마인가요?

Answer: 1

Solution (Python):
var_a = '6A5+B03=748'
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): How many of the numbers between 40 and 80 are multiples of 8?
Question (KO): 40이상 80 이하인 수 중에서 8의 배수에 해당되는 수는 모두 몇 개입니까?

Answer: 6

Solution (Python):
var_a = 40
var_b = 80
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 8
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): Jungkook wants to buy two different fruits and give them to Jimin and Yoongi as a present. If the fruits sold at the fruit store are apples, peaches, and pears, in how many ways can you gift them?
Question (KO): 정국이는 서로 다른 과일을 구매해서 지민과 윤기에게 선물하려고 합니다. 과일 가게에서 판매하는 과일이 사과, 복숭아, 배라면 선물할 수 있는 경우의 수는 모두 몇 가지입니까?

Answer: 6

Solution (Python):
var_a = 'apples'
var_b = 'peaches'
var_c = 'pears'
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)
var_e = 2
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
    var_f = var_f * (var_d-i)
print(int(var_f))
Category: Comparison

Question (EN): Taehyung, Minju, Sangmin, Yoonjeong, and Yoojung crossed the finish line in turn. Who came in last?
Question (KO): 결승선에 태형, 민주, 상민, 윤정, 유정이 차례로 들어갔습니다. 마지막에 들어온 사람은 누구입니까?

Answer: Yoojung

Solution (Python):
var_a = 'Taehyung'
var_b = 'Minju'
var_c = 'Sangmin'
var_d = 'Yoonjeong'
var_e = 'Yoojung'
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 = list_a[var_f-1]
print(var_g)
Category: Possibility

Question (EN): You want to create a four-digit number where the sum of each digit is 15. How many numbers can you make in total?
Question (KO): 각 자리 수의 합이 15가 되는 네 자리 수를 만드려고 합니다. 총 몇 가지의 수를 만들 수 있습니까?

Answer: 519

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)]
list_b=[]
for i in list_a:
    var_d = 0
    i = int(i)
    while i//10 > 0:
        var_d = var_d + i%10
        i = i//10
    var_d = var_d + i%10
    list_b.append(var_d)
var_e = 15
list_c = []
for i in list_b:
    if i <= var_e:
        list_c.append(i)
var_f = 15
list_d = []
for i in list_c:
    if i >= var_f:
        list_d.append(i)
var_g = len(list_d)
print(int(var_g))
Category: Arithmetic calculation

Question (EN): A hybrid car has two or more types of power units. Jaeho's family rode a hybrid car and arrived at his aunt's house, which is 120 kilometers (km) away, in an hour and 50 minutes. At first, they used electricity only, and later on gasoline only for an hour and ten minutes. This car needs 6 liters of gasoline to go 40.8 kilometers (km), and if Jaeho's family used 14 liters of gasoline to go to his aunt's house, how many kilometers (km) is the distance that this car used only electricity for 1 minute?
Question (KO): 하이브리드 자동차는 두 종류 이상의 동력 장치를 가진 자동차입니다. 재호네 가족은 하이브리드 자동차를 타고 집에서 120킬로미터(㎞) 떨어진 이모 댁에 1시간 50분 만에 도착했습니다. 처음에는 전기만 사용하여 달렸고, 나중에는 1시간 10분 동안 휘발유만 사용하여 달렸습니다. 이 자동차는 40.8킬로미터(㎞)를 가는데 6리터(L)의 휘발유가 필요하고 재호네 가족이 이모 댁에 가는 데 휘발유를 14리터(L) 사용했다면, 이 자동차가 전기를 사용하여 1분 동안 달린 거리는 몇 킬로미터(㎞)입니까?

Answer: 0.62

Solution (Python):
var_a = 120
var_b = 40.8
var_c = 6
var_d = var_b / var_c
var_e = 14
var_f = var_d * var_e
var_g = var_a - var_f
var_h = 1
var_i = 60
var_j = var_h * var_i
var_k = 50
var_l = var_j + var_k
var_m = 1
var_n = 60
var_o = var_m * var_n
var_p = 10
var_q = var_o + var_p
var_r = var_l - var_q
var_s = var_g / var_r
print('{:.2f}'.format(round(var_s+1e-10,2)))
Category: Correspondence

Question (EN): 397 is 236 lesser than a certain number. What is the value of a number that is 496 lesser than this certain number?
Question (KO): 397는 어떤 수보다 236작은 수 이다. 어떤 수보다 496 작은 수는 얼마인가?

Answer: 137

Solution (Python):
var_a = 397
var_b = 236
var_c = var_a + var_b
var_d = 496
var_e = var_c - var_d
print(int(var_e))
Category: Arithmetic calculation

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

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 = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[-var_d]
var_f = 1
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): Subtract 5 from a number and divide by 3. Find the number for the result to be 4.
Question (KO): 어떤 수에서 5를 빼고 3으로 나누어주었습니다. 결과가 4가 되기 위한 어떤 수를 구하시오.

Answer: 17

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

Question (EN): There are 7 different boxes with 2, 3, 3, 2, 1, 2, 1 chocolates, respectively. How many boxes contain 2 chocolates?
Question (KO): 서로 다른 7개의 상자에 초콜릿이 각각 2개, 3개, 3개, 2개, 1개, 2개, 1개씩 있습니다. 초콜릿이 2개 들어있는 상자는 몇 개입니까?

Answer: 3

Solution (Python):
var_a = 2
var_b = 3
var_c = 3
var_d = 2
var_e = 1
var_f = 2
var_g = 1
list_a= []
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_h = 2
var_i = 0
var_h = int(var_h)
for i in list_a:
    i = int(i)
    if i == var_h:
        var_i = var_i + 1
print(int(var_i))
Category: Geometry

Question (EN): I used all 12/25 meters (m) of wire to make one of the largest squares. What is the side length of this square in meters (m)?
Question (KO): 철사 12/25미터(m)를 모두 사용하여 가장 큰 정사각형을 한 개 만들었습니다. 이 정사각형의 한 변의 길이는 몇 미터(m)입니까?

Answer: 0.12

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

Question (EN): The fee for renting a bicycle for 30 minutes is 4,000 won. How much does one person get to pay when renting 4 bikes for 3 hours with 6 people paying equally?
Question (KO): 자전거 한 대를 30 분 동안 빌리는 요금은 4000 원이라고 합니다. 6 명이 똑같이 돈을 내어 자전거 4 대를 3 시간 동안 빌려 타려면 한 사람이 얼마씩 내야 합니까?

Answer: 16000

Solution (Python):
var_a = 3
var_b = 60
var_c = var_a * var_b
var_d = 30
var_e = var_c / var_d
var_f = 4000
var_g = var_e * var_f
var_h = 4
var_i = var_g * var_h
var_j = 6
var_k = var_i / var_j
print(int(var_k))
Category: Possibility

Question (EN): When you ask a passerby to pick random two numbers from 1 to 4, what is the number of cases where they pick two even numbers or only one even number?
Question (KO): 길 가는 사람에게 1부터 4 중 아무 숫자를 두 개 선택하게 시켰을 때, 둘 다 짝수를 선택하거나 하나만 짝수를 선택하는 상황은 몇 가지가 있습니까?

Answer: 5

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

Question (EN): Of the 15 people, 7 are women. If only men carry 48 loads, find how many loads each person can carry if they all share the same load.
Question (KO): 15명의 사람들 중 여자는 7명이다. 48개의 짐을 남자들만 나른다고 할 때, 모두 똑같은 짐을 나눠들면 한 명이 몇 개의 짐을 들면 되는지 구하시오.

Answer: 6

Solution (Python):
var_a = 48
var_b = 15
var_c = 7
var_d = var_b - var_c
var_e = var_a / var_d
print(int(var_e))
Category: Arithmetic calculation

Question (EN): Sunmi scored 75 points in Korean, 85 points in math, 90 points in science, and 65 points in English in the midterm exam. In how many subjects was Sunmi above the midterm average?
Question (KO): 선미는 중간고사에서 국어는 75점, 수학은 85점, 과학은 90점, 영어는 65점을 받았다. 선미의 중간고사 평균보다 위인 과목은 몇 개인가?

Answer: 2

Solution (Python):
var_a = 75
var_b = 85
var_c = 90
var_d = 65
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()
list_a = [float(i) for i in list_a]
var_e = sum(list_a)/len(list_a)
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: Comparison

Question (EN): Youngbin and Yechan are playing knocking down cans with a slingshot. Youngbin fired 25 shots and knocked down 19, and Yechan shot 16 and knocked down 10. Which of the two has a higher success rate?
Question (KO): 영빈이와 예찬이는 새총으로 깡통 쓰러트리기 놀이를 하고 있습니다. 영빈이는 25발을 쏴서 19개를 쓰러트렸고, 예찬이는 16발을 쏴서 10개를 쓰러트렸습니다. 두 사람 중 성공률이 더 높은 사람은 누구입니까?

Answer: Youngbin

Solution (Python):
var_a = 'Youngbin'
var_b = 'Yechan'
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 = 19
var_d = 25
var_e = var_c / var_d
var_f = 10
var_g = 16
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: Correspondence

Question (EN): The quotient of 59 divided by 8 is A and the remainder is 3. What is the value of A?
Question (KO): 59에 대해 8로 나눈 몫은 A, 나머지는 3입니다. A의 값은 무엇일까요?

Answer: 7

Solution (Python):
var_a = 59
var_b = 3
var_c = var_a - var_b
var_d = 8
var_e = var_c / var_d
print(int(var_e))
Category: Correspondence

Question (EN): I made a mistake in dividing a number by 4, and instead added by 4 to get 40. Find the correctly calculated value.
Question (KO): 어떤 수를 4로 나누어야 할 것을 잘못하여 어떤 수에 4를 더했더니 40이 되었습니다. 바르게 계산하면 얼마인지 구해보시오.

Answer: 9

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

Question (EN): There are two different numbers A and B. Find the sum of A and B in the two-digit subtraction formula, A5-2A=B7.
Question (KO): 서로 다른 두 수 A, B가 있습니다. 두 자리 수끼리의 뺄셈식 A5-2A=B7에서 A와 B의 합을 구하시오.

Answer: 13

Solution (Python):
var_a = 'A5-2A=B7'
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]
var_d = 'A5-2A=B7'
var_e = 'B'
ans_dict = dict()
var_d = var_d.replace('×','*')
var_d = var_d.replace('x','*')
var_d = var_d.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_d):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_d
    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_d):
        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_f = ans_dict[var_e]
var_g = var_c + var_f
print(int(var_g))
Category: Possibility

Question (EN): I want to paint the 4 parts A, B, C,and D with 4 colors red, yellow, blue and green. Find the number of ways to color each part with a different color.
Question (KO): A, B, C, D 4개의 부분을 빨강, 노랑, 파랑, 초록 4가지 색으로 칠하려고 한다. 각 부분에 서로 다른 색을 칠하는 경우의 수를 구하시오.

Answer: 24

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