philschmid/DMath huggingface dataset:
Category: Arithmetic calculation

Question (EN): Moving a decimal point to the right by one place makes it 2.7 greater than before. Find the original decimal.
Question (KO): 어떤 소수의 소수점을 오른쪽으로 한 자리 옮겼더니 원래보다 2.7만큼 더 커졌습니다. 원래의 소수를 구하시오.

Answer: 0.3

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

Question (EN): There is a rectangular cake whose sides are 54 centimeters (cm) long and 20 centimeters (cm) wide when viewed from above. As you try to divide it into 3 pieces to share with friends, you want to cut all 3 pieces into squares of the same size. What should be one side of a square in centimeters (cm) to make the largest square? (Given that the cake is cut only from top to bottom.)
Question (KO): 위에서 내려다 봤을 때 가로가 54센티미터(㎝), 세로가 20센티미터(㎝)인 직사각형 모양의 케이크를 3조각으로 나누어 친구들에게 나누어 주려고 합니다. 3조각 모두 위에서 내려다 봤을 때 같은 크기의 정사각형이 되도록 자르려고 합니다. 이때 가장 큰 정사각형을 만들려면 한 변의 길이를 몇 센티미터(㎝)로 해야 합니까? (단, 케이크는 위에서 아래로만 자릅니다.)

Answer: 18

Solution (Python):
var_a = 54
var_b = 3
var_c = var_a // var_b
var_d = 20
var_e = 3
var_f = var_d // var_e
list_a= []
if "/" in str(var_f):
    var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_c):
    var_c = eval(str(var_c))
list_a.append(var_c)
list_a.reverse()
var_g = 1
list_b=list_a.copy()
list_b.sort()
var_h = list_b[-var_g]
print(int(var_h))
Category: Comparison

Question (EN): Hyungjun has 324 grape-flavored candies and 541 strawberry-flavored candies, and Junghyeok has 416 orange-flavored candies and 253 cherry-flavored candies. Who has more candies, Hyungjun or Junghyeok?
Question (KO): 형준이는 포도맛 사탕을 324개, 딸기맛 사탕을 541개 가지고 있고, 정혁이는 오렌지맛 사탕을 416개, 체리맛 사탕을 253개 가지고 있습니다. 형준이와 정혁이 중 사탕의 개수가 더 많은 사람은 누구입니까?

Answer: Hyungjun

Solution (Python):
var_a = 'Hyungjun'
var_b = 'Junghyeok'
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): Five people hold each other's hands and stand in a circle. If they greet each other with those not holding hands, how many times do they say hello?
Question (KO): 5명이 서로 손을 잡고 원형으로 서 있다. 손을 잡지 않은 사람과 서로 인사를 한다면 인사는 몇 번 하게되는가?

Answer: 5

Solution (Python):
var_a = 5
var_b = 5
var_c = 3
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): There are 28 identical vending machines in the arcade. Each vending machine has 6 sections, and the number of drinks on each section is the same. When two drinks are dispensed from one section of a vending machine, there are three drinks left on that section. How many drinks are in all the vending machines in the arcade?
Question (KO): 오락실에 똑같은 자판기가 28대 있습니다. 각 자판기는 6층이고, 각 층마다 놓여 있는 음료수의 개수는 같습니다. 어느 자판기의 한 층에서 2개의 음료수를 뽑았을 때 그 층에 3개의 음료수가 남았다고 합니다. 오락실의 자판기들에 들어있는 음료수는 모두 몇 개입니까?

Answer: 840

Solution (Python):
var_a = 3
var_b = 2
var_c = var_a + var_b
var_d = 6
var_e = var_c * var_d
var_f = 28
var_g = var_e * var_f
print(int(var_g))
Category: Comparison

Question (EN): One factory makes 500 teddy bears in 30 minutes and 800 bunny dolls in 1 hour. Find which one will produce more after 5 hours.
Question (KO): 어느 공장에서 곰인형은 30분에 500개를 만들고, 토끼인형은 1시간에 800개를 만듭니다. 5시간 후에는 어느 것이 더 많이 만들어질지 구하시오.

Answer: bear

Solution (Python):
var_a = 'bear'
var_b = 'bunny'
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 = 5
var_d = 60
var_e = var_c * var_d
var_f = 30
var_g = var_e // var_f
var_h = 500
var_i = var_g * var_h
var_j = 5
var_k = 60
var_l = var_j * var_k
var_m = 60
var_n = var_l // var_m
var_o = 800
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_i):
    var_i = eval(str(var_i))
list_b.append(var_i)
list_b.reverse()
var_q = 1
list_c=list_b.copy()
list_c.sort()
var_r = list_c[-var_q]
var_s = list_b.index(var_r)+1
var_t = list_a[var_s-1]
print(var_t)
Category: Correspondence

Question (EN): Hoseok divided a certain number by 10 to get 6. What is the result of subtracting 15 from the number?
Question (KO): 호석이는 어떤 수를 10으로 나누어 6을 얻었습니다. 어떤 수에서 15를 뺀 결과는 얼마입니까?

Answer: 45

Solution (Python):
var_a = 6
var_b = 10
var_c = var_a * var_b
var_d = 15
var_e = var_c - var_d
print(int(var_e))
Category: Geometry

Question (EN): If 45 utility poles are lined up on a straight road at intervals of 60 meters (m), what is the distance in kilometers (km) between the two poles that are farthest apart?
Question (KO): 직선 도로에 전신주 45개가 60미터(m) 간격으로 일렬로 세워져 있다면, 가장 멀리 있는 두 전신주 사이의 거리는 몇 킬로미터(㎞)인지 구하시오.

Answer: 2.64

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

Question (EN): How many three-digit numbers are divisible by 4 and 5?
Question (KO): 숫자 4, 5로 나누어 떨어질 수 있는 세 자리 수는 모두 몇 개 있습니까?

Answer: 45

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 = 4
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 = len(list_c)
print(int(var_f))
Category: Geometry

Question (EN): If the area of a trapezoid with an upper side of 5 centimeters (cm) and a lower side of 9 centimeters (cm) is 56 square centimeters (cm2), what is the height in centimeters (cm) of the trapezoid?
Question (KO): 윗변이 5센티미터(㎝), 아랫변이 9센티미터(㎝)인 사다리꼴의 넓이가 56제곱센티미터(㎠)일 떄, 이 사다리꼴의 높이는 몇 센티미터(㎝)입니까?

Answer: 8

Solution (Python):
var_a = 56
var_b = 2
var_c = var_a * var_b
var_d = 5
var_e = 9
var_f = var_d + var_e
var_g = var_c / var_f
print(int(var_g))
Category: Arithmetic calculation

Question (EN): Suhwan's car traveled 15.5 kilometers (km) in 10 minutes. How many kilometers (km) would he travel in 46 minutes at this speed?
Question (KO): 수환이가 탄 자동차는 10분동안 15.5킬로미터(㎞)를 이동하였습니다. 이와 같은 빠르기로 46분 동안 달리면 몇 킬로미터(㎞)를 이동하겠습니까?

Answer: 71.3

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

Question (EN): If the coins are arranged in a square and there are 240 coins at the perimeter, what is the total number of coins?
Question (KO): 동전을 정사각형 모양으로 줄세웠더니 둘레에 놓인 동전의 개수가 240개였다면, 동전의 전체의 개수는 몇 개입니까?

Answer: 3721

Solution (Python):
var_a = 240
var_b = 4
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
var_f = 2
var_g = var_e ** var_f
print(int(var_g))
Category: Geometry

Question (EN): You want to make the largest square out of a piece of string that is 32 centimeters (cm) long. What is the area of the square in square centimeters (cm2)?
Question (KO): 길이가 32센티미터(㎝) 인 끈으로 가장 큰 정사각형을 만들려고 합니다. 정사각형의 넓이는 몇 제곱센티미터(㎠) 입니까?

Answer: 64

Solution (Python):
var_a = 32
var_b = 4
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 five numbers 10, 11, 12, 13, and 14. What is the answer when subtracting the second largest number by the smallest number?
Question (KO): 5개의 수 10, 11, 12, 13, 14가 있습니다. 그 중에서 2번째로 큰 수와 가장 작은 수의 차는 얼마입니까?

Answer: 3

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 = 1
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: Geometry

Question (EN): The largest circle was drawn inside a square with a side length of 16 centimeters (cm), and the largest rhombus was drawn inside the circle. What is the area of the rhombus in square centimeters?
Question (KO): 한 변의 길이가 16센티미터(㎝)인 정사각형 안에 가장 큰 원을 그린 다음, 원 안에 가장 큰 마름모를 그렸습니다. 마름모의 넓이는 몇 제곱센티미터입니까?

Answer: 128

Solution (Python):
var_a = 16
var_b = 16
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e))
Category: Comparison

Question (EN): Minyoung puts her bag in the locker that is 8th from the front, 14th from the back, 7th from the left, and 13th from the right among the classroom lockers. What is the total number of lockers in the classroom?
Question (KO): 민영이가 교실 사물함들 중 앞에서 8번째 칸, 뒤에서 14번째 칸, 왼쪽에서 7번째 칸, 오른쪽에서 13번째 칸에 가방을 넣었습니다. 교실 안 사물함의 총 개수는 몇 개입니까?

Answer: 399

Solution (Python):
var_a = 8
var_b = 14
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 7
var_g = 13
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
print(int(var_k))
Category: Possibility

Question (EN): Jungkook and Eunji are trying to share pieces of colored paper. When there are 15 pieces of colored paper, how many ways are there to divide them so that Jungkook and Eunji both have at least one piece?
Question (KO): 정국이와 은지가 색종이를 나누어 가지려고 합니다. 색종이가 15장 있을 때, 정국이와 은지가 최소 1장씩은 가지도록 나누어 주는 방법은 몇 가지입니까?

Answer: 14

Solution (Python):
var_a = 15
var_b = 2
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e))
Category: Geometry

Question (EN): A regular polygon with a perimeter of 80 centimeters (cm) has a side length of 16 centimeters (cm). How many vertices are there in this regular polygon?
Question (KO): 둘레의 길이가 80센티미터(㎝)인 정다각형의 한 변의 길이는 16센티미터(㎝)라고 합니다. 이 정다각형에는 총 몇 개의 꼭짓점이 있습니까?

Answer: 5

Solution (Python):
var_a = 80
var_b = 16
var_c = var_a / var_b
print(int(var_c))
Category: Comparison

Question (EN): When Yeomyeong goes to school by bus, she travels 7150 meters (m), and when she goes to school by bicycle, she travels 6 kilometers (km) and 720 meters (m). Which transportation travels a shorter distance, bus or bicycle?
Question (KO): 여명이가 버스를 타고 학교를 가면 이동 거리가 7150미터(m)이고, 자전거를 타고 학교를 가면 이동 거리가 6킬로미터(㎞) 720미터(m)입니다. 버스와 자전거 중 이동 거리가 더 짧은 교통수단은 무엇입니까?

Answer: bicycle

Solution (Python):
var_a = 'bus'
var_b = 'bicycle'
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 = 7150
var_d = 6
var_e = 1000
var_f = var_d * var_e
var_g = 720
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_c):
    var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[var_i-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l)
Category: Possibility

Question (EN): When two dice with numbers 1 to 12 written on each side of the dodecahedron are thrown twice, find the number of cases a multiple of 3 comes up at the first time and a multiple of 4 comes up at the second time.
Question (KO): 정십이면체의 각 면에 1부터 12까지 각각 적힌 주사위를 두 번 던질 때, 첫 번째는 3의 배수가 나오고, 두 번째는 4의 배수가 나오는 경우의 수를 구하시오.

Answer: 12

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)
var_f = 4
list_c = []
var_f = int(var_f)
for i in list_a:
    i = int(i)
    if i % var_f == 0:
        list_c.append(i)
var_g = len(list_c)
var_h = var_e * var_g
print(int(var_h))
Category: Correspondence

Question (EN): There are two natural numbers A and B. If B is A multiplied by 9 and plus 13, what is the remainder when B is divided by 9?
Question (KO): 두 개의 자연수 A와 B가 있습니다. B가 A에 9를 곱하고 13을 더한 수라면 B를 9로 나눈 나머지는 얼마입니까?

Answer: 4

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

Question (EN): When you wrongly multiplied a number that should have been divided by 2.4, you got 288. What is the correctly calculated value divided by 5?
Question (KO): 어떤 수를 2.4 로 나누어야 할 것을 잘못하여 곱하였더니 288 이 되었습니다. 바르게 계산한 값을 5로 나누면 얼마입니까?

Answer: 10

Solution (Python):
var_a = 288
var_b = 2.4
var_c = var_a / var_b
var_d = 2.4
var_e = var_c / var_d
var_f = 5
var_g = var_e / var_f
print(int(var_g))
Category: Comparison

Question (EN): The area of A circle is 25 square centimeters (cm2), and the area of B circle is 49 square centimeters (cm2). If pi is 3.1, how many centimeters (cm) is the diameter of the larger circle in A or B?
Question (KO): (가) 원의 넓이는 25제곱센티미터(㎠)이고, (나) 원의 넓이는 49제곱센티미터(㎠)입니다. 원주율이 3.1이라면 (가)와 (나) 중 더 넓은 원의 지름의 길이는 몇 센티미터(㎝)인지 구하시오.

Answer: 7.95

Solution (Python):
var_a = 25
var_b = 49
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
list_b=list_a.copy()
list_b.sort()
var_d = list_b[-var_c]
var_e = 3.1
var_f = var_d / var_e
var_g = 0.5
var_h = var_f ** var_g
var_i = 2
var_j = var_h * var_i
print('{:.2f}'.format(round(var_j+1e-10,2)))
Category: Correspondence

Question (EN): Divide this number by 2.5, subtract 10.5 from it, and multiply that by 0.3 to get 5.85. Find this number.
Question (KO): 어떤 수를 2.5로 나눈 후 10.5를 빼고, 그 값에 0.3을 곱하면 5.85가 됩니다. 어떤 수를 구하시오.

Answer: 75

Solution (Python):
var_a = 5.85
var_b = 0.3
var_c = var_a / var_b
var_d = 10.5
var_e = var_c + var_d
var_f = 2.5
var_g = var_e * var_f
print(int(var_g))
Category: Correspondence

Question (EN): Junhyung goes to the park every evening and runs 8050 meters (m). If Junhyung has run 80.5 meters (m) so far, find what percentage of the total distance was run.
Question (KO): 준형이는 저녁마다 공원에 나가 8050미터(m)를 달린다. 준형이가 지금까지 80.5미터(m)를 달렸다면 전체의 얼마에 해당하는 거리를 달린 것인지 구하시오.

Answer: 0.01

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

Question (EN): How many two-digit numbers can you make from 4, 5, 6, 7, and 8 using two different numbers?
Question (KO): 4, 5, 6, 7, 8 중에서 서로 다른 숫자 2개를 사용하여 만들 수 있는 두 자리 수는 모두 몇 개입니까?

Answer: 20

Solution (Python):
var_a = 4
var_b = 5
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 = 2
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 = len(list_b)
print(int(var_g))
Category: Correspondence

Question (EN): Find the sum of the largest and the smallest numbers that becomes 3.5 when numbers with two decimals are rounded from two decimal places.
Question (KO): 소수 두 자리 수 중 소수점 둘째 자리에서 반올림하면 3.5가 되는 가장 큰 수와 가장 작은 수의 합을 구하시오

Answer: 6.99

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

Question (EN): If you use the number cards 1, 3, 5, and 6 once each to make a four-digit number, how many numbers divided by 4 have a remainder of 0?
Question (KO): 숫자 카드 1, 3, 5, 6을 한 번씩 사용하여 네 자리 수를 만들 때, 4로 나눈 나머지가 0인 수는 몇 가지인가?

Answer: 6

Solution (Python):
var_a = 1
var_b = 3
var_c = 5
var_d = 6
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 = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
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_f = 4
list_c = []
var_f = int(var_f)
for i in list_b:
    i = int(i)
    if i % var_f == 0:
        list_c.append(i)
var_g = len(list_c)
print(int(var_g))
Category: Comparison

Question (EN): What is the sum of the numbers greater 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: 1.3

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

Question (EN): If the perimeter of a rectangle whose length is 3 centimeters (cm) shorter than its width is 54 centimeters (cm), find its width.
Question (KO): 세로의 길이가 가로의 길이보다 3 센티미터(㎝) 더 짧은 직사각형의 둘레의 길이가 54 센티미터(㎝)일 때, 가로의 길이를 구하시오.

Answer: 15

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

Question (EN): Find the number of ways in which 5 of the 8 students on the playground are picked and placed in order.
Question (KO): 운동장에 있는 8명의 학생 중, 5명을 뽑아 차례대로 세우는 경우의 수를 구하시오.

Answer: 6720

Solution (Python):
var_a = 8
var_b = 5
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))
Category: Correspondence

Question (EN): 280 is divisible by 70. Find the smallest number greater than 280 that, when divided by 70, has a remainder of 30.
Question (KO): 280은 70으로 나누어떨어집니다. 280보다 큰 수 중에서 70으로 나누었을 때 나머지가 30이 되는 가장 작은 수를 구하세요.

Answer: 310

Solution (Python):
var_a = 280
var_b = 30
var_c = var_a + var_b
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There are 9 bananas weighing 0.8 kilograms (kg) and 7 apples of unknown weight. The total weight of 9 bananas and 7 apples was 10.98 kilograms (kg). If all apples weigh the same, how many kilograms (kg) is one apple?
Question (KO): 0.8킬로그램(㎏)짜리의 바나나 9개와 무게를 알 수 없는 사과 7개가 있습니다. 바나나 9개와 사과 7개의 무게를 합했더니 10.98킬로그램(㎏)이었습니다. 사과의 무게가 모두 같다면 사과 한 개는 몇 킬로그램(㎏)입니까?

Answer: 0.54

Solution (Python):
var_a = 10.98
var_b = 0.8
var_c = 9
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 7
var_g = var_e / var_f
print('{:.2f}'.format(round(var_g+1e-10,2)))
Category: Correspondence

Question (EN): I mistakenly subtracted a number that should be multiplied by 423, and I got 421. Find the value of subtracting 500 from the sum of the correctly calculated and incorrectly calculated values.
Question (KO): 423에 어떤 수를 곱해야 할 것을 잘못하여 뺐더니 421이 되었습니다. 바르게 계산한 값과 잘못 계산한 값의 합에서 500을 뺀 값을 구하시오.

Answer: 767

Solution (Python):
var_a = 421
var_b = 423
var_c = 423
var_d = 421
var_e = var_c - var_d
var_f = var_b * var_e
var_g = var_a + var_f
var_h = 500
var_i = var_g - var_h
print(int(var_i))
Category: Possibility

Question (EN): Hajin wants to find the password of a lock. The password is set with one of the three numbers: 1, 7, 4, with the tens digit of 3. When password has all different numbers, find the sum of the largest and the third largest three-digit number that can be a password.
Question (KO): 하진이는 자물쇠 비밀번호를 찾고 싶다. 비밀번호의 각 숫자는 모두 다르며, 1, 7, 4, 3 중 세 개로 구성되어 있고 십의 자리 수가 3이다. 비밀번호가 될 수 있는 수 중 가장 큰 세 자리수와 세 번째로 큰 세 자리수의 합을 구하시오.

Answer: 1171

Solution (Python):
var_a = 1
var_b = 7
var_c = 4
var_d = 3
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 = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
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_f = 10
var_g = 3
list_c = [] 
var_f = int(var_f)
var_g = int(var_g)
for i in list_b:
    i = int(i)
    if (i//var_f)%10 == var_g:
        list_c.append(i)
var_h = 1
list_d=list_c.copy()
list_d.sort()
var_i = list_d[-var_h]
var_j = 3
list_e=list_c.copy()
list_e.sort()
var_k = list_e[-var_j]
var_l = var_i + var_k
print(int(var_l))
Category: Arithmetic calculation

Question (EN): There are 56 tulips. Red tulips are 3/7 of the total. Blue tulips are 3/8 of the total. If the rest are pink tulips, how many pink tulips are there?
Question (KO): 튤립이 56송이 있습니다. 빨간색 튤립은 전체의 3/7입니다. 파란색 튤립은 전체의 3/8입니다. 나머지는 분홍색 튤립이라면 분홍색 튤립은 몇 송이입니까?

Answer: 11

Solution (Python):
var_a = 56
var_b = 56
var_c = 0.42857142857142855
var_d = var_b * var_c
var_e = 56
var_f = 0.375
var_g = var_e * var_f
var_h = var_d + var_g
var_i = var_a - var_h
print(int(var_i))
Category: Correspondence

Question (EN): If A+10=15, what number should be A?
Question (KO): A+10=15일 때, A에 들어가야 하는 숫자는 무엇인가요?

Answer: 5

Solution (Python):
var_a = 'A+10=15'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
    if v in variable_candi:
        ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
    temp = var_a
    for i, (k, _) in enumerate(ans_dict.items()):
        temp = temp.replace(k, str(c[i]))
    term_list = []
    op_list = []
    temp_c = ''
    for tc in temp:
        if tc not in '+-*/=><().':
            temp_c += tc
        else:
            op_list.append(tc)
            term_list.append(temp_c)
            temp_c = ''
    term_list.append(temp_c)
    new_eq = ''
    for i in range(len(op_list)):
        new_eq += str(int(term_list[i]))+op_list[i]
    new_eq += str(int(term_list[-1]))
    if len(new_eq) == len(var_a):
        new_eq=new_eq.replace('=', '==')
        new_eq=new_eq.replace('>==', '>=')
        new_eq=new_eq.replace('<==', '<=')
        eval_result = False
        try:
            eval_result = eval(new_eq)
        except:
            pass
        if eval_result:
            for i, (k, _) in enumerate(ans_dict.items()):
                ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c))
Category: Arithmetic calculation

Question (EN): There is a fountain in the shape of an equilateral triangle with a side length of 2 meters (m). If there are 3 chairs on one side of this fountain, how many meters (m) are the lengths of the chairs as a decimal number?
Question (KO): 한 변의 길이가 2미터(m)인 정사각형 모양의 분수가 있습니다. 이 분수의 한 쪽에 3개의 의자가 있을 때 의자의 길이는 몇 미터(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)))