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
Find the multiples of 3 of the numbers whose hundreds are 7 and whose ones are 3. How many numbers are there?
3
[OP_LIST_SOL] 7 A 3 [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 7 var_b = 'A' var_c = 3 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="" for i in list_a: i = str(i) var_d = var_d + i ans_dict = dict() var_d = str(var_d) list_b = [] 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_d): if v in variable_candi: ans_dict[v] = 0 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_d for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) if len(var_d) == len(str(int(temp))): new_elem = int(temp) list_b.append(new_elem) 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))
Correspondence
Adding 305 to a number and then dividing it by 16 results in 31. Find the number.
191
31 16 [OP_MUL] 305 [OP_SUB]
var_a = 31 var_b = 16 var_c = var_a * var_b var_d = 305 var_e = var_c - var_d print(int(var_e))
Correspondence
When you divide a certain number by 10, you get 6. Find the result of subtracting 15 from the number.
45
6 10 [OP_MUL] 15 [OP_SUB]
var_a = 6 var_b = 10 var_c = var_a * var_b var_d = 15 var_e = var_c - var_d print(int(var_e))
Comparison
Hanbyul and Seulgi run around the park. During the same period, Hanbyul ran 1/100 of 10.2 kilometers (km), and Seulgi ran 100 meters (m). Who ran more?
Hanbyul
[OP_LIST_SOL] Hanbyul Seulgi [OP_LIST_EOL] [OP_LIST_SOL] 10.2 1000 [OP_MUL] 100 [OP_DIV] 100 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Hanbyul' var_b = 'Seulgi' 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.2 var_d = 1000 var_e = var_c * var_d var_f = 100 var_g = var_e / var_f var_h = 100 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) 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)
Geometry
There is a dice with one edge 20 centimeters (cm) long. Find the surface area of this dice.
2400
20 2 [OP_POW] 6 [OP_MUL]
var_a = 20 var_b = 2 var_c = var_a ** var_b var_d = 6 var_e = var_c * var_d print(int(var_e))
Arithmetic calculation
Among the numbers of 2.8, 2.3, 5, and 4.3, find the product of the smallest number and the largest number.
11.5
[OP_LIST_SOL] 2.8 2.3 5 4.3 [OP_LIST_EOL] 1 [OP_LIST_MIN] 1 [OP_LIST_MAX] [OP_MUL]
var_a = 2.8 var_b = 2.3 var_c = 5 var_d = 4.3 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 1 list_b=list_a.copy() list_b.sort() var_f = list_b[var_e-1] var_g = 1 list_c=list_a.copy() list_c.sort() var_h = list_c[-var_g] var_i = var_f * var_h print('{:.2f}'.format(round(var_i+1e-10,2)))
Geometry
You want to paint each face of the pentagonal prism with a different color. How many people do you need if each person paints one side?
7
2 5 [OP_ADD]
var_a = 2 var_b = 5 var_c = var_a + var_b print(int(var_c))
Correspondence
Yoongi wants to subtract 57 from a four-digit number. Yoongi has mistaken 9 for 6 in the unit place of a four-digit number. When the difference Yoongi gets is 1819, find the correct result.
1822
1819 57 [OP_ADD] 6 9 [OP_SUB] [OP_SUB] 57 [OP_SUB]
var_a = 1819 var_b = 57 var_c = var_a + var_b var_d = 6 var_e = 9 var_f = var_d - var_e var_g = var_c - var_f var_h = 57 var_i = var_g - var_h print(int(var_i))
Possibility
I'm trying to seat three second-graders and two first-graders on five chairs in a row. Find the case where two first-graders are seated consecutively.
48
[OP_LIST_SOL] A B C D E [OP_LIST_EOL] [OP_LIST_SOL] C [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_LIST_SOL] C D [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_MUL]
var_a = 'A' var_b = 'B' var_c = 'C' var_d = 'D' var_e = 'E' list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 'C' list_b= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) list_b.reverse() list_c = list(set(list_a) - set(list_b)) var_g = len(list_c) var_h = len(list_c) var_i = 1 var_g = int(var_g) var_h = int(var_h) for i, elem in enumerate(range(var_h)): var_i = var_i * (var_g-i) var_j = 'C' var_k = 'D' list_d= [] if "/" in str(var_k): var_k = eval(str(var_k)) list_d.append(var_k) if "/" in str(var_j): var_j = eval(str(var_j)) list_d.append(var_j) list_d.reverse() var_l = len(list_d) var_m = len(list_d) var_n = 1 var_l = int(var_l) var_m = int(var_m) for i, elem in enumerate(range(var_m)): var_n = var_n * (var_l-i) var_o = var_i * var_n print(int(var_o))
Possibility
Make a four-digit number by using the number cards from 0 to 9 once. Find the difference between the 2nd largest number and the 2nd smallest number.
8851
0 9 1 [OP_LIST_ARANGE] 4 [OP_LIST_GET_PERM] 2 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_SUB] [OP_ABS]
var_a = 0 var_b = 9 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 4 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 = 2 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] var_g = 2 list_d=list_b.copy() list_d.sort() var_h = list_d[var_g-1] var_i = var_f - var_h var_j = abs(var_i) print(int(var_j))
Geometry
How many faces of a regular octahedron meet at one vertex?
4
4
var_a = 4 print(int(var_a))
Geometry
If all eight sides of a figure are the same in length and the perimeter of the figure is 23.6 centimeters (cm), what is the length of one side in cm (cm)?
2.95
23.6 8 [OP_DIV]
var_a = 23.6 var_b = 8 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
You sold 1249 candies on Day 1. On Day 2, you sold 328 more candies than Day 1. On day 3, you sold 275 more candies than Day 2, leaving 367 left. How many candies were there at the beginning?
5045
367 1249 [OP_ADD] 1249 328 [OP_ADD] [OP_ADD] 1249 328 [OP_ADD] 275 [OP_ADD] [OP_ADD]
var_a = 367 var_b = 1249 var_c = var_a + var_b var_d = 1249 var_e = 328 var_f = var_d + var_e var_g = var_c + var_f var_h = 1249 var_i = 328 var_j = var_h + var_i var_k = 275 var_l = var_j + var_k var_m = var_g + var_l print(int(var_m))
Arithmetic calculation
Taehyung's uncle is 17 years older than Taehyung. Four years later, the sum of Taehyung's age and his uncle's age is 43 years old. How old is Taehyung this year?
9
43 4 2 [OP_MUL] [OP_SUB] 17 [OP_SUB] 2 [OP_DIV]
var_a = 43 var_b = 4 var_c = 2 var_d = var_b * var_c var_e = var_a - var_d var_f = 17 var_g = var_e - var_f var_h = 2 var_i = var_g / var_h print(int(var_i))
Arithmetic calculation
Heeju's school has 500 students. Among them, 289 students like ramen and 337 students like bread. If there are 56 students who do not like both ramen and bread, find how many students like both ramen and bread.
182
289 337 [OP_ADD] 500 56 [OP_SUB] [OP_SUB]
var_a = 289 var_b = 337 var_c = var_a + var_b var_d = 500 var_e = 56 var_f = var_d - var_e var_g = var_c - var_f print(int(var_g))
Arithmetic calculation
There are 19 tangerines and some persimmons in the basket. How many persimmons are there if the total number of tangerines and persimmons is 37 in the basket?
18
37 19 [OP_SUB]
var_a = 37 var_b = 19 var_c = var_a - var_b print(int(var_c))
Correspondence
Some trees lose 1 meter (m) of growth each year. If a tree's full growth is 91 meters (m), find the length the tree grew in the first year.
13
91 2 [OP_MUL] 1/2 [OP_POW] 1 [OP_FLOOR]
var_a = 91 var_b = 2 var_c = var_a * var_b var_d = 0.5 var_e = var_c ** var_d var_f = 1 var_g=int((var_e//(10**(var_f-1)))*10**(var_f-1)) print(int(var_g))
Arithmetic calculation
If you put 12 apples in a box, you get 55 boxes. If you put 15 apples in each box, how many boxes will there be?
44
12 55 [OP_MUL] 15 [OP_DIV] 1 [OP_CEIL]
var_a = 12 var_b = 55 var_c = var_a * var_b var_d = 15 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))
Geometry
How many faces are there in the pentahedron?
5
5
var_a = 5 print(int(var_a))
Arithmetic calculation
If you put 18 candies in each of the 5 boxes, there is a shortage of 3 candies. If you put the equal amount of candies into 6 boxes, what is the maximum number of candies in one box?
15
5 18 [OP_MUL] 3 [OP_ADD] 6 [OP_FDIV]
var_a = 5 var_b = 18 var_c = var_a * var_b var_d = 3 var_e = var_c + var_d var_f = 6 var_g = var_e // var_f print(int(var_g))
Correspondence
There is the expression 691-6A7=4. Find the number that goes into A
8
691-6A7=4 A [OP_DIGIT_UNK_SOLVER]
var_a = '691-6A7=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))
Arithmetic calculation
You want to cut a loaf of bread that is 150 centimeters (cm) long by 1.5 centimeters (cm). How many pieces can be cut?
100
150 1.5 [OP_DIV]
var_a = 150 var_b = 1.5 var_c = var_a / var_b print(int(var_c))
Possibility
There is a calculator that only works with four buttons: 2, 3, 7, and 9. When making a four-digit number on the calculator by pressing the button without duplication, find the second largest number that can be made.
9723
[OP_LIST_SOL] 2 3 7 9 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 2 [OP_LIST_MAX]
var_a = 2 var_b = 3 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 = 4 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 2 list_c=list_b.copy() list_c.sort() var_g = list_c[-var_f] print(int(var_g))
Comparison
There are five numbers 1.4, 9/10, 1.1, 0.5, and 13/10. How many of these numbers are greater than 0.9?
3
[OP_LIST_SOL] 1.4 9/10 1.1 0.5 13/10 [OP_LIST_EOL] 0.9 [OP_LIST_MORE] [OP_LIST_LEN]
var_a = 1.4 var_b = 0.9 var_c = 1.1 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 = 0.9 list_b = [] for i in list_a: if i > var_f: list_b.append(i) var_g = len(list_b) print(int(var_g))
Arithmetic calculation
You want to share 1/6 of 16 kilograms (kg) peanuts with your friends. If one person eats 4/15 kilograms (kg), how many people can eat?
10
16 6 [OP_DIV] 4/15 [OP_DIV]
var_a = 16 var_b = 6 var_c = var_a / var_b var_d = 0.26666666666666666 var_e = var_c / var_d print(int(var_e))
Possibility
Each box contains 3 balls. If you have 2 boxes, what is the total number of balls?
6
3 2 [OP_MUL]
var_a = 3 var_b = 2 var_c = var_a * var_b print(int(var_c))
Geometry
How many pairs of parallel faces are there in a cube?
3
6 2 [OP_DIV]
var_a = 6 var_b = 2 var_c = var_a / var_b print(int(var_c))
Arithmetic calculation
It is said that 140 U.S. dollars can be exchanged for 158,760 Korean won. What is the exchange rate of Korean money to the United States' money?
1134
158760 140 [OP_DIV]
var_a = 158760 var_b = 140 var_c = var_a / var_b print(int(var_c))
Arithmetic calculation
3 years ago, the sum of the ages of the mother and son was 49, and this year, when the mother is 4 times the age of the son, how old is the son this year?
11
49 3 2 [OP_MUL] [OP_ADD] 1 4 [OP_ADD] [OP_DIV]
var_a = 49 var_b = 3 var_c = 2 var_d = var_b * var_c var_e = var_a + var_d var_f = 1 var_g = 4 var_h = var_f + var_g var_i = var_e / var_h print(int(var_i))
Geometry
If the length of one radius of a circle is 2, what is the length of the other radius?
2
2
var_a = 2 print(int(var_a))
Arithmetic calculation
Find the value of the smaller number when the difference between the two numbers is 28 and the larger number plus 13 is twice the smaller number plus 13.
15
13 28 13 [OP_SUB] 2 [OP_MUL] [OP_ADD] 2 1 [OP_SUB] [OP_DIV] 28 [OP_SUB]
var_a = 13 var_b = 28 var_c = 13 var_d = var_b - var_c var_e = 2 var_f = var_d * var_e var_g = var_a + var_f var_h = 2 var_i = 1 var_j = var_h - var_i var_k = var_g / var_j var_l = 28 var_m = var_k - var_l print(int(var_m))
Geometry
You have a piece of paper in the shape of a triangle with an area of 46 square centimeters (cm2). If the base is 10 centimeters (cm), what is its height in centimeters (cm)?
9.2
46 2 [OP_MUL] 10 [OP_DIV]
var_a = 46 var_b = 2 var_c = var_a * var_b var_d = 10 var_e = var_c / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Arithmetic calculation
At one Wang mathematical academy, 120 students took the A Mathematical Education Evaluation. If there were 36 more students who received certificates than those who did not receive certificates, how many students received certificates?
78
120 36 [OP_SUB] 2 [OP_DIV] 36 [OP_ADD]
var_a = 120 var_b = 36 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 36 var_g = var_e + var_f print(int(var_g))
Arithmetic calculation
You want to install flower beds at intervals of 6.4 meters (m) along the wall of a school whose length is 268.8 meters (m). How many flower beds would be needed if flower beds are also installed at the both ends of the school walls?
43
268.8 6.4 [OP_DIV] 1 [OP_ADD]
var_a = 268.8 var_b = 6.4 var_c = var_a / var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
There are 28 erasers in total. Among them, Yeonju received 1/4 of the eraser and Minji received 3/7 of them. What is the number of remaining erasers?
9
28 1 1/4 [OP_SUB] 3/7 [OP_SUB] [OP_MUL]
var_a = 28 var_b = 1 var_c = 0.25 var_d = var_b - var_c var_e = 0.42857142857142855 var_f = var_d - var_e var_g = var_a * var_f print(int(var_g))
Comparison
Kyungsoo's group of students did the long jump. When Kyungsoo jumped 2.3 meters (m), Younghee jumped 9/10 meters (m), Jinju jumped 1.8 meters (m), and Chanho jumped 2.5 meters (m), who came second?
Kyungsoo
[OP_LIST_SOL] Kyungsoo Younghee Jinju Chanho [OP_LIST_EOL] [OP_LIST_SOL] 2.3 9/10 1.8 2.5 [OP_LIST_EOL] 2 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Kyungsoo' var_b = 'Younghee' var_c = 'Jinju' var_d = 'Chanho' 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.3 var_f = 0.9 var_g = 1.8 var_h = 2.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_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_i = 2 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
If we divide this value by 2.5 and take away 10.5 and then multiply it by 0.3, we get 5.85. What is this number?
75
5.85 0.3 [OP_DIV] 10.5 [OP_ADD] 2.5 [OP_MUL]
var_a = 5.85 var_b = 0.3 var_c = var_a / var_b var_d = 10.5 var_e = var_c + var_d var_f = 2.5 var_g = var_e * var_f print(int(var_g))
Correspondence
What single digit number must be placed in A to make the equation 61A+B3=645?
2
61A+B3=645 A [OP_DIGIT_UNK_SOLVER]
var_a = '61A+B3=645' 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))
Geometry
There is a parallelogram that has a base of 3.6 and a height of 2.5 times the base. Find the area of this parallelogram.
32.4
3.6 3.6 2.5 [OP_MUL] [OP_MUL]
var_a = 3.6 var_b = 3.6 var_c = 2.5 var_d = var_b * var_c var_e = var_a * var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Possibility
You want to create a two-digit number by drawing two different numbers from 7, 4, 0, 3, and 5. Find the difference between the third largest number and the third smallest number.
38
[OP_LIST_SOL] 7 4 0 3 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 3 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_SUB] [OP_ABS]
var_a = 7 var_b = 4 var_c = 0 var_d = 3 var_e = 5 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() 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 = 3 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = 3 list_d=list_b.copy() list_d.sort() var_j = list_d[var_i-1] var_k = var_h - var_j var_l = abs(var_k) print(int(var_l))
Comparison
There are 108 marbles of red marbles, blue marbles and white marbles. The number of blue marbles is 1/3 of the red marbles and the number of white marbles is 1/2 of the blue marbles. Which color has the least number of marbles?
white
[OP_LIST_SOL] red blue white [OP_LIST_EOL] [OP_LIST_SOL] 1 1/3 1/3 1/2 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'red' var_b = 'blue' var_c = 'white' 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 var_e = 0.3333333333333333 var_f = 0.3333333333333333 var_g = 0.5 var_h = var_f * var_g list_b= [] if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_b.append(var_d) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[var_i-1] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Geometry
A rectangle 6 centimetres (cm) wide, 5 centimetres (cm) long and 4 centimetres (cm) high has been painted green on all sides. This rectangle is cut into 120 cubes, each 1 centimetre (cm) long. How many of the cubes have no coloured faces?
24
6 2 [OP_SUB] 5 2 [OP_SUB] [OP_MUL] 4 2 [OP_SUB] [OP_MUL]
var_a = 6 var_b = 2 var_c = var_a - var_b var_d = 5 var_e = 2 var_f = var_d - var_e var_g = var_c * var_f var_h = 4 var_i = 2 var_j = var_h - var_i var_k = var_g * var_j print(int(var_k))
Geometry
How many meters (m) is the width of Jeong Su's field if it is a rectangle with an area of 143.2 square meters (m2) and the length of this field is 4 meters (m)?
35.8
143.2 4 [OP_DIV]
var_a = 143.2 var_b = 4 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Correspondence
A number multiplied by 8. 64 was added to the multiplied result. If the result of the calculation is 336, what is the number?
34
336 64 [OP_SUB] 8 [OP_DIV]
var_a = 336 var_b = 64 var_c = var_a - var_b var_d = 8 var_e = var_c / var_d print(int(var_e))
Comparison
There are three numbers A, B and C. A is 38 greater than 18. B is 26 less than A. C is the quotient of B divided by 3. Which number is the smallest?
C
[OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] 18 38 [OP_ADD] 18 38 [OP_ADD] 26 [OP_SUB] 18 38 [OP_ADD] 26 [OP_SUB] 3 [OP_DIV] [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 = 18 var_e = 38 var_f = var_d + var_e var_g = 18 var_h = 38 var_i = var_g + var_h var_j = 26 var_k = var_i - var_j var_l = 18 var_m = 38 var_n = var_l + var_m var_o = 26 var_p = var_n - var_o var_q = 3 var_r = var_p / var_q list_b= [] if "/" in str(var_r): var_r = eval(str(var_r)) list_b.append(var_r) 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_s = 1 list_c=list_b.copy() list_c.sort() var_t = list_c[var_s-1] var_u = list_b.index(var_t)+1 var_v = list_a[var_u-1] print(var_v)
Geometry
If the coin's radius is 7 centimeters (cm), how many centimeters (cm) is the coin's diameter?
14
7 2 [OP_MUL]
var_a = 7 var_b = 2 var_c = var_a * var_b print(int(var_c))
Geometry
He painted all the faces of a cube with an edge of 3 cm (cm) red. Then he cut this cube into 27 small cubes, each 1 cm (cm) long. How many of the small cubes have 3 faces painted red?
8
8
var_a = 8 print(int(var_a))
Possibility
Seokjin, Taehyung, Namjoon, Yoojeong, and Yuna are standing in line to checkout. At this time, how many ways are there to line up so that the order of payment differs?
120
[OP_LIST_SOL] Seokjin Taehyung Namjoon Yoojeong Yuna [OP_LIST_EOL] [OP_LIST_LEN] 5 [OP_PERM]
var_a = 'Seokjin' var_b = 'Taehyung' var_c = 'Namjoon' var_d = 'Yoojeong' var_e = 'Yuna' 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 = len(list_a) var_g = 5 var_h = 1 var_f = int(var_f) var_g = int(var_g) for i, elem in enumerate(range(var_g)): var_h = var_h * (var_f-i) print(int(var_h))
Comparison
Horses, cows, pigs, sheep, rabbits, and squirrels entered the pen in this order. Which animal took 4th place?
sheep
[OP_LIST_SOL] Horses cows pigs sheep rabbits squirrels [OP_LIST_EOL] 4 [OP_LIST_GET]
var_a = 'Horses' var_b = 'cows' var_c = 'pigs' var_d = 'sheep' var_e = 'rabbits' var_f = 'squirrels' 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 = 4 var_h = list_a[var_g-1] print(var_h)
Possibility
How many two-digit numbers can be made using two of the number cards 1, 2, and 7?
6
[OP_LIST_SOL] 1 2 7 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 1 var_b = 2 var_c = 7 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = len(list_b) print(int(var_e))
Geometry
In one exhibition hall, there was not enough space to hang the work, so we decided to install a temporary wall. If the width of this wall is 5.4 meters (m) and the length is 2.5 meters (m), how many square meters (m2) will the area be?
13.5
5.4 2.5 [OP_MUL]
var_a = 5.4 var_b = 2.5 var_c = var_a * var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Comparison
There is a box A that is 3 centimeters (cm) high and box B with 3.5 centimeters (cm) high. Taehyung stacked the boxes A and Yoongi stacked the boxes B. If Taehyung and Yoongi each stacked the boxes up to 16th and 14th floors, respectively, find out who stacked the boxes higher.
Yoongi
[OP_LIST_SOL] Taehyung Yoongi [OP_LIST_EOL] [OP_LIST_SOL] 3 16 [OP_MUL] 3.5 14 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Taehyung' var_b = 'Yoongi' 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 = 16 var_e = var_c * var_d var_f = 3.5 var_g = 14 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
Yoongi is going to multiply a number by 7. But when he accidentally added 9, the result was 30. Find the correct calculation result.
147
30 9 [OP_SUB] 7 [OP_MUL]
var_a = 30 var_b = 9 var_c = var_a - var_b var_d = 7 var_e = var_c * var_d print(int(var_e))
Correspondence
It took Minsu 10 days to complete 2/9 of the job. Find how many days it will take to complete 2/5 of the work.
18
10 2/9 [OP_DIV] 2/5 [OP_MUL]
var_a = 10 var_b = 0.2222222222222222 var_c = var_a / var_b var_d = 0.4 var_e = var_c * var_d print(int(var_e))
Possibility
You want to create a two-digit number by drawing two different numbers from 7, 4, 0, 3, and 5. Find the product of the third largest number and the third smallest number.
2555
[OP_LIST_SOL] 7 4 0 3 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 3 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_MUL]
var_a = 7 var_b = 4 var_c = 0 var_d = 3 var_e = 5 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() 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 = 3 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = 3 list_d=list_b.copy() list_d.sort() var_j = list_d[var_i-1] var_k = var_h * var_j print(int(var_k))
Correspondence
A number multiplied by 6 and divided by 1.5 equals 3.8. Find a number.
0.95
3.8 1.5 [OP_MUL] 6 [OP_DIV]
var_a = 3.8 var_b = 1.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
The seven digits 0, 1, 2, 3, 4, 5, and 6 are used once to form a seven-digit number. If this number is a multiple of 55, find the third smallest of this number.
1062435
[OP_LIST_SOL] 0 1 2 3 4 5 6 [OP_LIST_EOL] 7 [OP_LIST_GET_PERM] 55 [OP_LIST_DIVISIBLE] 3 [OP_LIST_MIN]
var_a = 0 var_b = 1 var_c = 2 var_d = 3 var_e = 4 var_f = 5 var_g = 6 list_a= [] if "/" in str(var_g): var_g = eval(str(var_g)) list_a.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_h = 7 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_h)) 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_i = 55 list_c = [] var_i = int(var_i) for i in list_b: i = int(i) if i % var_i == 0: list_c.append(i) var_j = 3 list_d=list_c.copy() list_d.sort() var_k = list_d[var_j-1] print(int(var_k))
Geometry
What is the length of the radius of the circumcircle of a right triangle with sides 10 centimeters (cm), 8 centimeters (cm), and 6 centimeters (cm), respectively?
5
10 2 [OP_DIV]
var_a = 10 var_b = 2 var_c = var_a / var_b print(int(var_c))
Arithmetic calculation
As Yoojung gave 7 candies to her older sister and 6 to her younger sister, there were 15 left on hand. Find number of candies Yoojung had at first.
28
15 6 [OP_ADD] 7 [OP_ADD]
var_a = 15 var_b = 6 var_c = var_a + var_b var_d = 7 var_e = var_c + var_d print(int(var_e))
Comparison
A pumpkin weighs 2 kilograms (kg) and 9/10 kilograms (kg), and a watermelon weighs 41/10 kilograms (kg). Which is heavier, pumpkin or watermelon?
watermelon
[OP_LIST_SOL] pumpkin watermelon [OP_LIST_EOL] [OP_LIST_SOL] 2 9 10 [OP_DIV] [OP_ADD] 41 10 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'pumpkin' var_b = 'watermelon' 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 = 9 var_e = 10 var_f = var_d / var_e var_g = var_c + var_f var_h = 41 var_i = 10 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
Sangheon is 1.56 meters (m) tall. Chiho is 0.14 meters (m) shorter than Sangheon, and Nara is 0.27 meters (m) taller than Chiho. How tall is Nara in meters (m)?
1.69
1.56 0.14 [OP_SUB] 0.27 [OP_ADD]
var_a = 1.56 var_b = 0.14 var_c = var_a - var_b var_d = 0.27 var_e = var_c + var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Correspondence
Subtract 29 from this number and add 64 to get 76. Find the 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))
Comparison
Jungkook collected 6 plus 3 points, Yoongi collected 4 points, and Yuna collected 5 points. Who has the smallest number?
Yoongi
[OP_LIST_SOL] Jungkook Yoongi Yuna [OP_LIST_EOL] [OP_LIST_SOL] 6 3 [OP_ADD] 4 5 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jungkook' var_b = 'Yoongi' 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 = 6 var_e = 3 var_f = var_d + var_e var_g = 4 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_f): var_f = eval(str(var_f)) list_b.append(var_f) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[var_i-1] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Correspondence
A and B are different single-digit numbers. Find the value of A+B that correspond to the following multiplication equation AB×6=BBB.
11
AB×6=BBB A [OP_DIGIT_UNK_SOLVER] AB×6=BBB B [OP_DIGIT_UNK_SOLVER] [OP_ADD]
var_a = 'AB×6=BBB' 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] var_d = 'AB×6=BBB' var_e = 'B' ans_dict = dict() var_d = var_d.replace('×','*') var_d = var_d.replace('x','*') var_d = var_d.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_d): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_d 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_d): 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_f = ans_dict[var_e] var_g = var_c + var_f print(int(var_g))
Geometry
There is a farm in the shape of a rectangle with a length of 3.6 kilometers (km) and a width 2.5 times its length. If half of this farm is for cattle and half is for pigs, find the area of the cattle area in square kilometers (km2).
16.2
3.6 3.6 2.5 [OP_MUL] [OP_MUL] 2 [OP_DIV]
var_a = 3.6 var_b = 3.6 var_c = 2.5 var_d = var_b * var_c var_e = var_a * var_d var_f = 2 var_g = var_e / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Comparison
Minhyun drank 0.41 times more milk than 6 liters (L) and Jinyoung drank 2.3 liters (L). Who has drunk more milk?
Minhyun
[OP_LIST_SOL] Minhyun Jinyoung [OP_LIST_EOL] [OP_LIST_SOL] 6 0.41 [OP_MUL] 2.3 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Minhyun' var_b = 'Jinyoung' 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 = 6 var_d = 0.41 var_e = var_c * var_d var_f = 2.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)
Arithmetic calculation
1250 people participated in a marathon. If there were 124 more people who gave up during running than finished people, how many people finished?
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))
Arithmetic calculation
There are 6 students playing (a) sports, and the number of students playing (b) sports is 4 times the number of students playing (a) sports. How many students do (b) sports?
24
6 4 [OP_MUL]
var_a = 6 var_b = 4 var_c = var_a * var_b print(int(var_c))
Arithmetic calculation
Among the numbers from 1 to 15, only odd numbers were selected and arranged in ascending order from left to right. Find the sum of the second number from the right and the second number from the left.
16
1 15 [OP_LIST_ODD] 2 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_ADD]
var_a = 1 var_b = 15 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 = 2 list_b=list_a.copy() list_b.sort() var_d = list_b[-var_c] var_e = 2 list_c=list_a.copy() list_c.sort() var_f = list_c[var_e-1] var_g = var_d + var_f print(int(var_g))
Geometry
There is a pyramid whose base side is a dodecagon. How many faces does this pyramid have?
13
12 1 [OP_ADD]
var_a = 12 var_b = 1 var_c = var_a + var_b print(int(var_c))
Comparison
There are 16 of Hoseok and his friends. How many friends are to Hoseok's left when there are 8 friends to Hoseok's right?
7
16 8 [OP_SUB] 1 [OP_SUB]
var_a = 16 var_b = 8 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
What is the largest three-digit number that is a multiple of 4 and a multiple of 5?
980
100 999 1 [OP_LIST_ARANGE] 4 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX]
var_a = 100 var_b = 999 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 4 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = 5 list_c = [] var_e = int(var_e) for i in list_b: i = int(i) if i % var_e == 0: list_c.append(i) var_f = 1 list_d=list_c.copy() list_d.sort() var_g = list_d[-var_f] print(int(var_g))
Arithmetic calculation
Five watermelons that weigh 1050 grams (g) each were placed on one side of a pan balance scale. Two of nine apples of equal weight, each weighing 4.5 kilograms (kg), were placed on the opposite side of that scale. How many more melons weighing 850 grams (g) each must be placed on the side of the apples to level the scale?
5
1050 5 [OP_MUL] 4.5 1000 [OP_MUL] 9 [OP_DIV] 2 [OP_MUL] [OP_SUB] 850 [OP_DIV]
var_a = 1050 var_b = 5 var_c = var_a * var_b var_d = 4.5 var_e = 1000 var_f = var_d * var_e var_g = 9 var_h = var_f / var_g var_i = 2 var_j = var_h * var_i var_k = var_c - var_j var_l = 850 var_m = var_k / var_l print(int(var_m))
Comparison
Minyoung crossed the finish line in 33rd place in the running race, and Eunji crossed the finish line before Minyoung while there are 11 people between them. What is Eunji's rank?
21
33 11 [OP_SUB] 1 [OP_SUB]
var_a = 33 var_b = 11 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Possibility
When choosing three numbers from 0, 2, 4, and 6 to make a three-digit number, find the sum of all the possible three-digit numbers.
7728
[OP_LIST_SOL] 0 2 4 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] [OP_LIST_SUM]
var_a = 0 var_b = 2 var_c = 4 var_d = 6 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] list_b = [float(i) for i in list_b] var_f = sum(list_b) print(int(var_f))
Arithmetic calculation
There are 1 to 25 buildings in Jungkook's apartment complex, and each building has up to 10 floors. If there are 8 households on each floor, how many households can live in Jungkook's apartment complex?
2000
25 10 [OP_MUL] 8 [OP_MUL]
var_a = 25 var_b = 10 var_c = var_a * var_b var_d = 8 var_e = var_c * var_d print(int(var_e))
Arithmetic calculation
Find the smallest number of natural numbers in excess of 12.
13
12 1 [OP_ADD] 999 1 [OP_LIST_ARANGE] 1 [OP_LIST_MIN]
var_a = 12 var_b = 1 var_c = var_a + var_b var_d = 999 var_e = 1 list_a = [i for i in range(var_c, var_d + 1, var_e)] var_f = 1 list_b=list_a.copy() list_b.sort() var_g = list_b[var_f-1] print(int(var_g))
Arithmetic calculation
Minjeong's family drinks 0.2 liters (L) of juices three times every day. How many liters (L) of juice does Minjeong's family drink in a week?
4.2
0.2 3 [OP_MUL] 7 [OP_MUL]
var_a = 0.2 var_b = 3 var_c = var_a * var_b var_d = 7 var_e = var_c * var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Comparison
32 students of different heights are lined up in order from tallest to shortest. Jimin stands 27th from the front, and Yuna stands 11th from the front. How many students are standing between Jimin and Yuna?
15
27 11 [OP_SUB] 1 [OP_SUB]
var_a = 27 var_b = 11 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Comparison
There are four numbers: 0.8, 1/2, 0.9, 1/3. What is the sum of numbers less than 3?
2.53
[OP_LIST_SOL] 0.8 1/2 0.9 1/3 [OP_LIST_EOL] 3 [OP_LIST_LESS] [OP_LIST_SUM]
var_a = 0.8 var_b = 0.5 var_c = 0.9 var_d = 0.3333333333333333 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 3 list_b = [] for i in list_a: if i < var_e: list_b.append(i) list_b = [float(i) for i in list_b] var_f = sum(list_b) print('{:.2f}'.format(round(var_f+1e-10,2)))
Arithmetic calculation
Express the decimal value when 22 is divided by 8 without remainder.
2.75
22 8 [OP_DIV]
var_a = 22 var_b = 8 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
When 21 is divided by A, the quotient becomes B and the remainder 5. A and B are natural numbers. What is the smallest number out of all possible Bs?
1
1
var_a = 1 print(int(var_a))
Possibility
The supermarket sells carrots, pears, and cucumbers, but Youngbin only has enough money to buy two kinds. How many cases can Youngbin buy?
3
[OP_LIST_SOL] carrots cucumbers pears [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB]
var_a = 'carrots' var_b = 'cucumbers' 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 = 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))
Possibility
Using all single-digit whole numbers greater than 6 once, find the sum of the largest three-digit number and the third largest three-digit number.
1884
6 1 [OP_ADD] 9 1 [OP_LIST_ARANGE] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 3 [OP_LIST_MAX] [OP_ADD]
var_a = 6 var_b = 1 var_c = var_a + var_b var_d = 9 var_e = 1 list_a = [i for i in range(var_c, var_d + 1, var_e)] var_f = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_f)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = 3 list_d=list_b.copy() list_d.sort() var_j = list_d[-var_i] var_k = var_h + var_j print(int(var_k))
Arithmetic calculation
Yeonjeong and Donghun rode bicycles on a lake with a circumference of 3 kilometers (km) and started at the same time in opposite directions from the same place. Yeonjeong rides at a speed of 100 meters (m) per minute, and Donghun rides a bicycle at a speed of 150 meters (m) per minute. Find how many minutes later the two meet again for the first time.
12
3 100 1000 [OP_DIV] 150 1000 [OP_DIV] [OP_ADD] [OP_DIV]
var_a = 3 var_b = 100 var_c = 1000 var_d = var_b / var_c var_e = 150 var_f = 1000 var_g = var_e / var_f var_h = var_d + var_g var_i = var_a / var_h print(int(var_i))
Correspondence
123 is the result of adding 84 by mistake instead of 48 to a number. Find the number.
39
123 84 [OP_SUB]
var_a = 123 var_b = 84 var_c = var_a - var_b print(int(var_c))
Arithmetic calculation
There are 2 straps of different lengths. The sum of the lengths of the two straps is 64 centimeters (cm), and the longer strap is 48 centimeters (cm) longer than the shorter strap. Find how many pieces of strap that equal the length of the shorter strap can be cut from the longer strap.
7
64 48 [OP_SUB] 2 [OP_DIV] 48 [OP_ADD] 64 48 [OP_SUB] 2 [OP_DIV] [OP_DIV]
var_a = 64 var_b = 48 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 48 var_g = var_e + var_f var_h = 64 var_i = 48 var_j = var_h - var_i var_k = 2 var_l = var_j / var_k var_m = var_g / var_l print(int(var_m))
Comparison
To fill the fishbowl with water, you need to pour water 7 times with the A bowl, 8 times with the B bowl, and 5 times with the C bowl. Which bowl has the largest capacity?
C
[OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] 1 7 [OP_DIV] 1 8 [OP_DIV] 1 5 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [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 = 1 var_e = 7 var_f = var_d / var_e var_g = 1 var_h = 8 var_i = var_g / var_h var_j = 1 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_i): var_i = eval(str(var_i)) list_b.append(var_i) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) 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)
Correspondence
A number divided by 9 is 8. Yoongi added 11 to the number. How much is this value?
83
8 9 [OP_MUL] 11 [OP_ADD]
var_a = 8 var_b = 9 var_c = var_a * var_b var_d = 11 var_e = var_c + var_d print(int(var_e))
Possibility
Find the difference between the largest and smallest three-digit numbers that can be formed by using the three number cards 6, 3, and 8 only once.
495
[OP_LIST_SOL] 6 3 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB]
var_a = 6 var_b = 3 var_c = 8 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] var_g = 1 list_d=list_b.copy() list_d.sort() var_h = list_d[var_g-1] var_i = var_f - var_h print(int(var_i))
Arithmetic calculation
What is the sum of the two numbers 1/6 and 5/12?
0.58
1/6 5/12 [OP_ADD]
var_a = 0.16666666666666666 var_b = 0.4166666666666667 var_c = var_a + var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
The sum of 25 consecutive even numbers is 750. Write the smallest even number among these.
6
750 25 [OP_DIV] 25 2 [OP_FDIV] 2 [OP_MUL] [OP_SUB]
var_a = 750 var_b = 25 var_c = var_a / var_b var_d = 25 var_e = 2 var_f = var_d // var_e var_g = 2 var_h = var_f * var_g var_i = var_c - var_h print(int(var_i))
Correspondence
Subtracting 16 from a certain number is divisible by 37, and the quotient is 23. Find what the number is that.
867
23 37 [OP_MUL] 16 [OP_ADD]
var_a = 23 var_b = 37 var_c = var_a * var_b var_d = 16 var_e = var_c + var_d print(int(var_e))
Correspondence
Jimin wanted to subtract by a number from 34 but instead added the number to 20 to get 60. Find the correctly calculated value.
-6
34 60 20 [OP_SUB] [OP_SUB]
var_a = 34 var_b = 60 var_c = 20 var_d = var_b - var_c var_e = var_a - var_d print(int(var_e))
Geometry
A cube has a volume of 2744 cubic centimeters (cm3). If you divide the area of the base of this cube by the height, what is the quotient?
14
2744 1/3 [OP_POW]
var_a = 2744 var_b = 0.3333333333333333 var_c = var_a ** var_b print(int(eval('{:.2f}'.format(round(var_c+1e-10,2)))))
Arithmetic calculation
Find the sum of even numbers from 1 to 100.
2550
1 100 [OP_LIST_EVEN] [OP_LIST_SUM]
var_a = 1 var_b = 100 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))
Possibility
Sunwoo is playing a game of making the smallest number using all the number cards he has. If Sunwoo has cards with 2 and 4 written on them, what number should he make?
24
[OP_LIST_SOL] 2 4 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MIN]
var_a = 2 var_b = 4 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 = len(list_a) list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_c)) 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_d = 1 list_c=list_b.copy() list_c.sort() var_e = list_c[var_d-1] print(int(var_e))
Possibility
You want to choose 15 out of 4 types of fruits. Calculate the total number of choices of fruit, if you choose two or more of each fruit.
120
4 15 [OP_ADD] 4 2 [OP_MUL] [OP_SUB] 1 [OP_SUB] 15 4 2 [OP_MUL] [OP_SUB] [OP_COMB]
var_a = 4 var_b = 15 var_c = var_a + var_b var_d = 4 var_e = 2 var_f = var_d * var_e var_g = var_c - var_f var_h = 1 var_i = var_g - var_h var_j = 15 var_k = 4 var_l = 2 var_m = var_k * var_l var_n = var_j - var_m var_o = 1 var_i = int(var_i) var_n = int(var_n) for i, elem in enumerate(range(var_n)): var_o = var_o * (var_i-i) for i, elem in enumerate(range(var_n)): var_o = var_o / (i+1) print(int(var_o))
Arithmetic calculation
There are 24 students. Among them, 50 sheets of colored paper were equally distributed to female students only, and 2 sheets were left. If the number of boys is twice the number of girls, how many pieces of colored paper will each girl receive?
6
50 2 [OP_SUB] 24 2 1 [OP_ADD] [OP_FDIV] [OP_FDIV]
var_a = 50 var_b = 2 var_c = var_a - var_b var_d = 24 var_e = 2 var_f = 1 var_g = var_e + var_f var_h = var_d // var_g var_i = var_c // var_h print(int(var_i))
Correspondence
Multiply a number by 2.5 then subtract 2.49 to get 22.01. Divide the number by 2.5, add 2.49, multiply by 2.3, and add 22.01 to get the result.
36.75
22.01 2.49 [OP_ADD] 2.5 [OP_DIV] 2.5 [OP_DIV] 2.49 [OP_ADD] 2.3 [OP_MUL] 22.01 [OP_ADD]
var_a = 22.01 var_b = 2.49 var_c = var_a + var_b var_d = 2.5 var_e = var_c / var_d var_f = 2.5 var_g = var_e / var_f var_h = 2.49 var_i = var_g + var_h var_j = 2.3 var_k = var_i * var_j var_l = 22.01 var_m = var_k + var_l print('{:.2f}'.format(round(var_m+1e-10,2)))