category
stringclasses
5 values
question
stringlengths
20
555
answer
stringlengths
1
20
solution_abst
stringlengths
1
287
solution_code
stringlengths
27
5.97k
Comparison
Fans A, B, C, D are turned on. B is stronger than A, and D is weaker than A. When A is weaker than C, which fan is turned at the weakest wind speed?
D
[OP_LIST_SOL] A B C D [OP_LIST_EOL] [OP_LIST_SOL] B A > A C < D A < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET]
var_a = 'A' var_b = 'B' var_c = 'C' var_d = 'D' list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 'B' var_f = 'A' var_g = '>' var_h = 'A' var_i = 'C' var_j = '<' var_k = 'D' var_l = 'A' var_m = '<' list_b= [] if "/" in str(var_m): var_m = eval(str(var_m)) list_b.append(var_m) if "/" in str(var_l): var_l = eval(str(var_l)) list_b.append(var_l) if "/" in str(var_k): var_k = eval(str(var_k)) list_b.append(var_k) if "/" in str(var_j): var_j = eval(str(var_j)) list_b.append(var_j) if "/" in str(var_i): var_i = eval(str(var_i)) list_b.append(var_i) if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_g): var_g = eval(str(var_g)) list_b.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() global item_name_index_dict items_name_list = list_a.copy() conditions = [] condition_list = list_b.copy() temp_stack = [] for index_, cond_ in enumerate(map(str, condition_list)): if cond_ in ("<", ">", "="): operand_right = temp_stack.pop() operand_left = temp_stack.pop() if cond_ == "=": cond_ = "==" conditions.append(f"{operand_left} {cond_} {operand_right}") else: if not cond_.isdigit(): cond_ = "{" + cond_ + "}" temp_stack.append(cond_) item_name_index_dict = {} for perm in itertools.permutations(range(1, len(items_name_list) + 1)): item_name_index_dict = dict(zip(items_name_list, perm)) formatted_conditions = \ [condition.format_map(item_name_index_dict) for condition in conditions] if all(map(eval, formatted_conditions)): break list_c = list(item_name_index_dict.keys()) list_c.sort(key=item_name_index_dict.get, reverse=True) var_n = len(list_c) var_o = list_c[var_n-1] print(var_o)
Comparison
Songhee read 288 pages in 12 days, and Eunju read 243 pages in 9 days. Who read more in one day?
Eunju
[OP_LIST_SOL] Songhee Eunju [OP_LIST_EOL] [OP_LIST_SOL] 288 12 [OP_DIV] 243 9 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Songhee' var_b = 'Eunju' 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 = 288 var_d = 12 var_e = var_c / var_d var_f = 243 var_g = 9 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)
Possibility
Find the largest five-digit number that can be formed using 0, 4, 6, 7, and 8 only once.
87640
[OP_LIST_SOL] 0 4 6 7 8 [OP_LIST_EOL] 5 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX]
var_a = 0 var_b = 4 var_c = 6 var_d = 7 var_e = 8 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 5 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_f)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] print(int(var_h))
Comparison
Jeongho's farm has chickens and pigs. If the sum of all the legs is 48, and there are 9 pigs, how many chickens are there on the farm?
6
48 4 9 [OP_MUL] [OP_SUB] 2 [OP_DIV]
var_a = 48 var_b = 4 var_c = 9 var_d = var_b * var_c var_e = var_a - var_d var_f = 2 var_g = var_e / var_f print(int(var_g))
Comparison
Three people are eating cake. Shinyoung ate 1/3, Seokgi 1/4, and Woong ate 1/5 of it. Who ate the most cake?
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)
Arithmetic calculation
An elevator in a building has buttons with numbers from the 1st floor to the 54th floor. Find out how many times the number 5 appears on the button.
10
1 54 1 [OP_LIST_ARANGE] [OP_LIST2NUM] [OP_NUM2LIST] 5 [OP_LIST_FIND_NUM]
var_a = 1 var_b = 54 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d="" for i in list_a: i = str(i) var_d = var_d + i list_b = [] var_d = int(var_d) while var_d//10 > 0: list_b.append(var_d%10) var_d = var_d//10 list_b.append(var_d%10) list_b = list_b[::-1] var_e = 5 var_f = 0 var_e = int(var_e) for i in list_b: i = int(i) if i == var_e: var_f = var_f + 1 print(int(var_f))
Arithmetic calculation
There are 19 boxes with 46 books in each box and several boxes with 170 pencils in each box. If the number of books and pencils is 1894 in total, how many boxes of pencils are there?
6
1894 46 19 [OP_MUL] [OP_SUB] 170 [OP_FDIV]
var_a = 1894 var_b = 46 var_c = 19 var_d = var_b * var_c var_e = var_a - var_d var_f = 170 var_g = var_e // var_f print(int(var_g))
Arithmetic calculation
What is the difference between the largest and smallest natural numbers from 1 to 1000, when the sum of each digit of this number is 11?
26
1 1000 1 [OP_LIST_ARANGE] [OP_LIST_NUM2SUM] 11 [OP_LIST_FIND_NUM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB]
var_a = 1 var_b = 1000 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] list_b=[] for i in list_a: var_d = 0 i = int(i) while i//10 > 0: var_d = var_d + i%10 i = i//10 var_d = var_d + i%10 list_b.append(var_d) var_e = 11 var_f = 0 var_e = int(var_e) for i in list_b: i = int(i) if i == var_e: var_f = var_f + 1 var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = 1 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
Sang-cheol gave Byeong-ji 2 battle cards, and the difference between Sang-cheol and Byeong-ji was 6. Find the difference between the two before Sang-cheol gave Byeong-ji battle cards. However, the number of battle cards Byeong-ji has is more than the number Sang-cheol has.
2
6 2 [OP_SUB] 2 [OP_SUB]
var_a = 6 var_b = 2 var_c = var_a - var_b var_d = 2 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
There are 6 more female students than male students in a club. If the total number of the club is 82, how many female students are there?
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))
Geometry
How many line segments in a nonagon join any two vertices that are not adjacent to each other?
27
9 9 3 [OP_SUB] [OP_MUL] 2 [OP_DIV]
var_a = 9 var_b = 9 var_c = 3 var_d = var_b - var_c var_e = var_a * var_d var_f = 2 var_g = var_e / var_f print(int(var_g))
Comparison
Choose the second smallest number among 5, 8, 4, 3, and 7.
4
[OP_LIST_SOL] 5 8 4 3 7 [OP_LIST_EOL] 2 [OP_LIST_MIN]
var_a = 5 var_b = 8 var_c = 4 var_d = 3 var_e = 7 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 2 list_b=list_a.copy() list_b.sort() var_g = list_b[var_f-1] print(int(var_g))
Correspondence
A is a single digit number. Find A from the two-digit addition formula AA+AA=132.
6
AA+AA=132 A [OP_DIGIT_UNK_SOLVER]
var_a = 'AA+AA=132' 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
Yoongi wanted to add 7 to a number but instead added 9 to get 30. Find the correct calculated value.
28
30 9 [OP_SUB] 7 [OP_ADD]
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))
Arithmetic calculation
How many 4-digit numbers are common multiples of 3 and 5?
600
1000 9999 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 1000 var_b = 9999 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 3 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = 5 list_c = [] var_e = int(var_e) for i in list_b: i = int(i) if i % var_e == 0: list_c.append(i) var_f = len(list_c) print(int(var_f))
Arithmetic calculation
A certain number should be multiplied by 3.6 and divided by 2, but when I mistakenly divided by 3.6, it became 2.5. Find the correctly calculated value.
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)))
Arithmetic calculation
If a train that travels 15.5 kilometers (km) in 10 minutes runs at a constant speed without stopping for 46 minutes, how many kilometers (km) will it travel?
71.3
15.5 10 [OP_DIV] 46 [OP_MUL]
var_a = 15.5 var_b = 10 var_c = var_a / var_b var_d = 46 var_e = var_c * var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Arithmetic calculation
The sum of five consecutive natural numbers is 60. Find the third number.
12
60 0 5 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 5 [OP_DIV] 3 1 [OP_SUB] [OP_ADD]
var_a = 60 var_b = 0 var_c = 5 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 = 5 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 math teacher gave us the two-digit addition formula A7+30=77 for the last problem. When Yuna says she got the answer right, what is the A that Yuna gave as the correct answer?
4
A7+30=77 A [OP_DIGIT_UNK_SOLVER]
var_a = 'A7+30=77' 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
The surface area of a cube is 96 square centimeters (cm2). I used 8 of these cubes to make a large cube. Find the volume of the large cube made.
512
96 6 [OP_DIV] 1/2 [OP_POW] 8 2 [OP_DIV] 2 [OP_DIV] [OP_MUL] 3 [OP_POW]
var_a = 96 var_b = 6 var_c = var_a / var_b var_d = 0.5 var_e = var_c ** var_d var_f = 8 var_g = 2 var_h = var_f / var_g var_i = 2 var_j = var_h / var_i var_k = var_e * var_j var_l = 3 var_m = var_k ** var_l print(int(var_m))
Comparison
Among the natural numbers less than 100, the common multiples of 4 and 6 are written from left in order of magnitude. What is the 7th number from the left?
84
0 1 [OP_ADD] 100 1 [OP_SUB] 1 [OP_LIST_ARANGE] 4 6 [OP_LCM] [OP_LIST_DIVISIBLE] 7 [OP_LIST_GET]
var_a = 0 var_b = 1 var_c = var_a + var_b var_d = 100 var_e = 1 var_f = var_d - var_e var_g = 1 list_a = [i for i in range(var_c, var_f + 1, var_g)] var_h = 4 var_i = 6 var_j = var_i * var_h / math.gcd(int(var_i), int(var_h)) list_b = [] var_j = int(var_j) for i in list_a: i = int(i) if i % var_j == 0: list_b.append(i) var_k = 7 var_l = list_b[var_k-1] print(int(var_l))
Arithmetic calculation
The straight line drawn by the Yoojeong is 3 millimeters (mm) shorter than 31 centimeters (cm). Write the length of the straight line drawn by Yoojeong in millimeters (mm).
307
31 10 [OP_MUL] 3 [OP_SUB]
var_a = 31 var_b = 10 var_c = var_a * var_b var_d = 3 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
Hyunsu harvested apples from the apple farm and tried to divide them equally into 8 boxes. But 8 boxes were not enough, and he needed 2 more boxes. So he put 1 more apple in each box, and now there are 4 apples left. How many apples did Hyunsu harvest?
40
8 2 [OP_SUB] 4 [OP_ADD] 8 8 2 [OP_SUB] [OP_SUB] [OP_FDIV] 8 [OP_MUL]
var_a = 8 var_b = 2 var_c = var_a - var_b var_d = 4 var_e = var_c + var_d var_f = 8 var_g = 8 var_h = 2 var_i = var_g - var_h var_j = var_f - var_i var_k = var_e // var_j var_l = 8 var_m = var_k * var_l print(int(var_m))
Arithmetic calculation
Five bags each contain 5 marbles, and another bag contains 8 marbles. How many marbles are in all 6 bags?
33
5 5 [OP_MUL] 1 8 [OP_MUL] [OP_ADD]
var_a = 5 var_b = 5 var_c = var_a * var_b var_d = 1 var_e = 8 var_f = var_d * var_e var_g = var_c + var_f print(int(var_g))
Arithmetic calculation
Find the smallest multiple of 7 greater than 500.
504
1 9999 1 [OP_LIST_ARANGE] 500 [OP_LIST_MORE] 7 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN]
var_a = 1 var_b = 9999 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 500 list_b = [] for i in list_a: if i > var_d: list_b.append(i) var_e = 7 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))
Possibility
What is the largest two-digit number made by the two numbers 3 and 6? Note: you cannot use the same number multiple times.
63
[OP_LIST_SOL] 6 3 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MAX]
var_a = 6 var_b = 3 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] print(int(var_e))
Geometry
There is a hat that has 14 corners and shaped like a pyramid. Find the number of vertices of this hat.
8
14 2 [OP_DIV] 1 [OP_ADD]
var_a = 14 var_b = 2 var_c = var_a / var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Geometry
The sum of 4 sides of a rectangle is equal to 50 centimeters (cm). If the length of this rectangle is 13 centimeters (cm), how many square centimeters (cm2) is the area of the rectangle?
156
50 2 [OP_DIV] 13 [OP_SUB] 13 [OP_MUL]
var_a = 50 var_b = 2 var_c = var_a / var_b var_d = 13 var_e = var_c - var_d var_f = 13 var_g = var_e * var_f print(int(var_g))
Correspondence
When you add 3 to a number, multiply it by 5, and divide it by 8, the quotient is 156 and the remainder is 2. Find the number.
247
156 8 [OP_MUL] 2 [OP_ADD] 5 [OP_DIV] 3 [OP_SUB]
var_a = 156 var_b = 8 var_c = var_a * var_b var_d = 2 var_e = var_c + var_d var_f = 5 var_g = var_e / var_f var_h = 3 var_i = var_g - var_h print(int(var_i))
Possibility
Kiyoung and Gicheol are playing a game of making three-digit numbers with number magnets 1, 6, and 8. When Kiyoung made the largest possible number, and Kicheol made the third smallest number, find the sum of the numbers made by Kiyoung and Kicheol.
1479
[OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [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 = 1 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))
Possibility
How many common three-digit multiples of 6 and 9 are 4 or less and 0 or more and different in each digit?
4
[OP_LIST_SOL] 0 1 2 3 4 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 6 9 [OP_LCM] [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 0 var_b = 1 var_c = 2 var_d = 3 var_e = 4 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_f)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_g = 6 var_h = 9 var_i = var_h * var_g / math.gcd(int(var_h), int(var_g)) list_c = [] var_i = int(var_i) for i in list_b: i = int(i) if i % var_i == 0: list_c.append(i) var_j = len(list_c) print(int(var_j))
Comparison
There are 4 puppies: White, Black, Yellowy, and Spotted. Black is heavier than White and lighter than Yellowy. Spotted is heavier than Yellowy. Which puppy is the lightest?
White
[OP_LIST_SOL] White Black Yellowy Spotted [OP_LIST_EOL] [OP_LIST_SOL] Black White > Black Yellowy < Spotted Yellowy > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET]
var_a = 'White' var_b = 'Black' var_c = 'Yellowy' var_d = 'Spotted' 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 = 'Black' var_f = 'White' var_g = '>' var_h = 'Black' var_i = 'Yellowy' var_j = '<' var_k = 'Spotted' var_l = 'Yellowy' var_m = '>' list_b= [] if "/" in str(var_m): var_m = eval(str(var_m)) list_b.append(var_m) if "/" in str(var_l): var_l = eval(str(var_l)) list_b.append(var_l) if "/" in str(var_k): var_k = eval(str(var_k)) list_b.append(var_k) if "/" in str(var_j): var_j = eval(str(var_j)) list_b.append(var_j) if "/" in str(var_i): var_i = eval(str(var_i)) list_b.append(var_i) if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_g): var_g = eval(str(var_g)) list_b.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() global item_name_index_dict items_name_list = list_a.copy() conditions = [] condition_list = list_b.copy() temp_stack = [] for index_, cond_ in enumerate(map(str, condition_list)): if cond_ in ("<", ">", "="): operand_right = temp_stack.pop() operand_left = temp_stack.pop() if cond_ == "=": cond_ = "==" conditions.append(f"{operand_left} {cond_} {operand_right}") else: if not cond_.isdigit(): cond_ = "{" + cond_ + "}" temp_stack.append(cond_) item_name_index_dict = {} for perm in itertools.permutations(range(1, len(items_name_list) + 1)): item_name_index_dict = dict(zip(items_name_list, perm)) formatted_conditions = \ [condition.format_map(item_name_index_dict) for condition in conditions] if all(map(eval, formatted_conditions)): break list_c = list(item_name_index_dict.keys()) list_c.sort(key=item_name_index_dict.get, reverse=True) var_n = len(list_c) var_o = list_c[var_n-1] print(var_o)
Possibility
Using the number cards 1, 6, and 8 all once, find the sum of the smallest three-digit number and the third smallest three-digit number.
786
[OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] 3 [OP_LIST_GET] [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 = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[var_e-1] var_g = 3 var_h = list_b[var_g-1] var_i = var_f + var_h print(int(var_i))
Arithmetic calculation
X is the number of 2 groups of 10 and 6 units, and Y is the number of 4 groups of 10 and 1 unit. Find the sum of X and Y.
67
10 2 [OP_MUL] 6 [OP_ADD] 10 4 [OP_MUL] 1 [OP_ADD] [OP_ADD]
var_a = 10 var_b = 2 var_c = var_a * var_b var_d = 6 var_e = var_c + var_d var_f = 10 var_g = 4 var_h = var_f * var_g var_i = 1 var_j = var_h + var_i var_k = var_e + var_j print(int(var_k))
Possibility
Among Jungkook, Jimin, and Yoongi, we want to choose two people by allowing duplicates. How many options are there in all?
6
[OP_LIST_SOL] Jungkook Jimin Yoongi [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_ADD] 1 [OP_SUB] 2 [OP_COMB]
var_a = 'Jungkook' var_b = 'Jimin' var_c = 'Yoongi' list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = len(list_a) var_e = 2 var_f = var_d + var_e var_g = 1 var_h = var_f - var_g var_i = 2 var_j = 1 var_h = int(var_h) var_i = int(var_i) for i, elem in enumerate(range(var_i)): var_j = var_j * (var_h-i) for i, elem in enumerate(range(var_i)): var_j = var_j / (i+1) print(int(var_j))
Possibility
When selecting one representative and one vice-president from among the five students, Jungkook, Jimin, Seokjin, Taehyung, and Namjoon, how many ways are there to select them?
20
5 2 [OP_PERM]
var_a = 5 var_b = 2 var_c = 1 var_a = int(var_a) var_b = int(var_b) for i, elem in enumerate(range(var_b)): var_c = var_c * (var_a-i) print(int(var_c))
Arithmetic calculation
There are 72 marbles in the two bags, (a) and (b). If there are 42 marbles in sack (A), how many more marbles are in sack (A) than in sack (B)?
12
42 72 42 [OP_SUB] [OP_SUB]
var_a = 42 var_b = 72 var_c = 42 var_d = var_b - var_c var_e = var_a - var_d print(int(var_e))
Arithmetic calculation
Hyuksu ate 2.6 kilograms (kg) of meat yesterday, and 5.98 kilograms (kg) of meat today. How many kilograms (kg) of meat did Hyuksu eat in two days?
8.58
2.6 5.98 [OP_ADD]
var_a = 2.6 var_b = 5.98 var_c = var_a + var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Geometry
If all five angles of a figure are the same and the perimeter of the figure is 23.4 centimeters (cm), find how many centimeters (cm) is the length of one side of the figure.
4.68
23.4 5 [OP_DIV]
var_a = 23.4 var_b = 5 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
There are two books in one set. I bought 3 sets of this book and paid 21,000 won. If one book in the set costs 300 won more than the other, how much is the cheaper book?
3350
21000 3 [OP_DIV] 300 [OP_SUB] 2 [OP_DIV]
var_a = 21000 var_b = 3 var_c = var_a / var_b var_d = 300 var_e = var_c - var_d var_f = 2 var_g = var_e / var_f print(int(var_g))
Correspondence
You made the mistake of adding a number to 36, so when you added the number to 63, you got 70. How much is it if you calculate it correctly?
43
36 70 63 [OP_SUB] [OP_ADD]
var_a = 36 var_b = 70 var_c = 63 var_d = var_b - var_c var_e = var_a + var_d print(int(var_e))
Correspondence
When a number is divided by 6, the quotient is 124 and the remainder is 4. What is the result of adding 24 to the number and dividing it by 8?
96.5
124 6 [OP_MUL] 4 [OP_ADD] 24 [OP_ADD] 8 [OP_DIV]
var_a = 124 var_b = 6 var_c = var_a * var_b var_d = 4 var_e = var_c + var_d var_f = 24 var_g = var_e + var_f var_h = 8 var_i = var_g / var_h print('{:.2f}'.format(round(var_i+1e-10,2)))
Correspondence
When the students in class 1 were paired with two students, there were eight pairs. If you ask the students in class 1 to form groups of four, how many groups will form?
4
8 2 [OP_MUL] 4 [OP_DIV]
var_a = 8 var_b = 2 var_c = var_a * var_b var_d = 4 var_e = var_c / var_d print(int(var_e))
Comparison
Taehyung entered the house for the 345th place, and Seokjin entered the house before Taehyung by 110 people. What place did Seokjin take?
234
345 110 [OP_SUB] 1 [OP_SUB]
var_a = 345 var_b = 110 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Comparison
Jungkook collected 6 times 3 apples, Yoongi collected 4 apples, and Yuna collected 5 apples. Who has the fewest apples?
Yoongi
[OP_LIST_SOL] Jungkook Yoongi Yuna [OP_LIST_EOL] [OP_LIST_SOL] 6 3 [OP_MUL] 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)
Comparison
Seokjin placed 8th on a test, and Taehyung ranked right below Seokjin. Find out the rank of Taehyung's score in ordinal number.
9
8 1 [OP_ADD]
var_a = 8 var_b = 1 var_c = var_a + var_b print(int(var_c))
Correspondence
After multiplying a decimal by 1000, moving the decimal two places to the left equals 12.5. Find the original decimal.
1.25
12.5 10 2 [OP_POW] [OP_MUL] 1000 [OP_DIV]
var_a = 12.5 var_b = 10 var_c = 2 var_d = var_b ** var_c var_e = var_a * var_d var_f = 1000 var_g = var_e / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Possibility
Find the sum of the largest three-digit number and the smallest three-digit number made by using the number cards 6, 2, and 5 all once.
654
[OP_LIST_SOL] 6 2 5 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] [OP_LIST_POP] 1 [OP_LIST_MIN] [OP_ADD]
var_a = 6 var_b = 2 var_c = 5 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_a.copy() list_d.sort() var_h = list_d[var_g-1] var_i = var_f + var_h print(int(var_i))
Comparison
Yuna placed 6th in the running event, and Min-Young came in as the 5th person after Yuna crossed the finish line. What is Min-Young's rank?
11
6 5 [OP_ADD]
var_a = 6 var_b = 5 var_c = var_a + var_b print(int(var_c))
Correspondence
We need to subtract a number from 66 and add 21, but we accidently added this number to 66 and 93 came out. How much do you get when you calculate correctly?
60
66 93 66 [OP_SUB] [OP_SUB] 21 [OP_ADD]
var_a = 66 var_b = 93 var_c = 66 var_d = var_b - var_c var_e = var_a - var_d var_f = 21 var_g = var_e + var_f print(int(var_g))
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)))
Geometry
If the area of one side of a cube is 64 square centimeters (cm2), what is the volume of this cube in cubic centimeters (cm3)?
512
64 1/2 [OP_POW] 3 [OP_POW]
var_a = 64 var_b = 0.5 var_c = var_a ** var_b var_d = 3 var_e = var_c ** var_d print(int(var_e))
Correspondence
When you add 19 to a number, you get 47. Find the number.
28
47 19 [OP_SUB]
var_a = 47 var_b = 19 var_c = var_a - var_b print(int(var_c))
Arithmetic calculation
It took me 4 days to read an entire book. I read 1/2 of the total on the first day, 1/4 of the total on the second day, 1/6 of the total on the third day, and 20 pages on the fourth day. Find the total number of pages of this book.
240
20 1 1/2 1/4 [OP_ADD] 1/6 [OP_ADD] [OP_SUB] [OP_DIV]
var_a = 20 var_b = 1 var_c = 0.5 var_d = 0.25 var_e = var_c + var_d var_f = 0.16666666666666666 var_g = var_e + var_f var_h = var_b - var_g var_i = var_a / var_h print(int(eval('{:.2f}'.format(round(var_i+1e-10,2)))))
Comparison
A dog weighs 4.56 kilograms (kg) and a cat weighs 10 times 462 grams (g). Which animal is heavier, a dog or a cat?
cat
[OP_LIST_SOL] dog cat [OP_LIST_EOL] [OP_LIST_SOL] 4.56 462 10 [OP_MUL] 1000 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'dog' var_b = 'cat' 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 = 4.56 var_d = 462 var_e = 10 var_f = var_d * var_e var_g = 1000 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_c): var_c = eval(str(var_c)) list_b.append(var_c) 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
If the sum of two consecutive natural numbers is 39, find the largest of the two natural numbers.
20
39 1 [OP_ADD] 2 [OP_DIV]
var_a = 39 var_b = 1 var_c = var_a + var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Geometry
There is a pretty tile. The tile is in the shape of a parallelogram, with each side measuring 18 centimeters (cm) and 12 centimeters (cm). Find the perimeter of the tile.
60
18 12 [OP_ADD] 2 [OP_MUL]
var_a = 18 var_b = 12 var_c = var_a + var_b var_d = 2 var_e = var_c * var_d print(int(var_e))
Possibility
Find the number of ways to throw a dice twice so that the sum of the results is 8.
5
1 6 1 [OP_LIST_ARANGE] 2 [OP_LIST_GET_PRODUCT] [OP_LIST_NUM2SUM] 8 [OP_LIST_FIND_NUM]
var_a = 1 var_b = 6 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.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] 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 = 8 var_g = 0 var_f = int(var_f) for i in list_c: i = int(i) if i == var_f: var_g = var_g + 1 print(int(var_g))
Arithmetic calculation
There are five numbers 10, 11, 12, 13, and 14. What is the quotient of the second largest number divided by the second smallest number?
1
[OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 2 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_FDIV]
var_a = 10 var_b = 11 var_c = 12 var_d = 13 var_e = 14 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 2 list_b=list_a.copy() list_b.sort() var_g = list_b[-var_f] var_h = 2 list_c=list_a.copy() list_c.sort() var_i = list_c[var_h-1] var_j = var_g // var_i print(int(var_j))
Arithmetic calculation
Eunji ate 18 of the 27 tangerines her father bought. How many tangerines are left?
9
27 18 [OP_SUB]
var_a = 27 var_b = 18 var_c = var_a - var_b print(int(var_c))
Comparison
20 students are waiting for the bus. If Jungkook came right before Yoongi, and there are 11 people who came after Jungkook, how many people came before Yoongi?
9
20 11 [OP_SUB] 1 [OP_ADD] 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))
Correspondence
The beaker is containing liquid. Dust got into the liquid so I removed 5 milliliters (ml) of the liquid, and there remained 35 milliliters (ml) of the solution in the beaker. Find how many milliliters (ml) would have been in one cup if the solution in the beaker had been not removed and equally poured into 5 different cups.
8
35 5 [OP_ADD] 5 [OP_DIV]
var_a = 35 var_b = 5 var_c = var_a + var_b var_d = 5 var_e = var_c / var_d print(int(var_e))
Geometry
Find the area of a planar figure of a cuboid that is 3 centimeters (cm) wide, 4 centimeters (cm) long, and 5 centimeters (cm) high.
94
3 4 [OP_MUL] 3 5 [OP_MUL] 4 5 [OP_MUL] [OP_ADD] [OP_ADD] 2 [OP_MUL]
var_a = 3 var_b = 4 var_c = var_a * var_b var_d = 3 var_e = 5 var_f = var_d * var_e var_g = 4 var_h = 5 var_i = var_g * var_h var_j = var_f + var_i var_k = var_c + var_j var_l = 2 var_m = var_k * var_l print(int(var_m))
Arithmetic calculation
Find the sum of the largest and smallest three-digit numbers with 2 in the hundreds and 7 in the ones.
504
[OP_LIST_SOL] 2 A 7 [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD]
var_a = 2 var_b = 'A' 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="" 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 = 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))
Correspondence
2/9 of all students in Yeeun's class are blood type A, and 2/5 of all students in Yeeun's class are type B. If there are 10 students with type A, how many students with type B are there?
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))
Geometry
All sides of a cuboid-shaped object measuring 4 centimeters (cm) in width, 3 centimeters (cm) in length, and 3 centimeters (cm) in height was painted blue. This figure was cut into 36 cubes, all of the same size. How many pieces have paint on only two sides?
16
4 2 [OP_SUB] 3 2 [OP_SUB] [OP_ADD] 3 2 [OP_SUB] [OP_ADD] 4 [OP_MUL]
var_a = 4 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 = 3 var_i = 2 var_j = var_h - var_i var_k = var_g + var_j var_l = 4 var_m = var_k * var_l print(int(var_m))
Comparison
Students lined up in ascending order according to their heights. Hoseok is taller than Namjoon, who is standing in the 3rd place, but shorter than Yoongi, who is standing in the 5th place. How tall is Hoseok? Answer in ordinal number.
4
3 5 [OP_ADD] 2 [OP_FDIV]
var_a = 3 var_b = 5 var_c = var_a + var_b var_d = 2 var_e = var_c // var_d print(int(var_e))
Comparison
Min-young, Min-ju, Min-gi, and Min-ji each drank milk, and realized there was a number written on the bottom of the milk carton. Min-young's number was 21, Min-ju's number was 9 less than Min-young's, and Min-gi's number was 17 more than Min-young's. When the sum of Min-young's and Min-ju's numbers minus Min-gi's number is equal to Min-ji's number minus 5, what is the number written on Min-ji's milk?
9
21 21 9 [OP_SUB] [OP_ADD] 21 9 [OP_SUB] 17 [OP_ADD] [OP_SUB] 5 [OP_ADD]
var_a = 21 var_b = 21 var_c = 9 var_d = var_b - var_c var_e = var_a + var_d var_f = 21 var_g = 9 var_h = var_f - var_g var_i = 17 var_j = var_h + var_i var_k = var_e - var_j var_l = 5 var_m = var_k + var_l print(int(var_m))
Possibility
There are 1 white marble, 1 black marble, 1 purple marble, 1 green marble and 1 red marble. How many different ways can there be to choose 2 different marbles?
10
[OP_LIST_SOL] white black purple green red [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB]
var_a = 'white' var_b = 'black' var_c = 'purple' var_d = 'green' var_e = 'red' 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 = 2 var_h = 1 var_f = int(var_f) var_g = int(var_g) for i, elem in enumerate(range(var_g)): var_h = var_h * (var_f-i) for i, elem in enumerate(range(var_g)): var_h = var_h / (i+1) print(int(var_h))
Arithmetic calculation
Find the sum of all common divisors of 8 and 12.
7
8 [OP_LIST_GET_DIVISOR] 12 [OP_LIST_GET_DIVISOR] [OP_SET_INTERSECT] [OP_LIST_SUM]
var_a = 8 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 = 12 list_b = [] num_sqrt = int(math.sqrt(var_b)) for i in range(1, num_sqrt+1): if var_b % i == 0: list_b.append(i) list_b.append(int(var_b/i)) list_b = sorted(set(list_b)) list_c = list(set(list_a) & set(list_b)) list_c = [float(i) for i in list_c] var_c = sum(list_c) print(int(var_c))
Correspondence
Consider A and B are two other natural numbers. If A divides by 13 is 33 with a remainder of B, find A that makes B the largest.
441
13 33 [OP_MUL] 12 [OP_ADD]
var_a = 13 var_b = 33 var_c = var_a * var_b var_d = 12 var_e = var_c + var_d print(int(var_e))
Correspondence
AB19 rounded up to the hundreds place gives 7300. Find the value obtained by rounding down AB19 to the tens place.
7210
AB19 [OP_GEN_POSSIBLE_LIST] 7300 100 [OP_SUB] [OP_LIST_MORE] 7300 [OP_LIST_LESS_EQUAL] AB19 A [OP_LIST_FIND_UNK] 1000 [OP_MUL] AB19 B [OP_LIST_FIND_UNK] 100 [OP_MUL] [OP_ADD] 19 [OP_ADD] 2 [OP_FLOOR]
var_a = 'AB19' 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 = 7300 var_c = 100 var_d = var_b - var_c list_b = [] for i in list_a: if i > var_d: list_b.append(i) var_e = 7300 list_c = [] for i in list_b: if i <= var_e: list_c.append(i) var_f = 'AB19' var_g = 'A' var_f = str(var_f) var_g = str(var_g) unk_idx = var_f.index(var_g) var_h = 0 for elem in list_c: elem = str(elem) var_h = int(elem[unk_idx]) var_i = 1000 var_j = var_h * var_i var_k = 'AB19' var_l = 'B' var_k = str(var_k) var_l = str(var_l) unk_idx = var_k.index(var_l) var_m = 0 for elem in list_c: elem = str(elem) var_m = int(elem[unk_idx]) var_n = 100 var_o = var_m * var_n var_p = var_j + var_o var_q = 19 var_r = var_p + var_q var_s = 2 var_t=int((var_r//(10**(var_s-1)))*10**(var_s-1)) print(int(var_t))
Geometry
The perimeter of an equilateral triangle is the same as the sum of four sides of an rectangle which is 125 centimeters (cm) wide and 115 centimeters (cm) long. If a snail moves one centimeter (cm) per second, how many seconds does it take to move forward by the length of one side of this equilateral triangle?
160
125 115 [OP_ADD] 2 [OP_MUL] 3 [OP_DIV]
var_a = 125 var_b = 115 var_c = var_a + var_b var_d = 2 var_e = var_c * var_d var_f = 3 var_g = var_e / var_f print(int(var_g))
Arithmetic calculation
Moving a decimal point two places to the right makes a certain number 3.7 larger than it should be. Find what the original decimal number is.
0.04
3.7 10 2 [OP_POW] 1 [OP_SUB] [OP_DIV]
var_a = 3.7 var_b = 10 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)))
Possibility
What is the largest two-digit number that can be formed by drawing two different numbers from 3, 9, 5, and 8 and then adding the remaining two numbers?
106
[OP_LIST_SOL] 3 9 5 8 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_NUM2LIST] [OP_LIST_SUM] [OP_ADD]
var_a = 3 var_b = 9 var_c = 5 var_d = 8 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 1 list_c=list_b.copy() list_c.sort() var_g = list_c[-var_f] var_h = 1 list_d=list_b.copy() list_d.sort() var_i = list_d[var_h-1] list_e = [] var_i = int(var_i) while var_i//10 > 0: list_e.append(var_i%10) var_i = var_i//10 list_e.append(var_i%10) list_e = list_e[::-1] list_e = [float(i) for i in list_e] var_j = sum(list_e) var_k = var_g + var_j print(int(var_k))
Comparison
There are five dogs: A, B, C, D, and E. A dog is smaller than C dog. D dog is bigger than B dog. Also, D dog is smaller than A dog. If B dog is bigger than E dog, which is the biggest dog?
C
[OP_LIST_SOL] A B C D E [OP_LIST_EOL] [OP_LIST_SOL] D B > D A < B E > A C < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET]
var_a = 'A' var_b = 'B' var_c = 'C' var_d = 'D' var_e = 'E' list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 'D' var_g = 'B' var_h = '>' var_i = 'D' var_j = 'A' var_k = '<' var_l = 'B' var_m = 'E' var_n = '>' var_o = 'A' var_p = 'C' var_q = '<' list_b= [] if "/" in str(var_q): var_q = eval(str(var_q)) list_b.append(var_q) if "/" in str(var_p): var_p = eval(str(var_p)) list_b.append(var_p) if "/" in str(var_o): var_o = eval(str(var_o)) list_b.append(var_o) if "/" in str(var_n): var_n = eval(str(var_n)) list_b.append(var_n) if "/" in str(var_m): var_m = eval(str(var_m)) list_b.append(var_m) if "/" in str(var_l): var_l = eval(str(var_l)) list_b.append(var_l) if "/" in str(var_k): var_k = eval(str(var_k)) list_b.append(var_k) if "/" in str(var_j): var_j = eval(str(var_j)) list_b.append(var_j) if "/" in str(var_i): var_i = eval(str(var_i)) list_b.append(var_i) if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_g): var_g = eval(str(var_g)) list_b.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) list_b.reverse() global item_name_index_dict items_name_list = list_a.copy() conditions = [] condition_list = list_b.copy() temp_stack = [] for index_, cond_ in enumerate(map(str, condition_list)): if cond_ in ("<", ">", "="): operand_right = temp_stack.pop() operand_left = temp_stack.pop() if cond_ == "=": cond_ = "==" conditions.append(f"{operand_left} {cond_} {operand_right}") else: if not cond_.isdigit(): cond_ = "{" + cond_ + "}" temp_stack.append(cond_) item_name_index_dict = {} for perm in itertools.permutations(range(1, len(items_name_list) + 1)): item_name_index_dict = dict(zip(items_name_list, perm)) formatted_conditions = \ [condition.format_map(item_name_index_dict) for condition in conditions] if all(map(eval, formatted_conditions)): break list_c = list(item_name_index_dict.keys()) list_c.sort(key=item_name_index_dict.get, reverse=True) var_r = 1 var_s = list_c[var_r-1] print(var_s)
Arithmetic calculation
A ball bounces 1/10 of the height it is dropped. If the ball falls from a height of 15 meters (m), find out how many meters (m) it is if you round the height of the third jump from the second decimal place.
0.02
15 1/10 3 [OP_POW] [OP_MUL] 2 [OP_ROUND]
var_a = 15 var_b = 0.1 var_c = 3 var_d = var_b ** var_c var_e = var_a * var_d var_f = 2 var_g = round(float(var_e)+1e-10, var_f) print('{:.2f}'.format(round(var_g+1e-10,2)))
Arithmetic calculation
What is the sum of 1.84, 5.23, 2.41, and 8.64?
18.12
1.84 5.23 [OP_ADD] 2.41 [OP_ADD] 8.64 [OP_ADD]
var_a = 1.84 var_b = 5.23 var_c = var_a + var_b var_d = 2.41 var_e = var_c + var_d var_f = 8.64 var_g = var_e + var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Geometry
There is a picture of a rectangle with an area of 54.3 square centimeters (cm2). If the width is 6 centimeters (cm), how many centimeters (cm) is the length?
9.05
54.3 6 [OP_DIV]
var_a = 54.3 var_b = 6 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Geometry
The largest square was made with a piece of string 32 centimeters (cm) long. What is the area of the square created in square centimeters (cm2)?
64
32 4 [OP_DIV] 2 [OP_POW]
var_a = 32 var_b = 4 var_c = var_a / var_b var_d = 2 var_e = var_c ** var_d print(int(var_e))
Correspondence
A2468B consists of single digits A and B. How many possible numbers are there when A2468B is divisible by 55?
2
A2468B [OP_GEN_POSSIBLE_LIST] 55 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 'A2468B' 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 = 55 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))
Comparison
Haeun has a 1/2 meter (m) long colored tape, and Minkyung has a 2/3 meters (m) long colored tape. Find whose color tape is longer.
Minkyung
[OP_LIST_SOL] Haeun Minkyung [OP_LIST_EOL] [OP_LIST_SOL] 1/2 2/3 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Haeun' var_b = 'Minkyung' 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 = 0.5 var_d = 0.6666666666666666 list_b= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_b.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_b.append(var_c) list_b.reverse() var_e = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] var_g = list_b.index(var_f)+1 var_h = list_a[var_g-1] print(var_h)
Geometry
There is a rectangular parallelepiped whose width of base is 4 centimeters (cm), length 6 centimeters (cm) longer than width, and height 5 centimeters (cm) longer than length. What is the surface area of this cuboid in square centimeters (cm2)?
500
4 4 6 [OP_ADD] [OP_MUL] 4 4 6 [OP_ADD] [OP_ADD] 4 6 5 [OP_ADD] [OP_ADD] [OP_MUL] [OP_ADD] 2 [OP_MUL]
var_a = 4 var_b = 4 var_c = 6 var_d = var_b + var_c var_e = var_a * var_d var_f = 4 var_g = 4 var_h = 6 var_i = var_g + var_h var_j = var_f + var_i var_k = 4 var_l = 6 var_m = 5 var_n = var_l + var_m var_o = var_k + var_n var_p = var_j * var_o var_q = var_e + var_p var_r = 2 var_s = var_q * var_r print(int(var_s))
Comparison
Jiseok's backpack weighs 1.49 kilograms (kg), and Miho's backpack weighs 9/20 kilograms (kg). Whose backpack is lighter?
Miho
[OP_LIST_SOL] Jiseok Miho [OP_LIST_EOL] [OP_LIST_SOL] 1.49 9 20 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jiseok' var_b = 'Miho' 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.49 var_d = 9 var_e = 20 var_f = var_d / var_e list_b= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_c): var_c = eval(str(var_c)) list_b.append(var_c) list_b.reverse() var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[var_g-1] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Comparison
When Taehyung and 10 of his classmates are standing, Taehyung has 5 students standing to his left. How many students are standing to his right?
4
10 5 [OP_SUB] 1 [OP_SUB]
var_a = 10 var_b = 5 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
There are 5 times as many chickens as ducks, and 12 fewer rabbits than ducks. If there are 4 rabbits, what is the total number of chickens, ducks and rabbits are there?
100
4 4 12 [OP_ADD] [OP_ADD] 5 4 12 [OP_ADD] [OP_MUL] [OP_ADD]
var_a = 4 var_b = 4 var_c = 12 var_d = var_b + var_c var_e = var_a + var_d var_f = 5 var_g = 4 var_h = 12 var_i = var_g + var_h var_j = var_f * var_i var_k = var_e + var_j print(int(var_k))
Possibility
Pick the numbers 1, 6, and 8 once to make a three-digit number and pay that amount. In this case, find the sum of the second largest and third smallest money that can be received.
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
Trees are planted at intervals of 30 meters (m) along the circular promenade. If the length of the trail is 1 kilometer (km) and 200 meters (m), how many trees were planted in all?
40
1 1000 [OP_MUL] 200 [OP_ADD] 30 [OP_DIV]
var_a = 1 var_b = 1000 var_c = var_a * var_b var_d = 200 var_e = var_c + var_d var_f = 30 var_g = var_e / var_f print(int(var_g))
Geometry
Hanbyeol has 3.2 pieces of square colored paper with a side length of 8.5 cm. Find the area he could get when gluing this colored paper together without any gap.
231.2
8.5 2 [OP_POW] 3.2 [OP_MUL]
var_a = 8.5 var_b = 2 var_c = var_a ** var_b var_d = 3.2 var_e = var_c * var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Correspondence
When you subtract 5 from a number, the answer is 2. What will you get from the number plus 3?
10
2 5 [OP_ADD] 3 [OP_ADD]
var_a = 2 var_b = 5 var_c = var_a + var_b var_d = 3 var_e = var_c + var_d print(int(var_e))
Correspondence
You get 231.88 when you multiply 1.87 by a particular number. What is the quotient of that particular number divided by 25?
4
231.88 1.87 [OP_DIV] 25 [OP_FDIV]
var_a = 231.88 var_b = 1.87 var_c = var_a / var_b var_d = 25 var_e = var_c // var_d print(int(var_e))
Geometry
What is the number of faces of a truncated quadrangular pyramid?
6
4 2 [OP_ADD]
var_a = 4 var_b = 2 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
There are 56 oak trees. There are 18 fewer ginkgo trees than pear trees, and 12 more ginkgo trees than maple trees. How many maple trees are there in all?
26
56 18 [OP_SUB] 12 [OP_SUB]
var_a = 56 var_b = 18 var_c = var_a - var_b var_d = 12 var_e = var_c - var_d print(int(var_e))
Comparison
The length of the yellow tape is 0.309 meters (m), and the length of the red tape is 48.2 centimeters (cm). Which color is longer?
red
[OP_LIST_SOL] yellow red [OP_LIST_EOL] [OP_LIST_SOL] 0.309 48.2 100 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'yellow' var_b = 'red' 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 = 0.309 var_d = 48.2 var_e = 100 var_f = var_d * var_e list_b= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_c): var_c = eval(str(var_c)) list_b.append(var_c) list_b.reverse() var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Arithmetic calculation
I'm going to eat 19 cookies for 9 days. How many cookies should I eat per day?
2.11
19 9 [OP_DIV]
var_a = 19 var_b = 9 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Comparison
25 students stand in a line. There are 9 people behind Yuna. How many students are standing in front of Yuna?
15
25 9 [OP_SUB] 1 [OP_SUB]
var_a = 25 var_b = 9 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Possibility
You are going to use 2 of your 4 number cards 3, 5, 6, 7 to create a two-digit number. What is the largest multiple of 7 that can be made?
63
[OP_LIST_SOL] 3 5 6 7 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 7 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX]
var_a = 3 var_b = 5 var_c = 6 var_d = 7 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 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) var_g = 1 list_d=list_c.copy() list_d.sort() var_h = list_d[-var_g] print(int(var_h))
Arithmetic calculation
There are 12 toads in the pond and 6 outside the pond. How many toads are there in all?
18
12 6 [OP_ADD]
var_a = 12 var_b = 6 var_c = var_a + var_b print(int(var_c))
Geometry
There are 1 triangle and 3 hexagons. What is the sum of all vertices of the shapes?
21
3 6 3 [OP_MUL] [OP_ADD]
var_a = 3 var_b = 6 var_c = 3 var_d = var_b * var_c var_e = var_a + var_d print(int(var_e))
Arithmetic calculation
When three 18 centimeters (cm) long colored tapes were overlapped and attached at the same length, it became 50.5 centimeters (cm) long. Find the answer by how many centimeters (cm) were overlapped and connected.
1.75
18 3 [OP_MUL] 50.5 [OP_SUB] 3 1 [OP_SUB] [OP_DIV]
var_a = 18 var_b = 3 var_c = var_a * var_b var_d = 50.5 var_e = var_c - var_d var_f = 3 var_g = 1 var_h = var_f - var_g var_i = var_e / var_h print('{:.2f}'.format(round(var_i+1e-10,2)))