category
stringclasses
5 values
question
stringlengths
20
555
answer
stringlengths
1
20
solution_abst
stringlengths
1
287
solution_code
stringlengths
27
5.97k
Arithmetic calculation
There are buses that depart only when there are more than 15 and no more than 30 people. If there are 9 people on the bus right now, find out how many more people need to get on the bus before it starts.
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))
Correspondence
Cheolsu's weight is 2/3 of his mother's weight, and his father's weight is 72 kilograms (kg). If the sum of Cheolsu's and his father's weight is equal to twice the mother's weight, find how many kilograms (kg) Cheolsu weighs.
36
72 2 1 2/3 [OP_DIV] [OP_MUL] 1 [OP_SUB] [OP_DIV]
var_a = 72 var_b = 2 var_c = 1 var_d = 0.6666666666666666 var_e = var_c / var_d var_f = var_b * var_e var_g = 1 var_h = var_f - var_g var_i = var_a / var_h print(int(var_i))
Correspondence
I mistakenly added 0.42 which should have subtracted from a number, and I ended up with 0.9. How much would it be if I counted correctly?
0.06
0.9 0.42 [OP_SUB] 0.42 [OP_SUB]
var_a = 0.9 var_b = 0.42 var_c = var_a - var_b var_d = 0.42 var_e = var_c - var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Correspondence
We have the expression 14A+2B3=418. Find the number that goes into B.
7
14A+2B3=418 B [OP_DIGIT_UNK_SOLVER]
var_a = '14A+2B3=418' var_b = 'B' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] print(int(var_c))
Possibility
How many ways can 19 be expressed as the sum of four different natural numbers?
264
1 9 1 [OP_LIST_ARANGE] 4 [OP_LIST_GET_PERM] [OP_LIST_NUM2SUM] 19 [OP_LIST_FIND_NUM]
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 = 4 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] 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 = 19 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
This year, the age of the mother is four times the age of the son. Three years ago, the combined ages of mother and son were 49. How old is her son this year?
11
49 3 2 [OP_MUL] [OP_ADD] 1 4 [OP_ADD] [OP_DIV]
var_a = 49 var_b = 3 var_c = 2 var_d = var_b * var_c var_e = var_a + var_d var_f = 1 var_g = 4 var_h = var_f + var_g var_i = var_e / var_h print(int(var_i))
Geometry
A cube was cut to make 27 cubes with each edge being 4 centimeters (cm) long. Find the surface area of the original cube in square centimeters (cm2).
864
4 27 1 3 [OP_DIV] [OP_POW] [OP_MUL] 2 [OP_POW] 6 [OP_MUL]
var_a = 4 var_b = 27 var_c = 1 var_d = 3 var_e = var_c / var_d var_f = var_b ** var_e var_g = var_a * var_f var_h = 2 var_i = var_g ** var_h var_j = 6 var_k = var_i * var_j print(int(var_k))
Possibility
There is a three-digit number made of 5, 9, and 2. When the difference between the two possible numbers is the greatest, which of the two numbers is smaller?
259
[OP_LIST_SOL] 5 9 2 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN]
var_a = 5 var_b = 9 var_c = 2 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] print(int(var_f))
Comparison
Juri is taller than Jungwoo. Myunghyun is taller than Seokjin. Juri is shorter than Jungkook. Myunghyun is shorter than Jungwoo. Who is the tallest person?
Jungkook
[OP_LIST_SOL] Juri Jungwoo Myunghyun Seokjin Jungkook [OP_LIST_EOL] [OP_LIST_SOL] Juri Jungwoo > Myunghyun Seokjin > Juri Jungkook < Myunghyun Jungwoo < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET]
var_a = 'Juri' var_b = 'Jungwoo' var_c = 'Myunghyun' var_d = 'Seokjin' var_e = 'Jungkook' 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 = 'Juri' var_g = 'Jungwoo' var_h = '>' var_i = 'Myunghyun' var_j = 'Seokjin' var_k = '>' var_l = 'Juri' var_m = 'Jungkook' var_n = '<' var_o = 'Myunghyun' var_p = 'Jungwoo' 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)
Correspondence
You were supposed to subtract 12 from a certain number and multiply by 9, but accidentally add 12 and divide by 8. Find the correctly calculated value.
360
8 8 [OP_MUL] 12 [OP_SUB] 12 [OP_SUB] 9 [OP_MUL]
var_a = 8 var_b = 8 var_c = var_a * var_b var_d = 12 var_e = var_c - var_d var_f = 12 var_g = var_e - var_f var_h = 9 var_i = var_g * var_h print(int(var_i))
Correspondence
An engineering school has 928 students and 713 of those are male students. Find how many male students outnumber female students.
498
713 928 713 [OP_SUB] [OP_SUB]
var_a = 713 var_b = 928 var_c = 713 var_d = var_b - var_c var_e = var_a - var_d print(int(var_e))
Correspondence
A and B are different numbers ranging from 0 to 9. What is the sum of A and B when the multiplication expression AB×6=BBB is true?
11
AB×6=BBB A [OP_DIGIT_UNK_SOLVER] AB×6=BBB B [OP_DIGIT_UNK_SOLVER] [OP_ADD]
var_a = 'AB×6=BBB' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] var_d = 'AB×6=BBB' var_e = 'B' ans_dict = dict() var_d = var_d.replace('×','*') var_d = var_d.replace('x','*') var_d = var_d.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_d): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_d for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_d): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_f = ans_dict[var_e] var_g = var_c + var_f print(int(var_g))
Arithmetic calculation
Identify which numbers are greater than 2 and less than 3 among 3.3, 7/2, 1.9, 14/5, and 2.1, and count how many of them are.
2
[OP_LIST_SOL] 3.3 7/2 1.9 14/5 2.1 [OP_LIST_EOL] 2 [OP_LIST_MORE] 3 [OP_LIST_LESS] [OP_LIST_LEN]
var_a = 3.3 var_b = 3.5 var_c = 1.9 var_d = 2.8 var_e = 2.1 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 2 list_b = [] for i in list_a: if i > var_f: list_b.append(i) var_g = 3 list_c = [] for i in list_b: if i < var_g: list_c.append(i) var_h = len(list_c) print(int(var_h))
Correspondence
Made the mistake of subtracting 43.72 from a certain number, when I should subtract 4.372, and I got 16.398. How much would it be if I calculated it correctly?
55.75
16.398 43.72 [OP_ADD] 4.372 [OP_SUB]
var_a = 16.398 var_b = 43.72 var_c = var_a + var_b var_d = 4.372 var_e = var_c - var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Geometry
The truck carries cabbages from Seoul to Incheon and radishes from Incheon to Seoul. When transported once, 4 kilograms (kg) and 436 grams (g) of cabbage and 1999 grams (g) of radish are loaded. If the truck goes back and forth between Incheon and Seoul twice, what is the total amount of both vegetables the truck carries in kilograms (kg)?
12.87
4 436 1000 [OP_DIV] [OP_ADD] 1999 1000 [OP_DIV] [OP_ADD] 2 [OP_MUL]
var_a = 4 var_b = 436 var_c = 1000 var_d = var_b / var_c var_e = var_a + var_d var_f = 1999 var_g = 1000 var_h = var_f / var_g var_i = var_e + var_h var_j = 2 var_k = var_i * var_j print('{:.2f}'.format(round(var_k+1e-10,2)))
Geometry
If the base of a triangle with an area of 46 square centimeters (cm2) is 10 centimeters (cm), how many centimeters (cm) is its height?
9.2
46 2 [OP_MUL] 10 [OP_DIV]
var_a = 46 var_b = 2 var_c = var_a * var_b var_d = 10 var_e = var_c / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Arithmetic calculation
The length of the long rod is 14/15 meters (m), and the length of the short rod is 1/10 meter (m) shorter than the length of the long rod. Find the sum of the lengths of the two rods in meters (m).
1.77
14/15 2 [OP_MUL] 1/10 [OP_SUB]
var_a = 0.9333333333333333 var_b = 2 var_c = var_a * var_b var_d = 0.1 var_e = var_c - var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Possibility
Jeonghee, Cheolsu, Eunsu, and Minjun went to the baseball field. If Eunsu and Minjun do not sit next to each other because they are not on good terms, find the number of cases in which four people sit in a row. (However, there are four seats and all are attached.)
12
[OP_LIST_SOL] Jeonghee Cheolsu Eunsu Minjun [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_LIST_SOL] Eunsu [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_LIST_SOL] Eunsu Minjun [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_MUL] [OP_SUB]
var_a = 'Jeonghee' var_b = 'Cheolsu' var_c = 'Eunsu' var_d = 'Minjun' 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 = len(list_a) 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) var_h = 'Eunsu' list_b= [] if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) list_b.reverse() list_c = list(set(list_a) - set(list_b)) var_i = len(list_c) var_j = len(list_c) 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) var_l = 'Eunsu' var_m = 'Minjun' list_d= [] if "/" in str(var_m): var_m = eval(str(var_m)) list_d.append(var_m) if "/" in str(var_l): var_l = eval(str(var_l)) list_d.append(var_l) list_d.reverse() var_n = len(list_d) var_o = len(list_d) var_p = 1 var_n = int(var_n) var_o = int(var_o) for i, elem in enumerate(range(var_o)): var_p = var_p * (var_n-i) var_q = var_k * var_p var_r = var_g - var_q print(int(var_r))
Geometry
A cube with a side length of 1 metre was cut into 64 cubes of equal size. What is the total surface area, in square centimetres (m²), of the smaller cubes?
24
1 4 [OP_DIV] 1 4 [OP_DIV] [OP_MUL] 6 [OP_MUL] 64 [OP_MUL]
var_a = 1 var_b = 4 var_c = var_a / var_b var_d = 1 var_e = 4 var_f = var_d / var_e var_g = var_c * var_f var_h = 6 var_i = var_g * var_h var_j = 64 var_k = var_i * var_j print(int(var_k))
Possibility
There are pants and skirts in the closet. There are 4 pants, and 7 possible ways to wear pants or skirts. At this time, how many skirts are there?
3
7 4 [OP_SUB]
var_a = 7 var_b = 4 var_c = var_a - var_b print(int(var_c))
Arithmetic calculation
Hoonjeong threw away 0.2 of the marbles he had and gave 0.35 of the remaining amount to his friend so that there are 130 marbles left. Find how many marbles Hoonjeong had at first.
250
130 1 0.35 [OP_SUB] [OP_DIV] 1 0.2 [OP_SUB] [OP_DIV]
var_a = 130 var_b = 1 var_c = 0.35 var_d = var_b - var_c var_e = var_a / var_d var_f = 1 var_g = 0.2 var_h = var_f - var_g var_i = var_e / var_h print(int(var_i))
Comparison
Students are in a line. Suppose Seoyoon's position is at the 5th from the left and 3rd from the right, how many students are in the line?
7
5 3 [OP_ADD] 1 [OP_SUB]
var_a = 5 var_b = 3 var_c = var_a + var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
There were 37 chicks on the farm. If you bought 23 more chicks on day 1 and 12 more chicks on day 2, how many more chicks are there?
35
23 12 [OP_ADD]
var_a = 23 var_b = 12 var_c = var_a + var_b print(int(var_c))
Comparison
Boat A travels at a speed of 92 kilometers (km) per hour, and boat B travels at a speed of 1500 meters (m) per minute. Which of the two boats is faster?
A
[OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 92 1500 1000 [OP_DIV] 60 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'A' var_b = 'B' 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 = 92 var_d = 1500 var_e = 1000 var_f = var_d / var_e var_g = 60 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)
Comparison
Find the value of multiplication the first largest number by the second largest number among 2.1, 3.2, 32, 12, 3.4, and 2.5.
384
[OP_LIST_SOL] 2.1 3.2 32 12 3.4 2.5 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_MUL]
var_a = 2.1 var_b = 3.2 var_c = 32 var_d = 12 var_e = 3.4 var_f = 2.5 list_a= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_g = 1 list_b=list_a.copy() list_b.sort() var_h = list_b[-var_g] var_i = 2 list_c=list_a.copy() list_c.sort() var_j = list_c[-var_i] var_k = var_h * var_j print(int(var_k))
Comparison
There are 24 marbles. Of these, red marbles account for 1/4 of the total. There are 6 more blue marbles than red marbles, and the rest are yellow marbles. What color beads do you have the most?
blue
[OP_LIST_SOL] red blue yellow [OP_LIST_EOL] [OP_LIST_SOL] 24 1/4 [OP_MUL] 24 1/4 [OP_MUL] 6 [OP_ADD] 24 24 1/4 [OP_MUL] 6 [OP_ADD] [OP_SUB] 24 1/4 [OP_MUL] [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'red' var_b = 'blue' var_c = 'yellow' 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 = 24 var_e = 0.25 var_f = var_d * var_e var_g = 24 var_h = 0.25 var_i = var_g * var_h var_j = 6 var_k = var_i + var_j var_l = 24 var_m = 24 var_n = 0.25 var_o = var_m * var_n var_p = 6 var_q = var_o + var_p var_r = var_l - var_q var_s = 24 var_t = 0.25 var_u = var_s * var_t var_v = var_r - var_u list_b= [] if "/" in str(var_v): var_v = eval(str(var_v)) list_b.append(var_v) if "/" in str(var_k): var_k = eval(str(var_k)) list_b.append(var_k) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) list_b.reverse() var_w = 1 list_c=list_b.copy() list_c.sort() var_x = list_c[-var_w] var_y = list_b.index(var_x)+1 var_z = list_a[var_y-1] print(var_z)
Arithmetic calculation
Minyoung is 10 years old this year and her grandmother is 65 years old this year. How old was her grandmother when Minyoung was 7 years old?
62
65 10 7 [OP_SUB] [OP_SUB]
var_a = 65 var_b = 10 var_c = 7 var_d = var_b - var_c var_e = var_a - var_d print(int(var_e))
Arithmetic calculation
There are six different numbers: 9, 2, 4, 1, 5, and 6. Find the difference between the largest number and the second largest number.
3
[OP_LIST_SOL] 6 2 4 1 5 9 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_SUB]
var_a = 6 var_b = 2 var_c = 4 var_d = 1 var_e = 5 var_f = 9 list_a= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_g = 1 list_b=list_a.copy() list_b.sort() var_h = list_b[-var_g] var_i = 2 list_c=list_a.copy() list_c.sort() var_j = list_c[-var_i] var_k = var_h - var_j print(int(var_k))
Possibility
Jungsoo was playing a game making a number using number cards once. Given the numbers 1, 4, and 5, he gets a higher score as the number gets smaller. Which number would be better for him to make?
145
[OP_LIST_SOL] 1 4 5 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MIN]
var_a = 1 var_b = 4 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 = len(list_a) 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] print(int(var_f))
Correspondence
I was supposed to subtract 382 from a number, but I mistakenly added 238 to it and get 637. What is the result of the correct calculation?
17
637 238 [OP_SUB] 382 [OP_SUB]
var_a = 637 var_b = 238 var_c = var_a - var_b var_d = 382 var_e = var_c - var_d print(int(var_e))
Geometry
A playground is in the shape of a square with sides measuring 12 meters (m). The time it took for Seoyoon to walk around the playground was the same as the time it took for Seoyoon to walk around the 9 meters (m) rectangular playground. If you walk at the same speed, what is the vertical length of the rectangular playground in meters (m)?
15
12 4 [OP_MUL] 2 [OP_DIV] 9 [OP_SUB]
var_a = 12 var_b = 4 var_c = var_a * var_b var_d = 2 var_e = var_c / var_d var_f = 9 var_g = var_e - var_f print(int(var_g))
Geometry
The area of a certain square was found to be 324 square meters (m2). Find the perimeter of the square.
72
324 1/2 [OP_POW] 4 [OP_MUL]
var_a = 324 var_b = 0.5 var_c = var_a ** var_b var_d = 4 var_e = var_c * var_d print(int(var_e))
Correspondence
When you multiply a number by 7 and add 37, you get 100. Find this number.
9
100 37 [OP_SUB] 7 [OP_DIV]
var_a = 100 var_b = 37 var_c = var_a - var_b var_d = 7 var_e = var_c / var_d print(int(var_e))
Comparison
Seokjin jumped ropes 32 times yesterday, and today he jumped 15 times more than yesterday. Taehyung jumped ropes 58 times yesterday, and today he jumped 12 times fewer than yesterday. Who jumped more ropes today?
Seokjin
[OP_LIST_SOL] Seokjin Taehyung [OP_LIST_EOL] [OP_LIST_SOL] 32 15 [OP_ADD] 58 12 [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Seokjin' var_b = 'Taehyung' 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 = 32 var_d = 15 var_e = var_c + var_d var_f = 58 var_g = 12 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
Eunji collected 1 piece of red confetti and 9 pieces of green confetti. If she gives 4 pieces of collected confetti to Yuna, find how many pieces are left with Eunji.
6
1 9 [OP_ADD] 4 [OP_SUB]
var_a = 1 var_b = 9 var_c = var_a + var_b var_d = 4 var_e = var_c - var_d print(int(var_e))
Possibility
Use the four number cards 0, 1, 4, and 8 once to find the third largest three-digit number whose units digit is 8, then find the sum of each digit.
13
[OP_LIST_SOL] 0 1 4 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 8 [OP_LIST_SEARCH_FIXED_DIGIT] 3 [OP_LIST_MAX] [OP_NUM2LIST] [OP_LIST_SUM]
var_a = 0 var_b = 1 var_c = 4 var_d = 8 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.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 var_g = 8 list_c = [] var_f = int(var_f) var_g = int(var_g) for i in list_b: i = int(i) if (i//var_f)%10 == var_g: list_c.append(i) var_h = 3 list_d=list_c.copy() list_d.sort() var_i = list_d[-var_h] 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) print(int(var_j))
Arithmetic calculation
The quotient of this number divided by 105 is 14 and the remainder is 84. What is the value of dividing this number by 6, and then dividing the quotient by 7 again?
33
105 14 [OP_MUL] 84 [OP_SUB] 6 7 [OP_MUL] [OP_DIV]
var_a = 105 var_b = 14 var_c = var_a * var_b var_d = 84 var_e = var_c - var_d var_f = 6 var_g = 7 var_h = var_f * var_g var_i = var_e / var_h print(int(var_i))
Correspondence
There are cookies that are packed in 3 pieces. Hyunwoo gave 3 of these 226 packed cookies to his friend. Find how many pieces of cookies Hyunwoo has.
669
226 3 [OP_SUB] 3 [OP_MUL]
var_a = 226 var_b = 3 var_c = var_a - var_b var_d = 3 var_e = var_c * var_d print(int(var_e))
Arithmetic calculation
Woosik tries to double the number of jump ropes every day. If you jump rope 18 times on day 1, how many times will you jump rope on day 4?
144
18 2 4 1 [OP_SUB] [OP_POW] [OP_MUL]
var_a = 18 var_b = 2 var_c = 4 var_d = 1 var_e = var_c - var_d var_f = var_b ** var_e var_g = var_a * var_f print(int(var_g))
Comparison
Which number is the second smallest among 5, 8, 9, and 7?
7
[OP_LIST_SOL] 5 8 9 7 [OP_LIST_EOL] 2 [OP_LIST_MIN]
var_a = 5 var_b = 8 var_c = 9 var_d = 7 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 2 list_b=list_a.copy() list_b.sort() var_f = list_b[var_e-1] print(int(var_f))
Possibility
1, 2, 3, 4 ..., 55 were written sequentially to make 1234567891011121314...535455. Find the sum of each digit in this number.
370
1 55 1 [OP_LIST_ARANGE] [OP_LIST_NUM2SUM] [OP_LIST_SUM]
var_a = 1 var_b = 55 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) list_b = [float(i) for i in list_b] var_e = sum(list_b) print(int(var_e))
Correspondence
Moving a decimal point two places to the left equals the original decimal minus 1.485. Find the original decimal number.
1.5
1.485 0.99 [OP_DIV]
var_a = 1.485 var_b = 0.99 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
Seonju ran 2+2/3 kilometers (km) every day. How many kilometers (km) did Seonju run for 9 days?
24
2 2/3 [OP_ADD] 9 [OP_MUL]
var_a = 2 var_b = 0.6666666666666666 var_c = var_a + var_b var_d = 9 var_e = var_c * var_d print(int(var_e))
Possibility
How ways are there to choose and buy two fruits out of peaches, apples, pears, melons, and persimmons?
10
5 2 [OP_COMB]
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) for i, elem in enumerate(range(var_b)): var_c = var_c / (i+1) print(int(var_c))
Arithmetic calculation
It takes Jun-seok 4 hours to translate a chapter of an English book and it takes Yoon-yeol 12 hours. If the two of them work together, how many hours will it take to translate one chapter?
3
1 1 4 [OP_DIV] 1 12 [OP_DIV] [OP_ADD] [OP_DIV]
var_a = 1 var_b = 1 var_c = 4 var_d = var_b / var_c var_e = 1 var_f = 12 var_g = var_e / var_f var_h = var_d + var_g var_i = var_a / var_h print(int(var_i))
Arithmetic calculation
What is the difference between the sum of numbers whose remainder is 1 and the sum of numbers whose remainder is 0 when divided by 2 from 1 to 100?
50
1 100 [OP_LIST_EVEN] [OP_LIST_SUM] 1 100 [OP_LIST_ODD] [OP_LIST_SUM] [OP_SUB]
var_a = 1 var_b = 100 list_a = [] if var_a%2!=0: for i in range(var_a+1, var_b+1, 2): list_a.append(i) else: for i in range(var_a, var_b+1, 2): list_a.append(i) list_a = [float(i) for i in list_a] var_c = sum(list_a) var_d = 1 var_e = 100 list_b = [] if var_d%2==0: for i in range(var_d+1, var_e+1, 2): list_b.append(i) else: for i in range(var_d, var_e+1, 2): list_b.append(i) list_b = [float(i) for i in list_b] var_f = sum(list_b) var_g = var_c - var_f print(int(var_g))
Correspondence
There are a total of 86 chicks and chickens in the coop and 30 chicks. If hens lay 3 eggs per day, how many eggs can you get from this henhouse in 30 days?
5040
86 30 [OP_SUB] 3 [OP_MUL] 30 [OP_MUL]
var_a = 86 var_b = 30 var_c = var_a - var_b var_d = 3 var_e = var_c * var_d var_f = 30 var_g = var_e * var_f print(int(var_g))
Geometry
Find the surface area of a cuboid whose width is 3 centimeters (cm), length is 4 centimeters (cm), and height is 5 centimeters (cm).
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))
Geometry
You have a square piece of paper with a side of 30 centimeters (cm). How many circles that has a radius of 3 centimeters (cm) can you make?
25
30 3 2 [OP_MUL] [OP_FDIV] 2 [OP_POW]
var_a = 30 var_b = 3 var_c = 2 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
20 students are waiting for the bus. Jungkook came later than Yoongi, and there are 5 students between Yoongi and Jungkook. There are 6 students standing behind Jungkook. How many students are standing in front of Yoongi?
7
20 6 [OP_SUB] 1 [OP_SUB] 5 [OP_SUB] 1 [OP_SUB]
var_a = 20 var_b = 6 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d var_f = 5 var_g = var_e - var_f var_h = 1 var_i = var_g - var_h print(int(var_i))
Arithmetic calculation
There are 27, 103, 78, 35, and 97. What is the difference between the largest and the smallest of five numbers?
76
[OP_LIST_SOL] 27 103 78 35 97 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB]
var_a = 27 var_b = 103 var_c = 78 var_d = 35 var_e = 97 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 1 list_b=list_a.copy() list_b.sort() var_g = list_b[-var_f] var_h = 1 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))
Geometry
Find the answer to how many vertices there are in a three-dimensional figure with two parallel sides congruent polygons and six rectangular sides.
12
6 2 [OP_MUL]
var_a = 6 var_b = 2 var_c = var_a * var_b print(int(var_c))
Arithmetic calculation
Yoo-jeong borrowed some of the 17 notebooks from Min-young, and Min-young had 8 notebooks left. How many notebooks did Yoo-jeong borrow?
9
17 8 [OP_SUB]
var_a = 17 var_b = 8 var_c = var_a - var_b print(int(var_c))
Correspondence
Subtracting 29 from any number and dividing it by 13 gives you 15. Find any number.
224
15 13 [OP_MUL] 29 [OP_ADD]
var_a = 15 var_b = 13 var_c = var_a * var_b var_d = 29 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
It is said that the price is 17.25 won per 1 gram (g) of a certain mineral. When one 1000 gram (g) weight and one 10 gram (g) weight were placed on a balance, and a lump of the mineral was placed on the other side, it was level. How much is a mineral worth?
17422.5
17.25 1000 [OP_MUL] 17.25 10 [OP_MUL] [OP_ADD]
var_a = 17.25 var_b = 1000 var_c = var_a * var_b var_d = 17.25 var_e = 10 var_f = var_d * var_e var_g = var_c + var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Geometry
A rectangle has a perimeter of 30 centimeters (cm) and a width of 10 centimeters (cm). How long is the length of this rectangle?
5
30 2 [OP_DIV] 10 [OP_SUB]
var_a = 30 var_b = 2 var_c = var_a / var_b var_d = 10 var_e = var_c - var_d print(int(var_e))
Geometry
Hyeonsu was walking in the shape of a circle with a radius of 50 meters (m) in the playground. He takes a walk and tries to mark every 7.85 meters (m) with an X. If the pi is calculated as 3.14, how many X marks will there be when Hyeonsu makes a turn?
40
50 2 [OP_MUL] 3.14 [OP_MUL] 7.85 [OP_FDIV]
var_a = 50 var_b = 2 var_c = var_a * var_b var_d = 3.14 var_e = var_c * var_d var_f = 7.85 var_g = var_e // var_f print(int(var_g))
Geometry
You have a trapezoid with a lower side of 9 centimeters (cm) and an upper side of 5 centimeters (cm). If the area is 56 square centimeters (cm2), how many centimeters (cm) is the height of this trapezoid?
8
56 2 [OP_MUL] 5 9 [OP_ADD] [OP_DIV]
var_a = 56 var_b = 2 var_c = var_a * var_b var_d = 5 var_e = 9 var_f = var_d + var_e var_g = var_c / var_f print(int(var_g))
Arithmetic calculation
There are five numbers 10, 11, 12, 13, and 14. What is the result when you divide the 3rd largest number by the 2nd largest number?
0.92
[OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 3 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_DIV]
var_a = 10 var_b = 11 var_c = 12 var_d = 13 var_e = 14 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 3 list_b=list_a.copy() list_b.sort() var_g = list_b[-var_f] var_h = 2 list_c=list_a.copy() list_c.sort() var_i = list_c[-var_h] var_j = var_g / var_i print('{:.2f}'.format(round(var_j+1e-10,2)))
Arithmetic calculation
Among the five numbers 9/10, 1.8, 2, 1, 11/5 , write the number greater than 1 and less than 2 including the decimal point.
1.8
[OP_LIST_SOL] 9/10 1.8 2 1 11/5 [OP_LIST_EOL] 1 [OP_LIST_MORE] 2 [OP_LIST_LESS] 1 [OP_LIST_GET]
var_a = 0.9 var_b = 1.8 var_c = 2 var_d = 1 var_e = 2.2 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 1 list_b = [] for i in list_a: if i > var_f: list_b.append(i) var_g = 2 list_c = [] for i in list_b: if i < var_g: list_c.append(i) var_h = 1 var_i = list_c[var_h-1] print('{:.2f}'.format(round(var_i+1e-10,2)))
Arithmetic calculation
How many baskets are needed to divide 44 ping pong balls into 4 baskets?
11
44 4 [OP_DIV]
var_a = 44 var_b = 4 var_c = var_a / var_b print(int(var_c))
Geometry
If the radius of the large marble is 6 centimeters (cm) and the radius of the small marble is 3 centimeters (cm), how many times the surface area of the large marble is the surface area of the small marble?
4
6 3 [OP_DIV] 2 [OP_POW]
var_a = 6 var_b = 3 var_c = var_a / var_b var_d = 2 var_e = var_c ** var_d print(int(var_e))
Comparison
There are 28 identical pianos in the music room. Each piano has the same number of keys. When you press the 14th key from the front and the 20th key from the back of a certain piano, find the number of keys on all the pianos in this music room.
924
14 20 [OP_ADD] 1 [OP_SUB] 28 [OP_MUL]
var_a = 14 var_b = 20 var_c = var_a + var_b var_d = 1 var_e = var_c - var_d var_f = 28 var_g = var_e * var_f print(int(var_g))
Geometry
There is a rectangular cuboid-shaped bowl measuring 16 centimeters (cm) wide, 14 centimeters (cm) long, and 9 centimeters (cm) high containing water 4 centimeters (cm) high. When a stone was placed in this bowl, the water level rose to 9 centimeters (cm). What is the volume of the stone in cubic centimeters (cm3)?
1120
16 14 [OP_MUL] 9 4 [OP_SUB] [OP_MUL]
var_a = 16 var_b = 14 var_c = var_a * var_b var_d = 9 var_e = 4 var_f = var_d - var_e var_g = var_c * var_f print(int(var_g))
Comparison
There are three numbers 0.8, 1/2, and 0.9. How many numbers are greater than or equal to 2?
0
[OP_LIST_SOL] 0.8 1/2 0.9 [OP_LIST_EOL] 2 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN]
var_a = 0.8 var_b = 0.5 var_c = 0.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 = 2 list_b = [] for i in list_a: if i >= var_d: list_b.append(i) var_e = len(list_b) print(int(var_e))
Arithmetic calculation
The radius of the smaller sphere is 1/4 of the radius of the larger sphere. Find how many times bigger the volume of the larger sphere is compared to the volume of the smaller sphere.
64
1 1/4 3 [OP_POW] [OP_DIV]
var_a = 1 var_b = 0.25 var_c = 3 var_d = var_b ** var_c var_e = var_a / var_d print(int(var_e))
Comparison
There are 28 identical bookshelves in the library. Each bookshelf has 6 floors, and the number of books on each floor is the same. An English book is placed 9th from the left and 11th from the right on one floor of a bookshelf. How many books are on the shelves in the library?
3192
9 11 [OP_ADD] 1 [OP_SUB] 6 [OP_MUL] 28 [OP_MUL]
var_a = 9 var_b = 11 var_c = var_a + var_b var_d = 1 var_e = var_c - var_d var_f = 6 var_g = var_e * var_f var_h = 28 var_i = var_g * var_h print(int(var_i))
Geometry
There is a cuboid-shaped rice container full of rice with a height of 5 meters (m) 20 centimeters (cm) and a base with side lengths of 6 meters (m) 40 centimeters (cm) and 9 meters (m) respectively. You want to divide the rice into several rice bins of 1 cubic meter (m3) in volume. Find how many boxes of rice you need at least.
300
6 40 100 [OP_DIV] [OP_ADD] 9 [OP_MUL] 5 20 100 [OP_DIV] [OP_ADD] [OP_MUL] 1 [OP_DIV] 1 [OP_CEIL]
var_a = 6 var_b = 40 var_c = 100 var_d = var_b / var_c var_e = var_a + var_d var_f = 9 var_g = var_e * var_f var_h = 5 var_i = 20 var_j = 100 var_k = var_i / var_j var_l = var_h + var_k var_m = var_g * var_l var_n = 1 var_o = var_m / var_n var_p = 1 var_q=int(((var_o+9*10**(var_p-2))//(10**(var_p-1)))*10**(var_p-1)) print(int(var_q))
Comparison
Taehyung, Namjoon, and Jimin bought apples at the fruit shop. If Jimin bought more apples than Taehyung and Taehyung bought more apples than Namjoon, who bought the most apples?
Jimin
[OP_LIST_SOL] Taehyung Namjoon Jimin [OP_LIST_EOL] [OP_LIST_SOL] Taehyung Namjoon > Jimin Taehyung > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET]
var_a = 'Taehyung' var_b = 'Namjoon' var_c = 'Jimin' 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 = 'Taehyung' var_e = 'Namjoon' var_f = '>' var_g = 'Jimin' var_h = 'Taehyung' var_i = '>' list_b= [] 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) if "/" in str(var_d): var_d = eval(str(var_d)) list_b.append(var_d) 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_j = 1 var_k = list_c[var_j-1] print(var_k)
Correspondence
Taking B2 from 8A made it 45. What is A+B?
11
8A-B2=45 A [OP_DIGIT_UNK_SOLVER] 8A-B2=45 B [OP_DIGIT_UNK_SOLVER] [OP_ADD]
var_a = '8A-B2=45' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] var_d = '8A-B2=45' var_e = 'B' ans_dict = dict() var_d = var_d.replace('×','*') var_d = var_d.replace('x','*') var_d = var_d.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_d): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_d for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_d): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_f = ans_dict[var_e] var_g = var_c + var_f print(int(var_g))
Correspondence
Adding 468 to a certain number gives 954. What is the result when subtracting 3 from this number?
483
954 468 [OP_SUB] 3 [OP_SUB]
var_a = 954 var_b = 468 var_c = var_a - var_b var_d = 3 var_e = var_c - var_d print(int(var_e))
Possibility
Find the number of ways to put C and D next to each other when 6 people A, B, C, D, E and F are lined up in a line.
240
[OP_LIST_SOL] A B C D E F [OP_LIST_EOL] [OP_LIST_SOL] A [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_LIST_SOL] C D [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_MUL]
var_a = 'A' var_b = 'B' var_c = 'C' var_d = 'D' var_e = 'E' var_f = 'F' list_a= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_g = 'A' list_b= [] if "/" in str(var_g): var_g = eval(str(var_g)) list_b.append(var_g) list_b.reverse() list_c = list(set(list_a) - set(list_b)) var_h = len(list_c) var_i = len(list_c) 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) var_k = 'C' var_l = 'D' list_d= [] if "/" in str(var_l): var_l = eval(str(var_l)) list_d.append(var_l) if "/" in str(var_k): var_k = eval(str(var_k)) list_d.append(var_k) list_d.reverse() var_m = len(list_d) var_n = len(list_d) var_o = 1 var_m = int(var_m) var_n = int(var_n) for i, elem in enumerate(range(var_n)): var_o = var_o * (var_m-i) var_p = var_j * var_o print(int(var_p))
Geometry
Find the difference between the number of diagonals in the octagon and the number of diagonals in the heptagon.
6
8 8 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] 7 7 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] [OP_SUB]
var_a = 8 var_b = 8 var_c = 3 var_d = var_b - var_c var_e = var_a * var_d var_f = 2 var_g = var_e / var_f var_h = 7 var_i = 7 var_j = 3 var_k = var_i - var_j var_l = var_h * var_k var_m = 2 var_n = var_l / var_m var_o = var_g - var_n print(int(var_o))
Geometry
The shape of the blackboard in Seongho's classroom is a rectangle with a width of 5.4 meters (m) and a height of 2.5 meters (m). What is the area of this blackboard in square meters (m2)?
13.5
5.4 2.5 [OP_MUL]
var_a = 5.4 var_b = 2.5 var_c = var_a * var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Correspondence
When A5+2B=68, what number should go into B?
3
A5+2B=68 B [OP_DIGIT_UNK_SOLVER]
var_a = 'A5+2B=68' var_b = 'B' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] print(int(var_c))
Correspondence
The product of 3.6 and a number is 10.08. Find the value multiplied by 15.
42
10.08 3.6 [OP_DIV] 15 [OP_MUL]
var_a = 10.08 var_b = 3.6 var_c = var_a / var_b var_d = 15 var_e = var_c * var_d print(int(var_e))
Comparison
Yoojung and Eunji live in the same apartment. Yoojung lives on the 17th floor and Eunji lives on the 25th floor. Who lives on the higher floor?
Eunji
[OP_LIST_SOL] Yoojung Eunji [OP_LIST_EOL] [OP_LIST_SOL] 17 25 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yoojung' var_b = 'Eunji' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 17 var_d = 25 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)
Comparison
I planted cabbage on 2/7 of the field, and eggplant on 3/8. Which part is wider, cabbage or eggplant?
eggplant
[OP_LIST_SOL] cabbage eggplant [OP_LIST_EOL] [OP_LIST_SOL] 2 7 [OP_DIV] 3 8 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'cabbage' var_b = 'eggplant' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 2 var_d = 7 var_e = var_c / var_d var_f = 3 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) 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
A basket containing 12 apples of the same weight weighed 11.48 kilograms (kg). I took four appes out of the basket and ate them, and the basket weighed 8.12 kilograms (kg) this time. Find the weight in kilograms (kg) of the empty basket.
1.4
11.48 11.48 8.12 [OP_SUB] 4 [OP_DIV] 12 [OP_MUL] [OP_SUB]
var_a = 11.48 var_b = 11.48 var_c = 8.12 var_d = var_b - var_c var_e = 4 var_f = var_d / var_e var_g = 12 var_h = var_f * var_g var_i = var_a - var_h print('{:.2f}'.format(round(var_i+1e-10,2)))
Arithmetic calculation
You want to plant trees at intervals of 6 meters (m) from start to finish on one side of a road that is 156 meters (m) long. Find how many trees you need in all.
27
156 6 [OP_DIV] 1 [OP_ADD]
var_a = 156 var_b = 6 var_c = var_a / var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Correspondence
There are two different numbers A and B. Find the value of A-B from the two-digit addition formula 2A+B2=89.
1
2A+B2=89 A [OP_DIGIT_UNK_SOLVER] 2A+B2=89 B [OP_DIGIT_UNK_SOLVER] [OP_SUB]
var_a = '2A+B2=89' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] var_d = '2A+B2=89' var_e = 'B' ans_dict = dict() var_d = var_d.replace('×','*') var_d = var_d.replace('x','*') var_d = var_d.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_d): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_d for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_d): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_f = ans_dict[var_e] var_g = var_c - var_f print(int(var_g))
Geometry
A diamond made of colored paper is 16 centimeters (cm) long with an area of 80 square cm (cm2). What is the length of the other diagonal of the rhombus created by Junseo in centimeters (cm)?
10
80 2 [OP_MUL] 16 [OP_DIV]
var_a = 80 var_b = 2 var_c = var_a * var_b var_d = 16 var_e = var_c / var_d print(int(var_e))
Possibility
How many numbers between 10 and 40 has 1, 3, 8, and 7 in them?
6
[OP_LIST_SOL] 1 3 7 8 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 40 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN]
var_a = 1 var_b = 3 var_c = 7 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 = 40 list_c = [] for i in list_b: if i <= var_f: list_c.append(i) var_g = len(list_c) print(int(var_g))
Comparison
How many two-digit natural numbers have the unit digit equal to 7 and are less than 50?
4
10 99 1 [OP_LIST_ARANGE] 1 7 [OP_LIST_SEARCH_FIXED_DIGIT] 50 [OP_LIST_LESS] [OP_LIST_LEN]
var_a = 10 var_b = 99 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 1 var_e = 7 list_b = [] var_d = int(var_d) var_e = int(var_e) for i in list_a: i = int(i) if (i//var_d)%10 == var_e: list_b.append(i) var_f = 50 list_c = [] for i in list_b: if i < var_f: list_c.append(i) var_g = len(list_c) print(int(var_g))
Arithmetic calculation
When you tried to divide 328 marbles equally among 15 students, a few marbles were in short. Find at least how many more marbles are needed to distribute all the marbles equally.
2
15 328 15 [OP_MOD] [OP_SUB]
var_a = 15 var_b = 328 var_c = 15 var_d = var_b % var_c var_e = var_a - var_d print(int(var_e))
Correspondence
You want to divide 68 toys equally, 5 each among 14 people. How many more toys do you need to keep them from running out?
2
14 5 [OP_MUL] 68 [OP_SUB]
var_a = 14 var_b = 5 var_c = var_a * var_b var_d = 68 var_e = var_c - var_d print(int(var_e))
Possibility
What is the difference between the second largest and the third smallest four-digit numbers that can be formed by using one time of all even numbers less than 10?
6576
0 10 1 [OP_SUB] [OP_LIST_EVEN] 4 [OP_LIST_GET_PERM] 2 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_SUB]
var_a = 0 var_b = 10 var_c = 1 var_d = var_b - var_c list_a = [] if var_a%2!=0: for i in range(var_a+1, var_d+1, 2): list_a.append(i) else: for i in range(var_a, var_d+1, 2): list_a.append(i) var_e = 4 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 2 list_c=list_b.copy() list_c.sort() var_g = list_c[-var_f] var_h = 3 list_d=list_b.copy() list_d.sort() var_i = list_d[var_h-1] var_j = var_g - var_i print(int(var_j))
Correspondence
Jeonghoon's monthly evaluation paper is torn, so he can't find out his math score. The scores for other subjects are 82 points for ethics, 90 points for Korean language, 88 points for science, and 84 points for social studies. What is his math score when the average score is 88?
96
88 5 [OP_MUL] 82 [OP_SUB] 90 [OP_SUB] 88 [OP_SUB] 84 [OP_SUB]
var_a = 88 var_b = 5 var_c = var_a * var_b var_d = 82 var_e = var_c - var_d var_f = 90 var_g = var_e - var_f var_h = 88 var_i = var_g - var_h var_j = 84 var_k = var_i - var_j print(int(var_k))
Comparison
Car A travels at a constant speed of 2.1 kilometers (km) in 1 minute, and car B travels at 10.5 kilometers (km) in 4 minutes. Find out which car to take to get to your destination faster.
B
[OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 2.1 1 [OP_DIV] 10.5 4 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'A' var_b = 'B' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 2.1 var_d = 1 var_e = var_c / var_d var_f = 10.5 var_g = 4 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)
Geometry
The area of the rectangle (a) is equal to the area of the square (b). If the lengths of the two sides of the rectangle (a) are 9 centimeters (cm) and 16 centimeters (cm) respectively, how many centimeters (cm) is the length of one side of the square (b)?
12
9 16 [OP_MUL] 1/2 [OP_POW]
var_a = 9 var_b = 16 var_c = var_a * var_b var_d = 0.5 var_e = var_c ** var_d print(int(var_e))
Arithmetic calculation
Jungkook and Seokjin each had 28 books. If Jungkook bought 18 more books and Seokjin bought 11 more books, how many more books does Jungkook have than Seokjin?
7
28 18 [OP_ADD] 28 11 [OP_ADD] [OP_SUB]
var_a = 28 var_b = 18 var_c = var_a + var_b var_d = 28 var_e = 11 var_f = var_d + var_e var_g = var_c - var_f print(int(var_g))
Comparison
21 is the smallest number that is divisible by any two numbers. Find the sum of the numbers between the 8th largest and 12th largest common multiples of the two numbers.
630
21 8 1 [OP_ADD] [OP_MUL] 21 12 -1 [OP_ADD] [OP_MUL] 21 [OP_LIST_ARANGE] [OP_LIST_SUM]
var_a = 21 var_b = 8 var_c = 1 var_d = var_b + var_c var_e = var_a * var_d var_f = 21 var_g = 12 var_h = -1 var_i = var_g + var_h var_j = var_f * var_i var_k = 21 list_a = [i for i in range(var_e, var_j + 1, var_k)] list_a = [float(i) for i in list_a] var_l = sum(list_a) print(int(var_l))
Arithmetic calculation
Five numbers 10, 11, 12, 13, and 14 are given. What is the remainder if the second largest number is divided by the smallest number?
3
[OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 2 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_MOD]
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 = 1 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))
Comparison
The height of the seven students in Doyeon's class is 161.5 centimeters (cm), 154.3 centimeters (cm), 143.7 centimeters (cm), 160.1 centimeters (cm), 158.0 centimeters (cm), 153.5 centimeters (cm), 147.8 centimeters (cm). Find the height of the tallest student among the students who are taller than the average.
154.3
[OP_LIST_SOL] 161.5 154.3 143.7 160.1 158.0 153.5 147.8 [OP_LIST_EOL] [OP_LIST_MEAN] [OP_LIST_MORE] 1 [OP_LIST_MIN]
var_a = 161.5 var_b = 154.3 var_c = 143.7 var_d = 160.1 var_e = 158 var_f = 153.5 var_g = 147.8 list_a= [] if "/" in str(var_g): var_g = eval(str(var_g)) list_a.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() list_a = [float(i) for i in list_a] var_h = sum(list_a)/len(list_a) list_b = [] for i in list_a: if i > var_h: list_b.append(i) var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[var_i-1] print('{:.2f}'.format(round(var_j+1e-10,2)))
Possibility
There are 3 ways to walk from Seojin's house to the soccer field, and 4 ways to drive. Find the number of ways to get from your house to the soccer field.
7
3 4 [OP_ADD]
var_a = 3 var_b = 4 var_c = var_a + var_b print(int(var_c))
Possibility
How many three-digit natural numbers can be formed by drawing three out of five different number cards? Each number card has the numbers 2, 4, 6, 7, and 9 written on it.
60
[OP_LIST_SOL] 2 4 6 7 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 2 var_b = 4 var_c = 6 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.permutations(list_b, var_f)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_g = len(list_b) print(int(var_g))
Geometry
There are some squares and rectangles. Consider a square has a side of 8 centimeters (cm), and a rectangle has a side of 10 centimeters (cm) and 5 centimeters (cm). What is the difference between the area of this square and the rectangle in square centimeters (cm2)?
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
In a bicycle course with a total length of 10.5 kilometers (km), if Yoongi goes 1.5 kilometers (km) and then goes another 3730 meters (m), how many meters (m) of the course remains?
5270
10.5 1000 [OP_MUL] 1.5 1000 [OP_MUL] [OP_SUB] 3730 [OP_SUB]
var_a = 10.5 var_b = 1000 var_c = var_a * var_b var_d = 1.5 var_e = 1000 var_f = var_d * var_e var_g = var_c - var_f var_h = 3730 var_i = var_g - var_h print(int(var_i))
Arithmetic calculation
How many natural numbers less than or equal to 30 are multiples of 5 or even?
18
1 30 1 [OP_LIST_ARANGE] 5 [OP_LIST_DIVISIBLE] 1 30 [OP_LIST_EVEN] [OP_SET_UNION] [OP_LIST_LEN]
var_a = 1 var_b = 30 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 5 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = 1 var_f = 30 list_c = [] if var_e%2!=0: for i in range(var_e+1, var_f+1, 2): list_c.append(i) else: for i in range(var_e, var_f+1, 2): list_c.append(i) list_d = list(set(list_b) | set(list_c)) var_g = len(list_d) print(int(var_g))
Geometry
You were able to draw four adjacent circles within a square with a circumference of 56 centimeters (cm). Of the squares that can be drawn in the same way, 441 circles of the same size as this circle, what is the circumference in centimeters (cm) of the smallest square?
588
56 4 [OP_DIV] 4 1/2 [OP_POW] [OP_DIV] 441 1/2 [OP_POW] [OP_MUL] 4 [OP_MUL]
var_a = 56 var_b = 4 var_c = var_a / var_b var_d = 4 var_e = 0.5 var_f = var_d ** var_e var_g = var_c / var_f var_h = 441 var_i = 0.5 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))