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 were 23 candies. Yuna ate a few of them, and there were 7 left. How many candies did Yuna eat? | 16 | 23 7 [OP_SUB] | var_a = 23
var_b = 7
var_c = var_a - var_b
print(int(var_c)) |
Arithmetic calculation | You are going to make candy necklaces for 134 first-year students who entered Suyeong's school this year. Each candy necklace costs 7 candies. How many bags of 28 candies per bag should I buy at least? | 34 | 134 7 [OP_MUL] 28 [OP_DIV] 1 [OP_CEIL] | var_a = 134
var_b = 7
var_c = var_a * var_b
var_d = 28
var_e = var_c / var_d
var_f = 1
var_g=int(((var_e+9*10**(var_f-2))//(10**(var_f-1)))*10**(var_f-1))
print(int(var_g)) |
Possibility | How many red balls are there when 4 yellow balls are placed inside a box containing 3 red balls, 2 blue balls, and 5 yellow balls? | 3 | 3 | var_a = 3
print(int(var_a)) |
Possibility | You want to divide 40 pencils equally into several bins. How many ways are there to divide the pencils? (However, there are more than one barrel.) | 7 | 40 [OP_LIST_GET_DIVISOR] [OP_LIST_SOL] 1 [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_LEN] | var_a = 40
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 = 1
list_b= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_b.append(var_b)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_c = len(list_c)
print(int(var_c)) |
Correspondence | A is a number which consists of 20 groups of 100 and 87 groups of 10. B is a number which is counted by jumping 3 times, increasing from 278 to 365. Find the value of A+B. | 4243 | 100 20 [OP_MUL] 10 87 [OP_MUL] [OP_ADD] 278 365 3 [OP_MUL] [OP_ADD] [OP_ADD] | var_a = 100
var_b = 20
var_c = var_a * var_b
var_d = 10
var_e = 87
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 278
var_i = 365
var_j = 3
var_k = var_i * var_j
var_l = var_h + var_k
var_m = var_g + var_l
print(int(var_m)) |
Comparison | Minyoung has 13 bread and Eunji has 21. Who has more bread? | Eunji | [OP_LIST_SOL] Minyoung Eunji [OP_LIST_EOL] [OP_LIST_SOL] 13 21 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Minyoung'
var_b = 'Eunji'
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 = 13
var_d = 21
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 | You are going to cut a rectangular paper that is 54 centimeters (cm) long and 20 centimeters (cm) wide to make three equal-sized squares. How many centimeters (cm) must each side be to make the largest square? | 18 | [OP_LIST_SOL] 54 3 [OP_FDIV] 20 3 [OP_FDIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] | var_a = 54
var_b = 3
var_c = var_a // var_b
var_d = 20
var_e = 3
var_f = var_d // var_e
list_a= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
list_a.reverse()
var_g = 1
list_b=list_a.copy()
list_b.sort()
var_h = list_b[-var_g]
print(int(var_h)) |
Correspondence | When you divide a number by 11, the result is 2. What is a number multiplied by 6? | 132 | 2 11 [OP_MUL] 6 [OP_MUL] | var_a = 2
var_b = 11
var_c = var_a * var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | It is said that when steaming dumplings, they are steamed by placing them in a checkerboard arrangement, 3 horizontally and 3 vertically, on a plate. How many plates are needed to steam 18 dumplings? | 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 | You want to multiply a number by 12. If the answer when mistakenly dividing this number by 14 is 42, what is the correct result? | 7056 | 42 14 [OP_MUL] 12 [OP_MUL] | var_a = 42
var_b = 14
var_c = var_a * var_b
var_d = 12
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | There are 5 snails and 2 frogs in the pond. How many snails and frogs are in the pond? | 7 | 5 2 [OP_ADD] | var_a = 5
var_b = 2
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | Red bags contain 10 marbles, and blue bags contain 50 marbles, and yellow bags contain 100 marbles, and there are total 12 bags. If the total number of marbles is 500 and the number of red and blue bags is the same, how many yellow bags are there? | 2 | 12 500 100 12 [OP_MUL] [OP_SUB] 10 50 [OP_ADD] 100 2 [OP_MUL] [OP_SUB] [OP_DIV] 2 [OP_MUL] [OP_SUB] | var_a = 12
var_b = 500
var_c = 100
var_d = 12
var_e = var_c * var_d
var_f = var_b - var_e
var_g = 10
var_h = 50
var_i = var_g + var_h
var_j = 100
var_k = 2
var_l = var_j * var_k
var_m = var_i - var_l
var_n = var_f / var_m
var_o = 2
var_p = var_n * var_o
var_q = var_a - var_p
print(int(var_q)) |
Correspondence | 172 pencils were to be distributed to students, but the pencils that should have been distributed equally to 4 classes were distributed equally to more classes by mistake, resulting in 28 fewer pencils per class than the amount originally planned to be given. If the pencils are distributed equally and 7 pencils are remaining, find out how many classes the pencils are divided into. | 11 | 172 7 [OP_SUB] 172 4 [OP_DIV] 28 [OP_SUB] [OP_DIV] | var_a = 172
var_b = 7
var_c = var_a - var_b
var_d = 172
var_e = 4
var_f = var_d / var_e
var_g = 28
var_h = var_f - var_g
var_i = var_c / var_h
print(int(var_i)) |
Geometry | There are 4 points on a line and 1 point not on a line. Find the number of straight lines that can be made by joining any two of these points. | 5 | 4 1 [OP_ADD] | var_a = 4
var_b = 1
var_c = var_a + var_b
print(int(var_c)) |
Comparison | Yujeong arranged colored balls in a row on the desk. If she puts red, blue, yellow, purple, and white balls in order, what color is the first ball? | red | [OP_LIST_SOL] red blue yellow purple white [OP_LIST_EOL] 1 [OP_LIST_GET] | var_a = 'red'
var_b = 'blue'
var_c = 'yellow'
var_d = 'purple'
var_e = 'white'
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
var_g = list_a[var_f-1]
print(var_g) |
Geometry | In art class, Junseo made a rhombus with an area of 80 square centimeters (cm2) with colored paper. If the length of one diagonal of the rhombus created by Junseo is 16 centimeters (cm), how many centimeters (cm) is the length of the other diagonal? | 10 | 80 2 [OP_MUL] 16 [OP_DIV] | var_a = 80
var_b = 2
var_c = var_a * var_b
var_d = 16
var_e = var_c / var_d
print(int(var_e)) |
Correspondence | I divided some pieces of colored paper equally among 6 people, and each person got 7 pieces, leaving 3 pieces. How many sheets of colored paper were there at first? | 45 | 7 6 [OP_MUL] 3 [OP_ADD] | var_a = 7
var_b = 6
var_c = var_a * var_b
var_d = 3
var_e = var_c + var_d
print(int(var_e)) |
Possibility | Seven classes are going to play soccer. If every class plays every other class once, find the total number of matches. | 21 | 7 7 1 [OP_SUB] [OP_MUL] 2 [OP_DIV] | var_a = 7
var_b = 7
var_c = 1
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g)) |
Arithmetic calculation | Eunji bought a notebook with half of her pocket money she received from her uncle yesterday. Today, she received 550 won from her mother, so the total is 1,000 won. How much money did she get from your uncle? | 900 | 1000 550 [OP_SUB] 2 [OP_MUL] | var_a = 1000
var_b = 550
var_c = var_a - var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | A school has 124 more boys than girls. If the total number of students in the school is 1250, how many girls are there? | 563 | 1250 124 [OP_SUB] 2 [OP_DIV] | var_a = 1250
var_b = 124
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Geometry | There is a rectangle with an area of 108 square centimeters (cm2) and a small rectangle with a width ratio of 8:7 and a height ratio of 9:4. Find the area of the small rectangle. | 42 | 108 8 [OP_DIV] 7 [OP_MUL] 9 [OP_DIV] 4 [OP_MUL] | var_a = 108
var_b = 8
var_c = var_a / var_b
var_d = 7
var_e = var_c * var_d
var_f = 9
var_g = var_e / var_f
var_h = 4
var_i = var_g * var_h
print(int(var_i)) |
Geometry | There are one square and one rectangle with the same area. A side of a square is 5 centimeters (cm), and a side of a rectangle is 4 centimeters (cm). Find the length of the other side of the rectangle. | 6.25 | 5 2 [OP_POW] 4 [OP_DIV] | var_a = 5
var_b = 2
var_c = var_a ** var_b
var_d = 4
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | If you buy 350 won milk and 500 won water and give 1000 won, how much change do you have to get? | 150 | 1000 350 [OP_SUB] 500 [OP_SUB] | var_a = 1000
var_b = 350
var_c = var_a - var_b
var_d = 500
var_e = var_c - var_d
print(int(var_e)) |
Geometry | If there is a box in the shape of a regular dodecahedron, how many sides can be counted? | 12 | 12 | var_a = 12
print(int(var_a)) |
Correspondence | There is a train from Seoul to Busan. 300 people more than two-fifths of the first boarded people got off at the first station, and 200 people less than one-half of the remaining people got off at the second station. All the rest of the people got off at Busan. If the number of people who got off at Busan is 800 in total, how many people were on board in the beginning? | 2500 | 800 200 [OP_SUB] 1 1/2 [OP_SUB] [OP_DIV] 300 [OP_ADD] 1 2/5 [OP_SUB] [OP_DIV] | var_a = 800
var_b = 200
var_c = var_a - var_b
var_d = 1
var_e = 0.5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 300
var_i = var_g + var_h
var_j = 1
var_k = 0.4
var_l = var_j - var_k
var_m = var_i / var_l
print(int(var_m)) |
Geometry | There is a prism with 21 corners. If the top of this prism overlaps exactly with the bottom when it is lowered to the floor, how many vertices does this prism have? | 14 | 21 3 [OP_DIV] 2 [OP_MUL] | var_a = 21
var_b = 3
var_c = var_a / var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Geometry | The sum of the lengths of the four sides of a parallelogram ABCD is 14 centimeters (cm). If the length of side AD is 5 centimeters (cm), how many centimeters (cm) is the length of side AB? | 2 | 14 2 [OP_DIV] 5 [OP_SUB] | var_a = 14
var_b = 2
var_c = var_a / var_b
var_d = 5
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | You want to plant street trees at intervals of 25 meters (m) on both sides of a road that is 2575 meters (m) long. How many street trees will be planted on both sides of the road? (However, trees are also planted at the beginning and end of the road.) | 208 | 2575 25 [OP_DIV] 1 [OP_ADD] 2 [OP_MUL] | var_a = 2575
var_b = 25
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 | I bought a piece of gum for 350 won and a protractor for 500 won and paid 1,000 won. How much change should I get? | 150 | 1000 350 [OP_SUB] 500 [OP_SUB] | var_a = 1000
var_b = 350
var_c = var_a - var_b
var_d = 500
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | If the sum of three consecutive even numbers is 1194, what is the largest even number? | 400 | 1194 0 3 1 [OP_SUB] 2 [OP_MUL] 2 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 3 [OP_DIV] 3 1 [OP_SUB] 2 [OP_MUL] [OP_ADD] | var_a = 1194
var_b = 0
var_c = 3
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e * var_f
var_h = 2
list_a = [i for i in range(var_b, var_g + 1, var_h)]
list_a = [float(i) for i in list_a]
var_i = sum(list_a)
var_j = var_a - var_i
var_k = 3
var_l = var_j / var_k
var_m = 3
var_n = 1
var_o = var_m - var_n
var_p = 2
var_q = var_o * var_p
var_r = var_l + var_q
print(int(var_r)) |
Possibility | How many multiples of 9 are there less than 80? | 8 | 1 80 1 [OP_SUB] 1 [OP_LIST_ARANGE] 9 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 1
var_b = 80
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
var_f = 9
list_b = []
var_f = int(var_f)
for i in list_a:
i = int(i)
if i % var_f == 0:
list_b.append(i)
var_g = len(list_b)
print(int(var_g)) |
Correspondence | There are four different numbers A, B, C, and D. Find A from the four-digit and three-digit subtraction equation AB82-9C9=493D. | 5 | AB82-9C9=493D A [OP_DIGIT_UNK_SOLVER] | var_a = 'AB82-9C9=493D'
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)) |
Comparison | Yoojung placed balls of various colors in a row on the desk. If she put the ball in an order of red, blue, yellow, purple, and white, what color is the first ball? | red | [OP_LIST_SOL] red blue yellow purple white [OP_LIST_EOL] 1 [OP_LIST_GET] | var_a = 'red'
var_b = 'blue'
var_c = 'yellow'
var_d = 'purple'
var_e = 'white'
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
var_g = list_a[var_f-1]
print(var_g) |
Comparison | There are 10 boxes of 50 purple marbles each weighing 3 grams (g). There are 9 boxes of 60 pink marbles each weighing 2.5 grams (g). Which color marble weighs more when the total marbles of each color were weighed? | purple | [OP_LIST_SOL] purple pink [OP_LIST_EOL] [OP_LIST_SOL] 3 50 10 [OP_MUL] [OP_MUL] 2.5 60 9 [OP_MUL] [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'purple'
var_b = 'pink'
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 = 3
var_d = 50
var_e = 10
var_f = var_d * var_e
var_g = var_c * var_f
var_h = 2.5
var_i = 60
var_j = 9
var_k = var_i * var_j
var_l = var_h * 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) |
Comparison | At the supermarket, Jimin, Jungkook, and Taehyung lined up one after another. When Jimin is the second one, what number is Taehyung? | 4 | 2 [OP_LIST_SOL] Jimin Jungkook Taehyung [OP_LIST_EOL] Taehyung [OP_LIST_INDEX] Jimin [OP_LIST_INDEX] [OP_SUB] [OP_ADD] | var_a = 2
var_b = 'Jimin'
var_c = 'Jungkook'
var_d = 'Taehyung'
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)
list_a.reverse()
var_e = 'Taehyung'
var_f = list_a.index(var_e)+1
var_g = 'Jimin'
var_h = list_a.index(var_g)+1
var_i = var_f - var_h
var_j = var_a + var_i
print(int(var_j)) |
Arithmetic calculation | There are 8 candies in basket (A) and 17 candies in basket (B). Find how many more candies must be placed in basket (A) to make the number of candies in both baskets equal. | 9 | 17 8 [OP_SUB] | var_a = 17
var_b = 8
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | 22 is the result from a certain number minus 48. What is 32 less than the 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)) |
Comparison | Among 5, 8, 9, and 7, which is the largest number? | 9 | [OP_LIST_SOL] 5 8 9 7 [OP_LIST_EOL] 1 [OP_LIST_MAX] | var_a = 5
var_b = 8
var_c = 9
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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
print(int(var_f)) |
Possibility | Yoongi's school is preparing for a school performance. How many possible cases are there when there are 8 classes to set the order of the school play? | 40320 | 8 8 [OP_PERM] | var_a = 8
var_b = 8
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
print(int(var_c)) |
Arithmetic calculation | At a large market, in the morning, I sold 3/5 of the snacks that were displayed at dawn. In the afternoon, 180 snacks in total were sold, including those left from the morning and newly displayed snacks. If the number of snacks sold in the morning and the snack sold in the afternoon was the same, how many snacks were displayed at dawn? | 300 | 180 3/5 [OP_DIV] | var_a = 180
var_b = 0.6
var_c = var_a / var_b
print(int(var_c)) |
Correspondence | When 170 is divided by a number, the remainder is 8. When 120 is divided by the number, the remainder is 12. When 268 is added by 2, it is divisible by the number. Among the numbers that are possible, find the largest value. | 54 | 170 8 [OP_SUB] 268 2 [OP_ADD] [OP_GCD] 120 12 [OP_SUB] [OP_GCD] | var_a = 170
var_b = 8
var_c = var_a - var_b
var_d = 268
var_e = 2
var_f = var_d + var_e
var_g = math.gcd(int(var_f), int(var_c))
var_h = 120
var_i = 12
var_j = var_h - var_i
var_k = math.gcd(int(var_j), int(var_g))
print(int(var_k)) |
Geometry | You are trying to make a cube by cutting a cuboid. If the width of the cube is 12 centimeters (cm), the length is 16 centimeters (cm), and the height is 14 centimeters (cm), what is the value of the surface area of the largest cube? | 864 | [OP_LIST_SOL] 12 16 14 [OP_LIST_EOL] 1 [OP_LIST_MIN] 2 [OP_POW] 6 [OP_MUL] | var_a = 12
var_b = 16
var_c = 14
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 = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
var_f = 2
var_g = var_e ** var_f
var_h = 6
var_i = var_g * var_h
print(int(var_i)) |
Arithmetic calculation | There are four numbers 10, 11, 12, and 13. What is the sum of the largest number and the next largest number? | 25 | [OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_ADD] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
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 = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = var_f + var_h
print(int(var_i)) |
Arithmetic calculation | A flower shop sold 3/5 of the flowers brought at dawn in the morning. In the afternoon, they sold all 180 flowers, including the remaining flowers after the morning and the newly brought flowers. If the number of flowers sold in the morning and the number of flowers sold in the afternoon were the same, how many flowers did they bring at dawn? | 300 | 180 3/5 [OP_DIV] | var_a = 180
var_b = 0.6
var_c = var_a / var_b
print(int(var_c)) |
Geometry | What is the sum of all the sides of a regular pentagon with a side of 15 centimeters (cm) in centimeters (cm)? | 75 | 15 5 [OP_MUL] | var_a = 15
var_b = 5
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | When Geongrin measured a span of his hand, it was 12 centimeters (cm) long. Gyeongrin measured the length of the long side of the notebook, and it was twice as long as the span. Approximately, how long is the long side of the notebook in centimeters (cm)? | 24 | 12 2 [OP_MUL] | var_a = 12
var_b = 2
var_c = var_a * var_b
print(int(var_c)) |
Geometry | A trapezoid has an area of 100.62 square centimeters (cm2), a height of 5.2 centimeters (cm), and the top side is 3.4 centimeters (cm) longer than the bottom side. How many centimeters (cm) is the length of the lower side? | 17.65 | 100.62 2 [OP_MUL] 5.2 [OP_DIV] 3.4 [OP_SUB] 2 [OP_DIV] | var_a = 100.62
var_b = 2
var_c = var_a * var_b
var_d = 5.2
var_e = var_c / var_d
var_f = 3.4
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Comparison | When Eunji's classmates stand in 3 lines with the same number of students in each line, Eunji stands at the 3rd from the front and the 6th from the back. Find the total number of students in Eunji's class. | 24 | 3 6 [OP_ADD] 1 [OP_SUB] 3 [OP_MUL] | var_a = 3
var_b = 6
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 3
var_g = var_e * var_f
print(int(var_g)) |
Geometry | How many diagonals are there in the rectangle? | 2 | 4 4 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] | var_a = 4
var_b = 4
var_c = 3
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g)) |
Arithmetic calculation | Gyuri takes 5 days to do 1/3 of a job, and Seungyeon takes 2 days to do 1/5 of the same job. If Gyuri and Seungyeon work together, how many days will it take to finish the job? | 6 | 1 1/3 5 [OP_DIV] 1/5 2 [OP_DIV] [OP_ADD] [OP_DIV] | var_a = 1
var_b = 0.3333333333333333
var_c = 5
var_d = var_b / var_c
var_e = 0.2
var_f = 2
var_g = var_e / var_f
var_h = var_d + var_g
var_i = var_a / var_h
print(int(eval('{:.2f}'.format(round(var_i+1e-10,2))))) |
Arithmetic calculation | There are 3/8 and 0.125. What is the difference between the two numbers? | 0.25 | 3/8 0.125 [OP_SUB] [OP_ABS] | var_a = 0.375
var_b = 0.125
var_c = var_a - var_b
var_d = abs(var_c)
print('{:.2f}'.format(round(var_d+1e-10,2))) |
Arithmetic calculation | Taehyung and Namjoon bought 10 pencils each. Taehyung used some of the pencils and gave 3 of the remaining pencils to Namjoon, and Namjoon also used a few, too. Than the two of them had 6 pencils each. Find how many pencils Namjoon used. | 7 | 10 6 3 [OP_SUB] [OP_SUB] | var_a = 10
var_b = 6
var_c = 3
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e)) |
Correspondence | Find A that satisfies the following condition: When 17 is divided by 6, the quotient is 2 and the remainder is A. | 5 | 17 6 2 [OP_MUL] [OP_SUB] | var_a = 17
var_b = 6
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e)) |
Correspondence | There is a two digit number. This number is divisible by 6 and 9, and when divided by 7, the remainder is 1. Find this two digit number. | 36 | 10 100 1 [OP_LIST_ARANGE] 6 9 [OP_LCM] 0 [OP_LIST_DIVIDE_AND_REMAIN] 7 1 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET] | var_a = 10
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
var_e = 9
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
var_g = 0
list_b = []
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
var_g = var_g + var_f
for i in list_a:
i = int(i)
if i%var_f == var_g:
list_b.append(i)
var_h = 7
var_i = 1
list_c = []
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
var_i = var_i + var_h
for i in list_b:
i = int(i)
if i%var_h == var_i:
list_c.append(i)
var_j = 1
var_k = list_c[var_j-1]
print(int(var_k)) |
Arithmetic calculation | A fairy tale book was placed on one side of the two-arm scale, and a 0.5 kilograms (kg) weight and two 0.3 kilograms (kg) weights were placed on the other side, and it was level. How many kilograms (kg) does one children's book weigh? | 1.1 | 0.5 0.3 2 [OP_MUL] [OP_ADD] | var_a = 0.5
var_b = 0.3
var_c = 2
var_d = var_b * var_c
var_e = var_a + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Comparison | Jina and Jeongyeol are singers. Jina sang for 140 hours in one week, and Jeongyeol sang for 48 hours in two days. Who sang more in one day? | Jeongyeol | [OP_LIST_SOL] Jina Jeongyeol [OP_LIST_EOL] [OP_LIST_SOL] 140 1 7 [OP_MUL] [OP_DIV] 48 2 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jina'
var_b = 'Jeongyeol'
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 = 140
var_d = 1
var_e = 7
var_f = var_d * var_e
var_g = var_c / var_f
var_h = 48
var_i = 2
var_j = var_h / var_i
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Arithmetic calculation | Among the people in Jimin's class who like Korean, 32 people also like math. There are 38 students who like Korean and 39 students who like math, and all students say they like at least one of the two. How many students are there in Jimin's class? | 45 | 38 39 [OP_ADD] 32 [OP_SUB] | var_a = 38
var_b = 39
var_c = var_a + var_b
var_d = 32
var_e = var_c - var_d
print(int(var_e)) |
Comparison | A is 32 plus 7, B is 3 groups of 10 each plus 3 individual pieces, and C is 50 minus 9. Which of the three numbers A, B, and C is the smallest? | B | [OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] 32 7 [OP_ADD] 3 10 [OP_MUL] 3 [OP_ADD] 50 9 [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
var_c = 'C'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 32
var_e = 7
var_f = var_d + var_e
var_g = 3
var_h = 10
var_i = var_g * var_h
var_j = 3
var_k = var_i + var_j
var_l = 50
var_m = 9
var_n = var_l - var_m
list_b= []
if "/" in str(var_n):
var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_o = 1
list_c=list_b.copy()
list_c.sort()
var_p = list_c[var_o-1]
var_q = list_b.index(var_p)+1
var_r = list_a[var_q-1]
print(var_r) |
Arithmetic calculation | Adding 8 consecutive even numbers gives 424. Find the last number out of 8 even numbers. | 60 | 424 0 8 1 [OP_SUB] 2 [OP_MUL] 2 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 8 [OP_DIV] 8 1 [OP_SUB] 2 [OP_MUL] [OP_ADD] | var_a = 424
var_b = 0
var_c = 8
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e * var_f
var_h = 2
list_a = [i for i in range(var_b, var_g + 1, var_h)]
list_a = [float(i) for i in list_a]
var_i = sum(list_a)
var_j = var_a - var_i
var_k = 8
var_l = var_j / var_k
var_m = 8
var_n = 1
var_o = var_m - var_n
var_p = 2
var_q = var_o * var_p
var_r = var_l + var_q
print(int(var_r)) |
Correspondence | A number is the product of 5 and 7. What is the numbber added by 12 added by 8? | 55 | 5 7 [OP_MUL] 12 [OP_ADD] 8 [OP_ADD] | var_a = 5
var_b = 7
var_c = var_a * var_b
var_d = 12
var_e = var_c + var_d
var_f = 8
var_g = var_e + var_f
print(int(var_g)) |
Correspondence | There are some decimals up to 2 places after the decimal point. Rounding this number to 2 decimal places gives 1.7. Find the largest of these decimals minus the smallest, including the decimal point. | 0.09 | 1.74 1.65 [OP_SUB] | var_a = 1.74
var_b = 1.65
var_c = var_a - var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | When 6AB3 is rounded to the thousandth, it. is 6000. Find the sum of the possible values of A. | 10 | 6AB3 [OP_GEN_POSSIBLE_LIST] 6000 500 [OP_SUB] [OP_LIST_MORE_EQUAL] 6000 500 [OP_ADD] [OP_LIST_LESS] 6AB3 A [OP_LIST_FIND_UNK] [OP_LIST_SUM] | var_a = '6AB3'
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 = 6000
var_c = 500
var_d = var_b - var_c
list_b = []
for i in list_a:
if i >= var_d:
list_b.append(i)
var_e = 6000
var_f = 500
var_g = var_e + var_f
list_c = []
for i in list_b:
if i < var_g:
list_c.append(i)
var_h = '6AB3'
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))
list_d = [float(i) for i in list_d]
var_j = sum(list_d)
print(int(var_j)) |
Geometry | There are 2 number cards. One has 15 written on it, and the other has the value of number on the first card multiplied by 0.9. Find the area of the rectangle whose length and width are the same numbers on these two cards. | 202.5 | 15 15 0.9 [OP_MUL] [OP_MUL] | var_a = 15
var_b = 15
var_c = 0.9
var_d = var_b * var_c
var_e = var_a * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | Eunbi, Jaeyeon, and Jooeun each have their own water bottles with water in them. The sum of the water in the three friends' water bottles is 1 liter (L) and 200 milliliters (㎖). If Jooeun gave Jaeyeon 200 milliliters (ml) of water and Eunbi 100 milliliters (ml) of water, and the three friends have the same amount of water now, find the amount of water that Eunbi's water bottle initially contained. | 300 | 1 1000 [OP_MUL] 200 [OP_ADD] 200 [OP_SUB] 100 [OP_SUB] 3 [OP_DIV] | var_a = 1
var_b = 1000
var_c = var_a * var_b
var_d = 200
var_e = var_c + var_d
var_f = 200
var_g = var_e - var_f
var_h = 100
var_i = var_g - var_h
var_j = 3
var_k = var_i / var_j
print(int(var_k)) |
Geometry | What is the sum of the number of all the faces of a pentahedron? | 5 | 5 | var_a = 5
print(int(var_a)) |
Comparison | Yoongi collected 4, and Jungkook collected 6 divided by 3, and Yuna collected 5. Who collected the biggest number? | Yuna | [OP_LIST_SOL] Yoongi Jungkook Yuna [OP_LIST_EOL] [OP_LIST_SOL] 4 6 3 [OP_FDIV] 5 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoongi'
var_b = 'Jungkook'
var_c = 'Yuna'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 4
var_e = 6
var_f = 3
var_g = var_e // var_f
var_h = 5
list_b= []
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_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Arithmetic calculation | The heights of the 10 students in Eunji's class are 145 centimeters (cm), 142 centimeters (cm), 138 centimeters (cm), 136 centimeters (cm), 143 centimeters (cm), 146 centimeters (cm), 138 centimeters (cm), 144 centimeters (cm), 137 centimeters (cm), 141 centimeters (cm). What is the average height of these 10 students in centimeters (cm)? | 141 | [OP_LIST_SOL] 145 142 138 136 143 146 138 144 137 141 [OP_LIST_EOL] [OP_LIST_MEAN] | var_a = 145
var_b = 142
var_c = 138
var_d = 136
var_e = 143
var_f = 146
var_g = 138
var_h = 144
var_i = 137
var_j = 141
list_a= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_a.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_a.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_a.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_a.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
list_a = [float(i) for i in list_a]
var_k = sum(list_a)/len(list_a)
print(int(var_k)) |
Correspondence | When we divide a number by 1.33, we get 48. Write what is the number we divided. | 63.84 | 48 1.33 [OP_MUL] | var_a = 48
var_b = 1.33
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Geometry | If the number of triangles that can be formed by drawing a line from one vertex to another inside a polygon is at most 20, find the number of diagonals of this polygon. | 170 | 20 20 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] | var_a = 20
var_b = 20
var_c = 3
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g)) |
Correspondence | I subtracted 29 from a particular number and added 64 and got 76 as a result. Find that particular number. | 41 | 76 64 [OP_SUB] 29 [OP_ADD] | var_a = 76
var_b = 64
var_c = var_a - var_b
var_d = 29
var_e = var_c + var_d
print(int(var_e)) |
Geometry | There is a certain regular octahedron with a side length of 2 centimeters (cm). What is the surface area of this regular octahedron in square centimeters (cm2)? | 13.86 | 3 1/2 [OP_POW] 2 [OP_DIV] 2 [OP_MUL] 2 [OP_MUL] 2 [OP_DIV] 8 [OP_MUL] | var_a = 3
var_b = 0.5
var_c = var_a ** var_b
var_d = 2
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 = 2
var_k = var_i / var_j
var_l = 8
var_m = var_k * var_l
print('{:.2f}'.format(round(var_m+1e-10,2))) |
Geometry | There is a rectangular-shaped post-it note with a length of 9.4 centimeters (cm) and a width of 3.7 centimeters (cm). There is an adhesive on the upper part of the back of the post-it note that allows it to be attached and detached, and this part is 0.6 centimeters (cm) long. What is the area of 15 post-it notes connected vertically so that only the adhesive part touches the other post-it notes? | 490.62 | 9.4 15 [OP_MUL] 15 1 [OP_SUB] 0.6 [OP_MUL] [OP_SUB] 3.7 [OP_MUL] | var_a = 9.4
var_b = 15
var_c = var_a * var_b
var_d = 15
var_e = 1
var_f = var_d - var_e
var_g = 0.6
var_h = var_f * var_g
var_i = var_c - var_h
var_j = 3.7
var_k = var_i * var_j
print('{:.2f}'.format(round(var_k+1e-10,2))) |
Arithmetic calculation | There are some 6th graders who participated in the basketball game, and the number is 6 times bigger than the number of 5th graders in the game. If there were 12 of 5th graders, what would be a total number of 5th and 6th grade students playing in the basketball game? | 84 | 12 12 6 [OP_MUL] [OP_ADD] | var_a = 12
var_b = 12
var_c = 6
var_d = var_b * var_c
var_e = var_a + var_d
print(int(var_e)) |
Correspondence | A number multiplied by 15 equals 45. Hoseok wants to subtract the number by 1. What is the result Hoseok will get? | 2 | 45 15 [OP_DIV] 1 [OP_SUB] | var_a = 45
var_b = 15
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Comparison | There are 3/8 liters (L) of Milk, 7/10 liters (L) of Cider, and 11/15 liters (L) of Orange-Juice in the refrigerator. Find the one with the largest amount among the three. | Orange-Juice | [OP_LIST_SOL] Milk Cider Orange-Juice [OP_LIST_EOL] [OP_LIST_SOL] 3/8 7/10 11/15 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Milk'
var_b = 'Cider'
var_c = 'Orange-Juice'
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.375
var_e = 0.7
var_f = 0.7333333333333333
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 7/10, 3/2, 1.8, 3/5, and 1.1. If you pick numbers greater than 1 from these, how many are there? | 3 | [OP_LIST_SOL] 7/10 3/2 1.8 3/5 1.1 [OP_LIST_EOL] 1 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 0.7
var_b = 1.5
var_c = 1.8
var_d = 0.6
var_e = 1.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 = 1
list_b = []
for i in list_a:
if i > var_f:
list_b.append(i)
var_g = len(list_b)
print(int(var_g)) |
Comparison | Choose the second largest number among 5, 8, 4, 3, and 7. | 7 | [OP_LIST_SOL] 5 8 4 3 7 [OP_LIST_EOL] 2 [OP_LIST_MAX] | var_a = 5
var_b = 8
var_c = 4
var_d = 3
var_e = 7
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 2
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
print(int(var_g)) |
Correspondence | There is a piece of paper in the shape of a square of 69.7 square centimeters (cm2). Find the area of one small square obtained by dividing the length and width into 8 equal parts. | 1.09 | 69.76 8 [OP_DIV] 8 [OP_DIV] | var_a = 69.76
var_b = 8
var_c = var_a / var_b
var_d = 8
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | The average score of 20 successful candidates for a certain national examination is 42 points, and the average score of 20 candidates who did not pass the examination is 38 points. What is the average of all test takers? | 40 | 20 42 [OP_MUL] 20 38 [OP_MUL] [OP_ADD] 20 20 [OP_ADD] [OP_DIV] | var_a = 20
var_b = 42
var_c = var_a * var_b
var_d = 20
var_e = 38
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 20
var_i = 20
var_j = var_h + var_i
var_k = var_g / var_j
print(int(var_k)) |
Comparison | In the prize draw at the mart, Namjoon won 2nd place and Yoongi won 4th place. Hoseok is higher than Yoongi, but lower than Namjoon. What is the rank of Hoseok? | 3 | 2 4 [OP_ADD] 2 [OP_FDIV] | var_a = 2
var_b = 4
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e)) |
Geometry | If the diagonal of square is 12 centimeters (cm), what is the area of this square? | 72 | 12 2 [OP_POW] 2 [OP_DIV] | var_a = 12
var_b = 2
var_c = var_a ** var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | Jiyoon is practicing mental arithmetic. She must say the sum of all the numbers that her friend called earlier. Her friend called 36, 17, 32, 54, 28, 3. What value should Jiyoon say? | 170 | [OP_LIST_SOL] 36 17 32 54 28 3 [OP_LIST_EOL] [OP_LIST_SUM] | var_a = 36
var_b = 17
var_c = 32
var_d = 54
var_e = 28
var_f = 3
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()
list_a = [float(i) for i in list_a]
var_g = sum(list_a)
print(int(var_g)) |
Comparison | Yesterday, Wonhee slept 10 and 9/10 hours, and Dongil slept 102/10 hours. Find out who slept longer. | Wonhee | [OP_LIST_SOL] Wonhee Dongil [OP_LIST_EOL] [OP_LIST_SOL] 10 9/10 [OP_ADD] 102/10 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Wonhee'
var_b = 'Dongil'
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 = 10
var_d = 0.9
var_e = var_c + var_d
var_f = 10.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)
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) |
Correspondence | When I cut 7 centimeters (cm) of wire into each piece, it became 12 pieces, leaving 4 centimeters (cm). If you cut this wire by 3 centimeters (cm), how many pieces will there be, leaving 1 centimeter (cm)? | 29 | 7 12 [OP_MUL] 4 [OP_ADD] 3 [OP_FDIV] | var_a = 7
var_b = 12
var_c = var_a * var_b
var_d = 4
var_e = var_c + var_d
var_f = 3
var_g = var_e // var_f
print(int(var_g)) |
Correspondence | If you divide 18 by 3 and divide it by 3 again, what is the result? | 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)) |
Arithmetic calculation | A 50.5 centimeters (cm) long color tape was made by overlapping and attaching three 18 centimeters (cm) color tapes. How many centimeters (cm) did you overlap and attach each? | 1.75 | 18 3 [OP_MUL] 50.5 [OP_SUB] 3 1 [OP_SUB] [OP_DIV] | var_a = 18
var_b = 3
var_c = var_a * var_b
var_d = 50.5
var_e = var_c - var_d
var_f = 3
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Geometry | A trapezoid with an upper side 3.6 centimeters (cm) longer than a lower side and with a height of 5.2 centimeters (cm) has an area of 96.9 square cm (cm2). How many centimeters (cm) is the lower side? | 16.85 | 96.98 2 [OP_MUL] 5.2 [OP_DIV] 3.6 [OP_SUB] 2 [OP_DIV] | var_a = 96.98
var_b = 2
var_c = var_a * var_b
var_d = 5.2
var_e = var_c / var_d
var_f = 3.6
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Arithmetic calculation | There are 240 candies of strawberry and grape flavors in total. If the number of grape-flavored candies is 2 less than the number of strawberry-flavored candies, how many strawberry-flavored candies are there? | 121 | 240 2 [OP_SUB] 2 [OP_DIV] 2 [OP_ADD] | var_a = 240
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 2
var_g = var_e + var_f
print(int(var_g)) |
Arithmetic calculation | Find how many times 4 appears when you list two-digit numbers that are even. | 14 | 11 99 [OP_LIST_EVEN] [OP_LIST2NUM] [OP_NUM2LIST] 4 [OP_LIST_FIND_NUM] | var_a = 11
var_b = 99
list_a = []
if var_a%2!=0:
for i in range(var_a+1, var_b+1, 2):
list_a.append(i)
else:
for i in range(var_a, var_b+1, 2):
list_a.append(i)
var_c=""
for i in list_a:
i = str(i)
var_c = var_c + i
list_b = []
var_c = int(var_c)
while var_c//10 > 0:
list_b.append(var_c%10)
var_c = var_c//10
list_b.append(var_c%10)
list_b = list_b[::-1]
var_d = 4
var_e = 0
var_d = int(var_d)
for i in list_b:
i = int(i)
if i == var_d:
var_e = var_e + 1
print(int(var_e)) |
Comparison | From 1.4, 9/10, 1.2, 0.5 and 13/10, pick numbers greater than 1.1 and calculate their sum. What is the sum? | 3.9 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE] [OP_LIST_SUM] | var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 1.1
list_b = []
for i in list_a:
if i > var_f:
list_b.append(i)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Comparison | We are comparing the heights of 4 students. If Yuna is taller than Yoongi, Yoongi is taller than Yoojung, and Yoojung is taller than Jimin, who is the shortest student? | Jimin | [OP_LIST_SOL] Yuna Yoongi Yoojung Jimin [OP_LIST_EOL] [OP_LIST_SOL] Yuna Yoongi > Yoongi Yoojung > Yoojung Jimin > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'Yuna'
var_b = 'Yoongi'
var_c = 'Yoojung'
var_d = 'Jimin'
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 = 'Yuna'
var_f = 'Yoongi'
var_g = '>'
var_h = 'Yoongi'
var_i = 'Yoojung'
var_j = '>'
var_k = 'Yoojung'
var_l = 'Jimin'
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 40 students in Hoseok's class. Hoseok, Jimin, and Yoongi's English test scores are 95, 82, and 88, respectively. Excluding these three students, the average score of students in English is 70. What is the average English score for Hoseok's class? | 71.38 | 40 3 [OP_SUB] 70 [OP_MUL] 95 [OP_ADD] 82 [OP_ADD] 88 [OP_ADD] 40 [OP_DIV] | var_a = 40
var_b = 3
var_c = var_a - var_b
var_d = 70
var_e = var_c * var_d
var_f = 95
var_g = var_e + var_f
var_h = 82
var_i = var_g + var_h
var_j = 88
var_k = var_i + var_j
var_l = 40
var_m = var_k / var_l
print('{:.2f}'.format(round(var_m+1e-10,2))) |
Arithmetic calculation | Jungkook has 5 red balls, 4 blue balls, and 3 yellow balls. When Jungkook gives Yoongi 1 blue ball, how many red balls does Jungkook have? | 5 | 5 | var_a = 5
print(int(var_a)) |
Comparison | Sueun's jump rope is 1.704 meters (m) long and Yeonwoo's jump rope is 1.74 meters (m) long. Whose jump rope is longer? | Yeonwoo | [OP_LIST_SOL] Sueun Yeonwoo [OP_LIST_EOL] [OP_LIST_SOL] 1.704 1.74 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Sueun'
var_b = 'Yeonwoo'
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.704
var_d = 1.74
list_b= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Arithmetic calculation | You are going to hand out notebooks to a few students. If each student is given 4 books, 3 books are left, and if 5 books are distributed, then 6 books are in short. Find the number of students. | 9 | 3 6 [OP_ADD] 5 4 [OP_SUB] [OP_DIV] | var_a = 3
var_b = 6
var_c = var_a + var_b
var_d = 5
var_e = 4
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g)) |
Correspondence | The equation 691-A87=4 holds. What number should be in A? | 6 | 691-A87=4 A [OP_DIGIT_UNK_SOLVER] | var_a = '691-A87=4'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Correspondence | Add 40 to a number multiplied by 5 to get 555. What is the result of multiplying a number by 7 and subtracting 55? | 442 | 555 5 [OP_DIV] 40 [OP_SUB] 7 [OP_MUL] 55 [OP_SUB] | var_a = 555
var_b = 5
var_c = var_a / var_b
var_d = 40
var_e = var_c - var_d
var_f = 7
var_g = var_e * var_f
var_h = 55
var_i = var_g - var_h
print(int(var_i)) |
Correspondence | Given two natural numbers A and B, if B is A multiplied by 9 and plus 13, what is the remainder when B is divided by 9? | 4 | 13 9 [OP_SUB] | var_a = 13
var_b = 9
var_c = var_a - var_b
print(int(var_c)) |
Comparison | 20 students are waiting for the bus. If Jungkook came right after Yoongi, and there are 11 people who came after Jungkook, how many people came before Yoongi? | 7 | 20 11 [OP_SUB] 1 [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
var_f = 1
var_g = var_e - var_f
print(int(var_g)) |
Geometry | You multiplied the length of a radius of a 30 square centimeters (cm2) circle by a factor of 5. What will be the area of that newly formed circle? | 750 | 30 5 5 [OP_MUL] [OP_MUL] | var_a = 30
var_b = 5
var_c = 5
var_d = var_b * var_c
var_e = var_a * var_d
print(int(var_e)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.