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 | There are 2 bottles of sugar water with the same amount of sugar. The concentration of one bottle is 5%, the concentration of the other bottle is 8%, and this sugar water is 300 grams (g). What is the difference between the two bottles of water in grams (g)? | 180 | 300 8 100 [OP_DIV] [OP_MUL] 100 5 [OP_DIV] [OP_MUL] 300 [OP_SUB] | var_a = 300
var_b = 8
var_c = 100
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 100
var_g = 5
var_h = var_f / var_g
var_i = var_e * var_h
var_j = 300
var_k = var_i - var_j
print(int(var_k)) |
Correspondence | This equation 57A-2B4=364 is valid. What number should go in A? | 8 | 57A-2B4=364 A [OP_DIGIT_UNK_SOLVER] | var_a = '57A-2B4=364'
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)) |
Arithmetic calculation | There are 9 buses and 17 trucks. How many more trucks are there than buses? | 8 | 17 9 [OP_SUB] | var_a = 17
var_b = 9
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | A number is twice the sum of the quotient of 36 added by 4 and then divided by 8 and the quotient of 17 multiplied by 2 divided by 12. Find the number. | 14 | 36 4 [OP_ADD] 8 [OP_FDIV] 17 2 [OP_MUL] 12 [OP_FDIV] [OP_ADD] 2 [OP_MUL] | var_a = 36
var_b = 4
var_c = var_a + var_b
var_d = 8
var_e = var_c // var_d
var_f = 17
var_g = 2
var_h = var_f * var_g
var_i = 12
var_j = var_h // var_i
var_k = var_e + var_j
var_l = 2
var_m = var_k * var_l
print(int(var_m)) |
Geometry | There is a park in the shape of a square whose side is 40 meters (m). If Taehyung ran one lap along the circumference of this park, how many meters (m) did Taehyung run? | 160 | 40 4 [OP_MUL] | var_a = 40
var_b = 4
var_c = var_a * var_b
print(int(var_c)) |
Correspondence | I mistakenly subtracted 5 from a number instead of dividing that number by 5, so I got 35 as a result. Find out how much it is if I calculate it correctly. | 8 | 35 5 [OP_ADD] 5 [OP_DIV] | var_a = 35
var_b = 5
var_c = var_a + var_b
var_d = 5
var_e = var_c / var_d
print(int(var_e)) |
Correspondence | Ji-hoon poured 152 milliliters (ml) of water from his water bottle into Hyo-joo's water bottle. Nevertheless, when Ji-hoon still has 346 milliliters (ml) more water than Hyo-ju, find out how many milliliters (ml) more water Ji-hoon had before pouring the water. | 650 | 346 152 [OP_ADD] 152 [OP_ADD] | var_a = 346
var_b = 152
var_c = var_a + var_b
var_d = 152
var_e = var_c + var_d
print(int(var_e)) |
Geometry | How many edges does a regular icosahedron have? | 30 | 30 | var_a = 30
print(int(var_a)) |
Geometry | The sum of the width and length of a rectangle is half of 28. This rectangle has a width of 6. Find the area of this rectangle. | 48 | 28 2 [OP_DIV] 6 [OP_SUB] 6 [OP_MUL] | var_a = 28
var_b = 2
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 | You want to create a three-digit number by removing one from the number cards 2, 5, 6, or 9 and using all remaining ones. Find the sum of the third largest and third smallest possible numbers. | 1221 | [OP_LIST_SOL] 2 5 6 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 3 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_ADD] | var_a = 2
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 = 3
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 3
list_d=list_b.copy()
list_d.sort()
var_i = list_d[var_h-1]
var_j = var_g + var_i
print(int(var_j)) |
Arithmetic calculation | Of the 13 students, 6 are girls. How many male students are there? | 7 | 13 6 [OP_SUB] | var_a = 13
var_b = 6
var_c = var_a - var_b
print(int(var_c)) |
Geometry | There is a cube with one edge 9 centimeters (cm) long. If you cut a cube with one edge 2 centimeters (cm) long at each vertex, what is the area in square centimeters (cm2) of the remaining area? | 486 | 9 9 [OP_MUL] 6 [OP_MUL] | var_a = 9
var_b = 9
var_c = var_a * var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Comparison | Yuna, Yujeong, and Eunji shared cards with natural numbers inscribed. Yuna's card has a 6 written on it, and Yujeong's has an 8 written on it. The number written on Eunji's card is larger than Yuna's and smaller than Yujeong's. What is the number written on Eunji's card? | 7 | 6 8 [OP_ADD] 2 [OP_FDIV] | var_a = 6
var_b = 8
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e)) |
Arithmetic calculation | What is the sum of all odd numbers from 1 to 9? | 25 | 1 9 [OP_LIST_ODD] [OP_LIST_SUM] | var_a = 1
var_b = 9
list_a = []
if var_a%2==0:
for i in range(var_a+1, var_b+1, 2):
list_a.append(i)
else:
for i in range(var_a, var_b+1, 2):
list_a.append(i)
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
print(int(var_c)) |
Geometry | You want to draw a circle with a diameter of 14 centimeters (cm). How many centimeters (cm) should the compass be spread out? | 7 | 14 2 [OP_DIV] | var_a = 14
var_b = 2
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | When Jungkook measured his height, he made a mistake and moved the decimal point one place to the right which resulted him to be 2.7 centimeters (cm) taller than he really is. Calculate the original Jungkook's height in centimeters (cm). | 0.3 | 2.7 10 1 [OP_SUB] [OP_DIV] | var_a = 2.7
var_b = 10
var_c = 1
var_d = var_b - var_c
var_e = var_a / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | Eunseo bought 3 red candies for 350 won each and 2 blue candies for 180 won each. When Eunseo pays 2,000 won, how much change should she receive? | 590 | 2000 350 3 [OP_MUL] 180 2 [OP_MUL] [OP_ADD] [OP_SUB] | var_a = 2000
var_b = 350
var_c = 3
var_d = var_b * var_c
var_e = 180
var_f = 2
var_g = var_e * var_f
var_h = var_d + var_g
var_i = var_a - var_h
print(int(var_i)) |
Correspondence | You had to divide a number by 3 but instead multiplied by 3 to get 18. Find the correctly calculated value. | 2 | 18 3 [OP_DIV] 3 [OP_DIV] | var_a = 18
var_b = 3
var_c = var_a / var_b
var_d = 3
var_e = var_c / var_d
print(int(var_e)) |
Correspondence | Dividing 231.88 by a certain number gives 1.87. What is the quotient of that certain number divided by 25? | 4 | 231.88 1.87 [OP_DIV] 25 [OP_FDIV] | var_a = 231.88
var_b = 1.87
var_c = var_a / var_b
var_d = 25
var_e = var_c // var_d
print(int(var_e)) |
Correspondence | If you multiply a number by 2 instead of multiply it by 20 and add 3, you get 22. How much is it when you calculate correctly? | 223 | 22 2 [OP_DIV] 20 [OP_MUL] 3 [OP_ADD] | var_a = 22
var_b = 2
var_c = var_a / var_b
var_d = 20
var_e = var_c * var_d
var_f = 3
var_g = var_e + var_f
print(int(var_g)) |
Geometry | The length of one side of an equilateral triangle is 14/8 centimeters (cm). Find the sum of the lengths of the three sides of this equilateral triangle in centimeters (cm). | 5.25 | 14/8 3 [OP_MUL] | var_a = 1.75
var_b = 3
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | If you multiply a number by 8, it returns 64. When the number is multiplied by 7, what does it give? | 56 | 64 8 [OP_DIV] 7 [OP_MUL] | var_a = 64
var_b = 8
var_c = var_a / var_b
var_d = 7
var_e = var_c * var_d
print(int(var_e)) |
Geometry | Eugene wants to purchase a rectangular frame with the same area as a triangular frame with a base of 7.2 centimeters (cm) and a height of 7 centimeters (cm). If the width of a rectangular picture frame is 4 centimeters (cm), how many centimeters (cm) should the length be? | 6.3 | 7.2 7 [OP_MUL] 2 [OP_DIV] 4 [OP_DIV] | var_a = 7.2
var_b = 7
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
var_f = 4
var_g = var_e / var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Correspondence | When you subtract 2 from a number and add 4, you get 9. Find the number. | 7 | 9 2 [OP_ADD] 4 [OP_SUB] | var_a = 9
var_b = 2
var_c = var_a + var_b
var_d = 4
var_e = var_c - var_d
print(int(var_e)) |
Possibility | There are a total of 4 students in the classroom who have appeared in the election for class president and vice president. How many ways can a class president and vice president be selected out of four? | 12 | 4 2 [OP_PERM] | var_a = 4
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)) |
Possibility | We are trying to make a two-digit number using 2 of our 3 number cards 1, 2, and 6. How many possible numbers are divisible by 3? | 2 | [OP_LIST_SOL] 1 2 6 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 1
var_b = 2
var_c = 6
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 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 = 3
list_c = []
var_e = int(var_e)
for i in list_b:
i = int(i)
if i % var_e == 0:
list_c.append(i)
var_f = len(list_c)
print(int(var_f)) |
Geometry | A square was created by arranging 10 square-shaped colored papers for each row and column without gaps. Find the number of colored paper placed at the perimeter. | 36 | 10 4 [OP_MUL] 4 [OP_SUB] | var_a = 10
var_b = 4
var_c = var_a * var_b
var_d = 4
var_e = var_c - var_d
print(int(var_e)) |
Comparison | Nana is 1.618 meters (m) and Gaeun is 162.3 centimeters (cm). Find out who is taller. | Gaeun | [OP_LIST_SOL] Nana Gaeun [OP_LIST_EOL] [OP_LIST_SOL] 1.618 100 [OP_MUL] 162.3 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Nana'
var_b = 'Gaeun'
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.618
var_d = 100
var_e = var_c * var_d
var_f = 162.3
list_b= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j) |
Possibility | You want to buy 2 fruits by combining apples, peaches and pears. If duplicates are allowed, how many possible combinations are there? | 6 | [OP_LIST_SOL] apples peaches pears [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_ADD] 1 [OP_SUB] 2 [OP_COMB] | var_a = 'apples'
var_b = 'peaches'
var_c = 'pears'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = len(list_a)
var_e = 2
var_f = var_d + var_e
var_g = 1
var_h = var_f - var_g
var_i = 2
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
var_j = var_j * (var_h-i)
for i, elem in enumerate(range(var_i)):
var_j = var_j / (i+1)
print(int(var_j)) |
Correspondence | You want to multiply 20 by some number. I mistakenly multiplied 10 by the number, and the result was 40. What is the correct calculation result? | 80 | 20 40 10 [OP_DIV] [OP_MUL] | var_a = 20
var_b = 40
var_c = 10
var_d = var_b / var_c
var_e = var_a * var_d
print(int(var_e)) |
Possibility | You want to create a two-digit number by drawing two different numbers from among 1, 4, 7, and 9. Find the difference between the largest number and the smallest number. | 83 | [OP_LIST_SOL] 1 4 7 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 1
var_b = 4
var_c = 7
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 = 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]
var_h = 1
list_d=list_b.copy()
list_d.sort()
var_i = list_d[var_h-1]
var_j = var_g - var_i
print(int(var_j)) |
Comparison | Hwajun got 19 out of 25 questions right on the Math test and 10 out of 16 questions on the Korean test. Which of the two subjects has the highest percentage of correct answers? | Math | [OP_LIST_SOL] Math Korean [OP_LIST_EOL] [OP_LIST_SOL] 19 25 [OP_DIV] 10 16 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Math'
var_b = 'Korean'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 19
var_d = 25
var_e = var_c / var_d
var_f = 10
var_g = 16
var_h = var_f / var_g
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Correspondence | Dividing a number by 8, adding 8, subtracting 30, and multiplying by 6 is 12. Find the number. | 192 | 12 6 [OP_DIV] 30 [OP_ADD] 8 [OP_SUB] 8 [OP_MUL] | var_a = 12
var_b = 6
var_c = var_a / var_b
var_d = 30
var_e = var_c + var_d
var_f = 8
var_g = var_e - var_f
var_h = 8
var_i = var_g * var_h
print(int(var_i)) |
Arithmetic calculation | Youngjin's family arrived at their grandmother's house, which is 120 kilometers away by subway and bus, in 1 hour and 50 minutes. At first, they took the subway, and later they took the bus for 1 hour and 10 minutes. This bus used 6 liters (L) of gasoline to travel 40.8 kilometers (㎞), and if Youngjin's family used 14 liters (L) of gasoline while taking the bus, how many kilometers (km) did Youngjin's family move by taking the subway to get there in 1 minute? (The time and distance to transfer from the subway to the bus are not taken into account.) | 0.62 | 120 40.8 6 [OP_DIV] 14 [OP_MUL] [OP_SUB] 1 60 [OP_MUL] 50 [OP_ADD] 1 60 [OP_MUL] 10 [OP_ADD] [OP_SUB] [OP_DIV] | var_a = 120
var_b = 40.8
var_c = 6
var_d = var_b / var_c
var_e = 14
var_f = var_d * var_e
var_g = var_a - var_f
var_h = 1
var_i = 60
var_j = var_h * var_i
var_k = 50
var_l = var_j + var_k
var_m = 1
var_n = 60
var_o = var_m * var_n
var_p = 10
var_q = var_o + var_p
var_r = var_l - var_q
var_s = var_g / var_r
print('{:.2f}'.format(round(var_s+1e-10,2))) |
Arithmetic calculation | If 72 candies and 56 jellies are distributed among 4 students, how many snacks does one person have? | 32 | 72 4 [OP_DIV] 56 4 [OP_DIV] [OP_ADD] | var_a = 72
var_b = 4
var_c = var_a / var_b
var_d = 56
var_e = 4
var_f = var_d / var_e
var_g = var_c + var_f
print(int(var_g)) |
Correspondence | 39 is the wrong result of subtracting 5 and adding 14 to the number, instead of multiplying 5 and adding 14. What is the sum of the incorrect and the correct results? | 203 | 39 14 [OP_SUB] 5 [OP_ADD] 5 [OP_MUL] 14 [OP_ADD] 39 [OP_ADD] | var_a = 39
var_b = 14
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
var_f = 5
var_g = var_e * var_f
var_h = 14
var_i = var_g + var_h
var_j = 39
var_k = var_i + var_j
print(int(var_k)) |
Correspondence | Adding a certain number to 0.46 three times gives you 0.72. What is the certain number? | 0.66 | 0.72 0.46 [OP_SUB] 0.46 [OP_SUB] 0.46 [OP_SUB] | var_a = 0.72
var_b = 0.46
var_c = var_a - var_b
var_d = 0.46
var_e = var_c - var_d
var_f = 0.46
var_g = var_e - var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | My older brother and younger brother each received pocket money from my father. If the sum of their pocket money is 12,000 won, and the older brother gets 1,000 won more than the younger brother, how much does the older brother get? | 6500 | 12000 1000 [OP_SUB] 2 [OP_DIV] 1000 [OP_ADD] | var_a = 12000
var_b = 1000
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 1000
var_g = var_e + var_f
print(int(var_g)) |
Arithmetic calculation | Find the smallest number that is a factor of 32 but not a factor of 8. | 16 | 32 [OP_LIST_GET_DIVISOR] 8 [OP_LIST_GET_DIVISOR] [OP_SET_DIFFERENCE] 1 [OP_LIST_MIN] | var_a = 32
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
if var_a % i == 0:
list_a.append(i)
list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = 8
list_b = []
num_sqrt = int(math.sqrt(var_b))
for i in range(1, num_sqrt+1):
if var_b % i == 0:
list_b.append(i)
list_b.append(int(var_b/i))
list_b = sorted(set(list_b))
list_c = list(set(list_a) - set(list_b))
var_c = 1
list_d=list_c.copy()
list_d.sort()
var_d = list_d[var_c-1]
print(int(var_d)) |
Arithmetic calculation | There are 3 groups of 10 black stones and 16 white stones. How many Go stones are there in all? | 46 | 10 3 [OP_MUL] 16 [OP_ADD] | var_a = 10
var_b = 3
var_c = var_a * var_b
var_d = 16
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | What is the product of a number that is greater than the second largest number and another number that is smaller than the second smallest number among 37, 45, 26, 51? | 1326 | [OP_LIST_SOL] 37 45 26 51 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_MUL] | var_a = 37
var_b = 45
var_c = 26
var_d = 51
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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 1
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)) |
Geometry | How many vertices of a regular dodecahedron are there? | 20 | 20 | var_a = 20
print(int(var_a)) |
Arithmetic calculation | A train is running at 1.6 kilometers (km) per minute. If it took 3 minutes and 15 seconds to completely pass through a 4.85 kilometers (km) long tunnel, how long is the train in meters (m)? | 350 | 1.6 3 15 60 [OP_DIV] [OP_ADD] [OP_MUL] 4.85 [OP_SUB] 1000 [OP_MUL] | var_a = 1.6
var_b = 3
var_c = 15
var_d = 60
var_e = var_c / var_d
var_f = var_b + var_e
var_g = var_a * var_f
var_h = 4.85
var_i = var_g - var_h
var_j = 1000
var_k = var_i * var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2))))) |
Possibility | There are 5 cards; each numbered with 0, 1, 2, 3, and 4. If you make two-digit integers using these cards, how many of them are greater than 30? | 7 | [OP_LIST_SOL] 0 1 2 3 4 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 30 [OP_LIST_MORE] [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 = 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 = 30
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 | You divided a particular number by 23 and subtracted 67. When you multiply that by 2, you get 102, what is 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)) |
Arithmetic calculation | Seokjin's mother is 32 years older than Seokjin, and his uncle is 3 years younger than his mother. When Seokjin is 12 years old, how old is his uncle? | 41 | 12 32 [OP_ADD] 3 [OP_SUB] | var_a = 12
var_b = 32
var_c = var_a + var_b
var_d = 3
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | Subtracting 48 from a number gives you 22. What is the number obtained when 32 is subtracted from a number? | 38 | 22 48 [OP_ADD] 32 [OP_SUB] | var_a = 22
var_b = 48
var_c = var_a + var_b
var_d = 32
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | There is a number that when it is divided by 23, the quotient is 17 and the remainder is 19. When the number is multiplied by 10 and divided by 23, find the sum of the quotient and remainder. | 184 | 23 17 [OP_MUL] 19 [OP_ADD] 10 [OP_MUL] 23 [OP_FDIV] 23 17 [OP_MUL] 19 [OP_ADD] 10 [OP_MUL] 23 [OP_MOD] [OP_ADD] | var_a = 23
var_b = 17
var_c = var_a * var_b
var_d = 19
var_e = var_c + var_d
var_f = 10
var_g = var_e * var_f
var_h = 23
var_i = var_g // var_h
var_j = 23
var_k = 17
var_l = var_j * var_k
var_m = 19
var_n = var_l + var_m
var_o = 10
var_p = var_n * var_o
var_q = 23
var_r = var_p % var_q
var_s = var_i + var_r
print(int(var_s)) |
Geometry | There exists a cube whose sum of 12 edges is 180 centimeters (cm). What is the total surface area? | 1350 | 180 12 [OP_DIV] 180 12 [OP_DIV] [OP_MUL] 6 [OP_MUL] | var_a = 180
var_b = 12
var_c = var_a / var_b
var_d = 180
var_e = 12
var_f = var_d / var_e
var_g = var_c * var_f
var_h = 6
var_i = var_g * var_h
print(int(var_i)) |
Arithmetic calculation | When 16 weights that weigh the same were placed in a box, it came out to be 17.88 kilograms (kg). If the empty box weighs 0.6 kilograms (kg), what is the weight of the 7 weights in kilograms (kg)? | 7.56 | 17.88 0.6 [OP_SUB] 16 [OP_DIV] 7 [OP_MUL] | var_a = 17.88
var_b = 0.6
var_c = var_a - var_b
var_d = 16
var_e = var_c / var_d
var_f = 7
var_g = var_e * var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | The length of string A is equal to 6 times of string C and is equal to 5 times of string B. Find the length of string C when the length of string B is 12 meters (m). | 10 | 12 5 [OP_MUL] 6 [OP_FDIV] | var_a = 12
var_b = 5
var_c = var_a * var_b
var_d = 6
var_e = var_c // var_d
print(int(var_e)) |
Possibility | I am trying to make a three-digit number by drawing three out of four number cards with the numbers 2, 4, 6, and 8 written on them. If you can use the same card multiple times, what is the sum of all possible numbers? | 35520 | [OP_LIST_SOL] 2 4 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] [OP_LIST_SUM] | var_a = 2
var_b = 4
var_c = 6
var_d = 8
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.product(list_b, repeat=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]
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print(int(var_f)) |
Geometry | Find the value of the sum of the vertices of the rectangle and the pentagon. | 9 | 4 5 [OP_ADD] | var_a = 4
var_b = 5
var_c = var_a + var_b
print(int(var_c)) |
Comparison | Gyeong-seok studies Korean 7 times a week, 2/3 hours each, and Math 5 times a week, 3/4 hours each. Find out which subject Kyung-seok studies more during the week, Korean or math. | Korean | [OP_LIST_SOL] Korean Math [OP_LIST_EOL] [OP_LIST_SOL] 2 3 [OP_DIV] 7 [OP_MUL] 3 4 [OP_DIV] 5 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Korean'
var_b = 'Math'
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 = 2
var_d = 3
var_e = var_c / var_d
var_f = 7
var_g = var_e * var_f
var_h = 3
var_i = 4
var_j = var_h / var_i
var_k = 5
var_l = var_j * var_k
list_b= []
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p) |
Geometry | If the base of a pyramid is an octagon, find the number of sides. | 8 | 8 | var_a = 8
print(int(var_a)) |
Comparison | The distance from the school to the park is 396 meters (m), and the distance from the school to the pharmacy is 0.389 kilometers (km). Which park or pharmacy is closer to the school? | pharmacy | [OP_LIST_SOL] park pharmacy [OP_LIST_EOL] [OP_LIST_SOL] 396 0.389 1000 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'park'
var_b = 'pharmacy'
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 = 396
var_d = 0.389
var_e = 1000
var_f = var_d * var_e
list_b= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
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) |
Arithmetic calculation | The number of first-year female students at Hyunjin's school is 3/5 of the number of first-year male students. If there are 240 first-year students, how many first-year male students are there? | 150 | 240 1 3/5 [OP_ADD] [OP_DIV] | var_a = 240
var_b = 1
var_c = 0.6
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e)) |
Geometry | There are 1 piece of paper tape each measuring 36 centimeters (cm), 42 centimeters (cm), and 48 centimeters (cm). Each of these paper tapes was cut into 1/6 pieces, and the remaining portion was connected in a way that the overlapping portion became the same, and it resulted in a length of 97 centimeters (cm). How many centimeters (cm) did you overlap? | 4 | 36 42 [OP_ADD] 48 [OP_ADD] 1 1/6 [OP_SUB] [OP_MUL] 97 [OP_SUB] 3 1 [OP_SUB] [OP_DIV] | var_a = 36
var_b = 42
var_c = var_a + var_b
var_d = 48
var_e = var_c + var_d
var_f = 1
var_g = 0.16666666666666666
var_h = var_f - var_g
var_i = var_e * var_h
var_j = 97
var_k = var_i - var_j
var_l = 3
var_m = 1
var_n = var_l - var_m
var_o = var_k / var_n
print(int(var_o)) |
Arithmetic calculation | You want to plant trees at intervals of 10 meters (m) on a 100-meter (m) long road. If trees are planted at the beginning and end of the road, how many trees are needed if planted on both sides of the road? | 22 | 100 10 [OP_DIV] 1 [OP_ADD] 2 [OP_MUL] | var_a = 100
var_b = 10
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
var_f = 2
var_g = var_e * var_f
print(int(var_g)) |
Possibility | You want to create a two-digit number by picking two different numbers from 1, 2, 3, 4, 5, and 6. How many different two-digit numbers can you make? | 30 | [OP_LIST_SOL] 1 2 3 4 5 6 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 1
var_b = 2
var_c = 3
var_d = 4
var_e = 5
var_f = 6
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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_g))
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_h = len(list_b)
print(int(var_h)) |
Comparison | Dongguk drinks 0.2 liters (L) of water five times a day. Yoonji drinks 0.3 liters (L) of water six times a day. Heejin drinks 500 milliliters (ml) of water four times a day. Who drinks the most water per day? | Heejin | [OP_LIST_SOL] Dongguk Yoonji Heejin [OP_LIST_EOL] [OP_LIST_SOL] 5 0.2 1000 [OP_MUL] [OP_MUL] 6 0.3 1000 [OP_MUL] [OP_MUL] 4 500 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Dongguk'
var_b = 'Yoonji'
var_c = 'Heejin'
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 = 5
var_e = 0.2
var_f = 1000
var_g = var_e * var_f
var_h = var_d * var_g
var_i = 6
var_j = 0.3
var_k = 1000
var_l = var_j * var_k
var_m = var_i * var_l
var_n = 4
var_o = 500
var_p = var_n * var_o
list_b= []
if "/" in str(var_p):
var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_m):
var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
var_q = 1
list_c=list_b.copy()
list_c.sort()
var_r = list_c[-var_q]
var_s = list_b.index(var_r)+1
var_t = list_a[var_s-1]
print(var_t) |
Arithmetic calculation | Seven students are jumping rope, and the number of students doing hula hoops is five times the number of students jumping rope. How many students are doing hula hoops? | 35 | 7 5 [OP_MUL] | var_a = 7
var_b = 5
var_c = var_a * var_b
print(int(var_c)) |
Correspondence | There is a question to divide a number by 5. I misread this question and divided it by two and submitted 0.65 as an answer. What is the correct answer? | 1.04 | 0.65 8 [OP_MUL] 5 [OP_DIV] | var_a = 0.65
var_b = 8
var_c = var_a * var_b
var_d = 5
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | When a number is divided by 8, the remainder is 7, and when divided by 7, the remainder is 6. Also, if you add 1 to this number, it is said to be divisible by 5. Find the smallest four-digit number among these numbers. | 1119 | 1000 9999 1 [OP_LIST_ARANGE] 8 7 [OP_LIST_DIVIDE_AND_REMAIN] 7 6 [OP_LIST_DIVIDE_AND_REMAIN] 5 -1 [OP_LIST_DIVIDE_AND_REMAIN] 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 = 8
var_e = 7
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 = 7
var_g = 6
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)
var_h = 5
var_i = -1
list_d = []
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
var_i = var_i + var_h
for i in list_c:
i = int(i)
if i%var_h == var_i:
list_d.append(i)
var_j = 1
list_e=list_d.copy()
list_e.sort()
var_k = list_e[var_j-1]
print(int(var_k)) |
Arithmetic calculation | Find the sum of all numbers from 1 to 100 that are multiples of 4 and have a remainder of 1 when divided by 3. | 468 | 1 100 1 [OP_LIST_ARANGE] 3 1 [OP_LIST_DIVIDE_AND_REMAIN] 4 [OP_LIST_DIVISIBLE] [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 = 3
var_e = 1
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 = 4
list_c = []
var_f = int(var_f)
for i in list_b:
i = int(i)
if i % var_f == 0:
list_c.append(i)
list_c = [float(i) for i in list_c]
var_g = sum(list_c)
print(int(var_g)) |
Geometry | Find the number of sides of the quadrangular pyramid. | 5 | 4 1 [OP_ADD] | var_a = 4
var_b = 1
var_c = var_a + var_b
print(int(var_c)) |
Correspondence | There is an expression 3A1+2B=327. Find the number that goes into B | 6 | 3A1+2B=327 B [OP_DIGIT_UNK_SOLVER] | var_a = '3A1+2B=327'
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 | 247 people entered the museum yesterday. 131 more people entered today than yesterday. How many people entered the museum yesterday and today in total? | 625 | 247 247 131 [OP_ADD] [OP_ADD] | var_a = 247
var_b = 247
var_c = 131
var_d = var_b + var_c
var_e = var_a + var_d
print(int(var_e)) |
Arithmetic calculation | A bag containing 6 apples weighs 1.82 kilograms (kg). How many kilograms (kg) does one apple weigh if the empty bag weighs 0.5 kilograms (kg)? | 0.22 | 1.82 0.5 [OP_SUB] 6 [OP_DIV] | var_a = 1.82
var_b = 0.5
var_c = var_a - var_b
var_d = 6
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Possibility | You want to create a five-digit number using the five numbers 7, 3, 9, 8, and 1 only once. How many five-digit numbers can you make? | 120 | [OP_LIST_SOL] 7 3 9 8 1 [OP_LIST_EOL] 5 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 7
var_b = 3
var_c = 9
var_d = 8
var_e = 1
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 5
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_g = len(list_b)
print(int(var_g)) |
Geometry | Sangwoo is going to cut paper to make several round-shaped tickets. The paper is rectangular, 20 centimeters (cm) wide and 16 centimeters (cm) long, respectively. If Sangwoo wants to make a ticket with a radius of 2 centimeters (cm), how many can he make? | 20 | 20 2 2 [OP_MUL] [OP_FDIV] 16 2 2 [OP_MUL] [OP_FDIV] [OP_MUL] | var_a = 20
var_b = 2
var_c = 2
var_d = var_b * var_c
var_e = var_a // var_d
var_f = 16
var_g = 2
var_h = 2
var_i = var_g * var_h
var_j = var_f // var_i
var_k = var_e * var_j
print(int(var_k)) |
Arithmetic calculation | Jungkook has 3 red balls and Yoongi has 4 blue balls. What is the total number of balls? | 7 | 3 4 [OP_ADD] | var_a = 3
var_b = 4
var_c = var_a + var_b
print(int(var_c)) |
Geometry | A square with a side of 20 centimeters (cm) was made using thread. I made a rectangle using the same thread. If the width of this rectangle is 14 centimeters (cm), how many centimeters (cm) is the length? | 26 | 20 4 [OP_MUL] 2 [OP_DIV] 14 [OP_SUB] | var_a = 20
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
var_f = 14
var_g = var_e - var_f
print(int(var_g)) |
Geometry | A trapezoid with a base of 25 centimeters (cm) and a height of 13 centimeters (cm) has an area of 286 square centimeters (cm2). How many centimeters (cm) is the length of the upper side of this trapezoid? | 19 | 286 13 [OP_DIV] 2 [OP_MUL] 25 [OP_SUB] | var_a = 286
var_b = 13
var_c = var_a / var_b
var_d = 2
var_e = var_c * var_d
var_f = 25
var_g = var_e - var_f
print(int(var_g)) |
Possibility | In how many ways can you choose and buy two different fruits among an apple, a peach, and a melon? | 3 | [OP_LIST_SOL] apple peach melon [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB] | var_a = 'apple'
var_b = 'peach'
var_c = 'melon'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = len(list_a)
var_e = 2
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
var_f = var_f * (var_d-i)
for i, elem in enumerate(range(var_e)):
var_f = var_f / (i+1)
print(int(var_f)) |
Comparison | In the running match, Jungkook placed 7th and Minyoung placed 5th. Taehyung was worse than Minyoung but better than Jungkook. What's Taehyung's ranking? | 6 | 7 5 [OP_ADD] 2 [OP_DIV] | var_a = 7
var_b = 5
var_c = var_a + var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Geometry | A cuboid has a base area of 14/5 square centimeter (cm2) and a volume of 28/3 cubic centimeter (cm3). Find the height of this cuboid. | 3.33 | 28/3 14/5 [OP_DIV] | var_a = 9.333333333333334
var_b = 2.8
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Geometry | There is a pyramid whose sum of the number of faces and the number of vertices is 16. How many edges does this pyramid have? | 14 | 16 2 [OP_DIV] 1 [OP_SUB] 2 [OP_MUL] | var_a = 16
var_b = 2
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e * var_f
print(int(var_g)) |
Arithmetic calculation | What is the result of subtracting the sum of all natural numbers less than or equal to 99 from the sum of all natural numbers less than or equal to 999? | 494550 | 1 999 1 [OP_LIST_ARANGE] [OP_LIST_SUM] 1 99 1 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] | var_a = 1
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
list_a = [float(i) for i in list_a]
var_d = sum(list_a)
var_e = 1
var_f = 99
var_g = 1
list_b = [i for i in range(var_e, var_f + 1, var_g)]
list_b = [float(i) for i in list_b]
var_h = sum(list_b)
var_i = var_d - var_h
print(int(var_i)) |
Arithmetic calculation | A box containing 16 watermelons of equal weight weighs 17.88 kilograms (kg). If the empty box weighs 0.6 kilograms (kg), how many kilograms (kg) do 7 watermelons weigh? | 7.56 | 17.88 0.6 [OP_SUB] 16 [OP_DIV] 7 [OP_MUL] | var_a = 17.88
var_b = 0.6
var_c = var_a - var_b
var_d = 16
var_e = var_c / var_d
var_f = 7
var_g = var_e * var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | There are two numbers 5.5 and 9/2. How much is it when you add them up to? | 10 | 5.5 9/2 [OP_ADD] | var_a = 5.5
var_b = 4.5
var_c = var_a + var_b
print(int(var_c)) |
Comparison | While Seokjin took the stairs to the 5th floor, Hoseok took the elevator to the 8th floor. Who climbed higher? | Hoseok | [OP_LIST_SOL] Seokjin Hoseok [OP_LIST_EOL] [OP_LIST_SOL] 5 8 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Seokjin'
var_b = 'Hoseok'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 5
var_d = 8
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) |
Possibility | Find how many odd numbers there are when two cards are drawn from a deck of five, each with the numbers 0, 1, 2, 3, and 4, to form a two-digit integer. | 6 | [OP_LIST_SOL] 0 1 2 3 4 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 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
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 = 2
list_c = []
var_g = int(var_g)
for i in list_b:
i = int(i)
if i % var_g == 0:
list_c.append(i)
list_d = list(set(list_b) - set(list_c))
var_h = len(list_d)
print(int(var_h)) |
Arithmetic calculation | What is the smallest three-digit number divisible by 5, 8, and 2? | 120 | 100 999 1 [OP_LIST_ARANGE] 5 [OP_LIST_DIVISIBLE] 8 [OP_LIST_DIVISIBLE] 2 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN] | 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 = 5
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 = 8
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 = 2
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 = 1
list_e=list_d.copy()
list_e.sort()
var_h = list_e[var_g-1]
print(int(var_h)) |
Arithmetic calculation | There are 57 rocks in box A, 25 of which are basalt. There are 49 rocks in box B, 19 of which are basalt. Find out the total number of the rocks in the box A and B that are not basalt. | 62 | 57 25 [OP_SUB] 49 19 [OP_SUB] [OP_ADD] | var_a = 57
var_b = 25
var_c = var_a - var_b
var_d = 49
var_e = 19
var_f = var_d - var_e
var_g = var_c + var_f
print(int(var_g)) |
Geometry | What is the sum of the vertices of the rectangle and the pentagon? | 9 | 4 5 [OP_ADD] | var_a = 4
var_b = 5
var_c = var_a + var_b
print(int(var_c)) |
Correspondence | The eight-digit number 757AB384 is divisible by 357. Get B. | 5 | 757AB384 [OP_GEN_POSSIBLE_LIST] 357 [OP_LIST_DIVISIBLE] 757AB384 B [OP_LIST_FIND_UNK] | var_a = '757AB384'
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 = 357
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 = '757AB384'
var_d = 'B'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
var_e = 0
for elem in list_b:
elem = str(elem)
var_e = int(elem[unk_idx])
print(int(var_e)) |
Arithmetic calculation | Jungkook raises 5 rabbits and 2 puppies. How many rabbits and puppies does Jungkook raise? | 7 | 5 2 [OP_ADD] | var_a = 5
var_b = 2
var_c = var_a + var_b
print(int(var_c)) |
Correspondence | A particular number is divisible by 5, and its resulting quotient is equal to 320 divided by 4 plus 220. Find out the value of that particular number divided by 3. | 500 | 320 4 [OP_DIV] 220 [OP_ADD] 5 [OP_MUL] 3 [OP_DIV] | var_a = 320
var_b = 4
var_c = var_a / var_b
var_d = 220
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)) |
Correspondence | A number when 1 is added to it becomes a multiple of 5, 7, and 8. Find the smallest four-digit natural number among these numbers. | 1119 | 1000 9999 1 [OP_LIST_ARANGE] 8 7 [OP_LIST_DIVIDE_AND_REMAIN] 7 6 [OP_LIST_DIVIDE_AND_REMAIN] 5 -1 [OP_LIST_DIVIDE_AND_REMAIN] 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 = 8
var_e = 7
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 = 7
var_g = 6
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)
var_h = 5
var_i = -1
list_d = []
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
var_i = var_i + var_h
for i in list_c:
i = int(i)
if i%var_h == var_i:
list_d.append(i)
var_j = 1
list_e=list_d.copy()
list_e.sort()
var_k = list_e[var_j-1]
print(int(var_k)) |
Geometry | You have a regular nonagon with a perimeter of 171 centimeters (cm). How many centimeters (cm) is one side of this regular nonagon? | 19 | 171 9 [OP_DIV] | var_a = 171
var_b = 9
var_c = var_a / var_b
print(int(var_c)) |
Geometry | If a cube with width, length, and height of 1 cm is stacked in 7 rows horizontally, 5 columns vertically, and 3 floors, what will be the total volume? | 105 | 1 7 [OP_MUL] 1 5 [OP_MUL] [OP_MUL] 1 3 [OP_MUL] [OP_MUL] | var_a = 1
var_b = 7
var_c = var_a * var_b
var_d = 1
var_e = 5
var_f = var_d * var_e
var_g = var_c * var_f
var_h = 1
var_i = 3
var_j = var_h * var_i
var_k = var_g * var_j
print(int(var_k)) |
Arithmetic calculation | Thirty students in Hyukchan's class have their own attendance numbers from 1 to 30. Among the students in Hyeokchan's class, the students wearing glasses are students #1, #3, #7, #10, #23, and #27, and the students with hair tied are #1, #9, #11, #20, and #23. How many students wear glasses or tie their hair? | 9 | [OP_LIST_SOL] 1 3 7 10 23 27 [OP_LIST_EOL] [OP_LIST_SOL] 1 9 11 20 23 [OP_LIST_EOL] [OP_SET_UNION] [OP_LIST_LEN] | var_a = 1
var_b = 3
var_c = 7
var_d = 10
var_e = 23
var_f = 27
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 = 1
var_h = 9
var_i = 11
var_j = 20
var_k = 23
list_b= []
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)
list_b.reverse()
list_c = list(set(list_a) | set(list_b))
var_l = len(list_c)
print(int(var_l)) |
Correspondence | When 11 is divided by 5, the remainder is B and the quotient is A. Find the value of A at this time. | 2 | 11 5 [OP_FDIV] | var_a = 11
var_b = 5
var_c = var_a // var_b
print(int(var_c)) |
Correspondence | A number is greater than 35 and less than 70. When a number is divided by 6, the remainder is 3. When a number is divided by 7, the remainder is 1. When a number is divided by 8, the remainder is 1. Find a number. | 57 | 35 1 [OP_ADD] 70 1 [OP_SUB] 1 [OP_LIST_ARANGE] 6 3 [OP_LIST_DIVIDE_AND_REMAIN] 7 1 [OP_LIST_DIVIDE_AND_REMAIN] 8 1 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET] | var_a = 35
var_b = 1
var_c = var_a + var_b
var_d = 70
var_e = 1
var_f = var_d - var_e
var_g = 1
list_a = [i for i in range(var_c, var_f + 1, var_g)]
var_h = 6
var_i = 3
list_b = []
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
var_i = var_i + var_h
for i in list_a:
i = int(i)
if i%var_h == var_i:
list_b.append(i)
var_j = 7
var_k = 1
list_c = []
var_j = int(var_j)
var_k = int(var_k)
if var_k < 0:
var_k = var_k + var_j
for i in list_b:
i = int(i)
if i%var_j == var_k:
list_c.append(i)
var_l = 8
var_m = 1
list_d = []
var_l = int(var_l)
var_m = int(var_m)
if var_m < 0:
var_m = var_m + var_l
for i in list_c:
i = int(i)
if i%var_l == var_m:
list_d.append(i)
var_n = 1
var_o = list_d[var_n-1]
print(int(var_o)) |
Correspondence | A, B, and C are natural numbers. When A is divided by 7, the quotient is B and the remainder is C. B and C here have the same value. Find the largest number that can be A. | 48 | 7 6 [OP_MUL] 6 [OP_ADD] | var_a = 7
var_b = 6
var_c = var_a * var_b
var_d = 6
var_e = var_c + var_d
print(int(var_e)) |
Correspondence | 35 comes out when you multiply a certain number by 0.5, add 26.1, divide that number by 0.4, then subtract 35. Find the number including the decimal point. | 3.8 | 35 35 [OP_ADD] 0.4 [OP_MUL] 26.1 [OP_SUB] 0.5 [OP_DIV] | var_a = 35
var_b = 35
var_c = var_a + var_b
var_d = 0.4
var_e = var_c * var_d
var_f = 26.1
var_g = var_e - var_f
var_h = 0.5
var_i = var_g / var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Arithmetic calculation | When nine soccer balls and seven baseballs of the same weight were weighed, they were 10.98 kilograms (kg). If one soccer ball weighs 0.8 kilograms (kg), how many kilograms (kg) does one baseball weigh? | 0.54 | 10.98 0.8 9 [OP_MUL] [OP_SUB] 7 [OP_DIV] | var_a = 10.98
var_b = 0.8
var_c = 9
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 7
var_g = var_e / var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Comparison | Taehyung is taller than Yoojung. When Yoojung is taller than Jimin, and Taehyung is shorter than Hoseok, who is the shortest among the 4 people? | Jimin | [OP_LIST_SOL] Taehyung Yoojung Jimin Hoseok [OP_LIST_EOL] [OP_LIST_SOL] Taehyung Yoojung > Yoojung Jimin > Taehyung Hoseok < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'Taehyung'
var_b = 'Yoojung'
var_c = 'Jimin'
var_d = 'Hoseok'
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 = 'Taehyung'
var_f = 'Yoojung'
var_g = '>'
var_h = 'Yoojung'
var_i = 'Jimin'
var_j = '>'
var_k = 'Taehyung'
var_l = 'Hoseok'
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) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. What is the value of the largest number divided by the second largest number? | 1.08 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_DIV] | 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('{:.2f}'.format(round(var_j+1e-10,2))) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.