category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Arithmetic calculation | All boxes contain 100 marbles each. How many marbles are in all 10 boxes? | 1000 | 100 10 [OP_MUL] | var_a = 100
var_b = 10
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | Trees are to be planted at intervals of 6.4 meters (m) on one side of a 268.8-meter (m) long walkway. How many trees will you need if you plant trees at both the beginning and end of the trail? | 43 | 268.8 6.4 [OP_DIV] 1 [OP_ADD] | var_a = 268.8
var_b = 6.4
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Geometry | How much is it when the diameter of a circle is divided by its radius? | 2 | 2 | var_a = 2
print(int(var_a)) |
Geometry | How many triangles are formed when the diagonals of a pentagon are drawn from one vertex? | 3 | 5 3 [OP_SUB] 1 [OP_ADD] | var_a = 5
var_b = 3
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Comparison | All 20 cars are parked. If a black car is 16th from the right and a white car is 11th from the left, how many cars are parked between the two cars? | 5 | 16 11 [OP_ADD] 20 [OP_SUB] 2 [OP_SUB] | var_a = 16
var_b = 11
var_c = var_a + var_b
var_d = 20
var_e = var_c - var_d
var_f = 2
var_g = var_e - var_f
print(int(var_g)) |
Arithmetic calculation | You want to find the average length of 5 tapes. If they are 35 centimeters (cm), 35.5 centimeters (cm), 36 centimeters (cm), and 30.5 centimeters (cm), what is the average length in centimeters (cm)? | 33.2 | [OP_LIST_SOL] 35 29 35.5 36 30.5 [OP_LIST_EOL] [OP_LIST_MEAN] | var_a = 35
var_b = 29
var_c = 35.5
var_d = 36
var_e = 30.5
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()
list_a = [float(i) for i in list_a]
var_f = sum(list_a)/len(list_a)
print('{:.2f}'.format(round(var_f+1e-10,2))) |
Possibility | If there are 6 students A, B, C, D, E, F, find the number of ways to elect 1 president, 1 vice-president, 1 secretary, and 1 secretary. | 360 | 6 1 1 [OP_ADD] 1 [OP_ADD] 1 [OP_ADD] [OP_PERM] | var_a = 6
var_b = 1
var_c = 1
var_d = var_b + var_c
var_e = 1
var_f = var_d + var_e
var_g = 1
var_h = var_f + var_g
var_i = 1
var_a = int(var_a)
var_h = int(var_h)
for i, elem in enumerate(range(var_h)):
var_i = var_i * (var_a-i)
print(int(var_i)) |
Correspondence | You mistakenly subtracted 59 instead of 46 from a certain number and got 43. Find the result of the correct calculation. | 56 | 43 59 [OP_ADD] 46 [OP_SUB] | var_a = 43
var_b = 59
var_c = var_a + var_b
var_d = 46
var_e = var_c - var_d
print(int(var_e)) |
Geometry | You want to pack a box in the shape of a cube. If the width of the wrapping paper is 600 to wrap without overlapping, what is the volume of this box? | 1000 | 600 6 [OP_DIV] 1/2 [OP_POW] 3 [OP_POW] | var_a = 600
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 | If the volume of a rectangular cuboid whose two sides are 7 centimeters (cm) and 6 centimeters (cm) respectively is 16 cubic centimeters (cm2), what is the surface area of the cuboid, in square centimeters (cm2)? | 93.9 | 16 7 [OP_DIV] 6 [OP_DIV] 7 6 [OP_ADD] [OP_MUL] 7 6 [OP_MUL] [OP_ADD] 2 [OP_MUL] | var_a = 16
var_b = 7
var_c = var_a / var_b
var_d = 6
var_e = var_c / var_d
var_f = 7
var_g = 6
var_h = var_f + var_g
var_i = var_e * var_h
var_j = 7
var_k = 6
var_l = var_j * var_k
var_m = var_i + var_l
var_n = 2
var_o = var_m * var_n
print('{:.2f}'.format(round(var_o+1e-10,2))) |
Arithmetic calculation | Eun-young is 1 meter (m) 35 centimeters (cm) tall, and Mi-seon is 9 centimeters (cm) taller than Eun-young. How many meters (m) is Mi-seon's height as a decimal number? | 1.44 | 1 35 100 [OP_DIV] [OP_ADD] 9 100 [OP_DIV] [OP_ADD] | var_a = 1
var_b = 35
var_c = 100
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 9
var_g = 100
var_h = var_f / var_g
var_i = var_e + var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Geometry | There is a hexagonal pyramid whose base is a regular hexagon with one side of 8 centimeters (cm) and the sides are all isosceles triangles. If the sides of an isosceles triangle are 13 centimeters (cm), 13 centimeters (cm), and 8 centimeters (cm), how many centimeters (cm) are the sum of all the edges of the pyramid? | 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 | Jungkook's basket contains 5 strawberries, and Minyoung's basket contains 7 strawberries. Taehyung's basket had more strawberries than Jungkook's and fewer than Minyoung's. How many strawberries are in Taehyung's basket? | 6 | 5 7 [OP_ADD] 2 [OP_FDIV] | var_a = 5
var_b = 7
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e)) |
Arithmetic calculation | The water in the small bucket is 7 liters (L) and the water in the large bucket is 5 liters (L). When 2 liters (L) of water from the large bucket is poured into the small bucket, how many liters (L) of water is more in the small bucket than in the large bucket? | 6 | 7 2 [OP_ADD] 5 2 [OP_SUB] [OP_SUB] | var_a = 7
var_b = 2
var_c = var_a + var_b
var_d = 5
var_e = 2
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g)) |
Comparison | After Jisoo washed the dishes, she put the plate on the shelf 1st from the left, 7th from the right, 2nd from the top, and 4th from the bottom. How many slots are there on the shelf? | 35 | 1 7 [OP_ADD] 1 [OP_SUB] 2 4 [OP_ADD] 1 [OP_SUB] [OP_MUL] | var_a = 1
var_b = 7
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = 4
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)) |
Possibility | How many of the three number cards among five number cards 0, 1, 2, 3, and 4 form a three-digit number that are both multiples of 6 and multiples of 9? | 4 | [OP_LIST_SOL] 0 1 2 3 4 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 6 9 [OP_LCM] [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
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 = 6
var_h = 9
var_i = var_h * var_g / math.gcd(int(var_h), int(var_g))
list_c = []
var_i = int(var_i)
for i in list_b:
i = int(i)
if i % var_i == 0:
list_c.append(i)
var_j = len(list_c)
print(int(var_j)) |
Arithmetic calculation | There are 24 female and male students in total. Among them, 50 sheets of colored paper were equally distributed to female students only, and 2 sheets were left. How many pieces of colored paper will the girls have if there are twice as many boys as girls? | 6 | 50 2 [OP_SUB] 24 2 1 [OP_ADD] [OP_FDIV] [OP_FDIV] | var_a = 50
var_b = 2
var_c = var_a - var_b
var_d = 24
var_e = 2
var_f = 1
var_g = var_e + var_f
var_h = var_d // var_g
var_i = var_c // var_h
print(int(var_i)) |
Comparison | A compact car took 4 hours to drive 200 kilometers (km), and a midsize car took 3 hours to drive 180 kilometers (km). Find which car is faster. | midsize | [OP_LIST_SOL] compact midsize [OP_LIST_EOL] [OP_LIST_SOL] 200 4 [OP_DIV] 180 3 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'compact'
var_b = 'midsize'
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 = 200
var_d = 4
var_e = var_c / var_d
var_f = 180
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)
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) |
Correspondence | When you divide a particular number by 2, 3, 4, 5, and 6, you get a remainder of 1, and that particular number is divisible by 7. When these numbers are counted from the smallest number, what number will come in the 3rd place? | 1141 | 0 9999 1 [OP_LIST_ARANGE] 2 3 [OP_LCM] 4 [OP_LCM] 5 [OP_LCM] 6 [OP_LCM] 1 [OP_LIST_DIVIDE_AND_REMAIN] 7 0 [OP_LIST_DIVIDE_AND_REMAIN] 3 [OP_LIST_MIN] | var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 2
var_e = 3
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
var_g = 4
var_h = var_g * var_f / math.gcd(int(var_g), int(var_f))
var_i = 5
var_j = var_i * var_h / math.gcd(int(var_i), int(var_h))
var_k = 6
var_l = var_k * var_j / math.gcd(int(var_k), int(var_j))
var_m = 1
list_b = []
var_l = int(var_l)
var_m = int(var_m)
if var_m < 0:
var_m = var_m + var_l
for i in list_a:
i = int(i)
if i%var_l == var_m:
list_b.append(i)
var_n = 7
var_o = 0
list_c = []
var_n = int(var_n)
var_o = int(var_o)
if var_o < 0:
var_o = var_o + var_n
for i in list_b:
i = int(i)
if i%var_n == var_o:
list_c.append(i)
var_p = 3
list_d=list_c.copy()
list_d.sort()
var_q = list_d[var_p-1]
print(int(var_q)) |
Correspondence | I'm going to give you 68 apples for lunch. How many more apples are needed to divide 5 each equally to 14 people? | 2 | 14 5 [OP_MUL] 68 [OP_SUB] | var_a = 14
var_b = 5
var_c = var_a * var_b
var_d = 68
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | After taking 30 kilograms (kg) of apples out of 5 boxes containing apples of the same weight, the remaining apples in the 5 boxes were weighed the same as the 2 apple boxes in the initial state. How many kilograms (kg) of apples were in each box initially? | 50 | 30 5 [OP_MUL] 5 2 [OP_SUB] [OP_DIV] | var_a = 30
var_b = 5
var_c = var_a * var_b
var_d = 5
var_e = 2
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g)) |
Correspondence | 6 minus a certain number equals 2. What is the value of the certain number minus 2? | 2 | 6 2 [OP_SUB] 2 [OP_SUB] | var_a = 6
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | Rounding 34AC to the hundred's place gives 3400. How many possible A's are there? | 5 | 34AC [OP_GEN_POSSIBLE_LIST] 3400 50 [OP_SUB] [OP_LIST_MORE_EQUAL] 3400 50 [OP_ADD] [OP_LIST_LESS] 34AC A [OP_LIST_FIND_UNK] [OP_LIST_LEN] | var_a = '34AC'
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 = 3400
var_c = 50
var_d = var_b - var_c
list_b = []
for i in list_a:
if i >= var_d:
list_b.append(i)
var_e = 3400
var_f = 50
var_g = var_e + var_f
list_c = []
for i in list_b:
if i < var_g:
list_c.append(i)
var_h = '34AC'
var_i = 'A'
var_h = str(var_h)
var_i = str(var_i)
unk_idx = var_h.index(var_i)
list_d = []
for elem in list_c:
elem = str(elem)
list_d.append(int(elem[unk_idx]))
list_d = list(set(list_d))
var_j = len(list_d)
print(int(var_j)) |
Arithmetic calculation | You are trying to make a number between 1 and 300 using number cards from 0 to 9. Find how many number card 3 are needed. | 61 | 1 300 1 [OP_LIST_ARANGE] [OP_LIST2NUM] [OP_NUM2LIST] 3 [OP_LIST_FIND_NUM] | var_a = 1
var_b = 300
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 = 3
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)) |
Geometry | Find the sum of the number of sides of the triangle and the number of sides of the quadrilateral. | 7 | 3 4 [OP_ADD] | var_a = 3
var_b = 4
var_c = var_a + var_b
print(int(var_c)) |
Correspondence | A number needs to be divided by 5, but when I accidentally divide it by 8, the quotient is 156 and the remainder is 2. Find the value obtained by subtracting 3 from the correctly calculated value. | 247 | 156 8 [OP_MUL] 2 [OP_ADD] 5 [OP_DIV] 3 [OP_SUB] | var_a = 156
var_b = 8
var_c = var_a * var_b
var_d = 2
var_e = var_c + var_d
var_f = 5
var_g = var_e / var_f
var_h = 3
var_i = var_g - var_h
print(int(var_i)) |
Arithmetic calculation | It takes Taehyung 9 seconds to set up a flag. Also, after raising a flag, he must rest for 5 seconds. If the road is divided into 16 sections and flags are placed between the sections except for the ends, how many seconds will it take in total? | 210 | 16 1 [OP_SUB] 9 5 [OP_ADD] [OP_MUL] | var_a = 16
var_b = 1
var_c = var_a - var_b
var_d = 9
var_e = 5
var_f = var_d + var_e
var_g = var_c * var_f
print(int(var_g)) |
Arithmetic calculation | You are trying to make a bridge by joining 24 pieces of wood. If a piece of wood is 28 centimeters (cm) long, and you want to make a bridge 580 centimeters (cm) long, how many centimeters (cm) do you have to overlap each? | 4 | 28 24 [OP_MUL] 580 [OP_SUB] 24 1 [OP_SUB] [OP_DIV] | var_a = 28
var_b = 24
var_c = var_a * var_b
var_d = 580
var_e = var_c - var_d
var_f = 24
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Arithmetic calculation | There are four numbers 10, 11, 12, and 13. What is the remainder of the second largest number divided by the second smallest number? | 1 | [OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 2 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_MOD] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
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 = 2
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f % var_h
print(int(var_i)) |
Arithmetic calculation | After putting 6 gifts in a small bag weighing 220 grams (g), then put 9 of these small bags in a larger bag weighing 250 grams (g), the result was 13.3 kilograms (kg). If each gift is the same, how many grams (g) does each gift weigh? | 205 | 13.3 1000 [OP_MUL] 250 [OP_SUB] 220 9 [OP_MUL] [OP_SUB] 6 9 [OP_MUL] [OP_DIV] | var_a = 13.3
var_b = 1000
var_c = var_a * var_b
var_d = 250
var_e = var_c - var_d
var_f = 220
var_g = 9
var_h = var_f * var_g
var_i = var_e - var_h
var_j = 6
var_k = 9
var_l = var_j * var_k
var_m = var_i / var_l
print(int(var_m)) |
Arithmetic calculation | How many pieces would it be if 3 meters (m) of tape were continuously cut by 1/4 meters (m)? | 12 | 3 1/4 [OP_DIV] | var_a = 3
var_b = 0.25
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | Yoongi is 3 years younger than Namjoon. How old is Yoongi when Namjoon becomes 6 years old this year? | 3 | 6 3 [OP_SUB] | var_a = 6
var_b = 3
var_c = var_a - var_b
print(int(var_c)) |
Arithmetic calculation | How many four-digit numbers are both multiples of 3 and multiples of 5? | 600 | 1000 9999 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 1000
var_b = 9999
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 = len(list_c)
print(int(var_f)) |
Comparison | There are four numbers 0.8, 1/2, 0.9, and 1/3. Find the sum of the numbers greater than 0.7. | 1.7 | [OP_LIST_SOL] 0.8 1/2 0.9 1/3 [OP_LIST_EOL] 0.7 [OP_LIST_MORE] [OP_LIST_SUM] | 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.7
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))) |
Arithmetic calculation | How many 100 won coins are equal to 80 10 won coins? | 8 | 10 80 [OP_MUL] 100 [OP_DIV] | var_a = 10
var_b = 80
var_c = var_a * var_b
var_d = 100
var_e = var_c / var_d
print(int(var_e)) |
Geometry | There is a square playground and a rectangular basketball court. The perimeter of the playground is 36 meters (m), and the perimeter of the basketball court is 38 meters (m). If the width of the basketball court is 15 meters (m), find the difference between the area of the playground and that of the basketball court. | 21 | 36 4 [OP_DIV] 2 [OP_POW] 38 2 [OP_DIV] 15 [OP_SUB] 15 [OP_MUL] [OP_SUB] [OP_ABS] | var_a = 36
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
var_f = 38
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)) |
Arithmetic calculation | Yoongi's math score is 82, and his Korean score is 5 points higher than his math score. How many points does he need to get in English to get an average score of 89 in Korean, Mathematics, and English? | 98 | 89 3 [OP_MUL] 82 [OP_SUB] 82 5 [OP_ADD] [OP_SUB] | var_a = 89
var_b = 3
var_c = var_a * var_b
var_d = 82
var_e = var_c - var_d
var_f = 82
var_g = 5
var_h = var_f + var_g
var_i = var_e - var_h
print(int(var_i)) |
Comparison | Toy (A) is larger than toy (B) and smaller than a toy (C). Toy (B) is bigger than Toy (D). Toy (C) is smaller than Toy (E). Which toy is the biggest? | (E) | [OP_LIST_SOL] (A) (B) (C) (D) (E) [OP_LIST_EOL] [OP_LIST_SOL] (A) (B) > (A) (C) < (B) (D) > (C) (E) < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = '(A)'
var_b = '(B)'
var_c = '(C)'
var_d = '(D)'
var_e = '(E)'
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 = '(A)'
var_g = '(B)'
var_h = '>'
var_i = '(A)'
var_j = '(C)'
var_k = '<'
var_l = '(B)'
var_m = '(D)'
var_n = '>'
var_o = '(C)'
var_p = '(E)'
var_q = '<'
list_b= []
if "/" in str(var_q):
var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
var_n = eval(str(var_n))
list_b.append(var_n)
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)
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_r = 1
var_s = list_c[var_r-1]
print(var_s) |
Geometry | Find the area of a rhombus whose two diagonals are 6 centimeters (cm) and 10 centimeters (cm), respectively. | 30 | 6 10 [OP_MUL] 2 [OP_DIV] | var_a = 6
var_b = 10
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Correspondence | 63+6AB=748. How much is B? | 5 | 63+6AB=748 B [OP_DIGIT_UNK_SOLVER] | var_a = '63+6AB=748'
var_b = 'B'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Arithmetic calculation | It takes 0.84 meters (m) of shiny string to decorate one tree. If there are 50 centimeters (cm) of rope left after decorating 10 trees, how many meters (m) of rope were there before decorating the tree? | 8.9 | 0.84 10 [OP_MUL] 50 100 [OP_DIV] [OP_ADD] | var_a = 0.84
var_b = 10
var_c = var_a * var_b
var_d = 50
var_e = 100
var_f = var_d / var_e
var_g = var_c + var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | I rode a bicycle back and forth between the two points A and B, traveling at 15 kilometers per hour (km) on the way forth and 10 kilometers per hour (km) on the way back. It took 30 minutes longer to come back. Find the time it took to go forth. | 1 | 10 30 60 [OP_DIV] [OP_MUL] 15 10 [OP_SUB] [OP_DIV] | var_a = 10
var_b = 30
var_c = 60
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 15
var_g = 10
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Arithmetic calculation | How many natural numbers are greater than 40 and less than 70? | 29 | 70 40 [OP_SUB] 1 [OP_SUB] | var_a = 70
var_b = 40
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Comparison | A red ball, blue ball, yellow ball and a green ball are in the box. The total number of these balls is 531, and the sum of the red and blue balls is 31 more than the sum of the yellow and green balls. Also, if there are 22 more yellow balls than green balls, how many yellow balls are there? | 136 | 531 31 [OP_SUB] 2 [OP_DIV] 22 [OP_SUB] 2 [OP_DIV] 22 [OP_ADD] | var_a = 531
var_b = 31
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 22
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
var_j = 22
var_k = var_i + var_j
print(int(var_k)) |
Arithmetic calculation | What is the smallest four-digit number that is divisible by 3? | 1002 | 1000 9999 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN] | var_a = 1000
var_b = 9999
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
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
print(int(var_f)) |
Arithmetic calculation | When I went to the health room from the science room, I walked at 2 kilometers (km) per hour, and when I went to the science room from the health room, I walked 2 kilometers (km) further at 3 kilometers (km) per hour. If it took 4 hours in total, what is the distance from the health room to the science room? | 6 | 2 4 [OP_MUL] 2 [OP_ADD] 3 2 [OP_ADD] [OP_DIV] 3 [OP_MUL] | var_a = 2
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c + var_d
var_f = 3
var_g = 2
var_h = var_f + var_g
var_i = var_e / var_h
var_j = 3
var_k = var_i * var_j
print(int(var_k)) |
Possibility | How many two-digit numbers can be made by selecting two different numbers from 2, 3, and 4? | 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 | Shinyoung gave 1/2 of the candy he had to Yonghee, and gave 5 more than 1/3 of the remaining candy to Hancho. If there are 5 candies left, how many candies did Shinyoung have at first? | 30 | 5 5 [OP_ADD] 1 1/3 [OP_SUB] [OP_DIV] 1 1/2 [OP_SUB] [OP_DIV] | var_a = 5
var_b = 5
var_c = var_a + var_b
var_d = 1
var_e = 0.3333333333333333
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 1
var_i = 0.5
var_j = var_h - var_i
var_k = var_g / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2))))) |
Correspondence | A number needs to be multiplied by 6, but you mistakenly subtracted it, and got 51. Find the result of the correct calculation. | 342 | 51 6 [OP_ADD] 6 [OP_MUL] | var_a = 51
var_b = 6
var_c = var_a + var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Possibility | You want to create a three-digit number using only one of 5, 9, and 2. What is the sum of the two numbers when it has the greatest difference? | 1211 | [OP_LIST_SOL] 5 9 2 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD] | var_a = 5
var_b = 9
var_c = 2
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 1
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i)) |
Geometry | When there is an equilateral triangle with a perimeter of 18 centimeters (cm), what is the length of one side of this equilateral triangle? | 6 | 18 3 [OP_DIV] | var_a = 18
var_b = 3
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | 6 students from Minjine's group were traveling by train from Seoul Station to Gwangju Station, and there were only 4 seats left, so they decided to stand up and take turns sitting on the rest. If the train ride is 3 hours and 12 minutes, find how many minutes each person can sit on average. | 128 | 3 60 [OP_MUL] 12 [OP_ADD] 6 [OP_DIV] 4 [OP_MUL] | var_a = 3
var_b = 60
var_c = var_a * var_b
var_d = 12
var_e = var_c + var_d
var_f = 6
var_g = var_e / var_f
var_h = 4
var_i = var_g * var_h
print(int(var_i)) |
Arithmetic calculation | At a stationery store, 210 sheets of red colored paper and 473 sheets of blue colored paper are mixed and 100 sheets are bound in a bundle. How many bundles of colored paper can you bundle at the maximum? | 6 | 210 473 [OP_ADD] 100 [OP_FDIV] | var_a = 210
var_b = 473
var_c = var_a + var_b
var_d = 100
var_e = var_c // var_d
print(int(var_e)) |
Comparison | Yoongi is playing a game of throwing basketballs with his 20 friends. When 11 students had goaled more balls than Yoongi, how many students did not goal balls than Yoongi? | 8 | 20 11 [OP_SUB] 1 [OP_SUB] | var_a = 20
var_b = 11
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | Adding 5 consecutive natural numbers equals 180. Find the largest of these 5 numbers. | 38 | 180 5 [OP_DIV] 5 2 [OP_FDIV] [OP_ADD] | var_a = 180
var_b = 5
var_c = var_a / var_b
var_d = 5
var_e = 2
var_f = var_d // var_e
var_g = var_c + var_f
print(int(var_g)) |
Correspondence | When you add 12 to a number and divide it by 4, the quotient is 12 and the remainder is 3. find some number | 39 | 12 4 [OP_MUL] 3 [OP_ADD] 12 [OP_SUB] | var_a = 12
var_b = 4
var_c = var_a * var_b
var_d = 3
var_e = var_c + var_d
var_f = 12
var_g = var_e - var_f
print(int(var_g)) |
Comparison | Classes 1 and 2 shared the 1000 marbles they received as a prize. At this time, class 2 took 50 fewer marbles than class 1 did, and male students in class 2 took a total of 35 more than female students in class 2. If there are 17 boys in class 2 and the marbles were shared with that boys equally, what is the difference between the number of marbles each male in class 2 receives and the total number of marbles taken by class 1? | 510 | 1000 50 [OP_SUB] 2 [OP_DIV] 50 [OP_ADD] 1000 50 [OP_SUB] 2 [OP_DIV] 35 [OP_SUB] 2 [OP_DIV] 35 [OP_ADD] 17 [OP_DIV] [OP_SUB] | var_a = 1000
var_b = 50
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 50
var_g = var_e + var_f
var_h = 1000
var_i = 50
var_j = var_h - var_i
var_k = 2
var_l = var_j / var_k
var_m = 35
var_n = var_l - var_m
var_o = 2
var_p = var_n / var_o
var_q = 35
var_r = var_p + var_q
var_s = 17
var_t = var_r / var_s
var_u = var_g - var_t
print(int(var_u)) |
Comparison | Shinyoung ate 1/3 of the pizza, Seokgi 1/4, and Woong 1/5. Who ate the most pizza? | Shinyoung | [OP_LIST_SOL] Shinyoung Seokgi Woong [OP_LIST_EOL] [OP_LIST_SOL] 1/3 1/4 1/5 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Shinyoung'
var_b = 'Seokgi'
var_c = 'Woong'
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.3333333333333333
var_e = 0.25
var_f = 0.2
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]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j) |
Comparison | There are tangerine trees A, B, C, and D. A had more tangerines than D, and D had more tangerines than C. If B has more tangerines than A, which tangerine tree has the most tangerines? | B | [OP_LIST_SOL] A B C D [OP_LIST_EOL] [OP_LIST_SOL] A D > D C > B A > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
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 = 'A'
var_f = 'D'
var_g = '>'
var_h = 'D'
var_i = 'C'
var_j = '>'
var_k = 'B'
var_l = 'A'
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) |
Geometry | You made a cube with wire at home, and there was no wire left when the edge was 10 centimeters (cm) long. If you use all of this wire in the cube to make a cuboid with a length of 8 centimeters (cm) and a width of 5 centimeters (cm), how high should it be in centimeters (cm)? | 17 | 10 12 [OP_MUL] 8 4 [OP_MUL] [OP_SUB] 5 4 [OP_MUL] [OP_SUB] 4 [OP_DIV] | var_a = 10
var_b = 12
var_c = var_a * var_b
var_d = 8
var_e = 4
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 5
var_i = 4
var_j = var_h * var_i
var_k = var_g - var_j
var_l = 4
var_m = var_k / var_l
print(int(var_m)) |
Correspondence | Seonyeong's classmates and Jieun's classmates are lined up together on the playground. Students are standing in 12 rows of 4 students in each line, followed by 3 students. There are 12 students in Jiune's class. Find how many students are in Seonyeong's class. | 39 | 12 4 [OP_MUL] 3 [OP_ADD] 12 [OP_SUB] | var_a = 12
var_b = 4
var_c = var_a * var_b
var_d = 3
var_e = var_c + var_d
var_f = 12
var_g = var_e - var_f
print(int(var_g)) |
Geometry | You are going to make a cube with one edge 13 centimeters (cm) long using wire. How many centimeters (cm) of wire should I use? | 156 | 13 4 [OP_MUL] 13 4 [OP_MUL] [OP_ADD] 13 4 [OP_MUL] [OP_ADD] | var_a = 13
var_b = 4
var_c = var_a * var_b
var_d = 13
var_e = 4
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 13
var_i = 4
var_j = var_h * var_i
var_k = var_g + var_j
print(int(var_k)) |
Arithmetic calculation | It is said that 269 cookies are divided equally among 29 students. If the price of one cookie is 150 won and you buy the lacking number of cookies, find out how much money you need. | 1200 | 269 29 [OP_MOD] 150 [OP_MUL] | var_a = 269
var_b = 29
var_c = var_a % var_b
var_d = 150
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | Suhan, Minsu, and Gyeongyeon climb the stairs one by one at the same time. When Suhan was on the 10th step, Minsu was on the 7th step, and when Minsu was on the 5th step, Gyeongyeon was on the 32nd step. When Suhan was on the 12th stairway, find the sum of the stairs where Minsu and Gyeongyeon are located. | 48 | 7 10 [OP_SUB] 12 [OP_ADD] 32 5 [OP_SUB] 12 [OP_ADD] [OP_ADD] | var_a = 7
var_b = 10
var_c = var_a - var_b
var_d = 12
var_e = var_c + var_d
var_f = 32
var_g = 5
var_h = var_f - var_g
var_i = 12
var_j = var_h + var_i
var_k = var_e + var_j
print(int(var_k)) |
Arithmetic calculation | There are 12 pencils per stroke. How many pencils must be given to each person to distribute all 6 strokes to 8 people? | 9 | 12 6 [OP_MUL] 8 [OP_FDIV] | var_a = 12
var_b = 6
var_c = var_a * var_b
var_d = 8
var_e = var_c // var_d
print(int(var_e)) |
Geometry | There are two circles A, B of different sizes. The radius of circle A is 4 times the radius of circle B. If the diameter of circle A is 80 centimeters (cm), what is the radius of circle B in centimeters (cm)? | 10 | 80 4 [OP_DIV] 2 [OP_DIV] | var_a = 80
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Geometry | A regular octagon has a perimeter of 23.6 centimeters (cm). What is the length of one side of this figure in cm (cm)? | 2.95 | 23.6 8 [OP_DIV] | var_a = 23.6
var_b = 8
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | If the number 133 greater than this number is 282, find the number 114 less than this number. | 35 | 282 133 [OP_SUB] 114 [OP_SUB] | var_a = 282
var_b = 133
var_c = var_a - var_b
var_d = 114
var_e = var_c - var_d
print(int(var_e)) |
Possibility | There are 3 blue balls and 5 red balls in the box. When 2 red balls are removed from that box, how many blue balls are in the box? | 3 | 3 | var_a = 3
print(int(var_a)) |
Geometry | I made a large square out of several small square tiles, and I have 20 tiles left. When I tried to make a bigger square by adding one row to each horizontal and vertical side, 9 tiles were short. Find the total number of small tiles. | 216 | 20 9 [OP_ADD] 1 [OP_SUB] 2 [OP_DIV] 2 [OP_POW] 20 [OP_ADD] | var_a = 20
var_b = 9
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
var_i = var_g ** var_h
var_j = 20
var_k = var_i + var_j
print(int(var_k)) |
Correspondence | Rounding 17AB to the hundreds place gives 1700. How many possible A are there? | 5 | 17AB [OP_GEN_POSSIBLE_LIST] 1700 50 [OP_SUB] [OP_LIST_MORE_EQUAL] 1700 50 [OP_ADD] [OP_LIST_LESS] 17AB A [OP_LIST_FIND_UNK] [OP_LIST_LEN] | var_a = '17AB'
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 = 1700
var_c = 50
var_d = var_b - var_c
list_b = []
for i in list_a:
if i >= var_d:
list_b.append(i)
var_e = 1700
var_f = 50
var_g = var_e + var_f
list_c = []
for i in list_b:
if i < var_g:
list_c.append(i)
var_h = '17AB'
var_i = 'A'
var_h = str(var_h)
var_i = str(var_i)
unk_idx = var_h.index(var_i)
list_d = []
for elem in list_c:
elem = str(elem)
list_d.append(int(elem[unk_idx]))
list_d = list(set(list_d))
var_j = len(list_d)
print(int(var_j)) |
Geometry | A long rectangular table has an area of 54 square meters (m2) and a width of 600 centimeters (cm). Find the length of the table in centimeters (cm). | 900 | 54 100 100 [OP_MUL] [OP_MUL] 600 [OP_DIV] | var_a = 54
var_b = 100
var_c = 100
var_d = var_b * var_c
var_e = var_a * var_d
var_f = 600
var_g = var_e / var_f
print(int(var_g)) |
Correspondence | When 41 is divided by 5, the quotient is A and the remainder is 1. Find the value of A at this time. | 8 | 41 1 [OP_SUB] 5 [OP_DIV] | var_a = 41
var_b = 1
var_c = var_a - var_b
var_d = 5
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | Roses are planted at intervals of 34.1 meters (m) on one side of the road that is 852.5 meters (m) long. Find the total number of roses planted on the side of the road. Note that the thickness of the rose doesn't count. | 25 | 852.5 34.1 [OP_FDIV] 1 [OP_ADD] | var_a = 852.5
var_b = 34.1
var_c = var_a // var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | Write the smallest three-digit number that can be formed by drawing three different numbers from 0, 3, 5, and 6. | 305 | [OP_LIST_SOL] 0 3 5 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] | var_a = 0
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 = 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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
print(int(var_g)) |
Correspondence | We want to add some number to 20. I mistakenly subtracted some number from 40, and the result was 52. What is the correct calculation result? | 8 | 20 40 52 [OP_SUB] [OP_ADD] | var_a = 20
var_b = 40
var_c = 52
var_d = var_b - var_c
var_e = var_a + var_d
print(int(var_e)) |
Geometry | If the length of the hypotenuse of a right triangle is 17 and the length of the non-hypotenuse is 15, what is the length of the other side? | 8 | 17 2 [OP_POW] 15 2 [OP_POW] [OP_SUB] 1/2 [OP_POW] | var_a = 17
var_b = 2
var_c = var_a ** var_b
var_d = 15
var_e = 2
var_f = var_d ** var_e
var_g = var_c - var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i)) |
Arithmetic calculation | Water flows out of the faucet at a rate of 2+2/3 liters (L) per hour. Find the total number of water that came out of the faucet for 9 hours in liters (L). | 24 | 2 2/3 [OP_ADD] 9 [OP_MUL] | var_a = 2
var_b = 0.6666666666666666
var_c = var_a + var_b
var_d = 9
var_e = var_c * var_d
print(int(var_e)) |
Geometry | Jongho found a giant cookie in the shape of a regular nonagon. Its circumference was 171 millimeters (mm). Find the length of one side of the giant cookie. | 19 | 171 9 [OP_DIV] | var_a = 171
var_b = 9
var_c = var_a / var_b
print(int(var_c)) |
Comparison | Namjoon won second place, and Yoongi was 10 people behind Namjoon. What is Yoongi's rank? | 12 | 2 10 [OP_ADD] | var_a = 2
var_b = 10
var_c = var_a + var_b
print(int(var_c)) |
Comparison | Seulgi has 9 pencils, and Hyeonjeong has 12 pencils. Who has more pencils? | Hyeonjeong | [OP_LIST_SOL] Seulgi Hyeonjeong [OP_LIST_EOL] [OP_LIST_SOL] 9 12 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Seulgi'
var_b = 'Hyeonjeong'
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 = 9
var_d = 12
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) |
Geometry | What is the volume of a cuboid-shaped water tank with a capacity of 36 liters (L) if the length, width, and height are all doubled? | 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 | Find the sum of all natural numbers less than or equal to 100 that have a remainder of 2 when divided by 7 and a remainder of 2 when divided by 8. | 60 | 1 100 1 [OP_LIST_ARANGE] 7 2 [OP_LIST_DIVIDE_AND_REMAIN] 8 2 [OP_LIST_DIVIDE_AND_REMAIN] [OP_LIST_SUM] | 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 = 7
var_e = 2
list_b = []
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
var_e = var_e + var_d
for i in list_a:
i = int(i)
if i%var_d == var_e:
list_b.append(i)
var_f = 8
var_g = 2
list_c = []
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
var_g = var_g + var_f
for i in list_b:
i = int(i)
if i%var_f == var_g:
list_c.append(i)
list_c = [float(i) for i in list_c]
var_h = sum(list_c)
print(int(var_h)) |
Correspondence | A and B are two different natural numbers. When A is divided by 29, the quotient is 31 and the remainder is B. Find A that makes B the smallest. | 900 | 29 31 [OP_MUL] 1 [OP_ADD] | var_a = 29
var_b = 31
var_c = var_a * var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | You can make one mobile with 4 meters (m) of wire. How many meters (m) of wire are left after making multiple mobiles of the same size with 105.8 meters (m) of wire? | 1.8 | 105.8 4 [OP_MOD] | var_a = 105.8
var_b = 4
var_c = var_a % var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Arithmetic calculation | There is a barrel with 10.4 kilograms (kg) of water. If you want to divide this water by 0.8 kg (kg) into one small bucket, how many buckets are needed? | 13 | 10.4 0.8 [OP_DIV] 1 [OP_CEIL] | var_a = 10.4
var_b = 0.8
var_c = var_a / var_b
var_d = 1
var_e=int(((var_c+9*10**(var_d-2))//(10**(var_d-1)))*10**(var_d-1))
print(int(var_e)) |
Arithmetic calculation | Taemin, Minho, and Kibum shared chocolate. Taemin has 5 times as much chocolate as Minho has, and Kibeom has 3 times as much chocolate as Minho has. If the sum of the chocolates that Taemin and Kibum have is 160, find how many chocolates Minho has. | 20 | 160 5 3 [OP_ADD] [OP_DIV] | var_a = 160
var_b = 5
var_c = 3
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e)) |
Arithmetic calculation | The sum of the pocket money Yulgi and Gayeong have is 6,000 won. If you subtract the difference between the two people's pocket money from the sum of their pocket money, it's 4800 won. If Yulgi has more pocket money than Gayeong, how much pocket money does Yulgi have? | 3600 | 6000 4800 2 [OP_DIV] [OP_SUB] | var_a = 6000
var_b = 4800
var_c = 2
var_d = var_b / var_c
var_e = var_a - var_d
print(int(var_e)) |
Correspondence | Subtracting a certain number from 37 gives 24. What is the value of the certain number multiplied by 24? | 312 | 37 24 [OP_SUB] 24 [OP_MUL] | var_a = 37
var_b = 24
var_c = var_a - var_b
var_d = 24
var_e = var_c * var_d
print(int(var_e)) |
Possibility | I am trying to find the sum of the 3 cards. When selecting cards from a box where 2 cards of 10, 30, and 50 each are contained, how many different sums can be possibly made? | 20 | [OP_LIST_SOL] 10 30 50 [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_MUL] 3 [OP_COMB] | var_a = 10
var_b = 30
var_c = 50
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 = var_d * var_e
var_g = 3
var_h = 1
var_f = int(var_f)
var_g = int(var_g)
for i, elem in enumerate(range(var_g)):
var_h = var_h * (var_f-i)
for i, elem in enumerate(range(var_g)):
var_h = var_h / (i+1)
print(int(var_h)) |
Geometry | There is a rectangle with a length to width ratio of 0.875. Given that the width of this rectangle is 24 centimeters (cm), what is the area of the rectangle in square centimeters (cm2)? | 504 | 24 0.875 [OP_MUL] 24 [OP_MUL] | var_a = 24
var_b = 0.875
var_c = var_a * var_b
var_d = 24
var_e = var_c * var_d
print(int(var_e)) |
Possibility | You are going to use all of the number cards 3, 6, and 9 once each to create three-digit numbers. How many three-digit numbers can you make? | 6 | [OP_LIST_SOL] 3 6 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 3
var_b = 6
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 = 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 = len(list_b)
print(int(var_e)) |
Possibility | What is the value created by subtracting the remaining two numbers in order from the smallest two-digit number that can be made by picking two different numbers from 5,1,6,7? | 2 | [OP_LIST_SOL] 5 1 6 7 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] 1 [OP_LIST_MAX] [OP_NUM2LIST] [OP_LIST_SUM] [OP_SUB] | var_a = 5
var_b = 1
var_c = 6
var_d = 7
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 = 2
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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = 1
list_d=list_b.copy()
list_d.sort()
var_i = list_d[-var_h]
list_e = []
var_i = int(var_i)
while var_i//10 > 0:
list_e.append(var_i%10)
var_i = var_i//10
list_e.append(var_i%10)
list_e = list_e[::-1]
list_e = [float(i) for i in list_e]
var_j = sum(list_e)
var_k = var_g - var_j
print(int(var_k)) |
Geometry | What is the product of the number of vertices and the number of faces of a cube? | 48 | 6 8 [OP_MUL] | var_a = 6
var_b = 8
var_c = var_a * var_b
print(int(var_c)) |
Correspondence | A particular number divided by 23, minus 67 and multiplied by 2 is 102. Find out that particular number. | 2714 | 102 2 [OP_DIV] 67 [OP_ADD] 23 [OP_MUL] | var_a = 102
var_b = 2
var_c = var_a / var_b
var_d = 67
var_e = var_c + var_d
var_f = 23
var_g = var_e * var_f
print(int(var_g)) |
Correspondence | A certain number is multiplied by 7/12 resulting 42. What is the value when the certain number is multiplied by 11/18 and subtract 4? | 40 | 42 1 7/12 [OP_DIV] [OP_MUL] 11/18 [OP_MUL] 4 [OP_SUB] | var_a = 42
var_b = 1
var_c = 0.5833333333333334
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 0.6111111111111112
var_g = var_e * var_f
var_h = 4
var_i = var_g - var_h
print(int(var_i)) |
Correspondence | A is a number of 6 bundles with 1000 and 36 bundles with 100. If B is counted by jumping twice from 876 to 197 smaller, subtract B from A to find the value. | 9118 | 1000 6 [OP_MUL] 100 36 [OP_MUL] [OP_ADD] 876 197 2 [OP_MUL] [OP_SUB] [OP_SUB] | var_a = 1000
var_b = 6
var_c = var_a * var_b
var_d = 100
var_e = 36
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 876
var_i = 197
var_j = 2
var_k = var_i * var_j
var_l = var_h - var_k
var_m = var_g - var_l
print(int(var_m)) |
Correspondence | Subtracting 7 from a particular number gives you 2. Find out that particular number. | 9 | 2 7 [OP_ADD] | var_a = 2
var_b = 7
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | When the 8.8 centimeters (cm) long block of wood was overlapped by 0.5 centimeters (cm), the total length of the connected block was 282.7 centimeters (cm). How many pieces of wood are there in total? | 34 | 282.7 8.8 [OP_SUB] 8.8 0.5 [OP_SUB] [OP_DIV] 1 [OP_ADD] | var_a = 282.7
var_b = 8.8
var_c = var_a - var_b
var_d = 8.8
var_e = 0.5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 1
var_i = var_g + var_h
print(int(eval('{:.2f}'.format(round(var_i+1e-10,2))))) |
Correspondence | You were supposed to add 2 to a number, but mistakenly subtracted 2, thereby getting 6. Find the number should be. | 8 | 6 2 [OP_ADD] | var_a = 6
var_b = 2
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.