category
stringclasses
5 values
question
stringlengths
20
555
answer
stringlengths
1
20
solution_abst
stringlengths
1
287
solution_code
stringlengths
27
5.97k
Possibility
A circle, triangle, and square are drawn without overlapping one by one. If each shape is only colored with one color, how many different ways can you color these three shapes with different colors using five colored pencils?
60
5 [OP_LIST_SOL] circle triangle square [OP_LIST_EOL] [OP_LIST_LEN] [OP_PERM]
var_a = 5 var_b = 'circle' var_c = 'triangle' var_d = 'square' 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 = len(list_a) var_f = 1 var_a = int(var_a) var_e = int(var_e) for i, elem in enumerate(range(var_e)): var_f = var_f * (var_a-i) print(int(var_f))
Possibility
How many different three-digit numbers can be formed using the three numbers 1, 2, and 7 only once?
6
[OP_LIST_SOL] 1 2 7 [OP_LIST_EOL] 3 [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 = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = len(list_b) print(int(var_e))
Comparison
How many of the five numbers 1.4, 9/10, 1.2, 0.5, and 13/10 are less than or equal to 1.1?
2
[OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN]
var_a = 1.4 var_b = 0.9 var_c = 1.2 var_d = 0.5 var_e = 1.3 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 1.1 list_b = [] for i in list_a: if i <= var_f: list_b.append(i) var_g = len(list_b) print(int(var_g))
Arithmetic calculation
You want to install 18 street lights equally on both sides of a straight road with a length of 16.4 meters (m). If street lights are installed at the beginning and end of the road, how many meters (m) should the distance between the street lights be?
2.05
16.4 18 2 [OP_DIV] 1 [OP_SUB] [OP_DIV]
var_a = 16.4 var_b = 18 var_c = 2 var_d = var_b / var_c var_e = 1 var_f = var_d - var_e var_g = var_a / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Geometry
A circle with a diameter of 100 centimeters (cm) and a circumference of 314 centimeters (cm) is drawn on the playing field. How many times bigger is the circumference compared to its diameter?
3.14
314 100 [OP_DIV]
var_a = 314 var_b = 100 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
When A is divided by 6, the quotient is 3 and the remainder is B. A and B are both natural numbers. What is the largest number of possible Bs?
5
6 1 [OP_SUB]
var_a = 6 var_b = 1 var_c = var_a - var_b print(int(var_c))
Geometry
Minah has a square blackboard with one side of 8 centimeters (cm), and Songa has a rectangular blackboard with one side of 10 centimeters (cm) and the other of 5 centimeters (cm). Find the difference between the areas of the two boards.
14
8 2 [OP_POW] 10 5 [OP_MUL] [OP_SUB] [OP_ABS]
var_a = 8 var_b = 2 var_c = var_a ** var_b var_d = 10 var_e = 5 var_f = var_d * var_e var_g = var_c - var_f var_h = abs(var_g) print(int(var_h))
Arithmetic calculation
One loaf of bread is made with 6.64 grams (g) of flour. How many loaves can you make if you bought 212.48 grams (g) of flour?
32
212.48 6.64 [OP_FDIV]
var_a = 212.48 var_b = 6.64 var_c = var_a // var_b print(int(var_c))
Correspondence
When A3+61B=695 is valid, where A3 and 61B are each two-digit and three-digit numbers. Find A.
8
A3+61B=695 A [OP_DIGIT_UNK_SOLVER]
var_a = 'A3+61B=695' 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
300 is a multiple of 25. There are some numbers that are natural numbers greater than 300. When some numbers are divided by 25, the remainder is 24. Find the smallest of some numbers.
324
300 24 [OP_ADD]
var_a = 300 var_b = 24 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
If a pencil at a store costs 20 won more than 5,000 won, find the price of the pencil in units of 10,000 won.
0.5
5000 20 [OP_ADD] 10000 [OP_DIV]
var_a = 5000 var_b = 20 var_c = var_a + var_b var_d = 10000 var_e = var_c / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Possibility
Three of the numbers 3, 5, and 9 were drawn and used only once to create the largest three-digit number. Find the number that is 27 less than the three digit number you created.
926
[OP_LIST_SOL] 3 5 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 27 [OP_SUB]
var_a = 3 var_b = 5 var_c = 9 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 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 = 27 var_h = var_f - var_g print(int(var_h))
Possibility
There are natural numbers from 1 to 9. Two of them were drawn at the same time. When two numbers are added, how many cases are there that it is less than 9?
12
1 9 1 [OP_LIST_ARANGE] 2 [OP_LIST_GET_PERM] [OP_LIST_NUM2SUM] 9 [OP_LIST_LESS] [OP_LIST_LEN] 2 [OP_DIV]
var_a = 1 var_b = 9 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 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] list_c=[] for i in list_b: var_e = 0 i = int(i) while i//10 > 0: var_e = var_e + i%10 i = i//10 var_e = var_e + i%10 list_c.append(var_e) var_f = 9 list_d = [] for i in list_c: if i < var_f: list_d.append(i) var_g = len(list_d) var_h = 2 var_i = var_g / var_h print(int(var_i))
Arithmetic calculation
There are four numbers 10, 11, 12, and 13. What is the difference between the largest number and the next largest number after that?
1
[OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_SUB]
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))
Geometry
Using yarn of 35 centimeters (cm) long, you created the largest square shape with a side length of a natural number. How many centimeters (cm) is the length of left yarn after making the square?
3
35 4 [OP_MOD]
var_a = 35 var_b = 4 var_c = var_a % var_b print(int(var_c))
Arithmetic calculation
The bottle was full of orange juice. Homin drank 2/5 of the juice from the bottle yesterday and weighed the bottle and it was 144 grams (g). If Homin drank 2/3 of the remaining juice today and weighed the bottle again, it was 96 grams (g), how many grams (g) would it be if he only weighed the bottle after emptying all the orange juice?
72
144 144 96 [OP_SUB] 1 2/5 [OP_SUB] [OP_DIV] 2/3 [OP_DIV] 1 2/5 [OP_SUB] [OP_MUL] [OP_SUB]
var_a = 144 var_b = 144 var_c = 96 var_d = var_b - var_c var_e = 1 var_f = 0.4 var_g = var_e - var_f var_h = var_d / var_g var_i = 0.6666666666666666 var_j = var_h / var_i var_k = 1 var_l = 0.4 var_m = var_k - var_l var_n = var_j * var_m var_o = var_a - var_n print(int(var_o))
Arithmetic calculation
Hanyoung is 4 kg (kg) lighter than Joohyung. Find the weight of Hanyoung when the sum of Hanyoung's weight and Joohyung's weight is 88 kg (kg).
42
88 4 [OP_SUB] 2 [OP_DIV]
var_a = 88 var_b = 4 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Arithmetic calculation
There are three numbers 10, 11 and 12. What is the quotient of the third largest number divided by the second largest number?
0
[OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 3 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_FDIV]
var_a = 10 var_b = 11 var_c = 12 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 3 list_b=list_a.copy() list_b.sort() var_e = list_b[-var_d] var_f = 2 list_c=list_a.copy() list_c.sort() var_g = list_c[-var_f] var_h = var_e // var_g print(int(var_h))
Correspondence
Yoongi wanted to subtract a three-digit number from a two-digit number. Yoongi saw the number in the wrong way the ones digit of two-digit units as 6, which is 9, and the three-digit number as 353 by changing the hundredth and ones digits. When Yoongi got the difference of 297, find the two-digit number.
59
353 297 [OP_SUB] 6 9 [OP_SUB] [OP_SUB]
var_a = 353 var_b = 297 var_c = var_a - var_b var_d = 6 var_e = 9 var_f = var_d - var_e var_g = var_c - var_f print(int(var_g))
Comparison
Dongguk drinks water 5 times a day and drinks 0.2 liters (L) each time. Yoonji drinks water 6 times a day and drinks 0.3 liters (L) each time. Heejin drinks 500 milliliters (ml) of water four times a day. Who drinks the most water per day?
Heejin
[OP_LIST_SOL] Dongguk Yoonji Heejin [OP_LIST_EOL] [OP_LIST_SOL] 5 0.2 1000 [OP_MUL] [OP_MUL] 6 0.3 1000 [OP_MUL] [OP_MUL] 4 500 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Dongguk' var_b = 'Yoonji' var_c = 'Heejin' list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 5 var_e = 0.2 var_f = 1000 var_g = var_e * var_f var_h = var_d * var_g var_i = 6 var_j = 0.3 var_k = 1000 var_l = var_j * var_k var_m = var_i * var_l var_n = 4 var_o = 500 var_p = var_n * var_o list_b= [] if "/" in str(var_p): var_p = eval(str(var_p)) list_b.append(var_p) if "/" in str(var_m): var_m = eval(str(var_m)) list_b.append(var_m) if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) list_b.reverse() var_q = 1 list_c=list_b.copy() list_c.sort() var_r = list_c[-var_q] var_s = list_b.index(var_r)+1 var_t = list_a[var_s-1] print(var_t)
Possibility
In the box, there are 2 red and 3 blue drawing paper respectively. How many red drawing papers will Hoseok have if he has 2 boxes?
4
2 2 [OP_MUL]
var_a = 2 var_b = 2 var_c = var_a * var_b print(int(var_c))
Comparison
You ordered a pizza, but Shinyoung ate 1/3, Seokgi ate 1/4, and Woong ate 1/5. Who ate the most pizza?
Shinyoung
[OP_LIST_SOL] Shinyoung Seokgi Woong [OP_LIST_EOL] [OP_LIST_SOL] 1 3 [OP_DIV] 1 4 [OP_DIV] 1 5 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Shinyoung' var_b = 'Seokgi' var_c = 'Woong' list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 1 var_e = 3 var_f = var_d / var_e var_g = 1 var_h = 4 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)
Possibility
If a nine-digit number formed by using the nine digits 1 through 9 once is a multiple of 55, what is the smallest nine-digit number?
126374985
1 9 1 [OP_LIST_ARANGE] 9 [OP_LIST_GET_PERM] 55 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN]
var_a = 1 var_b = 9 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 9 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 = 55 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-1] print(int(var_g))
Geometry
A rectangular prism has a base area of 50 square centimeters (cm2) and a height of 100 centimeters (cm). When the upper part of this rectangular prism is cut to make a small rectangular prism, find how many centimeters (cm) the height of the small rectangular prism must be cut so that the volume is 2000 cubic centimeters (cm3).
40
2000 50 [OP_DIV]
var_a = 2000 var_b = 50 var_c = var_a / var_b print(int(var_c))
Arithmetic calculation
Shinhye and Jongkook solved 18 English problems each. Shinhye got 100 points by getting all the questions right, Jongkook got 8 questions of 6 points and 6 questions of 5 points correctly, and the rest of the questions were wrong, so she didn't get any points. How many points did Jongkook get?
78
6 8 [OP_MUL] 5 6 [OP_MUL] [OP_ADD]
var_a = 6 var_b = 8 var_c = var_a * var_b var_d = 5 var_e = 6 var_f = var_d * var_e var_g = var_c + var_f print(int(var_g))
Arithmetic calculation
It took 1 hour and 15 minutes to drive 100 kilometers (km) by car. What is the average distance traveled in 1 hour in kilometers (km)?
80
100 1 15 60 [OP_DIV] [OP_ADD] [OP_DIV]
var_a = 100 var_b = 1 var_c = 15 var_d = 60 var_e = var_c / var_d var_f = var_b + var_e var_g = var_a / var_f print(int(var_g))
Correspondence
You mistakenly added 63 instead of multiplying a number by 36, and got 8. What is the correct calculation result?
-1980
8 63 [OP_SUB] 36 [OP_MUL]
var_a = 8 var_b = 63 var_c = var_a - var_b var_d = 36 var_e = var_c * var_d print(int(var_e))
Correspondence
A-B-B-B=303.1. Multiplying the decimal number B by 10 equals A. get A.
433
303.1 10 3 [OP_SUB] [OP_DIV] 10 [OP_MUL]
var_a = 303.1 var_b = 10 var_c = 3 var_d = var_b - var_c var_e = var_a / var_d var_f = 10 var_g = var_e * var_f print(int(eval('{:.2f}'.format(round(var_g+1e-10,2)))))
Geometry
You want to divide a large piece of paper that is 172 centimeters (cm) wide by 295 centimeters (cm) long into squares with sides measuring 24 centimeters (cm). How many can you divide?
84
172 24 [OP_FDIV] 295 24 [OP_FDIV] [OP_MUL]
var_a = 172 var_b = 24 var_c = var_a // var_b var_d = 295 var_e = 24 var_f = var_d // var_e var_g = var_c * var_f print(int(var_g))
Possibility
There are 4 number cards 1, 2, 3, 5. Find the sum of the numbers divisible by 7 when two cards are selected and used only once to form a two-digit number.
56
[OP_LIST_SOL] 1 2 3 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 7 [OP_LIST_DIVISIBLE] [OP_LIST_SUM]
var_a = 1 var_b = 2 var_c = 3 var_d = 5 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 7 list_c = [] var_f = int(var_f) for i in list_b: i = int(i) if i % var_f == 0: list_c.append(i) list_c = [float(i) for i in list_c] var_g = sum(list_c) print(int(var_g))
Comparison
Nine people stand in a line in order from shortest to tallest. Hoseok is the 5th shortest. If you line up again in order from tallest to shortest, what number will Hoseok stand from the front?
5
9 5 [OP_SUB] 1 [OP_ADD]
var_a = 9 var_b = 5 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Correspondence
Young-gi gave Su-ji 300 won which is more than two-fifths of the money, and 200 won which is less than 1/2 of the remaining money. If the remaining money t is 800 won, how much did Yeong-gi had at first?
2500
800 200 [OP_SUB] 1 1/2 [OP_SUB] [OP_DIV] 300 [OP_ADD] 1 2 5 [OP_DIV] [OP_SUB] [OP_DIV]
var_a = 800 var_b = 200 var_c = var_a - var_b var_d = 1 var_e = 0.5 var_f = var_d - var_e var_g = var_c / var_f var_h = 300 var_i = var_g + var_h var_j = 1 var_k = 2 var_l = 5 var_m = var_k / var_l var_n = var_j - var_m var_o = var_i / var_n print(int(var_o))
Arithmetic calculation
Subin drinks 2/5 liters (L) of milk every day. Find how many liters (L) of milk he drinks for 10 days.
4
2/5 10 [OP_MUL]
var_a = 0.4 var_b = 10 var_c = var_a * var_b print(int(var_c))
Arithmetic calculation
It is said that Min-young's age will be four times her current age in 24 years. How old is Min-young now?
8
24 4 1 [OP_SUB] [OP_DIV]
var_a = 24 var_b = 4 var_c = 1 var_d = var_b - var_c var_e = var_a / var_d print(int(var_e))
Arithmetic calculation
There are four numbers 10, 11, 12, and 13. What is the sum of the second largest number and the smallest number?
22
[OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 2 [OP_LIST_MAX] 1 [OP_LIST_MIN] [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 = 2 list_b=list_a.copy() list_b.sort() var_f = list_b[-var_e] var_g = 1 list_c=list_a.copy() list_c.sort() var_h = list_c[var_g-1] var_i = var_f + var_h print(int(var_i))
Correspondence
The five-digit number 752AB is divisible by 3, and A and B can contain any number from 0 to 9. How many of these numbers are there?
33
752AB [OP_GEN_POSSIBLE_LIST] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = '752AB' 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 = 3 list_b = [] var_b = int(var_b) for i in list_a: i = int(i) if i % var_b == 0: list_b.append(i) var_c = len(list_b) print(int(var_c))
Arithmetic calculation
Yuna's average score on the math test in May and June is 84. If Yuna's math test score in July is 96, what is her average math score over the three months?
88
84 84 [OP_ADD] 96 [OP_ADD] 3 [OP_DIV]
var_a = 84 var_b = 84 var_c = var_a + var_b var_d = 96 var_e = var_c + var_d var_f = 3 var_g = var_e / var_f print(int(var_g))
Comparison
There are 108 red balls, blue balls and white balls. The number of blue balls is 1/3 of the number of red balls, and the number of white balls is half of the number of blue balls. Which color ball has the fewest?
white
[OP_LIST_SOL] red blue white [OP_LIST_EOL] [OP_LIST_SOL] 1 1/3 1/3 2 [OP_DIV] [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 = 2 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)
Arithmetic calculation
Seokgi used some sheets of paper from 82 sheets of colored paper that he had to create an art work. If the number of paper remaining is 6 less than the number of paper used, how many sheets of paper did Seokgi used?
44
82 6 [OP_SUB] 2 [OP_DIV] 6 [OP_ADD]
var_a = 82 var_b = 6 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 6 var_g = var_e + var_f print(int(var_g))
Arithmetic calculation
You have 30 cats and 18 dogs each. The combined number of dogs and cows is 4 fewer than the number of cats. How many cows do you have?
5
45 32 [OP_SUB] 8 [OP_SUB]
var_a = 45 var_b = 32 var_c = var_a - var_b var_d = 8 var_e = var_c - var_d print(int(var_e))
Comparison
Jihee used 1 meter (m) and 1/5 meters (m) of shoelaces, and Hyun 8/5 meters (m). Figure out who used more of the shoelaces.
Hyun
[OP_LIST_SOL] Jihee Hyun [OP_LIST_EOL] [OP_LIST_SOL] 1 1 5 [OP_DIV] [OP_ADD] 8 5 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jihee' var_b = 'Hyun' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 1 var_d = 1 var_e = 5 var_f = var_d / var_e var_g = var_c + var_f var_h = 8 var_i = 5 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)
Geometry
There are coins in the shape of a regular nonagon. The sum of all sides of this coin is 171 millimeters (mm). Find the length of one side of the coin.
19
171 9 [OP_DIV]
var_a = 171 var_b = 9 var_c = var_a / var_b print(int(var_c))
Correspondence
When you mistakenly divide a number by 7 when instead you have to multiply a number by 6, the result is 49. How much do you get when you calculate correctly?
2058
49 7 [OP_MUL] 6 [OP_MUL]
var_a = 49 var_b = 7 var_c = var_a * var_b var_d = 6 var_e = var_c * var_d print(int(var_e))
Possibility
There are five number cards 1, 3, 5, 7, and 9. What is the average of the 3-digit numbers that can be made using this card that are less than 500? (The card can be used repeatedly.)
255
[OP_LIST_SOL] 1 3 5 7 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] 500 [OP_LIST_LESS] [OP_LIST_MEAN]
var_a = 1 var_b = 3 var_c = 5 var_d = 7 var_e = 9 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.product(list_b, repeat=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 = 500 list_c = [] for i in list_b: if i < var_g: list_c.append(i) list_c = [float(i) for i in list_c] var_h = sum(list_c)/len(list_c) print(int(var_h))
Comparison
Jimin collected 1 and 7 and Namjoon collected 6 and 3. Who has the greater sum of the numbers gathered?
Namjoon
[OP_LIST_SOL] Namjoon Jimin [OP_LIST_EOL] [OP_LIST_SOL] [OP_LIST_SOL] 3 6 [OP_LIST_EOL] [OP_LIST_SUM] [OP_LIST_SOL] 7 1 [OP_LIST_EOL] [OP_LIST_SUM] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_POP] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Namjoon' var_b = 'Jimin' 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 = 6 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() list_b = [float(i) for i in list_b] var_e = sum(list_b) var_f = 7 var_g = 1 list_c= [] if "/" in str(var_g): var_g = eval(str(var_g)) list_c.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_c.append(var_f) list_c.reverse() list_c = [float(i) for i in list_c] var_h = sum(list_c) list_d= [] if "/" in str(var_h): var_h = eval(str(var_h)) list_d.append(var_h) if "/" in str(var_e): var_e = eval(str(var_e)) list_d.append(var_e) list_d.reverse() var_i = 1 list_e=list_d.copy() list_e.sort() var_j = list_e[-var_i] var_k = list_d.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Geometry
I am going to cut a rectangular piece of paper measuring 3+1/4 meters (m) wide and 2+3/4 meters (m) long by dividing it into square pieces with a side length of 25 centimeters (cm). Find how many squares you can make if you cut as many squares as possible.
143
3 1/4 [OP_ADD] 25 100 [OP_DIV] [OP_FDIV] 2 3/4 [OP_ADD] 25 100 [OP_DIV] [OP_FDIV] [OP_MUL]
var_a = 3 var_b = 0.25 var_c = var_a + var_b var_d = 25 var_e = 100 var_f = var_d / var_e var_g = var_c // var_f var_h = 2 var_i = 0.75 var_j = var_h + var_i var_k = 25 var_l = 100 var_m = var_k / var_l var_n = var_j // var_m var_o = var_g * var_n print(int(var_o))
Arithmetic calculation
In a calculation of multiplying a three-digit number by a two-digit number, you omitted 1 in the tens place of the three-digit number, resulting in 17. If you multiply this number by a two-digit number and get 476, what is the correct calculation?
3276
476 17 [OP_DIV] 117 [OP_MUL]
var_a = 476 var_b = 17 var_c = var_a / var_b var_d = 117 var_e = var_c * var_d print(int(var_e))
Comparison
I have 5 friends, and we compared out scores after taking an exam. The overall average was 81.6. The average of the scores from 1st to 4th is 6 points higher than the average of the scores from 2nd to 5th, and the scores for 2nd, 3rd and 4th are said to be 88, 84, and 76. How many points is 1st place worth?
92
81.6 5 [OP_MUL] 88 84 [OP_ADD] 76 [OP_ADD] [OP_SUB] 6 4 [OP_MUL] [OP_ADD] 2 [OP_DIV]
var_a = 81.6 var_b = 5 var_c = var_a * var_b var_d = 88 var_e = 84 var_f = var_d + var_e var_g = 76 var_h = var_f + var_g var_i = var_c - var_h var_j = 6 var_k = 4 var_l = var_j * var_k var_m = var_i + var_l var_n = 2 var_o = var_m / var_n print(int(var_o))
Arithmetic calculation
What is the largest four-digit number that is a multiple of 2 and a multiple of 3 and a multiple of 8 and a multiple of 9?
9936
1000 9999 1 [OP_LIST_ARANGE] 2 [OP_LIST_DIVISIBLE] 3 [OP_LIST_DIVISIBLE] 8 [OP_LIST_DIVISIBLE] 9 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX]
var_a = 1000 var_b = 9999 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 2 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = 3 list_c = [] var_e = int(var_e) for i in list_b: i = int(i) if i % var_e == 0: list_c.append(i) var_f = 8 list_d = [] var_f = int(var_f) for i in list_c: i = int(i) if i % var_f == 0: list_d.append(i) var_g = 9 list_e = [] var_g = int(var_g) for i in list_d: i = int(i) if i % var_g == 0: list_e.append(i) var_h = 1 list_f=list_e.copy() list_f.sort() var_i = list_f[-var_h] print(int(var_i))
Arithmetic calculation
There is a pencil, a ruler, and an eraser. If the price of the pencil is 100 won and that of the ruler is 95, and the average price is 90 won, how much is the eraser?
90
95 3 [OP_MUL] 100 [OP_SUB] 95 [OP_SUB]
var_a = 95 var_b = 3 var_c = var_a * var_b var_d = 100 var_e = var_c - var_d var_f = 95 var_g = var_e - var_f print(int(var_g))
Correspondence
When a number that should be divided by 4 is mistakenly divided by 32, the quotient is 3 with no remainder. Find the correct calculated value.
24
32 3 [OP_MUL] 4 [OP_DIV]
var_a = 32 var_b = 3 var_c = var_a * var_b var_d = 4 var_e = var_c / var_d print(int(var_e))
Arithmetic calculation
The number of pages Taehyung read as much as 0.4 of the total was 16 pages. Find the total number of pages in this book.
40
16 0.4 [OP_DIV]
var_a = 16 var_b = 0.4 var_c = var_a / var_b print(int(var_c))
Arithmetic calculation
There are cruise ships that depart only when there are more than 15 people and no more than 30 people. If there are 9 people on the cruise ship right now, find out how many more people need to board before it can depart.
7
15 1 [OP_ADD] 9 [OP_SUB]
var_a = 15 var_b = 1 var_c = var_a + var_b var_d = 9 var_e = var_c - var_d print(int(var_e))
Comparison
Yoongi collected 4, Jungkook collected 6 multiplied by 3, and Yuna collected 5. Who got the biggest number?
Jungkook
[OP_LIST_SOL] Yoongi Jungkook Yuna [OP_LIST_EOL] [OP_LIST_SOL] 4 6 3 [OP_MUL] 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
After buying 37 pencils, I bought 17 more. How many pencils are there in all?
54
37 17 [OP_ADD]
var_a = 37 var_b = 17 var_c = var_a + var_b print(int(var_c))
Comparison
Mom, Dad, and Grandfather bought clothes at the department store. Dad bought more clothes than Mom, and Grandfather bought more clothes than Dad. What is the order in which Dad bought the least amount of clothes?
2
[OP_LIST_SOL] Mom Dad Grandpa [OP_LIST_EOL] Dad [OP_LIST_INDEX]
var_a = 'Mom' var_b = 'Dad' var_c = 'Grandpa' 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 = 'Dad' var_e = list_a.index(var_d)+1 print(int(var_e))
Correspondence
A is a number with 6 groups of 1000 and 36 groups of 100. B is the count of 2 jumps from 876 to 197 smaller. Find the value of A-B.
9118
1000 6 [OP_MUL] 100 36 [OP_MUL] [OP_ADD] 876 197 2 [OP_MUL] [OP_SUB] [OP_SUB]
var_a = 1000 var_b = 6 var_c = var_a * var_b var_d = 100 var_e = 36 var_f = var_d * var_e var_g = var_c + var_f var_h = 876 var_i = 197 var_j = 2 var_k = var_i * var_j var_l = var_h - var_k var_m = var_g - var_l print(int(var_m))
Arithmetic calculation
The boat can carry 30 people in one run. At least how many boat trips will it take for all 1284 students to ride once?
43
1284 30 [OP_DIV] 1 [OP_CEIL]
var_a = 1284 var_b = 30 var_c = var_a / var_b var_d = 1 var_e=int(((var_c+9*10**(var_d-2))//(10**(var_d-1)))*10**(var_d-1)) print(int(var_e))
Arithmetic calculation
The sum of all objects is 35. When there are (a) objects and (b) objects, if there are 17 (a) objects, (b) how many objects are there?
18
35 17 [OP_SUB]
var_a = 35 var_b = 17 var_c = var_a - var_b print(int(var_c))
Geometry
The milk carton is 9 centimeters (cm) wide, 4 centimeters (cm) long, and 7 centimeters (cm) high. What is this milk carton's volume in cubic centimeters (cm3)?
252
9 4 [OP_MUL] 7 [OP_MUL]
var_a = 9 var_b = 4 var_c = var_a * var_b var_d = 7 var_e = var_c * var_d print(int(var_e))
Comparison
Among 1.4, 9/10, 1.2, 0.5, and 13/10, pick a number less than 1.1, and calculate the total. What is the answer?
1.4
[OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_LESS] [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
Yuna and 13 friends are standing in a line. Yuna is standing 4th from the left. How many more people are standing to Yuna's right than the people standing to her left?
6
13 4 [OP_SUB] 3 [OP_SUB]
var_a = 13 var_b = 4 var_c = var_a - var_b var_d = 3 var_e = var_c - var_d print(int(var_e))
Comparison
There are a total of 3 trains at the train station. Each train has 12 cars, and each car has the same number of seats with 24. Find the number of all seats on the trains at the station.
864
3 12 [OP_MUL] 24 [OP_MUL]
var_a = 3 var_b = 12 var_c = var_a * var_b var_d = 24 var_e = var_c * var_d print(int(var_e))
Possibility
If you are trying to make a two-digit number by choosing two different numbers from 1, 3, and 4, how many possible two-digit numbers are there?
6
[OP_LIST_SOL] 1 3 4 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 1 var_b = 3 var_c = 4 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = len(list_b) print(int(var_e))
Comparison
There are four numbers: 0.8, 1/2, 0.9, 1/3. What is the sum of the numbers greater than or equal to 0.7?
1.7
[OP_LIST_SOL] 0.8 1/2 0.9 1/3 [OP_LIST_EOL] 0.7 [OP_LIST_MORE_EQUAL] [OP_LIST_SUM]
var_a = 0.8 var_b = 0.5 var_c = 0.9 var_d = 0.3333333333333333 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 0.7 list_b = [] for i in list_a: if i >= var_e: list_b.append(i) list_b = [float(i) for i in list_b] var_f = sum(list_b) print('{:.2f}'.format(round(var_f+1e-10,2)))
Arithmetic calculation
The family has been eating milk for 1,500 won every day since June 1st, but the price went up in the middle, thereby paying 1,600 won each. If they paid 46,200 won for milk in June, On what day in June did the price of milk increase?
19
30 46200 1500 30 [OP_MUL] [OP_SUB] 1600 1500 [OP_SUB] [OP_DIV] [OP_SUB] 1 [OP_ADD]
var_a = 30 var_b = 46200 var_c = 1500 var_d = 30 var_e = var_c * var_d var_f = var_b - var_e var_g = 1600 var_h = 1500 var_i = var_g - var_h var_j = var_f / var_i var_k = var_a - var_j var_l = 1 var_m = var_k + var_l print(int(var_m))
Geometry
The surface area of a cube-shaped gift box is 600 square centimeters (cm2). What is the length of one side of this gift box?
10
600 6 [OP_DIV] 1/2 [OP_POW]
var_a = 600 var_b = 6 var_c = var_a / var_b var_d = 0.5 var_e = var_c ** var_d print(int(var_e))
Correspondence
Subtracting 36 from a number and multipling by 22 gets you 748. Find the number.
70
748 22 [OP_DIV] 36 [OP_ADD]
var_a = 748 var_b = 22 var_c = var_a / var_b var_d = 36 var_e = var_c + var_d print(int(var_e))
Correspondence
Add 1.4 to a number, divide by 3, subtract 0.7, multiply by 9, and you get 5.4. Calculate the number including the decimal point.
2.5
5.4 9 [OP_DIV] 0.7 [OP_ADD] 3 [OP_MUL] 1.4 [OP_SUB]
var_a = 5.4 var_b = 9 var_c = var_a / var_b var_d = 0.7 var_e = var_c + var_d var_f = 3 var_g = var_e * var_f var_h = 1.4 var_i = var_g - var_h print('{:.2f}'.format(round(var_i+1e-10,2)))
Arithmetic calculation
Jungkook picked 25 persimmons. It is said that Jungkook picked 4 more persimoons than 3 times the number of persimmons that Hoseok picked. How many persimmons did Hoseok pick?
7
25 4 [OP_SUB] 3 [OP_FDIV]
var_a = 25 var_b = 4 var_c = var_a - var_b var_d = 3 var_e = var_c // var_d print(int(var_e))
Possibility
There are 3 geese inside the fence. If you give the geese at least 2 bamboos, how many ways are there to distribute 20 bamboos?
120
3 20 [OP_ADD] 3 2 [OP_MUL] [OP_SUB] 1 [OP_SUB] 20 3 2 [OP_MUL] [OP_SUB] [OP_COMB]
var_a = 3 var_b = 20 var_c = var_a + var_b var_d = 3 var_e = 2 var_f = var_d * var_e var_g = var_c - var_f var_h = 1 var_i = var_g - var_h var_j = 20 var_k = 3 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))
Comparison
I handed out erasers to both classes. 15 students in Dohoon's class were given 45 erasers equally, and 5 students in Kihoon's class were given 30 erasers equally. In which class will one student have more erasers?
Kihoon
[OP_LIST_SOL] Dohoon Kihoon [OP_LIST_EOL] [OP_LIST_SOL] 45 15 [OP_DIV] 30 5 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Dohoon' var_b = 'Kihoon' 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 = 45 var_d = 15 var_e = var_c / var_d var_f = 30 var_g = 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) 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 sum of 7 consecutive natural numbers is 63. Find the third number.
8
63 0 7 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 7 [OP_DIV] 3 1 [OP_SUB] [OP_ADD]
var_a = 63 var_b = 0 var_c = 7 var_d = 1 var_e = var_c - var_d var_f = 1 list_a = [i for i in range(var_b, var_e + 1, var_f)] list_a = [float(i) for i in list_a] var_g = sum(list_a) var_h = var_a - var_g var_i = 7 var_j = var_h / var_i var_k = 3 var_l = 1 var_m = var_k - var_l var_n = var_j + var_m print(int(var_n))
Correspondence
The difference of the age of the older brother and the younger brother is 12. The sum of the older brother's age and younger brother's age is 40 more than the difference. Find the product of the ages of the brothers.
640
40 2 [OP_DIV] 12 [OP_ADD] 40 2 [OP_DIV] [OP_MUL]
var_a = 40 var_b = 2 var_c = var_a / var_b var_d = 12 var_e = var_c + var_d var_f = 40 var_g = 2 var_h = var_f / var_g var_i = var_e * var_h print(int(var_i))
Arithmetic calculation
When the bucket containing 320 kilograms (kg) of water was weighed again after using half of the water, it. became 175 kilograms (kg). Find the weight of the empty bucket in kilograms (kg).
30
320 320 175 [OP_SUB] 2 [OP_MUL] [OP_SUB]
var_a = 320 var_b = 320 var_c = 175 var_d = var_b - var_c var_e = 2 var_f = var_d * var_e var_g = var_a - var_f print(int(var_g))
Arithmetic calculation
My uncle is 41 years old. If Yuna is 3 years older than Eunji and Eunji is 25 years younger than my uncle, what is the sum of the ages of Eunji and Yuna?
35
41 25 [OP_SUB] 41 25 [OP_SUB] 3 [OP_ADD] [OP_ADD]
var_a = 41 var_b = 25 var_c = var_a - var_b var_d = 41 var_e = 25 var_f = var_d - var_e var_g = 3 var_h = var_f + var_g var_i = var_c + var_h print(int(var_i))
Arithmetic calculation
When Jimin drinks 150 milliliters (㎖) and Taehyung drinks 1.65 liter (L) from a 30 liter (L) bucket, find how many liters (L) of water are left.
28.2
30 150 1000 [OP_DIV] [OP_SUB] 1.65 [OP_SUB]
var_a = 30 var_b = 150 var_c = 1000 var_d = var_b / var_c var_e = var_a - var_d var_f = 1.65 var_g = var_e - var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Correspondence
If the reciprocal of -0.4 is A and the reciprocal of +5/2 is B, find the reciprocal of 3/A + 2/B.
0.26
1 3 1 -0.4 [OP_DIV] [OP_DIV] 2 1 5/2 [OP_DIV] [OP_DIV] [OP_ADD] [OP_DIV]
var_a = 1 var_b = 3 var_c = 1 var_d = -0.4 var_e = var_c / var_d var_f = var_b / var_e var_g = 2 var_h = 1 var_i = 2.5 var_j = var_h / var_i var_k = var_g / var_j var_l = var_f + var_k var_m = var_a / var_l print('{:.2f}'.format(round(var_m+1e-10,2)))
Correspondence
Given the equation 23+A72=695. What number is A?
6
23+A72=695 A [OP_DIGIT_UNK_SOLVER]
var_a = '23+A72=695' 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
20 students lined up in a single line. Jungkook is standing right in front of Yoongi, and 11 students are standing in front of Jungkook. How many students are standing behind 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))
Arithmetic calculation
Yuna's family drank 0.4 of the total milk today, and the leftover milk was 0.69 liters (L). Find how many liters (L) of milk were there at first.
1.15
0.69 1 0.4 [OP_SUB] [OP_DIV]
var_a = 0.69 var_b = 1 var_c = 0.4 var_d = var_b - var_c var_e = var_a / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Possibility
Among Jungkook, Jimin, Yoongi, and Yoojung, I'm going to vote for 2 people by allowing anonymous duplication. How many cases can possibly occur?
10
[OP_LIST_SOL] Jungkook Jimin Yoongi Yoojung [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_ADD] 1 [OP_SUB] 2 [OP_COMB]
var_a = 'Jungkook' var_b = 'Jimin' var_c = 'Yoongi' var_d = 'Yoojung' 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 = len(list_a) var_f = 2 var_g = var_e + var_f var_h = 1 var_i = var_g - var_h var_j = 2 var_k = 1 var_i = int(var_i) var_j = int(var_j) for i, elem in enumerate(range(var_j)): var_k = var_k * (var_i-i) for i, elem in enumerate(range(var_j)): var_k = var_k / (i+1) print(int(var_k))
Comparison
There are 50 soccerballs, 26 basketballs, and 8 more baseballs than basketballs. Which ball has the most of the three?
soccerballs
[OP_LIST_SOL] soccerballs basketballs baseballs [OP_LIST_EOL] [OP_LIST_SOL] 50 26 26 8 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'soccerballs' var_b = 'basketballs' var_c = 'baseballs' 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 = 50 var_e = 26 var_f = 26 var_g = 8 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] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Arithmetic calculation
Find the number of 4-digit odd numbers that has 7 in the hundreds place and 5 in the tens place.
45
[OP_LIST_SOL] A 7 5 B [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 1000 10000 [OP_LIST_ODD] [OP_SET_INTERSECT] [OP_LIST_LEN]
var_a = 'A' var_b = 7 var_c = 5 var_d = 'B' 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="" for i in list_a: i = str(i) var_e = var_e + i ans_dict = dict() var_e = str(var_e) 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_e): if v in variable_candi: ans_dict[v] = 0 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_e for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) if len(var_e) == len(str(int(temp))): new_elem = int(temp) list_b.append(new_elem) var_f = 1000 var_g = 10000 list_c = [] if var_f%2==0: for i in range(var_f+1, var_g+1, 2): list_c.append(i) else: for i in range(var_f, var_g+1, 2): list_c.append(i) list_d = list(set(list_b) & set(list_c)) var_h = len(list_d) print(int(var_h))
Arithmetic calculation
There are five times more students doing hula hoops than the number of students jumping rope. If there are 7 students jumping rope, how many students are doing hula hoops?
35
7 5 [OP_MUL]
var_a = 7 var_b = 5 var_c = var_a * var_b print(int(var_c))
Possibility
We want to create natural numbers less than 10000 and greater than 1000 using the natural numbers from 1 to 3. What is the sum of all possible numbers at this time?
179982
[OP_LIST_SOL] 1 2 3 [OP_LIST_EOL] 4 [OP_LIST_GET_PRODUCT] 10000 [OP_LIST_LESS] 1000 [OP_LIST_MORE_EQUAL] [OP_LIST_SUM]
var_a = 1 var_b = 2 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 = 4 list_b = [str(i) for i in list_a] list_b = list(itertools.product(list_b, repeat=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 = 10000 list_c = [] for i in list_b: if i < var_e: list_c.append(i) var_f = 1000 list_d = [] for i in list_c: if i >= var_f: list_d.append(i) list_d = [float(i) for i in list_d] var_g = sum(list_d) print(int(var_g))
Geometry
What is the area in square meters (m2) of a rectangular toilet with a length of 5 meters (m) and a width of 17/20 meters (m)?
4.25
5 17/20 [OP_MUL]
var_a = 5 var_b = 0.85 var_c = var_a * var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Correspondence
It was 40 that should be subtracted from, but mistakenly subtracting 21 from a number yields 52. How much do you get when you calculate it correctly?
33
52 21 [OP_ADD] 40 [OP_SUB]
var_a = 52 var_b = 21 var_c = var_a + var_b var_d = 40 var_e = var_c - var_d print(int(var_e))
Comparison
Taehyung's house is on the 7th floor from the top and the 13th floor from the bottom of the apartment, and if there are 15 houses on each floor, how many houses are there in this apartment?
315
7 13 [OP_ADD] 1 [OP_ADD] 15 [OP_MUL]
var_a = 7 var_b = 13 var_c = var_a + var_b var_d = 1 var_e = var_c + var_d var_f = 15 var_g = var_e * var_f print(int(var_g))
Arithmetic calculation
Yujeong divided the pizza into 3 equal slices and ate one slice. Minwoo divided the same size pizza into 15 equal slices. How many slices does Minwoo need to eat to eat the same amount as Yujeong?
5
15 3 [OP_DIV]
var_a = 15 var_b = 3 var_c = var_a / var_b print(int(var_c))
Possibility
Find the sum of the second largest and third smallest numbers greater than 100 and less than 1000, using the numbers 1, 6, and 8 once.
1434
[OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 2 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_ADD]
var_a = 1 var_b = 6 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 = 2 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] var_g = 3 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
Minyoung and Taehyung have 9 and 3 candies, respectively. How many candies should Taehyung take from Minyeong to keep the number of candies equal?
3
9 3 [OP_SUB] 2 [OP_DIV]
var_a = 9 var_b = 3 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Arithmetic calculation
There were 24 boys and 14 girls in the auditorium. After a while, an equal number of boys and girls left the auditorium. If only 30 students remained in the auditorium, how many girls left earlier?
4
24 14 [OP_ADD] 30 [OP_SUB] 2 [OP_DIV]
var_a = 24 var_b = 14 var_c = var_a + var_b var_d = 30 var_e = var_c - var_d var_f = 2 var_g = var_e / var_f print(int(var_g))
Possibility
There are 1 red marble, 1 green marble, 1 blue marble and 1 purple marble. In how many different ways can you place 4 marbles in a row?
24
[OP_LIST_SOL] red green blue purple [OP_LIST_EOL] [OP_LIST_LEN] 4 [OP_PERM]
var_a = 'red' var_b = 'green' var_c = 'blue' var_d = 'purple' 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 = len(list_a) var_f = 4 var_g = 1 var_e = int(var_e) var_f = int(var_f) for i, elem in enumerate(range(var_f)): var_g = var_g * (var_e-i) print(int(var_g))
Geometry
Find the length of the other side of a right triangle with one non-hypotenuse of length 3 and hypotenuse of length 5.
4
5 2 [OP_POW] 3 2 [OP_POW] [OP_SUB] 1/2 [OP_POW]
var_a = 5 var_b = 2 var_c = var_a ** var_b var_d = 3 var_e = 2 var_f = var_d ** var_e var_g = var_c - var_f var_h = 0.5 var_i = var_g ** var_h print(int(var_i))
Arithmetic calculation
When 4 pieces of tape were overlapped and attached to the same length, it became 925 centimeters (cm). If the length of one piece of tape is 250 centimeters (cm), how many centimeters (cm) is the length of each of the overlapping parts?
25
250 4 [OP_MUL] 925 [OP_SUB] 4 1 [OP_SUB] [OP_DIV]
var_a = 250 var_b = 4 var_c = var_a * var_b var_d = 925 var_e = var_c - var_d var_f = 4 var_g = 1 var_h = var_f - var_g var_i = var_e / var_h print(int(var_i))
Arithmetic calculation
Jimin ate 7 of the 12 tangerines. How many tangerines are left?
5
12 7 [OP_SUB]
var_a = 12 var_b = 7 var_c = var_a - var_b print(int(var_c))
Possibility
Provided that the length of one side of the square is 2 centimeters (cm), we want to make a different rectangle by attaching all 210 of these squares. In case you rotate the rectangle that you made and when it has the same shape, you consider it as the same one, find how many ways you can make the rectangle.
8
210 [OP_LIST_GET_DIVISOR] [OP_LIST_LEN] 2 [OP_DIV] 1 [OP_CEIL]
var_a = 210 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 = len(list_a) var_c = 2 var_d = var_b / var_c var_e = 1 var_f=int(((var_d+9*10**(var_e-2))//(10**(var_e-1)))*10**(var_e-1)) print(int(var_f))
Geometry
The sides of a prism are made up of six rectangles. How many vertices does this prism have?
12
6 2 [OP_MUL]
var_a = 6 var_b = 2 var_c = var_a * var_b print(int(var_c))
Arithmetic calculation
How many two-digit numbers that can be formed by drawing two different numbers from 0, 1, 2, and 3 are divisible by 4?
3
[OP_LIST_SOL] 0 1 2 3 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 4 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 0 var_b = 1 var_c = 2 var_d = 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 = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 4 list_c = [] var_f = int(var_f) for i in list_b: i = int(i) if i % var_f == 0: list_c.append(i) var_g = len(list_c) print(int(var_g))