philschmid/DMath huggingface dataset:
Category: Correspondence

Question (EN): A is a single digit number. Find A when the multiplication expression AA×AA of two digit numbers is 5929.
Question (KO): A는 한 자리 수입니다. AA×AA=5929를 만족하는, A를 구하시오.

Answer: 7

Solution (Python):
var_a = 'AA×AA=5929'
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: Geometry

Question (EN): There is a rectangular garden. The perimeter of this garden is 48 meters (m), and the length of the garden is 2 meters (m) added to its width. Find the width of the garden.
Question (KO): 직사각형의 텃밭이 있습니다. 이 텃밭의 둘레가 48미터(m)이고 텃밭의 가로에 2미터(m)를 더하면 세로의 길이이다. 텃밭의 가로의 길이는 얼마인지 구하시오.

Answer: 11

Solution (Python):
var_a = 48
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: Comparison

Question (EN): Flowerpot A is 14th from the right, and flowerpot B is 29th from the left. If the total number of pots is 33, how many are there between A and B?
Question (KO): 화분 (가)는 오른쪽에서부터 14번째, 화분 (나)는 왼쪽으로부터 29번째에 있습니다. 전체 화분의 수가 33개라면, (가) 화분과 (나) 화분사이에는 몇 개가 있습니까?

Answer: 8

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

Question (EN): Find the smallest odd number between 2 and 7.
Question (KO): 2부터 7까지의 홀수 중 가장 작은 수를 구하시오.

Answer: 3

Solution (Python):
var_a = 2
var_b = 7
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 = 1
list_b=list_a.copy()
list_b.sort()
var_d = list_b[var_c-1]
print(int(var_d))
Category: Arithmetic calculation

Question (EN): You want to draw points at intervals of 5 centimeters (cm) on a line that is 30 centimeters (cm) long. How many times should a dot be drawn when there is no dot at the beginning and end of a line?
Question (KO): 길이가 30센티미터(㎝)인 선분 위에 5센티미터(㎝) 간격으로 점을 찍으려고 합니다. 선분의 처음과 끝에는 점을 찍지 않을 때, 점은 몇 번 찍어야 합니까?

Answer: 5

Solution (Python):
var_a = 30
var_b = 5
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e))
Category: Correspondence

Question (EN): There are a total of 60 marbles in the bag. There are 32 black marbles, 10 red marbles, and 5 green marbles. If the marbles in the bag are black, red, green, and white, how many white marbles are there?
Question (KO): 주머니 속에 구슬이 총 60개가 들어있습니다. 검은색 구슬이 32개, 빨간색 구슬이 10개, 초록색 구슬이 5개 있습니다. 주머니 속 구슬의 색깔이 검은색, 빨간색, 초록색, 흰색이 있을 경우 흰색 구슬은 몇 개가 있나요?

Answer: 13

Solution (Python):
var_a = 60
var_b = 32
var_c = var_a - var_b
var_d = 10
var_e = var_c - var_d
var_f = 5
var_g = var_e - var_f
print(int(var_g))
Category: Possibility

Question (EN): How many three-digit numbers are there where each digit is odd?
Question (KO): 각 자리의 수가 홀수인 세 자리 수는 모두 몇 개입니까?

Answer: 125

Solution (Python):
var_a = 1
var_b = 9
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: Arithmetic calculation

Question (EN): There are 1, 4, 0, 7, 5, 2, and 8. You want to create a four-digit number by using the numbers between the 2nd and 7th from the left only once. Find the 4th largest number that can be made.
Question (KO): 1, 4, 0, 7, 5, 2, 8이 있습니다. 왼쪽에서 2번째와 7번째 사이에 있는 수를 한 번씩만 사용하여 네 자리 수를 만들려고 합니다. 만들 수 있는 수 중에서 4번째로 큰 수를 구하시오.

Answer: 7520

Solution (Python):
var_a = 4
var_b = 0
var_c = 7
var_d = 5
var_e = 2
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 = 4
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 = 4
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
print(int(var_h))
Category: Comparison

Question (EN): Jungkook collected 6 divided by 3 apples, and Yoongi collected 4 apples. Who has fewer apples?
Question (KO): 정국이는 6 나누기 3만큼 사과를 모았고, 윤기는 사과를 4개 모았습니다. 누가 더 사과가 적습니까?

Answer: Jungkook

Solution (Python):
var_a = 'Jungkook'
var_b = 'Yoongi'
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 = 6
var_d = 3
var_e = var_c // var_d
var_f = 4
list_b= []
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_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j)
Category: Possibility

Question (EN): You want to create a number with two decimal places less than 6. How many can you make if you can only use 2, 4, 6 and the decimal point once?
Question (KO): 6보다 작은 소수 두 자리 수를 만드려고 합니다. 이때2, 4, 6과 소수점을 한번씩만 쓸 수 있다면 모두 몇 개를 만들 수 있습니까?

Answer: 4

Solution (Python):
var_a = 2
var_b = 4
var_c = 6
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 = 6
var_f = 10
var_g = 3
var_h = 1
var_i = var_g - var_h
var_j = var_f ** var_i
var_k = var_e * var_j
list_c = []
for i in list_b:
    if i < var_k:
        list_c.append(i)
var_l = len(list_c)
print(int(var_l))
Category: Arithmetic calculation

Question (EN): Find the distance left after 2 hours of driving to an airport which is 300 kilometers (km) from home 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: Geometry

Question (EN): What is the surface area of an octahedron with sides of 2 centimeters (cm)?
Question (KO): 한변의 길이가 2센티미터(㎝)인 정팔면체의 겉넓이는?

Answer: 10.39

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

Question (EN): You want to build an apartment complex on a rectangular piece of empty land that is 262 kilometers (km) wide and 185 km long, divided into squares. If one side of the apartment complex is 18 kilometers (km), find how many apartment complexes can be built.
Question (KO): 가로가 262킬로미터(㎞)이고 세로가 185킬로미터(㎞)인 직사각형 모양의 빈 땅에 정사각형 모양의 땅으로 나눠 아파트 단지를 건설할 생각이다. 아파트 단지의 한 변이 18킬로미터(㎞)라면 몇 개의 아파트단지를 지을 수 있는지 구하시오.

Answer: 140

Solution (Python):
var_a = 262
var_b = 18
var_c = var_a // var_b
var_d = 185
var_e = 18
var_f = var_d // var_e
var_g = var_c * var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): What is the largest five-digit number that is a multiple of 2 and a multiple of 3 and a multiple of 8 and a multiple of 9?
Question (KO): 2의 배수이면서 3의 배수이면서 8의 배수이면서 9의 배수인 수 중 가장 큰 다섯 자리 수는?

Answer: 99936

Solution (Python):
var_a = 10000
var_b = 99999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 2
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 = 3
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 = 8
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 = 9
list_e = []
var_g = int(var_g)
for i in list_d:
    i = int(i)
    if i % var_g == 0:
        list_e.append(i)
var_h = 1
list_f=list_e.copy()
list_f.sort()
var_i = list_f[-var_h]
print(int(var_i))
Category: Possibility

Question (EN): There are 5 number cards, each with a number from 1 to 5 written on it. When you take out 3 of these and find the sum of the numbers, find the sum of all possible sums.
Question (KO): 1부터 5까지의 숫자가 각각 한 개씩 적힌 숫자 카드가 5장 있다. 이 중에서 3장을 꺼내 그 숫자의 합을 구할 때, 나올 수 있는 모든 합들의 총합을 구하여라.

Answer: 63

Solution (Python):
var_a = 1
var_b = 5
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
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]
list_c=[]
for i in list_b:
    var_e = 0
    i = int(i)
    while i//10 > 0:
        var_e = var_e + i%10
        i = i//10
    var_e = var_e + i%10
    list_c.append(var_e)
list_d= []
list_d.reverse()
list_e = list(set(list_c) | set(list_d))
list_e = [float(i) for i in list_e]
var_f = sum(list_e)
print(int(var_f))
Category: Possibility

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

Answer: 40876

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

Question (EN): A and B are single-digit numbers. A is 3 greater than 5, and B is 2 less than A. Find the sum of A and B.
Question (KO): A, B는 한 자리 수입니다. A는 5보다 3 큰 수이고, B는 A보다 2 작은 수입니다. A와 B의 합을 구하시오.

Answer: 14

Solution (Python):
var_a = 5
var_b = 3
var_c = var_a + var_b
var_d = 5
var_e = 3
var_f = var_d + var_e
var_g = 2
var_h = var_f - var_g
var_i = var_c + var_h
print(int(var_i))
Category: Comparison

Question (EN): Hyunjin's school has 324 female students and 541 male students, and Seonju's school has 416 female students and 253 male students. Find whose school has more students.
Question (KO): 현진이네 학교에는 여학생이 324명, 남학생이 541명 있고, 선주네 학교에는 여학생이 416명, 남학생이 253명 있습니다. 누구의 학교에 학생이 더 많은지 구하시오.

Answer: Hyunjin

Solution (Python):
var_a = 'Hyunjin'
var_b = 'Seonju'
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 = 324
var_d = 541
var_e = var_c + var_d
var_f = 416
var_g = 253
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: Arithmetic calculation

Question (EN): Find the average score of three subjects when Math is 100, and the average score of Korean and English is 88.
Question (KO): 수학이 100점이고 국어, 영어의 평균점수가 88점일때 세 과목 평균 점수는 몇 점인가

Answer: 92

Solution (Python):
var_a = 88
var_b = 2
var_c = var_a * var_b
var_d = 100
var_e = var_c + var_d
var_f = 2
var_g = 1
var_h = var_f + var_g
var_i = var_e / var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): Find the second smallest factor of 32.
Question (KO): 32의 약수 중 두 번째로 작은 값을 구하시오.

Answer: 2

Solution (Python):
var_a = 32
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 = 2
list_b=list_a.copy()
list_b.sort()
var_c = list_b[var_b-1]
print(int(var_c))
Category: Arithmetic calculation

Question (EN): A family decided to share one pineapple. Grandpa ate 1/6 of the whole, and Grandma ate 2/5 of the remaining pineapple. If the remaining pineapple after Chaeyoung ate 2/3 of the pineapple left after Grandpa and Grandma ate was 120 grams (g), how many grams (g) did the first pineapple weigh?
Question (KO): 파인애플 하나를 가족들이 나눠 먹기로 하였습니다. 할아버지께서 전체의 1/6을 드시고, 할머니께서 남은 파인애플의 2/5를 드셨습니다. 할아버지와 할머니께서 드시고 남은 파인애플의 2/3을 채영이가 먹은 후 남아 있는 파인애플이 120그램(g)이라면, 처음 파인애플의 무게는 몇 그램(g)이었을까요?

Answer: 720

Solution (Python):
var_a = 120
var_b = 1
var_c = 0.16666666666666666
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 1
var_g = 0.4
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 1
var_k = 0.6666666666666666
var_l = var_j - var_k
var_m = var_i / var_l
print(int(eval('{:.2f}'.format(round(var_m+1e-10,2)))))
Category: Geometry

Question (EN): What is the length in centimeters (cm) of the radius of a circle whose diameter are 26 centimeters (cm)?
Question (KO): 지름이 26센티미터(㎝)인 원의 반지름의 길이는 몇 센티미터(㎝)인가?

Answer: 13

Solution (Python):
var_a = 26
var_b = 2
var_c = var_a / var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): This year Seokjin is 7 years old and Seokjin's mother is 33 years old. After 5 years, how many years is Seokjin's mother older than Seokjin?
Question (KO): 올해 석진이는 7살이고 석진이 어머니는 33살입니다. 5년 후에 석진이 어머니는 석진이보다 몇 살 더 많습니까?

Answer: 26

Solution (Python):
var_a = 33
var_b = 5
var_c = var_a + var_b
var_d = 7
var_e = 5
var_f = var_d + var_e
var_g = var_c - var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): I bought 7 boxes of cucumbers, 16 in each box. Thirteen of them are rotten and discarded, and the remaining cucumbers are divided equally into 8 bags. How many cucumbers are left that didn't fit in the bag?
Question (KO): 한 상자에 16개씩 들어 있는 오이를 7상자 샀습니다. 그 중에서 13개는 썩어서 버리고, 남은 오이를 8봉지에 똑같이 나누어 담으려고 합니다. 봉지에 들어가지 못한 남은 오이는 몇 개가 됩니까?

Answer: 3

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: Possibility

Question (EN): You are going to give 8 candies to Yuna and Hoseok. If Yuna and Hoseok take at least 1 candy, then how many different ways can candy be distributed?
Question (KO): 사탕 8개를 유나와 호석이에게 나누어 주려고 합니다. 유나와 호석이는 적어도 사탕 1개를 받습니다. 사탕을 나누어 주는 방법은 모두 몇 가지입니까?

Answer: 7

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

Question (EN): Seokjin bought two notebooks for 500 won with the money he had and a pencil for 270 won, he finally had 230 won left. How much money did Seokjin have at first?
Question (KO): 석진이는 가지고 있는 돈으로 500원짜리 공책을 2권 사고, 270원짜리 연필을 1자루 샀더니 230원이 남았습니다. 처음에 석진이가 가지고 있던 돈은 얼마입니까?

Answer: 1500

Solution (Python):
var_a = 230
var_b = 270
var_c = 1
var_d = var_b * var_c
var_e = var_a + var_d
var_f = 500
var_g = 2
var_h = var_f * var_g
var_i = var_e + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): In a calculation that adds a two-digit number to a four-digit number, the digit in the ones place of the four-digit number is incorrectly seen as 5. Also, when we mistook and switched the digits in the tens and ones place of a two-digit number, we got 63. If the incorrect calculation resulted in 2708, and the original four-digit number has 8 in the ones place, what is the correct result of the calculation?
Question (KO): 두 자리 수와 네 자리 수를 더하는 계산에서 네 자리 수의 일의 자리 숫자를 5로 잘못 보았습니다. 또 두 자리 숫자의 십의 자리 수와 일의 자리 수를 바꾸어 보았더니 63이 되었습니다. 잘못 보고 계산한 결과가 2708이었고, 원래 네 자리 수의 일의 자리 숫자가 8이었다면, 바르게 계산한 결과는 얼마입니까?

Answer: 2738

Solution (Python):
var_a = 2708
var_b = 8
var_c = 5
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 63
var_g = 36
var_h = var_f - var_g
var_i = var_e + var_h
print(int(var_i))
Category: Arithmetic calculation

Question (EN): A bank has a waiting list with numbers ranging from 1 to 54. Find how many times the number 5 appears in this waiting list.
Question (KO): 어느 은행에 1부터 54까지 수가 쓰인 대기표가 있습니다. 이 대기표에는 숫자 5가 몇 번 나오는지 구하시오.

Answer: 10

Solution (Python):
var_a = 1
var_b = 54
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d=""
for i in list_a:
    i = str(i)
    var_d = var_d + i
list_b = []
var_d = int(var_d)
while var_d//10 > 0:
    list_b.append(var_d%10)
    var_d = var_d//10
list_b.append(var_d%10)
list_b = list_b[::-1]
var_e = 5
var_f = 0
var_e = int(var_e)
for i in list_b:
    i = int(i)
    if i == var_e:
        var_f = var_f + 1
print(int(var_f))
Category: Correspondence

Question (EN): When you open a faucet, 9 milliliters (ml) of water pours out in one second. Water was poured in for 8 seconds and after that, an additional 7 milliliters (ml) was added in a large canteen that was empty. If the water contained in this canteen is divided by 6 milliliters (ml) into small canteens, how many canteens will be needed at most?
Question (KO): 수도꼭지를 열면 1초에 9밀리리터(㎖)의 물이 쏟아진다. 물이 담기지 않은 큰 수통에 8초 동안 물을 받고 7밀리리터(㎖)를 추가로 더 넣었다. 이 수통에 담긴 물을 작은 수통에 6밀리리터(㎖)씩 나눈다면 최대 몇 개의 수통이 필요하겠는가?

Answer: 14

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
var_h = 1
var_i=int(((var_g+9*10**(var_h-2))//(10**(var_h-1)))*10**(var_h-1))

print(int(var_i))
Category: Arithmetic calculation

Question (EN): There were 1238 snacks and 374 more ramens than snacks in the market. Of these, some snacks were sold, and 276 ramen were bought, so the total of ramen and snacks was 2527. How many sweets were sold?
Question (KO): 대형 마트에 과자가 1238개, 라면은 과자보다 374개 더 많이 있었습니다. 이 중에서 과자가 몇 개 팔리고, 라면을 276개 사들였더니 라면과 과자를 합하여 2527개가 되었습니다. 팔린 과자는 몇 개입니까?

Answer: 599

Solution (Python):
var_a = 1238
var_b = 2527
var_c = 1238
var_d = 374
var_e = var_c + var_d
var_f = 276
var_g = var_e + var_f
var_h = var_b - var_g
var_i = var_a - var_h
print(int(var_i))
Category: Correspondence

Question (EN): There is a number whose multiples are 160 minus 4 and 197 minus 2. If you divide that number by 229, it is said to be short of 5. Find the largest natural number among these numbers.
Question (KO): 160에서 4를 뺀 수와 197에서 2를 뺀 수를 배수로 가지는 어떤 수가 있다. 어떤 수로 229를 나누면 5가 부족하다고 한다. 이러한 수 중 가장 큰 자연수를 구하여라.

Answer: 39

Solution (Python):
var_a = 197
var_b = 2
var_c = var_a - var_b
var_d = 160
var_e = 4
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
var_h = 229
var_i = 5
var_j = var_h + var_i
var_k = math.gcd(int(var_j), int(var_g))
print(int(var_k))
Category: Possibility

Question (EN): A class president and vice president is going to be elected. How many possible cases of the election are there out of Jungkook, Jimin, and Yoongi.
Question (KO): 반장, 부반장을 뽑으려고 합니다. 정국, 지민, 윤기 중에서 선출하는 경우는 모두 몇 가지입니까?

Answer: 6

Solution (Python):
var_a = 'Jungkook'
var_b = 'Jimin'
var_c = 'Yoongi'
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: Arithmetic calculation

Question (EN): Find the number of ways in which a multiple of 3 or 2 comes up when a die is thrown.
Question (KO): 주사위를 던졌을 때 3의 배수 혹은 2의 배수가 나오는 경우의 수를 구하시오.

Answer: 4

Solution (Python):
var_a = 1
var_b = 6
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 = 1
var_f = 6
list_c = []
if var_e%2!=0:
    for i in range(var_e+1, var_f+1, 2):
        list_c.append(i)
else:
    for i in range(var_e, var_f+1, 2):
        list_c.append(i)
list_d = list(set(list_b) | set(list_c))
var_g = len(list_d)
print(int(var_g))
Category: Correspondence

Question (EN): You want to divide 66 golf balls and 49 tennis balls among several carts. The number of golf balls in each cart and the number of tennis balls in each cart are the same. How many carts will there be if there are 6 golf balls left and 4 tennis balls left?
Question (KO): 몇 개의 카트에 골프공 66개와 테니스공 49를 나눠 담으려 한다. 각각의 카트에 들어간 골프공의 개수와 테니스 공의 개수는 서로 모두 같다. 골프공이 6개가 남고 테니스공이 4개가 남는다면 카트의 개수는 몇 개 입니까?

Answer: 15

Solution (Python):
var_a = 49
var_b = 4
var_c = var_a - var_b
var_d = 66
var_e = 6
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
print(int(var_g))
Category: Geometry

Question (EN): I used 63 centimeters (cm) of wire to make an equilateral triangle. Find how many centimeters (cm) of wire are needed to make one side of this equilateral triangle.
Question (KO): 어떤 정삼각형을 만들기 위해서 63센티미터(㎝)짜리 철사를 사용했습니다. 이 정삼각형의 한 변을 만들기 위해 필요한 철사는 몇 센티미터(㎝)인지 구하시오.

Answer: 21

Solution (Python):
var_a = 63
var_b = 3
var_c = var_a / var_b
print(int(var_c))