category
stringclasses
5 values
question
stringlengths
20
555
answer
stringlengths
1
20
solution_abst
stringlengths
1
287
solution_code
stringlengths
27
5.97k
Comparison
Yoongi has the number 4, and Jungkook has the number that is 6 multiplied by 3. Which of the two has the larger number?
Jungkook
[OP_LIST_SOL] Yoongi Jungkook [OP_LIST_EOL] [OP_LIST_SOL] 4 6 3 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yoongi' var_b = 'Jungkook' 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 var_d = 6 var_e = 3 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)
Possibility
I gave 7 indistinguishable locks to Jungkook and Hoseok. Jungkook and Hoseok each received at least one lock. Find the number of ways to divide locks.
6
7 2 1 [OP_MUL] [OP_SUB] 1 [OP_ADD]
var_a = 7 var_b = 2 var_c = 1 var_d = var_b * var_c var_e = var_a - var_d var_f = 1 var_g = var_e + var_f print(int(var_g))
Comparison
A horse, a cow, a pig, a sheep, a rabbit, and a squirrel sequentially entered the fence in that sequence. Which animal took the 4th place?
sheep
[OP_LIST_SOL] horse cow pig sheep rabbit squirrel [OP_LIST_EOL] 4 [OP_LIST_GET]
var_a = 'horse' var_b = 'cow' var_c = 'pig' var_d = 'sheep' var_e = 'rabbit' var_f = 'squirrel' list_a= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_g = 4 var_h = list_a[var_g-1] print(var_h)
Geometry
The sum of the lengths of the four sides of a rectangle with sides measuring 7centimeters (cm) and 5centimeters (cm) is equal to the sum of the lengths of the four sides of a square. Find the length of one side of the square.
6
7 5 [OP_ADD] 2 [OP_MUL] 4 [OP_DIV]
var_a = 7 var_b = 5 var_c = var_a + var_b var_d = 2 var_e = var_c * var_d var_f = 4 var_g = var_e / var_f print(int(var_g))
Correspondence
Multiply 0.55 by a number and add 4 to get 8.235. What do you get when the number is divided by 0.55?
14
8.235 4 [OP_SUB] 0.55 [OP_DIV] 0.55 [OP_DIV]
var_a = 8.235 var_b = 4 var_c = var_a - var_b var_d = 0.55 var_e = var_c / var_d var_f = 0.55 var_g = var_e / var_f print(int(eval('{:.2f}'.format(round(var_g+1e-10,2)))))
Arithmetic calculation
There are numbers whose quotient is 11 when divided by 75. What is the largest out of these numbers?
899
11 75 [OP_MUL] 75 1 [OP_SUB] [OP_ADD]
var_a = 11 var_b = 75 var_c = var_a * var_b var_d = 75 var_e = 1 var_f = var_d - var_e var_g = var_c + var_f print(int(var_g))
Possibility
Find the total number of games played when 5 classes play dodgeball once against each other.
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
Bus passengers can ride up to 30 at a time. At least how many trips does the bus have to make to pick up all 1284 passengers once?
43
1284 30 [OP_DIV] 1 [OP_CEIL]
var_a = 1284 var_b = 30 var_c = var_a / var_b var_d = 1 var_e=int(((var_c+9*10**(var_d-2))//(10**(var_d-1)))*10**(var_d-1)) print(int(var_e))
Arithmetic calculation
This year, Yuna is 12 years old and her grandmother is 72 years old. When grandmother's age is 7 times Yuna's age, how old is her grandmother?
70
72 12 [OP_SUB] 7 [OP_MUL] 7 1 [OP_SUB] [OP_DIV]
var_a = 72 var_b = 12 var_c = var_a - var_b var_d = 7 var_e = var_c * var_d var_f = 7 var_g = 1 var_h = var_f - var_g var_i = var_e / var_h print(int(var_i))
Arithmetic calculation
You are going to put 20 bandages 15.25 centimeters (cm) in length, overlapping each other. How many centimeters (cm) must each bandage be overlapped so that the total length of the bandages is 248 centimeters (cm)?
3
15.25 248 15.25 [OP_SUB] 20 1 [OP_SUB] [OP_DIV] [OP_SUB]
var_a = 15.25 var_b = 248 var_c = 15.25 var_d = var_b - var_c var_e = 20 var_f = 1 var_g = var_e - var_f var_h = var_d / var_g var_i = var_a - var_h print(int(var_i))
Correspondence
A72+23=695. How much is A?
6
A72+23=695 A [OP_DIGIT_UNK_SOLVER]
var_a = 'A72+23=695' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] print(int(var_c))
Comparison
Jimin, Yoongi, Taehyung, and Namjoon are in a running race. The student who first crossed the finish line was Namjoon, and Yoongi crossed it faster than Taehyung. If Taehyung was faster than Jimin, who would be the last one to cross the finish line?
Jimin
[OP_LIST_SOL] Jimin Yoongi Taehyung Namjoon [OP_LIST_EOL] [OP_LIST_SOL] Namjoon Yoongi > Namjoon Jimin > Namjoon Taehyung > Yoongi Taehyung > Taehyung Jimin > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET]
var_a = 'Jimin' var_b = 'Yoongi' var_c = 'Taehyung' var_d = 'Namjoon' 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 = 'Namjoon' var_f = 'Yoongi' var_g = '>' var_h = 'Namjoon' var_i = 'Jimin' var_j = '>' var_k = 'Namjoon' var_l = 'Taehyung' var_m = '>' var_n = 'Yoongi' var_o = 'Taehyung' var_p = '>' var_q = 'Taehyung' var_r = 'Jimin' var_s = '>' list_b= [] if "/" in str(var_s): var_s = eval(str(var_s)) list_b.append(var_s) if "/" in str(var_r): var_r = eval(str(var_r)) list_b.append(var_r) 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) 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_t = len(list_c) var_u = list_c[var_t-1] print(var_u)
Correspondence
I had to multiply a number by 6 but instead subtracted and it resulted in 51. What is the number if I calculate correctly?
342
51 6 [OP_ADD] 6 [OP_MUL]
var_a = 51 var_b = 6 var_c = var_a + var_b var_d = 6 var_e = var_c * var_d print(int(var_e))
Geometry
A square was made using all of the 34.8 centimeters (cm) lengths of wire. How many centimeters (cm) is the length of one side of the square?
8.7
34.8 4 [OP_DIV]
var_a = 34.8 var_b = 4 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Comparison
In the running event, Yuna is running in 17th place. Eunji is ahead of Yuna, and there are 8 people between Eunji and Yuna. What rank is Eunji running?
8
17 8 [OP_SUB] 1 [OP_SUB]
var_a = 17 var_b = 8 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Comparison
The difference between the lengths of the two sticks is 12 centimeters (cm), and the length of the longer stick multiplied by 2/3 is the length of the shorter stick. What is the length of the shorter stick?
24
12 1 2/3 [OP_SUB] [OP_DIV] 2/3 [OP_MUL]
var_a = 12 var_b = 1 var_c = 0.6666666666666666 var_d = var_b - var_c var_e = var_a / var_d var_f = 0.6666666666666666 var_g = var_e * var_f print(int(eval('{:.2f}'.format(round(var_g+1e-10,2)))))
Comparison
Villages A, B, and C have different numbers of people. Village A has more people than Village C, and Village A has more people than Village B. If Village B has fewer people than Village C, which village has the most people?
A
[OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] A B > B C < A C > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET]
var_a = 'A' var_b = 'B' var_c = 'C' list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 'A' var_e = 'B' var_f = '>' var_g = 'B' var_h = 'C' var_i = '<' var_j = 'A' var_k = 'C' var_l = '>' list_b= [] 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) 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_m = 1 var_n = list_c[var_m-1] print(var_n)
Arithmetic calculation
4 friends bought 5 fish-shaped bread which is 200 won each and 7 hotteoks which is 800 won each. Write how much each person would have to pay if the money were to be divided equally among 4 people.
1650
200 5 [OP_MUL] 800 7 [OP_MUL] [OP_ADD] 4 [OP_DIV]
var_a = 200 var_b = 5 var_c = var_a * var_b var_d = 800 var_e = 7 var_f = var_d * var_e var_g = var_c + var_f var_h = 4 var_i = var_g / var_h print(int(var_i))
Geometry
If the width of a door with an area of 3 square meters (m2) is 150 centimeters (cm), find the length in centimeters (cm).
200
3 100 2 [OP_POW] [OP_MUL] 150 [OP_DIV]
var_a = 3 var_b = 100 var_c = 2 var_d = var_b ** var_c var_e = var_a * var_d var_f = 150 var_g = var_e / var_f print(int(var_g))
Arithmetic calculation
You are told to divide 30 white balls and 18 red balls into boxes by the color. There are 6 balls in each box. How many more boxes of white balls would there be than boxes of red balls?
2
30 6 [OP_DIV] 18 6 [OP_DIV] [OP_SUB]
var_a = 30 var_b = 6 var_c = var_a / var_b var_d = 18 var_e = 6 var_f = var_d / var_e var_g = var_c - var_f print(int(var_g))
Correspondence
A number divided by 11 equals 2. Hoseok multiplied the number by 6 to get the result value. What is this value?
132
2 11 [OP_MUL] 6 [OP_MUL]
var_a = 2 var_b = 11 var_c = var_a * var_b var_d = 6 var_e = var_c * var_d print(int(var_e))
Possibility
At home, there are 2 pairs of pants and 3 pairs of tops. How many looks can you wear?
6
2 3 [OP_MUL]
var_a = 2 var_b = 3 var_c = var_a * var_b print(int(var_c))
Comparison
If ducks on the farm have a total of 40 legs and rabbits have a total of 60 legs, which animal are there more, ducks or rabbits?
ducks
[OP_LIST_SOL] ducks rabbits [OP_LIST_EOL] [OP_LIST_SOL] 40 2 [OP_DIV] 60 4 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'ducks' var_b = 'rabbits' 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 = 40 var_d = 2 var_e = var_c / var_d var_f = 60 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
Find the sum of the lengths of all edges of a prism made by stacking 11 regular hexagonal prisms with a height of 1 centimeter (cm) and its base as 6 centimeters (cm).
138
6 6 [OP_MUL] 2 [OP_MUL] 11 6 [OP_MUL] [OP_ADD]
var_a = 6 var_b = 6 var_c = var_a * var_b var_d = 2 var_e = var_c * var_d var_f = 11 var_g = 6 var_h = var_f * var_g var_i = var_e + var_h print(int(var_i))
Arithmetic calculation
If each box has 100 marbles, how many marbles do 10 boxes have?
1000
100 10 [OP_MUL]
var_a = 100 var_b = 10 var_c = var_a * var_b print(int(var_c))
Comparison
Five numbers were drawn. The average is 81.6, and the average scores excluding the largest number is 6 higher than the average of the remaining scores. If the middle three numbers are 88, 84, and 75, what is the lowest number?
68.5
81.6 5 [OP_MUL] 88 84 [OP_ADD] 75 [OP_ADD] [OP_SUB] 6 4 [OP_MUL] [OP_SUB] 2 [OP_DIV]
var_a = 81.6 var_b = 5 var_c = var_a * var_b var_d = 88 var_e = 84 var_f = var_d + var_e var_g = 75 var_h = var_f + var_g var_i = var_c - var_h var_j = 6 var_k = 4 var_l = var_j * var_k var_m = var_i - var_l var_n = 2 var_o = var_m / var_n print('{:.2f}'.format(round(var_o+1e-10,2)))
Arithmetic calculation
Hyosung and Mimi started at the same speed toward each other at the end of the playground. The distance of the playground is 2.5 kilometers (km). If Hyosung walks 0.08 kilometers (km) per minute and Mimi walks 2.4 kilometers (km) an hour, how many kilometers (km) is the distance between the two people after 15 minutes?
0.7
2.5 0.08 15 [OP_MUL] [OP_SUB] 2.4 60 [OP_DIV] 15 [OP_MUL] [OP_SUB]
var_a = 2.5 var_b = 0.08 var_c = 15 var_d = var_b * var_c var_e = var_a - var_d var_f = 2.4 var_g = 60 var_h = var_f / var_g var_i = 15 var_j = var_h * var_i var_k = var_e - var_j print('{:.2f}'.format(round(var_k+1e-10,2)))
Correspondence
When 12 is divided by A, the quotient is B and the remainder is C. A, B, and C are natural numbers. What is the largest number that can be C?
11
12 1 [OP_SUB]
var_a = 12 var_b = 1 var_c = var_a - var_b print(int(var_c))
Geometry
If the length of the hypotenuse of a right triangle is 5 and the length of the non-hypotenuse is 3, what is the length of the other side?
4
5 2 [OP_POW] 3 2 [OP_POW] [OP_SUB] 1/2 [OP_POW]
var_a = 5 var_b = 2 var_c = var_a ** var_b var_d = 3 var_e = 2 var_f = var_d ** var_e var_g = var_c - var_f var_h = 0.5 var_i = var_g ** var_h print(int(var_i))
Correspondence
9 is the sum of a number and 5. What is the number?
4
9 5 [OP_SUB]
var_a = 9 var_b = 5 var_c = var_a - var_b print(int(var_c))
Possibility
For the three natural numbers A, B, and C, find the number of ordered pairs that satisfy A + B + C = 8.
21
1 8 1 [OP_LIST_ARANGE] 3 [OP_LIST_GET_PRODUCT] [OP_LIST_NUM2SUM] 8 [OP_LIST_FIND_NUM]
var_a = 1 var_b = 8 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 3 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 2180 ballpoint pens. A total of 12 pencil cases are left after organizing pens into 200 pencil cases and 150 pencil cases. Also, there are 30 ballpoint pens left. Find the number of 200 pencil cases.
7
2180 30 [OP_SUB] 150 12 [OP_MUL] [OP_SUB] 200 150 [OP_SUB] [OP_DIV]
var_a = 2180 var_b = 30 var_c = var_a - var_b var_d = 150 var_e = 12 var_f = var_d * var_e var_g = var_c - var_f var_h = 200 var_i = 150 var_j = var_h - var_i var_k = var_g / var_j print(int(var_k))
Geometry
There is a cube whose sum of all its edges equals to 108 centimeters (cm). How long is one edge of this cube in centimeters (cm)?
9
108 4 3 [OP_MUL] [OP_DIV]
var_a = 108 var_b = 4 var_c = 3 var_d = var_b * var_c var_e = var_a / var_d print(int(var_e))
Geometry
There are hexagonal prisms and quadrangular pyramids whose all edges are the same length. If the sum of the lengths of all the edges of the hexagonal prism is 81 centimeters (cm), find the sum of the lengths of all the edges of the pyramid.
36
81 6 3 [OP_MUL] [OP_DIV] 4 2 [OP_MUL] [OP_MUL]
var_a = 81 var_b = 6 var_c = 3 var_d = var_b * var_c var_e = var_a / var_d var_f = 4 var_g = 2 var_h = var_f * var_g var_i = var_e * var_h print(int(var_i))
Geometry
In the middle of each face of a cube with an edge length of 10 centimeters (cm), a cube shape with an edge length of 2 centimeters (cm) was dug out to create a new shape. What is the surface area of this shape in square centimeters (cm2)?
696
10 10 [OP_MUL] 6 [OP_MUL] 2 2 [OP_MUL] 4 [OP_MUL] 6 [OP_MUL] [OP_ADD]
var_a = 10 var_b = 10 var_c = var_a * var_b var_d = 6 var_e = var_c * var_d var_f = 2 var_g = 2 var_h = var_f * var_g var_i = 4 var_j = var_h * var_i var_k = 6 var_l = var_j * var_k var_m = var_e + var_l print(int(var_m))
Correspondence
When the quotient of a certain division formula was incorrectly calculated as the number moved to the left by one from the decimal point, the difference of wrong and correct calculated quotient was 37.35. Find the correct quotient.
4.15
37.35 9 [OP_DIV]
var_a = 37.35 var_b = 9 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Correspondence
Among all numbers greater than 280, find the smallest number that has a remainder of 30 when divided by 70.
310
280 30 [OP_ADD]
var_a = 280 var_b = 30 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
I ate 140 cookies today. If there are 30 fewer cookies yesterday than today, how many cookies did I eat yesterday?
110
140 30 [OP_SUB]
var_a = 140 var_b = 30 var_c = var_a - var_b print(int(var_c))
Possibility
Two people try to share 20 apples. If you say every person should have at least one, how many ways are there?
19
20 2 [OP_SUB] 1 [OP_ADD]
var_a = 20 var_b = 2 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
What is the sum of the numbers 7.31 and 1/5?
7.51
7.31 1/5 [OP_ADD]
var_a = 7.31 var_b = 0.2 var_c = var_a + var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Comparison
You are trying to compare the weight of paint and crayons using a scale and a 100 won coin. Paint is equal to the weight of 3 100 won coins, and crayons are equal to the weight of 5 100 won coins. Which is lighter, paint or crayons?
paint
[OP_LIST_SOL] paint crayons [OP_LIST_EOL] [OP_LIST_SOL] 100 3 [OP_MUL] 100 5 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'paint' var_b = 'crayons' 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 = 100 var_d = 3 var_e = var_c * var_d var_f = 100 var_g = 5 var_h = var_f * var_g list_b= [] if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[var_i-1] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Geometry
In the math test, Seokjin is ranked 4th, and Jimin is ranked right after Seokjin. What is Jimin's rank?
5
4 1 [OP_ADD]
var_a = 4 var_b = 1 var_c = var_a + var_b print(int(var_c))
Geometry
You have a rhombus with a perimeter of 60 centimeters (cm). Find the distance in centimeters (cm) from one vertex of this rhombus to the next vertex.
15
60 4 [OP_DIV]
var_a = 60 var_b = 4 var_c = var_a / var_b print(int(var_c))
Geometry
Find the pi of a circle with a diameter of 8 centimeters (cm) and a circumference of 25.12 centimeters (cm).
3.14
25.12 8 [OP_DIV]
var_a = 25.12 var_b = 8 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Comparison
There are two circles A and B. The area of A is 198.4 square centimeters (cm2), and the area of B is 251.1 square centimeters (cm2). When the pi is calculated as 3.1, find the number of centimeters (cm) by subtracting the circumference of A from the circumference of B including the decimal point.
6.2
198.4 3.1 [OP_DIV] 1 2 [OP_DIV] [OP_POW] 2 [OP_MUL] 3.1 [OP_MUL] 251.1 3.1 [OP_DIV] 1 2 [OP_DIV] [OP_POW] 2 [OP_MUL] 3.1 [OP_MUL] [OP_SUB] [OP_ABS]
var_a = 198.4 var_b = 3.1 var_c = var_a / var_b var_d = 1 var_e = 2 var_f = var_d / var_e var_g = var_c ** var_f var_h = 2 var_i = var_g * var_h var_j = 3.1 var_k = var_i * var_j var_l = 251.1 var_m = 3.1 var_n = var_l / var_m var_o = 1 var_p = 2 var_q = var_o / var_p var_r = var_n ** var_q var_s = 2 var_t = var_r * var_s var_u = 3.1 var_v = var_t * var_u var_w = var_k - var_v var_x = abs(var_w) print('{:.2f}'.format(round(var_x+1e-10,2)))
Arithmetic calculation
I want to create a cuboid with 24 centimeters (cm) width, 15 centimeters (cm) length, and 28 centimeters (cm) height by stacking cuboids with 4 centimeters (cm) width, 5 centimeters (cm) length, and 7 centimeters (cm) height. How many cuboids do you need to make it?
72
24 15 [OP_MUL] 28 [OP_MUL] 4 5 [OP_MUL] 7 [OP_MUL] [OP_DIV]
var_a = 24 var_b = 15 var_c = var_a * var_b var_d = 28 var_e = var_c * var_d var_f = 4 var_g = 5 var_h = var_f * var_g var_i = 7 var_j = var_h * var_i var_k = var_e / var_j print(int(var_k))
Comparison
After filling the water into the 1100 milliliter (㎖) water bottle and 3 liter (L) and 400 milliliter (㎖) juice bottle, they were transported to the bucket. As the bucket became full, which one has more capacity: a kettle with a capacity of 4 liters (L) and 800 milliliters (㎖) or the bucket?
kettle
[OP_LIST_SOL] kettle bucket [OP_LIST_EOL] [OP_LIST_SOL] 4 1000 [OP_MUL] 800 [OP_ADD] 1100 3 1000 [OP_MUL] 400 [OP_ADD] [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'kettle' var_b = 'bucket' 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 var_d = 1000 var_e = var_c * var_d var_f = 800 var_g = var_e + var_f var_h = 1100 var_i = 3 var_j = 1000 var_k = var_i * var_j var_l = 400 var_m = var_k + var_l var_n = var_h + var_m list_b= [] if "/" in str(var_n): var_n = eval(str(var_n)) list_b.append(var_n) if "/" in str(var_g): var_g = eval(str(var_g)) list_b.append(var_g) list_b.reverse() var_o = 1 list_c=list_b.copy() list_c.sort() var_p = list_c[-var_o] var_q = list_b.index(var_p)+1 var_r = list_a[var_q-1] print(var_r)
Arithmetic calculation
Find the sum of all natural numbers less than or equal to 5.
15
1 5 1 [OP_LIST_ARANGE] [OP_LIST_SUM]
var_a = 1 var_b = 5 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] list_a = [float(i) for i in list_a] var_d = sum(list_a) print(int(var_d))
Correspondence
7ABABA is a six-digit number consisting of single digit numbers of A and B. When it is said to be a multiple of 6, how many of these six digits are there?
15
7ABABA [OP_GEN_POSSIBLE_LIST] 6 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = '7ABABA' 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 = 6 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))
Correspondence
There are four different numbers A, B, C, and D. Find D from the four-digit addition formula ABCD+ABCD=5472.
6
ABCD+ABCD=5472 D [OP_DIGIT_UNK_SOLVER]
var_a = 'ABCD+ABCD=5472' var_b = 'D' 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
When 3A+B82=216, what number should go in A?
4
3A+B82=216 A [OP_DIGIT_UNK_SOLVER]
var_a = '3A+B82=216' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] print(int(var_c))
Arithmetic calculation
Yujun's group of 8 students took the KTX from Seoul Station to Busan Station, but there were only 5 seats left, so they decided to buy standing tickets and sit in the remaining seats by turns. If the time taken on the KTX is 2 hours and 32 minutes, how many minutes does one person sit on average?
95
2 60 [OP_MUL] 32 [OP_ADD] 8 [OP_DIV] 5 [OP_MUL]
var_a = 2 var_b = 60 var_c = var_a * var_b var_d = 32 var_e = var_c + var_d var_f = 8 var_g = var_e / var_f var_h = 5 var_i = var_g * var_h print(int(var_i))
Correspondence
77 is a number that you need to subtract 35 from a number, but you accidentally added it. How much is it when you calculate correctly?
7
77 35 [OP_SUB] 35 [OP_SUB]
var_a = 77 var_b = 35 var_c = var_a - var_b var_d = 35 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
There are four numbers 10, 11, 12, and 13. What is the largest number divided by the smallest number?
1.3
[OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_DIV]
var_a = 10 var_b = 11 var_c = 12 var_d = 13 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 1 list_b=list_a.copy() list_b.sort() var_f = list_b[-var_e] var_g = 1 list_c=list_a.copy() list_c.sort() var_h = list_c[var_g-1] var_i = var_f / var_h print('{:.2f}'.format(round(var_i+1e-10,2)))
Correspondence
An eight-digit number 757AB384 is said to be divisible by 357. Find the value that can be B.
5
757AB384 [OP_GEN_POSSIBLE_LIST] 357 [OP_LIST_DIVISIBLE] 757AB384 B [OP_LIST_FIND_UNK]
var_a = '757AB384' 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 = 357 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 = '757AB384' var_d = 'B' var_c = str(var_c) var_d = str(var_d) unk_idx = var_c.index(var_d) var_e = 0 for elem in list_b: elem = str(elem) var_e = int(elem[unk_idx]) print(int(var_e))
Arithmetic calculation
There were 32 people on the bus. At the bus stop, 19 people got on and 13 people got off. Find how many people are on the bus right now.
38
32 19 [OP_ADD] 13 [OP_SUB]
var_a = 32 var_b = 19 var_c = var_a + var_b var_d = 13 var_e = var_c - var_d print(int(var_e))
Comparison
There are 28 identical cartons of eggs in the supermarket. Each egg carton contains the same number of eggs. If you select an egg that is at 14 from the front, 20 from the back, 3 from the left, and 2 from the right on the carton, count the number of eggs on cartons at that market.
3696
14 20 [OP_ADD] 1 [OP_SUB] 3 2 [OP_ADD] 1 [OP_SUB] [OP_MUL] 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 = 3 var_g = 2 var_h = var_f + var_g var_i = 1 var_j = var_h - var_i var_k = var_e * var_j var_l = 28 var_m = var_k * var_l print(int(var_m))
Correspondence
The two-digit number 3A is a multiple of 8. What number can be A?
2
3A [OP_GEN_POSSIBLE_LIST] 8 [OP_LIST_DIVISIBLE] 3A A [OP_LIST_FIND_UNK]
var_a = '3A' 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 = 8 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 = '3A' var_d = 'A' var_c = str(var_c) var_d = str(var_d) unk_idx = var_c.index(var_d) var_e = 0 for elem in list_b: elem = str(elem) var_e = int(elem[unk_idx]) print(int(var_e))
Possibility
Using the four numbers 1, 5, 6, and 9 once, find the largest two-digit number with 1 in the ones place.
91
[OP_LIST_SOL] 1 5 6 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 1 [OP_LIST_SEARCH_FIXED_DIGIT] 1 [OP_LIST_MAX]
var_a = 1 var_b = 5 var_c = 6 var_d = 9 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 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 var_g = 1 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 = 1 list_d=list_c.copy() list_d.sort() var_i = list_d[-var_h] print(int(var_i))
Arithmetic calculation
8 boxes of 25 balls each costing 2750 won are loaded on one truck. When there are 18 trucks like this, how much money can you make selling the balls?
9900000
18 8 [OP_MUL] 25 [OP_MUL] 2750 [OP_MUL]
var_a = 18 var_b = 8 var_c = var_a * var_b var_d = 25 var_e = var_c * var_d var_f = 2750 var_g = var_e * var_f print(int(var_g))
Arithmetic calculation
Yoojung gave 7 candies to her older sister and 6 to her younger sister, and there were 15 left over. How many candies did Yoojung have at first?
28
15 7 [OP_ADD] 6 [OP_ADD]
var_a = 15 var_b = 7 var_c = var_a + var_b var_d = 6 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
When Jian drinks 1/3 liter (L) of water for 5 days and Joowon drinks 1/5 liter (L) for 2 days, find the number of days it takes for them to drink 1 liter (l) of water together.
6
1 1/3 5 [OP_DIV] 1/5 2 [OP_DIV] [OP_ADD] [OP_DIV]
var_a = 1 var_b = 0.3333333333333333 var_c = 5 var_d = var_b / var_c var_e = 0.2 var_f = 2 var_g = var_e / var_f var_h = var_d + var_g var_i = var_a / var_h print(int(eval('{:.2f}'.format(round(var_i+1e-10,2)))))
Arithmetic calculation
A club has 12 more first-year students than non-first-year students. If there are 128 people in the club, how many first-year students are in this club?
70
128 12 [OP_SUB] 2 [OP_DIV] 12 [OP_ADD]
var_a = 128 var_b = 12 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 12 var_g = var_e + var_f print(int(var_g))
Arithmetic calculation
Seungju read 3/10 of the novel yesterday, and 4/10 of it today. If the number of pages of the novel he read yesterday and today is 140, how many pages are there in the novel Seungju read?
200
140 3/10 4/10 [OP_ADD] [OP_DIV]
var_a = 140 var_b = 0.3 var_c = 0.4 var_d = var_b + var_c var_e = var_a / var_d print(int(var_e))
Geometry
Find the maximum number of diagonals that can be drawn in a rectangle.
2
4 4 3 [OP_SUB] [OP_MUL] 2 [OP_DIV]
var_a = 4 var_b = 4 var_c = 3 var_d = var_b - var_c var_e = var_a * var_d var_f = 2 var_g = var_e / var_f print(int(var_g))
Arithmetic calculation
I was trying to install street lights at 32 meters (m) intervals around a circle-shaped park with a circumference of 2 kilometers (km) and 400 meters (m) but installed them at 48 meters (m) intervals. How many fewer streetlights did I install compare to installing them at 32 meters (m) apart?
25
2 1000 [OP_MUL] 400 [OP_ADD] 32 [OP_DIV] 2 1000 [OP_MUL] 400 [OP_ADD] 48 [OP_DIV] [OP_SUB]
var_a = 2 var_b = 1000 var_c = var_a * var_b var_d = 400 var_e = var_c + var_d var_f = 32 var_g = var_e / var_f var_h = 2 var_i = 1000 var_j = var_h * var_i var_k = 400 var_l = var_j + var_k var_m = 48 var_n = var_l / var_m var_o = var_g - var_n print(int(var_o))
Arithmetic calculation
You are planning to plant flowers at intervals of 30 meters (m) along a promenade with a perimeter of 1 kilometer (km) and 500 meters (m). If each flower costs 5,000 won, how much does it cost to buy the flowers you need?
250000
1 1000 [OP_MUL] 500 [OP_ADD] 30 [OP_DIV] 5000 [OP_MUL]
var_a = 1 var_b = 1000 var_c = var_a * var_b var_d = 500 var_e = var_c + var_d var_f = 30 var_g = var_e / var_f var_h = 5000 var_i = var_g * var_h print(int(var_i))
Arithmetic calculation
What is the sum of the numbers 72.52, 12.23, and 5.21?
89.96
72.52 12.23 [OP_ADD] 5.21 [OP_ADD]
var_a = 72.52 var_b = 12.23 var_c = var_a + var_b var_d = 5.21 var_e = var_c + var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Geometry
A rectangle has a length of 13 centimeters (cm) and a perimeter of 50 centimeters (cm). Find the horizontal length.
12
50 2 [OP_DIV] 13 [OP_SUB]
var_a = 50 var_b = 2 var_c = var_a / var_b var_d = 13 var_e = var_c - var_d print(int(var_e))
Correspondence
You get 58 when 74 is subtracted by a number, and then multiplies it by 15, divides by 5, and adds 16. Find what the number is.
88
58 16 [OP_SUB] 5 [OP_MUL] 15 [OP_DIV] 74 [OP_ADD]
var_a = 58 var_b = 16 var_c = var_a - var_b var_d = 5 var_e = var_c * var_d var_f = 15 var_g = var_e / var_f var_h = 74 var_i = var_g + var_h print(int(var_i))
Possibility
How many different two-digit numbers can be formed by using the two numbers 3 and 5 only once?
2
[OP_LIST_SOL] 3 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 3 var_b = 5 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 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 = len(list_b) print(int(var_d))
Geometry
A triangle with a base of 7.2 meters (m) and a height of 7 meters (m) and a rectangle with a width of 4 meters (m). If both shapes have the same area, how many meters (m) is the length of the rectangle?
6.3
7.2 7 [OP_MUL] 2 [OP_DIV] 4 [OP_DIV]
var_a = 7.2 var_b = 7 var_c = var_a * var_b var_d = 2 var_e = var_c / var_d var_f = 4 var_g = var_e / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Geometry
How many diagonal lines can be drawn at a vertex of a figure with 10 sides?
7
10 3 [OP_SUB]
var_a = 10 var_b = 3 var_c = var_a - var_b print(int(var_c))
Arithmetic calculation
Minyoung drank 4/9 liters (L) of milk, and Yuna drank 2/3 liters (L). Find how many times the amount of milk that Minyoung drank was the amount of what Yuna drank.
0.67
4/9 2/3 [OP_DIV]
var_a = 0.4444444444444444 var_b = 0.6666666666666666 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Comparison
Choose the smallest number among 5, 9, 10, 3, and 6.
3
[OP_LIST_SOL] 5 9 10 3 6 [OP_LIST_EOL] 1 [OP_LIST_MIN]
var_a = 5 var_b = 9 var_c = 10 var_d = 3 var_e = 6 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-1] print(int(var_g))
Correspondence
If A is the number that is -5 less than -3 and B is the number that is -2 greater than +2, find the value of A-B.
2
-3 -5 [OP_SUB] 2 -2 [OP_ADD] [OP_SUB]
var_a = -3 var_b = -5 var_c = var_a - var_b var_d = 2 var_e = -2 var_f = var_d + var_e var_g = var_c - var_f print(int(var_g))
Correspondence
When you mistakenly multiply a number by 8, instead of dividing a number by 8 and adding 7, you get 56. If you calculated correctly, indicate the number to two decimal places.
7.88
56 8 [OP_DIV] 8 [OP_DIV] 7 [OP_ADD]
var_a = 56 var_b = 8 var_c = var_a / var_b var_d = 8 var_e = var_c / var_d var_f = 7 var_g = var_e + var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Geometry
Find the circumference of a sphere of radius 4 centimeters (cm) in pi.
8
4 2 [OP_MUL]
var_a = 4 var_b = 2 var_c = var_a * var_b print(int(var_c))
Comparison
It is said that Jihoon is taller than Hyeonseo and Hyeonseo is taller than Hyeonsoo. Who is the tallest of the three?
Jihoon
[OP_LIST_SOL] Jihoon Hyeonseo Hyeonsoo [OP_LIST_EOL] [OP_LIST_SOL] Jihoon Hyeonseo > Hyeonseo Hyeonsoo > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET]
var_a = 'Jihoon' var_b = 'Hyeonseo' var_c = 'Hyeonsoo' 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 = 'Jihoon' var_e = 'Hyeonseo' var_f = '>' var_g = 'Hyeonseo' var_h = 'Hyeonsoo' 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)
Comparison
When I weighed the bag, Jimin's bag weighed 1.2 kilograms (kg) and Seokjin's bag weighed 1350 grams (g). Whose bag is heavier?
Seokjin
[OP_LIST_SOL] Jimin Seokjin [OP_LIST_EOL] [OP_LIST_SOL] 1.2 1000 [OP_MUL] 1350 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jimin' var_b = 'Seokjin' 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.2 var_d = 1000 var_e = var_c * var_d var_f = 1350 list_b= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Possibility
What is the difference between the second largest and the second smallest of all different four-digit numbers where each digit is 0 or a natural number?
8851
0 9 1 [OP_LIST_ARANGE] 4 [OP_LIST_GET_PERM] 2 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_SUB]
var_a = 0 var_b = 9 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 4 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = 2 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] var_g = 2 list_d=list_b.copy() list_d.sort() var_h = list_d[var_g-1] var_i = var_f - var_h print(int(var_i))
Geometry
Find the number of diagonals that can be drawn from one vertex of the icosikaipentagon.
22
25 3 [OP_SUB]
var_a = 25 var_b = 3 var_c = var_a - var_b print(int(var_c))
Comparison
You draw 2 number cards. The sum of the numbers written on the two cards is 1443 and the difference is 141. Which of the numbers on the two cards is greater?
792
1443 141 [OP_ADD] 2 [OP_DIV]
var_a = 1443 var_b = 141 var_c = var_a + var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Geometry
What is the length in centimeters (cm) of one edge of a cube-shaped box whose volume is 1 cubic centimeter (cm2) less than a cuboid-shaped box whose base is 10 square centimeter (cm2) wide and whose height is 73 centimeters (cm)?
9
10 73 [OP_MUL] 1 [OP_SUB] 1/3 [OP_POW]
var_a = 10 var_b = 73 var_c = var_a * var_b var_d = 1 var_e = var_c - var_d var_f = 0.3333333333333333 var_g = var_e ** var_f print(int(eval('{:.2f}'.format(round(var_g+1e-10,2)))))
Arithmetic calculation
There are 21 cookies in one bag and there are 4 bags of cookies in one box. If there are 2 cookie boxes, find how many cookies there are.
168
21 4 [OP_MUL] 2 [OP_MUL]
var_a = 21 var_b = 4 var_c = var_a * var_b var_d = 2 var_e = var_c * var_d print(int(var_e))
Correspondence
When I mistakenly multiplied a number by 14 instead of subtracting 6, I got 70. What is the correct calculation result?
-1
70 14 [OP_DIV] 6 [OP_SUB]
var_a = 70 var_b = 14 var_c = var_a / var_b var_d = 6 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
There is a doll that is 5 meters (m) long and weighs 29/8 kilograms (kg) and a tree that is 4 meters (m) long and weighs 2.8 kilograms (kg). If you cut the doll and the tree into 2 meters (m) and weigh them together, how many kilograms (kg) do you get?
2.85
29/8 5 [OP_DIV] 2 [OP_MUL] 2.8 4 [OP_DIV] 2 [OP_MUL] [OP_ADD]
var_a = 3.625 var_b = 5 var_c = var_a / var_b var_d = 2 var_e = var_c * var_d var_f = 2.8 var_g = 4 var_h = var_f / var_g var_i = 2 var_j = var_h * var_i var_k = var_e + var_j print('{:.2f}'.format(round(var_k+1e-10,2)))
Arithmetic calculation
You want to place 58 fire extinguishers equally spaced on each side of a 191.8-meter (m) hallway. If fire extinguishers are placed at both the beginning and end of the hallway, what is the distance in meters (m) between the fire extinguishers?
6.85
191.8 58 2 [OP_DIV] 1 [OP_SUB] [OP_DIV]
var_a = 191.8 var_b = 58 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)))
Comparison
We are to plan to divide 1 liter (L) of water into 2 bottles of bottle A and 3 liters (L) of water into 4 bottles of B equally. If each bottle is the same shape and size, which bottle has more water, bottle A or bottle B?
B
[OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 1 2 [OP_DIV] 3 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 = 1 var_d = 2 var_e = var_c / var_d var_f = 3 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)
Correspondence
2A+B2=89. If A and B are different numbers, what is A-B?
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))
Correspondence
AB19 rounded up to the hundred's place is 7300. What is AB19 rounded down 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))
Arithmetic calculation
There are 28 strawberry-flavored candies and 32 grape-flavored candies. If you give 4 candies of any type to each person, to how many people can you distribute them?
15
28 32 [OP_ADD] 4 [OP_FDIV]
var_a = 28 var_b = 32 var_c = var_a + var_b var_d = 4 var_e = var_c // var_d print(int(var_e))
Comparison
Two friends are playing a game where one wins if he draws the bigger number. When Yeseul drew a card with 13/10 written on it, and Youngjun drew a card written as 22/15, who was the winner?
Youngjun
[OP_LIST_SOL] Yeseul Youngjun [OP_LIST_EOL] [OP_LIST_SOL] 13/10 22/15 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yeseul' var_b = 'Youngjun' 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.3 var_d = 1.4666666666666666 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
For line segment AB with a length of 12 centimeters (cm), if point M is the midpoint of line segment AB, find the length of line segment AM.
6
12 2 [OP_DIV]
var_a = 12 var_b = 2 var_c = var_a / var_b print(int(var_c))
Correspondence
There are three numbers (A), (B), and (C). When (A) is divided by (B), the quotient is divided by 1.2, and when (B) is divided by (C), the quotient is divided by 5/6. If (A) is divided by (C), what is the quotient?
1
1.2 5/6 [OP_MUL]
var_a = 1.2 var_b = 0.8333333333333334 var_c = var_a * var_b print(int(var_c))
Comparison
Among the divisors of 72 and 120, you write duplicate numbers on paper in order. What is the 4th largest number?
6
72 [OP_LIST_GET_DIVISOR] 120 [OP_LIST_GET_DIVISOR] [OP_SET_INTERSECT] 4 [OP_LIST_MAX
var_a = 72 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 = 120 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)) var_c = 4 var_d = '[OP_LIST_MAX' print(var_d)
Comparison
Students are standing in a line. Yoojung is standing at the head, and Eunji is standing at the tail end. 14 people are standing between Yoojung and Eunji. How many students are in line?
16
1 14 [OP_ADD] 1 [OP_ADD]
var_a = 1 var_b = 14 var_c = var_a + var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
Among the notebooks Eunji had, she gave half of the remaining 8 to her younger sister, and there were 5 left. How many notebooks did Eunji have at first?
18
5 2 [OP_MUL] 8 [OP_ADD]
var_a = 5 var_b = 2 var_c = var_a * var_b var_d = 8 var_e = var_c + var_d print(int(var_e))
Geometry
A rectangular bulletin board with an area of 6400 square centimeters (cm2) is 160 centimeters (cm) long. How many centimeters (cm) is the width?
40
6400 160 [OP_DIV]
var_a = 6400 var_b = 160 var_c = var_a / var_b print(int(var_c))
Correspondence
Jihoon took half of the marbles that Seohyun had in the game, and Seohyun lost 1/3 of the marbles, leaving her 12 marbles. How many marbles did Seohyun have at first?
36
12 1 1/3 [OP_SUB] [OP_DIV] 1 1/2 [OP_SUB] [OP_DIV]
var_a = 12 var_b = 1 var_c = 0.3333333333333333 var_d = var_b - var_c var_e = var_a / var_d var_f = 1 var_g = 0.5 var_h = var_f - var_g var_i = var_e / var_h print(int(eval('{:.2f}'.format(round(var_i+1e-10,2)))))