category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Possibility | There is a box containing 5 balls of different colors. How many ways can 3 balls be drawn from this box? | 10 | 5 3 [OP_COMB] | var_a = 5
var_b = 3
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)
print(int(var_c)) |
Arithmetic calculation | There is a 15 liter (L) barrel with 7 liters (L) and 200 milliliters (㎖) of petroleum. At least how many times does a 600 milliliters (mL) of container must be poured into the barrel to completely fill this with oil? | 13 | 15 1000 [OP_MUL] 7 1000 [OP_MUL] 200 [OP_ADD] [OP_SUB] 600 [OP_DIV] 1 [OP_CEIL] | var_a = 15
var_b = 1000
var_c = var_a * var_b
var_d = 7
var_e = 1000
var_f = var_d * var_e
var_g = 200
var_h = var_f + var_g
var_i = var_c - var_h
var_j = 600
var_k = var_i / var_j
var_l = 1
var_m=int(((var_k+9*10**(var_l-2))//(10**(var_l-1)))*10**(var_l-1))
print(int(var_m)) |
Correspondence | Yuna wants to multiply 8 by some number. If the result of multiplying 4 by any number by mistake is 60, find the correct result. | 120 | 8 60 4 [OP_DIV] [OP_MUL] | var_a = 8
var_b = 60
var_c = 4
var_d = var_b / var_c
var_e = var_a * var_d
print(int(var_e)) |
Correspondence | There is a two-digit natural number whose tens digit is 2 and the units digit is A. If you exchange each digit, it is 9 greater than the initial number. Find A. | 3 | 2 10 [OP_MUL] 2 [OP_SUB] 9 [OP_ADD] 10 1 [OP_SUB] [OP_DIV] | var_a = 2
var_b = 10
var_c = var_a * var_b
var_d = 2
var_e = var_c - var_d
var_f = 9
var_g = var_e + var_f
var_h = 10
var_i = 1
var_j = var_h - var_i
var_k = var_g / var_j
print(int(var_k)) |
Geometry | Find the number of vertices of the truncated square pyramid. | 8 | 4 2 [OP_MUL] | var_a = 4
var_b = 2
var_c = var_a * var_b
print(int(var_c)) |
Correspondence | There is a train from Seoul to Busan. 300 people got off more than two-fifths of the first stop at the first stop, and 200 people got off less than half of the remaining people at the second stop. If the rest of the people got off at Busan and the total number of people who got off at Busan was 800, how many people got on at first? | 2500 | 800 200 [OP_SUB] 1 1/2 [OP_SUB] [OP_DIV] 300 [OP_ADD] 1 2 5 [OP_DIV] [OP_SUB] [OP_DIV] | var_a = 800
var_b = 200
var_c = var_a - var_b
var_d = 1
var_e = 0.5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 300
var_i = var_g + var_h
var_j = 1
var_k = 2
var_l = 5
var_m = var_k / var_l
var_n = var_j - var_m
var_o = var_i / var_n
print(int(var_o)) |
Comparison | Mihye worked out for 1 and 5/12 hours and Seongjae did it for 1 and 3/12 hours. Who has been exercising longer? | Mihye | [OP_LIST_SOL] Mihye Seongjae [OP_LIST_EOL] [OP_LIST_SOL] 1 5/12 [OP_ADD] 1 3/12 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Mihye'
var_b = 'Seongjae'
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 = 0.4166666666666667
var_e = var_c + var_d
var_f = 1
var_g = 0.25
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) |
Arithmetic calculation | The perimeter of a rectangle made of wire is 242.7 cm (cm). Provided there are 5 identical rectangles, Find how many centimeters (cm) of the wire was used to make these squares. | 1213.5 | 242.7 5 [OP_MUL] | var_a = 242.7
var_b = 5
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | During a math test, Young-hee mistakenly added 0.42 which should have been subtracted, and submitted 0.9 as the answer. What is the original correct answer? | 0.06 | 0.9 0.42 [OP_SUB] 0.42 [OP_SUB] | var_a = 0.9
var_b = 0.42
var_c = var_a - var_b
var_d = 0.42
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Possibility | Play rock-paper-scissors twice. In this case, how many times can one person lose twice in a row? | 9 | 3 3 [OP_MUL] | var_a = 3
var_b = 3
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | 29 tangerines were divided into 8 boxes, each equal in number, and 5 tangerines remained. How many tangerines are there in one box? | 3 | 29 5 [OP_SUB] 8 [OP_DIV] | var_a = 29
var_b = 5
var_c = var_a - var_b
var_d = 8
var_e = var_c / var_d
print(int(var_e)) |
Comparison | Customers stand in a line and board the bus in turn. If there are 10 people behind the first passenger, how many people are in a line? | 11 | 10 1 [OP_ADD] | var_a = 10
var_b = 1
var_c = var_a + var_b
print(int(var_c)) |
Comparison | There are two bowling balls. The red ball weighs 1.49 kilograms (kg) and the blue ball weighs 9/20 kilograms (kg). Which color ball is heavier? | red | [OP_LIST_SOL] red blue [OP_LIST_EOL] [OP_LIST_SOL] 1.49 9/20 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'red'
var_b = 'blue'
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.49
var_d = 0.45
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]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Arithmetic calculation | There are two coin banks. There are 8,000 won in the red coin bank and 5,000 won in the yellow coin bank, and 300 won and 500 won in each coin bank every day. How much money is in the red coin bank on the day when the money in both coin banks is equal? | 12500 | 8000 5000 [OP_SUB] 500 300 [OP_SUB] [OP_DIV] 300 [OP_MUL] 8000 [OP_ADD] | var_a = 8000
var_b = 5000
var_c = var_a - var_b
var_d = 500
var_e = 300
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 300
var_i = var_g * var_h
var_j = 8000
var_k = var_i + var_j
print(int(var_k)) |
Arithmetic calculation | If you change one of the five numbers, whose average is 8, to 8, the average becomes 9. What number was changed? | 3 | 8 5 [OP_MUL] 9 5 [OP_MUL] 8 [OP_SUB] [OP_SUB] | var_a = 8
var_b = 5
var_c = var_a * var_b
var_d = 9
var_e = 5
var_f = var_d * var_e
var_g = 8
var_h = var_f - var_g
var_i = var_c - var_h
print(int(var_i)) |
Comparison | Namjoon was the second to arrive at school, and Jimin arrived after Namjoon and three more arrived. What place did Jimin arrive in? | 6 | 2 3 [OP_ADD] 1 [OP_ADD] | var_a = 2
var_b = 3
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | What is 7.31 minus 1/5? | 7.11 | 7.31 1/5 [OP_SUB] | var_a = 7.31
var_b = 0.2
var_c = var_a - var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Arithmetic calculation | The sum of 6 consecutive natural numbers is 105. Find the difference between the largest and smallest of that six natural numbers. | 5 | 6 1 [OP_SUB] | var_a = 6
var_b = 1
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | A certain number is divisible by 423, and the quotient is equal to 423 minus 421. What is the sum of 421 added to the certain number? | 1267 | 421 423 423 421 [OP_SUB] [OP_MUL] [OP_ADD] | 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
print(int(var_g)) |
Comparison | Find the number greater than 1.1 among the five numbers 1.4, 9/10, 1.2, 0.5 and 13/10, and find the number of that numbers. | 3 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
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 = 1.1
list_b = []
for i in list_a:
if i > var_f:
list_b.append(i)
var_g = len(list_b)
print(int(var_g)) |
Arithmetic calculation | The sum of 5 consecutive natural numbers is 60. Find the first number. | 10 | 60 0 5 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 5 [OP_DIV] | var_a = 60
var_b = 0
var_c = 5
var_d = 1
var_e = var_c - var_d
var_f = 1
list_a = [i for i in range(var_b, var_e + 1, var_f)]
list_a = [float(i) for i in list_a]
var_g = sum(list_a)
var_h = var_a - var_g
var_i = 5
var_j = var_h / var_i
print(int(var_j)) |
Geometry | The volume of a cuboid is 36 cubic centimeters (cm3). What is the volume of a cube whose edges are doubled from the cuboid? | 288 | 36 2 3 [OP_POW] [OP_MUL] | var_a = 36
var_b = 2
var_c = 3
var_d = var_b ** var_c
var_e = var_a * var_d
print(int(var_e)) |
Arithmetic calculation | There are three types of fruit. There are 5 fruit (a), 6 fruit (b), and 4 fruit (c). How many fruits are there in total? | 15 | 5 6 [OP_ADD] 4 [OP_ADD] | var_a = 5
var_b = 6
var_c = var_a + var_b
var_d = 4
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | If 4 people finished a task by dividing it with an equal amount. Find how much is done by one person out of the total task. | 0.25 | 1 4 [OP_DIV] | var_a = 1
var_b = 4
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Geometry | The circumference of a circular pond was measured and found to be 314 centimeters (cm) and 100 centimeters (cm) in diameter. How many times bigger is the circumference compared to the diameter of this pond? | 3.14 | 314 100 [OP_DIV] | var_a = 314
var_b = 100
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | Yoongi, Jungkook, and Yuna each collected 7, 6, and 9. Who has the 2nd largest number? | Yoongi | [OP_LIST_SOL] Yoongi Jungkook Yuna [OP_LIST_EOL] [OP_LIST_SOL] 7 6 9 [OP_LIST_EOL] 2 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoongi'
var_b = 'Jungkook'
var_c = 'Yuna'
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 = 7
var_e = 6
var_f = 9
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)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_g = 2
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j) |
Arithmetic calculation | Jungkook and Seokjin went to the bookstore together and Jungkook bought 18 more books and Seokjin 11 more. The number of books they each had in the beginning were 28. How many fewer books does Seokjin have than Jungkook? | 7 | 28 18 [OP_ADD] 28 11 [OP_ADD] [OP_SUB] | var_a = 28
var_b = 18
var_c = var_a + var_b
var_d = 28
var_e = 11
var_f = var_d + var_e
var_g = var_c - var_f
print(int(var_g)) |
Arithmetic calculation | Find which three-digit number is the greatest common multiple of 6, 5, 8, and 9. | 720 | 100 999 1 [OP_LIST_ARANGE] 6 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] 8 [OP_LIST_DIVISIBLE] 9 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] | 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 = 6
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 = 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)) |
Geometry | You have a square and a rectangle with a perimeter of 52 centimeters (cm). The length of the rectangle is 15 centimeters (cm). Find the difference between the area of the square and the rectangle. | 4 | 52 4 [OP_DIV] 2 [OP_POW] 52 2 [OP_DIV] 15 [OP_SUB] 15 [OP_MUL] [OP_SUB] [OP_ABS] | var_a = 52
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
var_f = 52
var_g = 2
var_h = var_f / var_g
var_i = 15
var_j = var_h - var_i
var_k = 15
var_l = var_j * var_k
var_m = var_e - var_l
var_n = abs(var_m)
print(int(var_n)) |
Comparison | As a result of investigating the time it took seven students in Suhwan's class to go to school, they were 10 minutes, 12 minutes, 15 minutes, 6 minutes, 3 minutes, 8 minutes, and 9 minutes. How many students reach the school in less than 10 minutes? | 4 | [OP_LIST_SOL] 10 12 15 6 3 8 9 [OP_LIST_EOL] 10 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 10
var_b = 12
var_c = 15
var_d = 6
var_e = 3
var_f = 8
var_g = 9
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 = 10
list_b = []
for i in list_a:
if i < var_h:
list_b.append(i)
var_i = len(list_b)
print(int(var_i)) |
Geometry | Several squares with a side length of 10 centimeters (cm) were glued together to create a planar figure of a cube. How many square centimeters (cm2) is this planar figure of a cube? | 600 | 10 10 [OP_MUL] 6 [OP_MUL] | var_a = 10
var_b = 10
var_c = var_a * var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Possibility | Two of the numbers 3, 5, and 9 were drawn and used only once to create the largest two-digit number. Find the number that is 27 greater than the two-digit number. | 122 | [OP_LIST_SOL] 3 5 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 27 [OP_ADD] | var_a = 3
var_b = 5
var_c = 9
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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 27
var_h = var_f + var_g
print(int(var_h)) |
Geometry | If one side of the base of a regular hexagonal pyramid is 8 centimeters (cm) and one side of the side face is 13 centimeters (cm), how many centimeters (cm) is the sum of all the edges? | 126 | 13 6 [OP_MUL] 8 6 [OP_MUL] [OP_ADD] | var_a = 13
var_b = 6
var_c = var_a * var_b
var_d = 8
var_e = 6
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g)) |
Comparison | There are three numbers A, B, and C. A is 1/2 and B is 9/10. If C is 2/5, what is the smallest number among A, B, and C? | C | [OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] 1/2 9/10 2/5 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
var_c = 'C'
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 = 0.5
var_e = 0.9
var_f = 0.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)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
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) |
Geometry | Diagonals were drawn from one vertex of an octagon to the other points. How many triangles are formed in this case? | 6 | 8 3 [OP_SUB] 1 [OP_ADD] | var_a = 8
var_b = 3
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | There are three numbers 10, 11 and 12. What is the product of the 3rd smallest number and the 2nd smallest number? | 132 | [OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 3 [OP_LIST_MIN] 2 [OP_LIST_MIN] [OP_MUL] | 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 = 3
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
var_f = 2
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)) |
Correspondence | When a number that should have been divided by 6 got mistakenly divided by 9, the quotient is 8 and the remainder is 6. Find the correctly calculated value. | 13 | 8 9 [OP_MUL] 6 [OP_ADD] 6 [OP_FDIV] | var_a = 8
var_b = 9
var_c = var_a * var_b
var_d = 6
var_e = var_c + var_d
var_f = 6
var_g = var_e // var_f
print(int(var_g)) |
Possibility | There are bags with 2, 3 or 4 marbles. How many two-digit numbers can be made by selecting two different pockets and use one for the tens place and one for the ones place to make a two-digit number? | 6 | [OP_LIST_SOL] 2 3 4 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 2
var_b = 3
var_c = 4
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)) |
Correspondence | For a number that should have been divided by 18, I mistakenly divided it by 1.8, and the quotient was 21 and the remainder was 2. Find out the correct value that should have been calculated, and round it to two decimal places. | 2.21 | 21 1.8 [OP_MUL] 2 [OP_ADD] 18 [OP_DIV] 2 [OP_ROUND] | var_a = 21
var_b = 1.8
var_c = var_a * var_b
var_d = 2
var_e = var_c + var_d
var_f = 18
var_g = var_e / var_f
var_h = 2
var_i = round(float(var_g)+1e-10, var_h)
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Geometry | You want to plant trees at intervals of 3 meters (m) around the land in the shape of an equilateral triangle with a side length of 10 meters (m). How many trees do you need? | 10 | 10 3 [OP_MUL] 3 [OP_FDIV] | var_a = 10
var_b = 3
var_c = var_a * var_b
var_d = 3
var_e = var_c // var_d
print(int(var_e)) |
Geometry | If the area of the playground is 143.2 square meters (m2), and the playground is rectangular, and the length is 4 meters (m), how many meters (m) is the width? | 35.8 | 143.2 4 [OP_DIV] | var_a = 143.2
var_b = 4
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | There are three circles (a), (b), and (c). The areas of the circles are 48 square centimeters (cm2), 108 square centimeters (cm2), and 75 square centimeters (cm2), respectively. If pi is 3, how many centimeters (cm) is the length of the diameter of the largest circle minus the length of the diameter of the smallest circle? | 2 | [OP_LIST_SOL] 48 3 [OP_DIV] 1 2 [OP_DIV] [OP_POW] 108 3 [OP_DIV] 1 2 [OP_DIV] [OP_POW] 75 3 [OP_DIV] 1 2 [OP_DIV] [OP_POW] [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 48
var_b = 3
var_c = var_a / var_b
var_d = 1
var_e = 2
var_f = var_d / var_e
var_g = var_c ** var_f
var_h = 108
var_i = 3
var_j = var_h / var_i
var_k = 1
var_l = 2
var_m = var_k / var_l
var_n = var_j ** var_m
var_o = 75
var_p = 3
var_q = var_o / var_p
var_r = 1
var_s = 2
var_t = var_r / var_s
var_u = var_q ** var_t
list_a= []
if "/" in str(var_u):
var_u = eval(str(var_u))
list_a.append(var_u)
if "/" in str(var_n):
var_n = eval(str(var_n))
list_a.append(var_n)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_a.append(var_g)
list_a.reverse()
var_v = 1
list_b=list_a.copy()
list_b.sort()
var_w = list_b[-var_v]
var_x = 1
list_c=list_a.copy()
list_c.sort()
var_y = list_c[var_x-1]
var_z = var_w - var_y
print(int(var_z)) |
Correspondence | A number divided by 16 equals 16 multiplied by 8. Find a number. | 2048 | 8 16 [OP_MUL] 16 [OP_MUL] | var_a = 8
var_b = 16
var_c = var_a * var_b
var_d = 16
var_e = var_c * var_d
print(int(var_e)) |
Comparison | Youngchul is taking 4 classes today: Korean, Mathematics, English, and Science. He listens to Mathematics first before Korean, and English later than Korean but before Science. Find the class he takes at last. | Science | [OP_LIST_SOL] Korean Mathematics English Science [OP_LIST_EOL] [OP_LIST_SOL] Korean Mathematics > Korean English < Science English > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'Korean'
var_b = 'Mathematics'
var_c = 'English'
var_d = 'Science'
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 = 'Korean'
var_f = 'Mathematics'
var_g = '>'
var_h = 'Korean'
var_i = 'English'
var_j = '<'
var_k = 'Science'
var_l = 'English'
var_m = '>'
list_b= []
if "/" in str(var_m):
var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
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_n = 1
var_o = list_c[var_n-1]
print(var_o) |
Comparison | You want to divide 1 liter (L) of water and 3 liters (L) of water equally into bottles of the same shape and size. If 1 liter (L) of water is divided equally into 2 (A) bottles and 3 liters (L) of water is divided equally into 4 (B) bottles, which bottle has more water, bottle A or bottle B? | (B) | [OP_LIST_SOL] (A) (B) [OP_LIST_EOL] [OP_LIST_SOL] 1 2 [OP_MUL] 3 4 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = '(A)'
var_b = '(B)'
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 = 2
var_e = var_c * var_d
var_f = 3
var_g = 4
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) |
Arithmetic calculation | There are 135.1 liters (L) of water. How many water bottles can be filled if you divide the water into 7 liters (L) water bottles? | 19 | 135.1 7 [OP_FDIV] | var_a = 135.1
var_b = 7
var_c = var_a // var_b
print(int(var_c)) |
Arithmetic calculation | There are four times as many chickens as ducks raised at Minyoung's house. There are 17 more ducks than rabbits. If there are 8 rabbits in Minyoung's house, how many chickens, ducks, and rabbits are there in Minyoung's house in total? | 133 | 8 8 17 [OP_ADD] [OP_ADD] 4 8 17 [OP_ADD] [OP_MUL] [OP_ADD] | var_a = 8
var_b = 8
var_c = 17
var_d = var_b + var_c
var_e = var_a + var_d
var_f = 4
var_g = 8
var_h = 17
var_i = var_g + var_h
var_j = var_f * var_i
var_k = var_e + var_j
print(int(var_k)) |
Possibility | Find the number of odd numbers that are 30 or less among the two-digit natural numbers formed by arranging two different numbers from the ten numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. | 9 | [OP_LIST_SOL] 0 1 2 3 4 5 6 7 8 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 30 [OP_LIST_LESS_EQUAL] 2 [OP_LIST_DIVISIBLE] [OP_SET_DIFFERENCE] [OP_LIST_LEN] | var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
var_f = 5
var_g = 6
var_h = 7
var_i = 8
var_j = 9
list_a= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_a.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_a.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_a.append(var_h)
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_k = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_k))
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_l = 30
list_c = []
for i in list_b:
if i <= var_l:
list_c.append(i)
var_m = 2
list_d = []
var_m = int(var_m)
for i in list_c:
i = int(i)
if i % var_m == 0:
list_d.append(i)
list_e = list(set(list_c) - set(list_d))
var_n = len(list_e)
print(int(var_n)) |
Correspondence | Adding all the digits of the three-digit number gives 12. How many of these three-digit numbers are there? | 66 | 100 1000 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_NUM2SUM] 12 [OP_LIST_MORE_EQUAL] 12 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] | var_a = 100
var_b = 1000
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
list_b=[]
for i in list_a:
var_f = 0
i = int(i)
while i//10 > 0:
var_f = var_f + i%10
i = i//10
var_f = var_f + i%10
list_b.append(var_f)
var_g = 12
list_c = []
for i in list_b:
if i >= var_g:
list_c.append(i)
var_h = 12
list_d = []
for i in list_c:
if i <= var_h:
list_d.append(i)
var_i = len(list_d)
print(int(var_i)) |
Correspondence | 6AB-41=591 is true. What is A, where 6AB is three-digit number? | 3 | 6AB-41=591 A [OP_DIGIT_UNK_SOLVER] | var_a = '6AB-41=591'
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)) |
Correspondence | 4 out of 40 apples were thrown away because they were rotten. If you put the remainder equally into 4 boxes, how many should you put per box? | 9 | 40 4 [OP_SUB] 4 [OP_DIV] | 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)) |
Geometry | Each side of the cube has a number from 1 to 6 written on it. The sum of the numbers written on the two parallel sides of this cube is 7. Find the value of the number written on the parallel side to the side with 5 on it being multiplied by 5. | 10 | 5 7 5 [OP_SUB] [OP_MUL] | var_a = 5
var_b = 7
var_c = 5
var_d = var_b - var_c
var_e = var_a * var_d
print(int(var_e)) |
Arithmetic calculation | If 5 people shake each other's hand once, how many times will they shake hands? | 10 | 5 5 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] 5 [OP_ADD] | 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
var_h = 5
var_i = var_g + var_h
print(int(var_i)) |
Arithmetic calculation | There are 28 persimmons and 32 strawberries. If you give one person 4 of any kind, how many people can you give them? | 15 | 28 32 [OP_ADD] 4 [OP_FDIV] | var_a = 28
var_b = 32
var_c = var_a + var_b
var_d = 4
var_e = var_c // var_d
print(int(var_e)) |
Geometry | The surface area of one cube is 150 square centimeters (cm2). Find the volume. | 125 | 150 6 [OP_DIV] 1/2 [OP_POW] 3 [OP_POW] | var_a = 150
var_b = 6
var_c = var_a / var_b
var_d = 0.5
var_e = var_c ** var_d
var_f = 3
var_g = var_e ** var_f
print(int(var_g)) |
Geometry | The World Health Organization (WHO) recommends that adults drink 2000 cubic centimeters (cm3) of water per day to maintain their health. A cuboid-shaped water container with a bottom area of 50 square centimeters (cm2) is intended to contain the recommended amount of water for an adult per day. How many centimeters (cm) high should the water be in the bucket? | 40 | 2000 50 [OP_DIV] | var_a = 2000
var_b = 50
var_c = var_a / var_b
print(int(var_c)) |
Geometry | A number is equal to 30 divided by 3 plus 2. What is the value of 2 added to the number? | 8 | 30 2 3 [OP_ADD] [OP_DIV] 2 [OP_ADD] | var_a = 30
var_b = 2
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)) |
Correspondence | The five-digit number 1A23B is a multiple of 12. How many possible A are there? | 7 | 1A23B [OP_GEN_POSSIBLE_LIST] 12 [OP_LIST_DIVISIBLE] 1A23B A [OP_LIST_FIND_UNK] [OP_LIST_LEN] | var_a = '1A23B'
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 = 12
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 = '1A23B'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
elem = str(elem)
list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_e = len(list_c)
print(int(var_e)) |
Arithmetic calculation | Yurim drank 2 liters (l) and 600 milliliters (ml) of Coke during the day, and Ji-in drank 3700 milliliters (ml) of cider. How many milliliters (ml) did the two drink today? | 6300 | 2 1000 [OP_MUL] 600 [OP_ADD] 3700 [OP_ADD] | var_a = 2
var_b = 1000
var_c = var_a * var_b
var_d = 600
var_e = var_c + var_d
var_f = 3700
var_g = var_e + var_f
print(int(var_g)) |
Correspondence | There are three consecutive natural numbers A, B, and C. If A is a multiple of 8, B is a multiple of 7, and C is a multiple of 5, find A the smallest of the numbers greater than 1000. | 1008 | 1000 1 [OP_ADD] 9999 1 [OP_LIST_ARANGE] 8 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN] | var_a = 1000
var_b = 1
var_c = var_a + var_b
var_d = 9999
var_e = 1
list_a = [i for i in range(var_c, var_d + 1, var_e)]
var_f = 8
list_b = []
var_f = int(var_f)
for i in list_a:
i = int(i)
if i % var_f == 0:
list_b.append(i)
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
print(int(var_h)) |
Arithmetic calculation | The sum of three consecutive natural numbers is 48. What is the product of the largest and smallest of these 3 numbers? | 255 | 48 3 [OP_DIV] 3 2 [OP_FDIV] [OP_ADD] 48 3 [OP_DIV] 3 2 [OP_FDIV] [OP_SUB] [OP_MUL] | var_a = 48
var_b = 3
var_c = var_a / var_b
var_d = 3
var_e = 2
var_f = var_d // var_e
var_g = var_c + var_f
var_h = 48
var_i = 3
var_j = var_h / var_i
var_k = 3
var_l = 2
var_m = var_k // var_l
var_n = var_j - var_m
var_o = var_g * var_n
print(int(var_o)) |
Arithmetic calculation | I ate 5 persimmons on Chuseok, but there are 12 left. How many persimmons were there at first before eating them? | 17 | 12 5 [OP_ADD] | var_a = 12
var_b = 5
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | A stationery store offers a 1,200 won discount for purchases worth 8,000 won. How much discount do you get if you buy something worth 15,000 won at this stationery store? | 2250 | 1200 8000 [OP_DIV] 15000 [OP_MUL] | var_a = 1200
var_b = 8000
var_c = var_a / var_b
var_d = 15000
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | There are different numbers A, B, and C. A is 4 less than 9, B is 5 more than A, and 8 less than C is 1. What is B minus C? | 1 | 9 4 [OP_SUB] 5 [OP_ADD] 8 1 [OP_ADD] [OP_SUB] | var_a = 9
var_b = 4
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
var_f = 8
var_g = 1
var_h = var_f + var_g
var_i = var_e - var_h
print(int(var_i)) |
Possibility | What is the fifth smallest three-digit number that can be formed by using single digit multiples of 3? | 366 | 1 9 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 3 [OP_LIST_GET_PRODUCT] 5 [OP_LIST_MIN] | var_a = 1
var_b = 9
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 = 3
list_c = [str(i) for i in list_b]
list_c = list(itertools.product(list_c, repeat=var_e))
list_c = [''.join(num_list) for num_list in list_c]
list_c = [str_num for str_num in list_c if str_num[0] != '0']
list_c = [float(i) for i in list_c]
var_f = 5
list_d=list_c.copy()
list_d.sort()
var_g = list_d[var_f-1]
print(int(var_g)) |
Geometry | A new cuboid was created by doubling the length of each corner of a cuboid measuring 28 centimeters (cm) wide, 24 centimeters (cm) long, and 19 centimeters (cm) high. How many times the volume of the newly created cuboid is the volume of the original cuboid? | 8 | 28 2 [OP_MUL] 24 [OP_MUL] 2 [OP_MUL] 19 [OP_MUL] 2 [OP_MUL] 28 24 [OP_MUL] 19 [OP_MUL] [OP_FDIV] | var_a = 28
var_b = 2
var_c = var_a * var_b
var_d = 24
var_e = var_c * var_d
var_f = 2
var_g = var_e * var_f
var_h = 19
var_i = var_g * var_h
var_j = 2
var_k = var_i * var_j
var_l = 28
var_m = 24
var_n = var_l * var_m
var_o = 19
var_p = var_n * var_o
var_q = var_k // var_p
print(int(var_q)) |
Possibility | Using the four digits 1, 5, 6, and 9 once, find out the largest three-digit number with 1 in the tens place. | 916 | [OP_LIST_SOL] 1 5 6 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 10 1 [OP_LIST_SEARCH_FIXED_DIGIT] 1 [OP_LIST_MAX] | var_a = 1
var_b = 5
var_c = 6
var_d = 9
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 = 1
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]
print(int(var_i)) |
Geometry | There are two identical magnets in the shape of a rectangle. If you attach two magnets horizontally, the total circumference is 70 centimeters (cm) and the length is 15 centimeters (cm). Find the area of one magnet. | 150 | 70 2 [OP_DIV] 15 [OP_SUB] 15 [OP_MUL] 2 [OP_DIV] | var_a = 70
var_b = 2
var_c = var_a / var_b
var_d = 15
var_e = var_c - var_d
var_f = 15
var_g = var_e * var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i)) |
Arithmetic calculation | Find the average of all natural numbers from 1 to 100 where the units digit is 0. | 55 | 1 100 1 [OP_LIST_ARANGE] 1 0 [OP_LIST_SEARCH_FIXED_DIGIT] [OP_LIST_MEAN] | 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)
list_b = [float(i) for i in list_b]
var_f = sum(list_b)/len(list_b)
print(int(var_f)) |
Possibility | Select two different colors: a yellow marble, a white marble, a red marble, a purple marble, a green marble, and a blue marble. Find the number of possible selections. | 15 | [OP_LIST_SOL] yellow white red purple green blue [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB] | var_a = 'yellow'
var_b = 'white'
var_c = 'red'
var_d = 'purple'
var_e = 'green'
var_f = 'blue'
list_a= []
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_g = len(list_a)
var_h = 2
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)
print(int(var_i)) |
Geometry | How many chocolates are placed around the perimeter if the chocolates are arranged in a regular pattern so that there are no gaps in a square with 6 per side? | 20 | 6 4 [OP_MUL] 4 [OP_SUB] | var_a = 6
var_b = 4
var_c = var_a * var_b
var_d = 4
var_e = var_c - var_d
print(int(var_e)) |
Geometry | On Minho's desk, there is a triangular ruler with a base of 15 centimeters (cm) and a height of 20 centimeters (cm). What is the area of this triangle in square centimeters? | 150 | 15 20 [OP_MUL] 2 [OP_DIV] | var_a = 15
var_b = 20
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Comparison | What is the sum of the numbers less than or equal to 1.1 among five numbers 1.4, 9/10, 1.2, 0.5, and 13/10? | 1.4 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_LESS_EQUAL] [OP_LIST_SUM] | var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
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 = 1.1
list_b = []
for i in list_a:
if i <= var_f:
list_b.append(i)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | Which three-digit number is the greatest common multiple of 3 and 5? | 990 | 100 999 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] | 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 = 3
list_b = []
var_d = int(var_d)
for i in list_a:
i = int(i)
if i % var_d == 0:
list_b.append(i)
var_e = 5
list_c = []
var_e = int(var_e)
for i in list_b:
i = int(i)
if i % var_e == 0:
list_c.append(i)
var_f = 1
list_d=list_c.copy()
list_d.sort()
var_g = list_d[-var_f]
print(int(var_g)) |
Comparison | How many of 0.8, 1/2, 0.9, and 1/3 are greater than or equal to 0.4? | 3 | [OP_LIST_SOL] 0.8 1/2 0.9 1/3 [OP_LIST_EOL] 0.4 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
var_c = 0.9
var_d = 0.3333333333333333
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 0.4
list_b = []
for i in list_a:
if i >= var_e:
list_b.append(i)
var_f = len(list_b)
print(int(var_f)) |
Arithmetic calculation | Machine A takes 4 hours to complete the job by itself and Machine B takes 12 hours to complete the job by itself. How many hours would it take for A and B to do this at the same time? | 3 | 1 1 4 [OP_DIV] 1 12 [OP_DIV] [OP_ADD] [OP_DIV] | var_a = 1
var_b = 1
var_c = 4
var_d = var_b / var_c
var_e = 1
var_f = 12
var_g = var_e / var_f
var_h = var_d + var_g
var_i = var_a / var_h
print(int(var_i)) |
Arithmetic calculation | Find the average of the numbers less than or equal to 6, among the odd numbers that are not less than 1 and not greater than 10. | 3 | 1 10 [OP_LIST_ODD] 6 [OP_LIST_LESS_EQUAL] [OP_LIST_MEAN] | var_a = 1
var_b = 10
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 = 6
list_b = []
for i in list_a:
if i <= var_c:
list_b.append(i)
list_b = [float(i) for i in list_b]
var_d = sum(list_b)/len(list_b)
print(int(var_d)) |
Comparison | Wansoo has 9/25 liter (L) of chocolate milk, and Yugyeong has 0.41 liter (L) of chocolate milk. Who has more chocolate milk? | Yugyeong | [OP_LIST_SOL] Wansoo Yugyeong [OP_LIST_EOL] [OP_LIST_SOL] 9/25 0.41 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Wansoo'
var_b = 'Yugyeong'
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 = 0.36
var_d = 0.41
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]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Arithmetic calculation | Siwoo finished some work in 3 hours. What is the total amount of work Siwoo did in one hour? | 0.33 | 1 3 [OP_DIV] | var_a = 1
var_b = 3
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | When students are lined up, Hoseok stands at the right of Yoongi, and there are five other students between them. When there are 9 people on the right side of Hoseok, and 6 people on the left side of Yoongi, how many students are there? | 22 | 1 1 [OP_ADD] 5 [OP_ADD] 9 [OP_ADD] 6 [OP_ADD] | var_a = 1
var_b = 1
var_c = var_a + var_b
var_d = 5
var_e = var_c + var_d
var_f = 9
var_g = var_e + var_f
var_h = 6
var_i = var_g + var_h
print(int(var_i)) |
Geometry | What is the area in square centimeters (cm2) of a rectangle whose short side is 11 centimeters (cm) and its perimeter is 52 centimeters (cm)? | 165 | 11 52 2 [OP_DIV] 11 [OP_SUB] [OP_MUL] | var_a = 11
var_b = 52
var_c = 2
var_d = var_b / var_c
var_e = 11
var_f = var_d - var_e
var_g = var_a * var_f
print(int(var_g)) |
Arithmetic calculation | There are 6 candies. How many candies can Taehyung eat if Seokjin eats 4 of them? | 2 | 6 4 [OP_SUB] | var_a = 6
var_b = 4
var_c = var_a - var_b
print(int(var_c)) |
Possibility | Find the number of natural numbers greater than 200 when making a three-digit natural number by drawing three of the following number cards: 0, 1, 3, 5, and 6. | 36 | [OP_LIST_SOL] 0 1 3 5 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 200 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 0
var_b = 1
var_c = 3
var_d = 5
var_e = 6
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 = 3
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 = 200
list_c = []
for i in list_b:
if i > var_g:
list_c.append(i)
var_h = len(list_c)
print(int(var_h)) |
Correspondence | Taehyung wants to multiply a number by 8. But when he accidentally divided it by 5, the result was 30. Find the correct calculation result. | 1200 | 30 5 [OP_MUL] 8 [OP_MUL] | var_a = 30
var_b = 5
var_c = var_a * var_b
var_d = 8
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | It is said that it takes 6.1 liters (l) of paint to paint a wall. How many walls can be painted with 333.4 liters (l) of paint? | 54 | 333.4 6.1 [OP_FDIV] | var_a = 333.4
var_b = 6.1
var_c = var_a // var_b
print(int(var_c)) |
Arithmetic calculation | Among Eunji’s classmates, 24 students can play instrument (a), 17 students can play instrument (b), and 8 students can play both instruments. If there is no student who cannot play either (a) or (b), how many students are in Eunji's class? | 33 | 24 17 [OP_ADD] 8 [OP_SUB] | var_a = 24
var_b = 17
var_c = var_a + var_b
var_d = 8
var_e = var_c - var_d
print(int(var_e)) |
Possibility | How many can you make in total when you make two digits by choosing two of the natural numbers 0, 2, 4, 5, and 8 so that they do not overlap? | 16 | [OP_LIST_SOL] 0 2 4 5 8 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 0
var_b = 2
var_c = 4
var_d = 5
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)) |
Geometry | A ring with a radius of 15 centimeters (cm) has a circumference of 90 centimeters (cm). How many times is the ring's circumference longer than the ring's diameter? | 3 | 90 15 2 [OP_MUL] [OP_DIV] | var_a = 90
var_b = 15
var_c = 2
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e)) |
Possibility | There are 5 people A, B, C, D, and E. Find the number of ways to pick 2 people out of 5 and line them up. | 20 | 5 2 [OP_PERM] | var_a = 5
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)
print(int(var_c)) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. What is the sum of the largest number and the next largest number? | 27 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_ADD] | 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 = 1
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[-var_h]
var_j = var_g + var_i
print(int(var_j)) |
Comparison | Yoongi collected 4 apples, Yuna collected 5 apples, and Jungkook collected 6 times 3 apples. Who has the fewest apples? | Yoongi | [OP_LIST_SOL] Yoongi Yuna Jungkook [OP_LIST_EOL] [OP_LIST_SOL] 4 5 6 3 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoongi'
var_b = 'Yuna'
var_c = 'Jungkook'
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 = 4
var_e = 5
var_f = 6
var_g = 3
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)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
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) |
Comparison | There is a A box and a B box. You compared the two boxes. If A box is larger than B box, which of the two boxes is smaller? | B | [OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] A B > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
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 = 'A'
var_d = 'B'
var_e = '>'
list_b= []
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)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
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_f = len(list_c)
var_g = list_c[var_f-1]
print(var_g) |
Correspondence | When you needed to add 293 to a number, but mistakenly added 392, it became 541. Find the result of the correct calculation. | 442 | 541 392 [OP_SUB] 293 [OP_ADD] | var_a = 541
var_b = 392
var_c = var_a - var_b
var_d = 293
var_e = var_c + var_d
print(int(var_e)) |
Geometry | There is a square made by arranging 12 pieces of colored paper of the same size, which has 12 pieces in each side. How many pieces of colored paper are on one side? | 12 | 12 | var_a = 12
print(int(var_a)) |
Correspondence | When you multiply a number by 15, you get 45. Find the result of subtracting 1 from this number. | 2 | 45 15 [OP_DIV] 1 [OP_SUB] | var_a = 45
var_b = 15
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Comparison | Four students, Jimin, Yoongi, Taehyung, and Namjoon, are lining up. When Jimin is in front of Yoongi, Taehyung is behind Namjoon, and Yoongi is in front of Namjoon, who is the most behind? | Taehyung | [OP_LIST_SOL] Jimin Yoongi Taehyung Namjoon [OP_LIST_EOL] [OP_LIST_SOL] Jimin Yoongi > Taehyung Namjoon < Yoongi Namjoon > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'Jimin'
var_b = 'Yoongi'
var_c = 'Taehyung'
var_d = 'Namjoon'
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 = 'Jimin'
var_f = 'Yoongi'
var_g = '>'
var_h = 'Taehyung'
var_i = 'Namjoon'
var_j = '<'
var_k = 'Yoongi'
var_l = 'Namjoon'
var_m = '>'
list_b= []
if "/" in str(var_m):
var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
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_n = len(list_c)
var_o = list_c[var_n-1]
print(var_o) |
Comparison | Find the number of numbers greater than or equal to 0.4 among 0.8, 1/2, 0.3, and 1/3. | 2 | [OP_LIST_SOL] 0.8 1/2 0.3 1/3 [OP_LIST_EOL] 0.4 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
var_c = 0.3
var_d = 0.3333333333333333
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 0.4
list_b = []
for i in list_a:
if i >= var_e:
list_b.append(i)
var_f = len(list_b)
print(int(var_f)) |
Geometry | There is a box in the shape of a rectangular cuboid. If the surface area is 442 square centimeters (cm2) and the length and width are 7 centimeters (cm) and 8 centimeters (cm) respectively, what is the height of this box in centimeters (cm)? | 11 | 442 2 [OP_DIV] 7 8 [OP_MUL] [OP_SUB] 7 8 [OP_ADD] [OP_DIV] | var_a = 442
var_b = 2
var_c = var_a / var_b
var_d = 7
var_e = 8
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 7
var_i = 8
var_j = var_h + var_i
var_k = var_g / var_j
print(int(var_k)) |
Possibility | A bag contains 2 red balls each with a different number and 4 blue balls each with a different number. Find the number of ways in which one ball is selected. | 6 | 2 4 [OP_ADD] 1 [OP_COMB] | var_a = 2
var_b = 4
var_c = var_a + var_b
var_d = 1
var_e = 1
var_c = int(var_c)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
var_e = var_e * (var_c-i)
for i, elem in enumerate(range(var_d)):
var_e = var_e / (i+1)
print(int(var_e)) |
Geometry | How many edges does a cube have? | 12 | 4 3 [OP_MUL] | var_a = 4
var_b = 3
var_c = var_a * var_b
print(int(var_c)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.