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
When three numbers are given: 10, 11 and 12, find the 2nd largest number divided by the 2nd smallest number.
1
[OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 2 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_DIV]
var_a = 10 var_b = 11 var_c = 12 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 2 list_b=list_a.copy() list_b.sort() var_e = list_b[-var_d] var_f = 2 list_c=list_a.copy() list_c.sort() var_g = list_c[var_f-1] var_h = var_e / var_g print(int(var_h))
Correspondence
You need to find the sum of 9 and a certain number, but mistakenly calculated the difference of them and got 1 as the answer. If the number is less than 10, find the sum of 9 and the number.
17
9 1 [OP_SUB] 9 [OP_ADD]
var_a = 9 var_b = 1 var_c = var_a - var_b var_d = 9 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
There are a total of 20 telephone poles at 25m (m) intervals between Seokgi's and Dongmin's houses. If there is no telephone pole in front of their houses, what is the distance in meters (m) between Seokgi's and Dongmin's houses?
525
20 1 [OP_ADD] 25 [OP_MUL]
var_a = 20 var_b = 1 var_c = var_a + var_b var_d = 25 var_e = var_c * var_d print(int(var_e))
Possibility
There are 20 people in Seokjin's class. If you are trying to pick 11 people to play in a soccer tournament, what are possible cases to pick a team?
167960
20 11 [OP_COMB]
var_a = 20 var_b = 11 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
Jisoo got 30 robots. Heeyoung has four times as many robots as Jisoo. How many robots do Heeyoung and Jisoo have in total?
120
40 4 [OP_MUL] 40 [OP_SUB]
var_a = 40 var_b = 4 var_c = var_a * var_b var_d = 40 var_e = var_c - var_d print(int(var_e))
Comparison
Given that 8 people are standing between Eunjung and Yoojung, how many students are in a line when Eunjeong is the 5th student from the front and Yoojung is the last student in the line?
14
5 8 [OP_ADD] 1 [OP_ADD]
var_a = 5 var_b = 8 var_c = var_a + var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Comparison
Minsu, Changhyun, and Seonghyun are standing in line at the bus stop. If Minsu is standing in front of Changhyun and Changhyun is standing in front of Seonghyun, find out who is standing at the back.
Seonghyun
[OP_LIST_SOL] Minsu Changhyun Seonghyun [OP_LIST_EOL] [OP_LIST_SOL] Minsu Changhyun < Changhyun Seonghyun < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET]
var_a = 'Minsu' var_b = 'Changhyun' var_c = 'Seonghyun' 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 = 'Minsu' var_e = 'Changhyun' var_f = '<' var_g = 'Changhyun' var_h = 'Seonghyun' 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)
Possibility
Yoo-ah left one of the digits 5, 2, 8, or 0 out and tried to form a three-digit number with the remaining digits. How many of the numbers Yoo-ah made are greater than 550 and less than 850?
6
[OP_LIST_SOL] 5 2 8 0 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 550 [OP_LIST_MORE] 850 [OP_LIST_LESS] [OP_LIST_LEN]
var_a = 5 var_b = 2 var_c = 8 var_d = 0 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 = 550 list_c = [] for i in list_b: if i > var_f: list_c.append(i) var_g = 850 list_d = [] for i in list_c: if i < var_g: list_d.append(i) var_h = len(list_d) print(int(var_h))
Geometry
If you draw a diagonal from one vertex of a figure made of 9 angles, how many figures made of 3 angles are made?
7
9 3 [OP_SUB] 1 [OP_ADD]
var_a = 9 var_b = 3 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Comparison
22 people of different heights stand in a line in order, tallest first. (a) stands 13th from the back. If you line up again in order of shortest to tallest, what number will you stand from the back?
10
22 13 [OP_SUB] 1 [OP_ADD]
var_a = 22 var_b = 13 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
How many grams (g) of water must be evaporated from 300 grams (g) of 4% salt water to make 10% salt water?
180
300 300 4 100 [OP_DIV] [OP_MUL] 100 10 [OP_DIV] [OP_MUL] [OP_SUB]
var_a = 300 var_b = 300 var_c = 4 var_d = 100 var_e = var_c / var_d var_f = var_b * var_e var_g = 100 var_h = 10 var_i = var_g / var_h var_j = var_f * var_i var_k = var_a - var_j print(int(var_k))
Comparison
Yoongi collected 4 apples and Jungkook collected 6 times 3 apples. Who has fewer apples?
Yoongi
[OP_LIST_SOL] Yoongi Jungkook [OP_LIST_EOL] [OP_LIST_SOL] 4 6 3 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MIN] [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-1] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Comparison
Jungkook ate 3 out of 6 apples. When Yoongi has 4 apples, who has fewer apples?
Jungkook
[OP_LIST_SOL] Jungkook Yoongi [OP_LIST_EOL] [OP_LIST_SOL] 6 3 [OP_SUB] 4 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jungkook' var_b = 'Yoongi' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 6 var_d = 3 var_e = var_c - var_d var_f = 4 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-1] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Arithmetic calculation
There are apples, bananas and persimmons in the fruit shop. The number of apples is 4 times the number of bananas, and the number of persimmons is 3 times the number of bananas. If the sum of apples and persimmons is 210, how many bananas are there?
30
210 4 3 [OP_ADD] [OP_DIV]
var_a = 210 var_b = 4 var_c = 3 var_d = var_b + var_c var_e = var_a / var_d print(int(var_e))
Arithmetic calculation
There are 23 more soccer balls at Hoseok's school than basketballs and 18 fewer volleyballs than soccer balls. If there are 40 volleyballs, how many basketballs are there?
35
40 18 [OP_ADD] 23 [OP_SUB]
var_a = 40 var_b = 18 var_c = var_a + var_b var_d = 23 var_e = var_c - var_d print(int(var_e))
Correspondence
Multiplying a number by 0.55 in a row gives you 4.235. Find the number.
14
4.235 0.55 [OP_DIV] 0.55 [OP_DIV]
var_a = 4.235 var_b = 0.55 var_c = var_a / var_b var_d = 0.55 var_e = var_c / var_d print(int(var_e))
Comparison
If Eunji stands in line for a bus and there are 6 people waiting in front and 5 people behind, how many people are there?
12
6 1 [OP_ADD] 5 [OP_ADD]
var_a = 6 var_b = 1 var_c = var_a + var_b var_d = 5 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
The circumference of Suyeong's school playground is 242.7 meters (m). If Suyeong ran 5 laps around the playground, how many meters (m) did she run?
1213.5
242.7 5 [OP_MUL]
var_a = 242.7 var_b = 5 var_c = var_a * var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Comparison
There are 3 red balls, 2 blue balls, and 5 green balls in the bag. When a ball is drawn from the bag, what will be the color of the ball with the highest probability?
green
[OP_LIST_SOL] red blue green [OP_LIST_EOL] [OP_LIST_SOL] 3 2 5 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'red' var_b = 'blue' var_c = 'green' 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 var_e = 2 var_f = 5 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) if "/" in str(var_d): var_d = eval(str(var_d)) list_b.append(var_d) 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
Soyun chooses and discards one of the number cards 3, 5, 8, and 9, and wants to make a three-digit natural number with the remaining cards. How many total numbers can Soyun make?
24
[OP_LIST_SOL] 3 5 8 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 3 var_b = 5 var_c = 8 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 = 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 = len(list_b) print(int(var_f))
Possibility
If you choose three different numbers from 0, 3, 5, and 9 and use them once to make a three-digit number, what is the sum of the smallest and largest numbers?
1258
[OP_LIST_SOL] 0 3 5 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] 1 [OP_LIST_MAX] [OP_ADD]
var_a = 0 var_b = 3 var_c = 5 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 = 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 list_c=list_b.copy() list_c.sort() var_g = list_c[var_f-1] var_h = 1 list_d=list_b.copy() list_d.sort() var_i = list_d[-var_h] var_j = var_g + var_i print(int(var_j))
Arithmetic calculation
There is a hot air balloon that is 115 meters (m) high. How many minutes does it take to pass through the stratosphere of 1.625 kilometers (km) if it ascends 400 meters (m) in 1 minute?
3.78
1.625 1000 [OP_MUL] 115 [OP_SUB] 400 [OP_DIV]
var_a = 1.625 var_b = 1000 var_c = var_a * var_b var_d = 115 var_e = var_c - var_d var_f = 400 var_g = var_e / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Comparison
The wire Yeongju has is 97.5 centimeters (cm), and the wire Minho has is 3 millimeters (mm) longer than 97 centimeters (cm). Who has a shorter wire?
Minho
[OP_LIST_SOL] Yeongju Minho [OP_LIST_EOL] [OP_LIST_SOL] 97.5 97 3 10 [OP_DIV] [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yeongju' var_b = 'Minho' 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 = 97.5 var_d = 97 var_e = 3 var_f = 10 var_g = var_e / var_f var_h = var_d + 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-1] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Correspondence
Among the multiples of 123, there are is a number shaped162ABC6. Find the smallest of these numbers shaped like that.
1620156
1620006 1629996 1 [OP_LIST_ARANGE] 123 [OP_LIST_DIVISIBLE] 10 6 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_MIN]
var_a = 1620006 var_b = 1629996 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 123 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 = 10 var_f = 6 list_c = [] var_e = int(var_e) var_f = int(var_f) if var_f < 0: var_f = var_f + var_e for i in list_b: i = int(i) if i%var_e == var_f: list_c.append(i) var_g = 1 list_d=list_c.copy() list_d.sort() var_h = list_d[var_g-1] print(int(var_h))
Correspondence
Divide 11 by a number and you get 2 as a result. How much is 6 multiplied by a number?
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))
Arithmetic calculation
Hot air balloons are said to ascend into the sky at 3.8 kilometers (km) per hour. How high in kilometers (km) does a hot air balloon rise without stopping in 2 hours and 45 minutes?
10.45
3.8 2 45 60 [OP_DIV] [OP_ADD] [OP_MUL]
var_a = 3.8 var_b = 2 var_c = 45 var_d = 60 var_e = var_c / var_d var_f = var_b + var_e var_g = var_a * var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Arithmetic calculation
There are 12 liters (L) and 400 milliliters (㎖) of oil. You are trying to divide this into two bottles. A large bottle can hold 2 liters (L) and 600 milliliters (㎖) more than a small bottle. How many liters (liters) will the large bottle hold?
7.5
12 400 1000 [OP_DIV] [OP_ADD] 2 [OP_DIV] 2 600 1000 [OP_DIV] [OP_ADD] 2 [OP_DIV] [OP_ADD]
var_a = 12 var_b = 400 var_c = 1000 var_d = var_b / var_c var_e = var_a + var_d var_f = 2 var_g = var_e / var_f var_h = 2 var_i = 600 var_j = 1000 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('{:.2f}'.format(round(var_o+1e-10,2)))
Geometry
How many diagonals can be drawn from one vertex of a 10-angle figure?
7
10 3 [OP_SUB]
var_a = 10 var_b = 3 var_c = var_a - var_b print(int(var_c))
Correspondence
The five-digit number A375B is divisible by 24. How many numbers fit for A?
3
A375B [OP_GEN_POSSIBLE_LIST] 24 [OP_LIST_DIVISIBLE] A375B A [OP_LIST_FIND_UNK] [OP_LIST_LEN]
var_a = 'A375B' 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 = 24 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 = 'A375B' var_d = 'A' var_c = str(var_c) var_d = str(var_d) unk_idx = var_c.index(var_d) list_c = [] for elem in list_b: elem = str(elem) list_c.append(int(elem[unk_idx])) list_c = list(set(list_c)) var_e = len(list_c) print(int(var_e))
Geometry
What is the total number of vertices of a figure with 21 edges, 9 faces, and two polygonal base sides that are parallel and congruent?
14
21 3 [OP_DIV] 2 [OP_MUL]
var_a = 21 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 four numbers 0.8, 1/2, 0.9, and 1/3. How many numbers are less than or equal to 3?
4
[OP_LIST_SOL] 0.8 1/2 0.9 1/3 [OP_LIST_EOL] 3 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN]
var_a = 0.8 var_b = 0.5 var_c = 0.9 var_d = 0.3333333333333333 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 3 list_b = [] for i in list_a: if i <= var_e: list_b.append(i) var_f = len(list_b) print(int(var_f))
Correspondence
If the six-digit number A15B94 is a multiple of 99, find the sum of A and B.
8
A15B94 [OP_GEN_POSSIBLE_LIST] 99 [OP_LIST_DIVISIBLE] A15B94 A [OP_LIST_FIND_UNK] A15B94 B [OP_LIST_FIND_UNK] [OP_ADD]
var_a = 'A15B94' 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 = 99 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 = 'A15B94' 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]) var_f = 'A15B94' var_g = 'B' var_f = str(var_f) var_g = str(var_g) unk_idx = var_f.index(var_g) var_h = 0 for elem in list_b: elem = str(elem) var_h = int(elem[unk_idx]) var_i = var_e + var_h print(int(var_i))
Geometry
You have a rectangular piece of dough measuring 34 centimeters (cm) wide. When the dough is cut without gaps using a square mold with a side length of 4 centimeters (cm), if the width of the dough is 2 centimeters (cm) left and 24 cookies are made in total, Find the minimum perimeter of the dough before the mold is stamped in centimeters (cm).
92
24 34 4 [OP_FDIV] [OP_DIV] 4 [OP_MUL] 34 [OP_ADD] 2 [OP_MUL]
var_a = 24 var_b = 34 var_c = 4 var_d = var_b // var_c var_e = var_a / var_d var_f = 4 var_g = var_e * var_f var_h = 34 var_i = var_g + var_h var_j = 2 var_k = var_i * var_j print(int(var_k))
Possibility
At a fruit store that sells apples, peaches, pears, and strawberries, you want to buy two fruits allowing duplicates. How many possible cases are there?
10
[OP_LIST_SOL] apples peaches pears strawberries [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_ADD] 1 [OP_SUB] 2 [OP_COMB]
var_a = 'apples' var_b = 'peaches' var_c = 'pears' var_d = 'strawberries' list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = len(list_a) var_f = 2 var_g = var_e + var_f var_h = 1 var_i = var_g - var_h var_j = 2 var_k = 1 var_i = int(var_i) var_j = int(var_j) for i, elem in enumerate(range(var_j)): var_k = var_k * (var_i-i) for i, elem in enumerate(range(var_j)): var_k = var_k / (i+1) print(int(var_k))
Arithmetic calculation
You have 200 grams (g) of salt water with 5% salt. When the remaining salt became 8% of the total salt water after the water evaporated from this salt water, find how many grams (g) of water has evaporated.
75
200 200 5 100 [OP_DIV] [OP_MUL] 100 8 [OP_DIV] [OP_MUL] [OP_SUB]
var_a = 200 var_b = 200 var_c = 5 var_d = 100 var_e = var_c / var_d var_f = var_b * var_e var_g = 100 var_h = 8 var_i = var_g / var_h var_j = var_f * var_i var_k = var_a - var_j print(int(var_k))
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. It is said that when two books are taken from one floor of a bookshelf, there are 20 books left on that floor. How many books are on the shelves in the library?
3696
20 2 [OP_ADD] 6 [OP_MUL] 28 [OP_MUL]
var_a = 20 var_b = 2 var_c = var_a + var_b var_d = 6 var_e = var_c * var_d var_f = 28 var_g = var_e * var_f print(int(var_g))
Arithmetic calculation
In the process of division, Seokjin left out the 0 in the tens place of the three-digit subtracting number, so he saw it as 15 by mistake. If he gets a quotient of 182 without any remainder, find the quotient of the correct calculation.
26
15 182 [OP_MUL] 105 [OP_FDIV]
var_a = 15 var_b = 182 var_c = var_a * var_b var_d = 105 var_e = var_c // var_d print(int(var_e))
Comparison
Which of the five numbers 1.4, 9/10, 1.2, 0.5, and 13/10 is greater than or equal to 1.1? Find the smallest or the equal number.
1.2
[OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE_EQUAL] 1 [OP_LIST_MIN]
var_a = 1.4 var_b = 0.9 var_c = 1.2 var_d = 0.5 var_e = 1.3 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 1.1 list_b = [] for i in list_a: if i >= var_f: list_b.append(i) var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[var_g-1] print('{:.2f}'.format(round(var_h+1e-10,2)))
Correspondence
Subtracting 17 from a number gives 55. What number is it when the number is divided by 9?
8
55 17 [OP_ADD] 9 [OP_DIV]
var_a = 55 var_b = 17 var_c = var_a + var_b var_d = 9 var_e = var_c / var_d print(int(var_e))
Possibility
How many faces in a tetrahedron meet at one vertex?
3
3
var_a = 3 print(int(var_a))
Geometry
Using 28 centimeters (cm) long wire, I made a rectangle with a width of 6. Find the area of the rectangle.
48
28 2 [OP_DIV] 6 [OP_SUB] 6 [OP_MUL]
var_a = 28 var_b = 2 var_c = var_a / var_b var_d = 6 var_e = var_c - var_d var_f = 6 var_g = var_e * var_f print(int(var_g))
Correspondence
While Yoongi was subtracting 57 from the three-digit number, Yoongi mistakenly saw the three-digit ones digit 9 as 6. If the difference that Yoongi found is 819, what is the correct calculation?
822
819 57 [OP_ADD] 6 9 [OP_SUB] [OP_SUB] 57 [OP_SUB]
var_a = 819 var_b = 57 var_c = var_a + var_b var_d = 6 var_e = 9 var_f = var_d - var_e var_g = var_c - var_f var_h = 57 var_i = var_g - var_h print(int(var_i))
Geometry
Find the number of semi-straight lines for three points that are not on a straight line.
6
3 2 [OP_PERM]
var_a = 3 var_b = 2 var_c = 1 var_a = int(var_a) var_b = int(var_b) for i, elem in enumerate(range(var_b)): var_c = var_c * (var_a-i) print(int(var_c))
Arithmetic calculation
When three people have marbles, 5 times the number of marbles that Namjoon has is 11 more than what Yoongi has. 2 multiply by the number that Yoongi has is 8 fewer than Hoseok's marbles. Find the sum of marbles for each person: Namjoon, Yoongi, and Hoseok.
247
17 17 5 [OP_MUL] 11 [OP_SUB] [OP_ADD] 17 5 [OP_MUL] 11 [OP_SUB] 2 [OP_MUL] 8 [OP_ADD] [OP_ADD]
var_a = 17 var_b = 17 var_c = 5 var_d = var_b * var_c var_e = 11 var_f = var_d - var_e var_g = var_a + var_f var_h = 17 var_i = 5 var_j = var_h * var_i var_k = 11 var_l = var_j - var_k var_m = 2 var_n = var_l * var_m var_o = 8 var_p = var_n + var_o var_q = var_g + var_p print(int(var_q))
Arithmetic calculation
A large bucket is filled with water. You want to divide this water into 7 smaller buckets of the same shape and size. If you divide it by 900 grams (g), 200 grams (g) remain. How many kilograms (kg) of water is in the large bucket?
6.5
900 7 [OP_MUL] 200 [OP_ADD] 1000 [OP_DIV]
var_a = 900 var_b = 7 var_c = var_a * var_b var_d = 200 var_e = var_c + var_d var_f = 1000 var_g = var_e / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Arithmetic calculation
When writing numbers from 1 to 125, find out how many times 2 are written.
29
1 125 1 [OP_LIST_ARANGE] [OP_LIST2NUM] [OP_NUM2LIST] 2 [OP_LIST_FIND_NUM]
var_a = 1 var_b = 125 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d="" for i in list_a: i = str(i) var_d = var_d + i list_b = [] var_d = int(var_d) while var_d//10 > 0: list_b.append(var_d%10) var_d = var_d//10 list_b.append(var_d%10) list_b = list_b[::-1] var_e = 2 var_f = 0 var_e = int(var_e) for i in list_b: i = int(i) if i == var_e: var_f = var_f + 1 print(int(var_f))
Arithmetic calculation
I bought 7 boxes of soda, each box containing 16 cans. Thirteen of them are discarded because the cans were crushed during transport, and I plan to distribute the remaining beverages equally among the eight cartons. How many cans of beverages do not fit in the box?
3
16 7 [OP_MUL] 13 [OP_SUB] 8 [OP_MOD]
var_a = 16 var_b = 7 var_c = var_a * var_b var_d = 13 var_e = var_c - var_d var_f = 8 var_g = var_e % var_f print(int(var_g))
Comparison
In a running competition, Jungkook came in the 7th and Minyoung came in the 5th. Taehyung did worse than Minyoung but better than Jungkook. In what place did Taehyung come in?
6
5 7 [OP_ADD] 2 [OP_FDIV]
var_a = 5 var_b = 7 var_c = var_a + var_b var_d = 2 var_e = var_c // var_d print(int(var_e))
Correspondence
When a number is divided by 24, it becomes 19. What number is it?
456
19 24 [OP_MUL]
var_a = 19 var_b = 24 var_c = var_a * var_b print(int(var_c))
Geometry
Find the sum of the vertices, faces, and edges of the octagonal pyramid.
34
8 1 [OP_ADD] 8 2 [OP_MUL] [OP_ADD] 8 1 [OP_ADD] [OP_ADD]
var_a = 8 var_b = 1 var_c = var_a + var_b var_d = 8 var_e = 2 var_f = var_d * var_e var_g = var_c + var_f var_h = 8 var_i = 1 var_j = var_h + var_i var_k = var_g + var_j print(int(var_k))
Comparison
There are three numbers A, B, and C. A is 8 multiplied by 9 minus 3. B is the quotient of A divided by 3. C is equal to 2 times B plus 4. Find the sum of the largest and smallest numbers.
92
[OP_LIST_SOL] 8 9 [OP_MUL] 3 [OP_SUB] 8 9 [OP_MUL] 3 [OP_SUB] 3 [OP_DIV] 8 9 [OP_MUL] 3 [OP_SUB] 3 [OP_DIV] 2 [OP_MUL] 4 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] 3 [OP_LIST_MAX] [OP_ADD]
var_a = 8 var_b = 9 var_c = var_a * var_b var_d = 3 var_e = var_c - var_d var_f = 8 var_g = 9 var_h = var_f * var_g var_i = 3 var_j = var_h - var_i var_k = 3 var_l = var_j / var_k var_m = 8 var_n = 9 var_o = var_m * var_n var_p = 3 var_q = var_o - var_p var_r = 3 var_s = var_q / var_r var_t = 2 var_u = var_s * var_t var_v = 4 var_w = var_u + var_v list_a= [] if "/" in str(var_w): var_w = eval(str(var_w)) list_a.append(var_w) if "/" in str(var_l): var_l = eval(str(var_l)) list_a.append(var_l) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) list_a.reverse() var_x = 1 list_b=list_a.copy() list_b.sort() var_y = list_b[-var_x] var_z = 3 list_c=list_a.copy() list_c.sort() var_A = list_c[-var_z] var_B = var_y + var_A print(int(var_B))
Possibility
Find the sum of possible four digit numbers that can be formed by using each 3, 5, 7, and 9.
159984
[OP_LIST_SOL] 3 5 7 9 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] [OP_LIST_SUM]
var_a = 3 var_b = 5 var_c = 7 var_d = 9 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 4 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] list_b = [float(i) for i in list_b] var_f = sum(list_b) print(int(var_f))
Possibility
You are going to clean the classroom with 5 friends including Eunhee. When picking 2 people in charge of the classroom floor and 1 person in charge of the window, find the number of cases where Eunhee be in charge of the classroom floor.
12
5 1 [OP_SUB] 2 1 [OP_SUB] 1 [OP_ADD] [OP_PERM]
var_a = 5 var_b = 1 var_c = var_a - var_b var_d = 2 var_e = 1 var_f = var_d - var_e var_g = 1 var_h = var_f + var_g var_i = 1 var_c = int(var_c) var_h = int(var_h) for i, elem in enumerate(range(var_h)): var_i = var_i * (var_c-i) print(int(var_i))
Geometry
A lake has a circumference of 30 meters (m) and a circumference of 94.2 meters (m). How many times the circumference of the lake is greater than its diameter?
3.14
94.2 30 [OP_DIV]
var_a = 94.2 var_b = 30 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
There are three numbers 10, 11 and 12. What is the value of difference between the 3rd smallest number and the 2nd smallest number?
1
[OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 3 [OP_LIST_MIN] 2 [OP_LIST_MIN] [OP_SUB]
var_a = 10 var_b = 11 var_c = 12 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 3 list_b=list_a.copy() list_b.sort() var_e = list_b[var_d-1] var_f = 2 list_c=list_a.copy() list_c.sort() var_g = list_c[var_f-1] var_h = var_e - var_g print(int(var_h))
Geometry
Sumin has 6 square-shaped pieces of paper with each side measuring 30 centimeters (cm). To connect these papers in a single line, she overlapped them by 7 centimeters (cm) and attached them with glue. Find the area of the connected paper.
4350
30 6 [OP_MUL] 7 6 1 [OP_SUB] [OP_MUL] [OP_SUB] 30 [OP_MUL]
var_a = 30 var_b = 6 var_c = var_a * var_b var_d = 7 var_e = 6 var_f = 1 var_g = var_e - var_f var_h = var_d * var_g var_i = var_c - var_h var_j = 30 var_k = var_i * var_j print(int(var_k))
Possibility
You want to divide 7 bananas into 2 different baskets. The basket must contain at least 1 banana. How many ways are there to share bananas?
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))
Arithmetic calculation
Some school divides classes into upper and lower classes according to math skills. If there are a total of 120 students and there are 36 more students in the lower class than in the upper class, how many students are in the lower class?
78
120 36 [OP_SUB] 2 [OP_DIV] 36 [OP_ADD]
var_a = 120 var_b = 36 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 36 var_g = var_e + var_f print(int(var_g))
Comparison
There are 2 people standing in front of Jungkook and four people behind him. If there are a total of 8 lines with the same number of people for each line, how many people are there?
56
2 4 [OP_ADD] 1 [OP_ADD] 8 [OP_MUL]
var_a = 2 var_b = 4 var_c = var_a + var_b var_d = 1 var_e = var_c + var_d var_f = 8 var_g = var_e * var_f print(int(var_g))
Arithmetic calculation
There are 3 numbers: 3/25, 1/5, and 55.21. What is the sum of these numbers?
55.53
3/25 1/5 [OP_ADD] 55.21 [OP_ADD]
var_a = 0.12 var_b = 0.2 var_c = var_a + var_b var_d = 55.21 var_e = var_c + var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Geometry
If A and B are the numbers of sides and vertices of a pentagon, what is the value of A+B?
10
5 5 [OP_ADD]
var_a = 5 var_b = 5 var_c = var_a + var_b print(int(var_c))
Possibility
Find the number of combinations of numbers that add up to 19 by selecting 3 of the number cards from 1 to 9.
30
1 9 1 [OP_LIST_ARANGE] 3 [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 = 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] 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))
Comparison
Which of 2.23, 3.12, 9.434, and 2.453 is the second smallest number?
2.45
[OP_LIST_SOL] 2.23 3.12 9.434 2.453 [OP_LIST_EOL] 2 [OP_LIST_MIN]
var_a = 2.23 var_b = 3.12 var_c = 9.434 var_d = 2.453 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('{:.2f}'.format(round(var_f+1e-10,2)))
Arithmetic calculation
Of the students who played on the playground, 16 went home, and 9 more came, resulting in a total of 25. How many students were playing on the playground at first?
32
25 9 [OP_SUB] 16 [OP_ADD]
var_a = 25 var_b = 9 var_c = var_a - var_b var_d = 16 var_e = var_c + var_d print(int(var_e))
Comparison
Yuna and her friends are of different heights. The teacher lined up in order from the smallest height, and Yuna was 4th from the front and 6th from the back. How many Yuna and her friends are there?
9
4 6 [OP_ADD] 1 [OP_SUB]
var_a = 4 var_b = 6 var_c = var_a + var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
There are 240 pencils and erasers in the pencil case. If there are 2 fewer pencils than erasers, how many erasers are there in the pencil case?
121
240 2 [OP_SUB] 2 [OP_DIV] 2 [OP_ADD]
var_a = 240 var_b = 2 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 2 var_g = var_e + var_f print(int(var_g))
Arithmetic calculation
There are numbers which are 38, 114, 152, and 95. What is the value when the largest number is divided by the smallest number?
4
[OP_LIST_SOL] 38 114 152 95 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_DIV]
var_a = 38 var_b = 114 var_c = 152 var_d = 95 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(int(var_i))
Comparison
5 different boxes contain 20, 15, 18, 17, and 20 chocolates respectively. If all the chocolates are taken out of boxes containing 18 or more chocolates and put into one large box, find how many chocolates will fit in this box.
58
[OP_LIST_SOL] 20 15 18 17 20 [OP_LIST_EOL] 18 [OP_LIST_MORE_EQUAL] [OP_LIST_SUM]
var_a = 20 var_b = 15 var_c = 18 var_d = 17 var_e = 20 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 = 18 list_b = [] for i in list_a: if i >= var_f: list_b.append(i) list_b = [float(i) for i in list_b] var_g = sum(list_b) print(int(var_g))
Arithmetic calculation
Father's age divided by daughter's age equals 4. When the sum of their ages after 5 years is 50, how old is your father this year?
32
50 5 2 [OP_MUL] [OP_SUB] 1 4 [OP_ADD] [OP_DIV] 4 [OP_MUL]
var_a = 50 var_b = 5 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 var_j = 4 var_k = var_i * var_j print(int(var_k))
Geometry
The length of each side of the parallelogram is 18 centimeters (cm) and 12 centimeters (cm), respectively. Find the circumference of this parellelogram.
60
18 12 [OP_ADD] 2 [OP_MUL]
var_a = 18 var_b = 12 var_c = var_a + var_b var_d = 2 var_e = var_c * var_d print(int(var_e))
Arithmetic calculation
A total of 30 trees are planted 9 meters (m) apart on either side of a road from beginning to end. Find the length of this road in meters (m).
126
30 2 [OP_DIV] 1 [OP_SUB] 9 [OP_MUL]
var_a = 30 var_b = 2 var_c = var_a / var_b var_d = 1 var_e = var_c - var_d var_f = 9 var_g = var_e * var_f print(int(var_g))
Comparison
There are three numbers A, B, and C. A is 1/2 and B is 9/10. If C is 2/5, what is the smallest among A, B, or C?
C
[OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] 1 2 [OP_DIV] 9 10 [OP_DIV] 2 5 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'A' var_b = 'B' var_c = 'C' list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 1 var_e = 2 var_f = var_d / var_e var_g = 9 var_h = 10 var_i = var_g / var_h var_j = 2 var_k = 5 var_l = var_j / var_k list_b= [] if "/" in str(var_l): var_l = eval(str(var_l)) list_b.append(var_l) if "/" in str(var_i): var_i = eval(str(var_i)) list_b.append(var_i) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) list_b.reverse() var_m = 1 list_c=list_b.copy() list_c.sort() var_n = list_c[var_m-1] var_o = list_b.index(var_n)+1 var_p = list_a[var_o-1] print(var_p)
Geometry
There are planks that are 36 centimeters (cm), 42 centimeters (cm), and 48 centimeters (cm) respectively. After cutting out 1/6 of this plank while trimming it, I overlapped and glued certain parts together, and the total length is 97 centimeters (cm). If all overlapping parts are the same length, find how many centimeters (cm) is the overlapping part.
4
36 42 [OP_ADD] 48 [OP_ADD] 1 1/6 [OP_SUB] [OP_MUL] 97 [OP_SUB] 3 1 [OP_SUB] [OP_DIV]
var_a = 36 var_b = 42 var_c = var_a + var_b var_d = 48 var_e = var_c + var_d var_f = 1 var_g = 0.16666666666666666 var_h = var_f - var_g var_i = var_e * var_h var_j = 97 var_k = var_i - var_j var_l = 3 var_m = 1 var_n = var_l - var_m var_o = var_k / var_n print(int(var_o))
Correspondence
A number needs to be multiplied by 5, but I mistakenly added 5 to get 43. Find the result of the correct calculation.
190
43 5 [OP_SUB] 5 [OP_MUL]
var_a = 43 var_b = 5 var_c = var_a - var_b var_d = 5 var_e = var_c * var_d print(int(var_e))
Geometry
You want to plant trees at intervals of 4 meters (m) in a circle-shaped park with a circumference of 28 meters (m). Find how many trees you can plant.
7
28 4 [OP_DIV]
var_a = 28 var_b = 4 var_c = var_a / var_b print(int(var_c))
Geometry
There is a prism whose sum of the number of edges, faces, and vertices is 50. How many edges of the pyramid have the same base shape as the prism?
16
50 2 [OP_SUB] 2 3 [OP_ADD] 1 [OP_ADD] [OP_DIV] 2 [OP_MUL]
var_a = 50 var_b = 2 var_c = var_a - var_b var_d = 2 var_e = 3 var_f = var_d + var_e var_g = 1 var_h = var_f + var_g var_i = var_c / var_h var_j = 2 var_k = var_i * var_j print(int(var_k))
Possibility
You want to draw two numbers from the digits 0, 1, 2, and 5 to create a number greater than 10 and less than 100. In how many cases does each digit of the drawn number differ?
8
[OP_LIST_SOL] 0 1 2 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 10 [OP_LIST_MORE] 100 [OP_LIST_LESS] [OP_LIST_LEN]
var_a = 0 var_b = 1 var_c = 2 var_d = 5 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 10 list_c = [] for i in list_b: if i > var_f: list_c.append(i) var_g = 100 list_d = [] for i in list_c: if i < var_g: list_d.append(i) var_h = len(list_d) print(int(var_h))
Geometry
There are several ttakjis. I laid out the ttakjis to make a large square, and there were residual 36 ttakjis that were not used to make the square. I increased one horizontal and one vertical side by one column, and there are still three residual ttakjis left. How many ttakjis are there in all?
292
36 3 [OP_SUB] 1 [OP_SUB] 2 [OP_DIV] 2 [OP_POW] 36 [OP_ADD]
var_a = 36 var_b = 3 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d var_f = 2 var_g = var_e / var_f var_h = 2 var_i = var_g ** var_h var_j = 36 var_k = var_i + var_j print(int(var_k))
Correspondence
When a number is multiplied by 4 and divided by 8, the quotient is 6 and the remainder is 4. Find out what this number is.
13
6 8 [OP_MUL] 4 [OP_ADD] 4 [OP_DIV]
var_a = 6 var_b = 8 var_c = var_a * var_b var_d = 4 var_e = var_c + var_d var_f = 4 var_g = var_e / var_f print(int(var_g))
Geometry
A cube is made by stacking 8 smaller cubes. If the volume of the stacked cubes is 1000 cubic centimeters (cm3), find the length of one corner of the smaller cube.
5
1000 8 [OP_DIV] 1/3 [OP_POW]
var_a = 1000 var_b = 8 var_c = var_a / var_b var_d = 0.3333333333333333 var_e = var_c ** var_d print(int(eval('{:.2f}'.format(round(var_e+1e-10,2)))))
Arithmetic calculation
There is a two-digit natural number whose tens digit is 3. If the number of digits in the tens digit and the ones digit of this natural number that are interchanged is 9 less than the initial number, find the initial number.
32
3 10 [OP_MUL] 9 [OP_SUB] 3 [OP_SUB] 10 1 [OP_SUB] [OP_DIV] 3 10 [OP_MUL] [OP_ADD]
var_a = 3 var_b = 10 var_c = var_a * var_b var_d = 9 var_e = var_c - var_d var_f = 3 var_g = var_e - var_f var_h = 10 var_i = 1 var_j = var_h - var_i var_k = var_g / var_j var_l = 3 var_m = 10 var_n = var_l * var_m var_o = var_k + var_n print(int(var_o))
Arithmetic calculation
Among the numbers from 1 to 100, find the smallest number whose remainder when divided by 7 is 2 and when divided by 8 is also 2.
2
1 100 1 [OP_LIST_ARANGE] 7 2 [OP_LIST_DIVIDE_AND_REMAIN] 8 2 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_MIN]
var_a = 1 var_b = 100 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 7 var_e = 2 list_b = [] var_d = int(var_d) var_e = int(var_e) if var_e < 0: var_e = var_e + var_d for i in list_a: i = int(i) if i%var_d == var_e: list_b.append(i) var_f = 8 var_g = 2 list_c = [] var_f = int(var_f) var_g = int(var_g) if var_g < 0: var_g = var_g + var_f for i in list_b: i = int(i) if i%var_f == var_g: list_c.append(i) var_h = 1 list_d=list_c.copy() list_d.sort() var_i = list_d[var_h-1] print(int(var_i))
Correspondence
AB+21=58. Calculate the value of A.
3
AB+21=58 A [OP_DIGIT_UNK_SOLVER]
var_a = 'AB+21=58' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] print(int(var_c))
Geometry
There is a soap in the shape of a rectangular parallelepiped measuring 4 centimeters (cm) wide, 6 centimeters (cm) long, and 5 centimeters (cm) high. If you use this soap and it becomes a cube, what is the maximum volume of the soap?
64
[OP_LIST_SOL] 4 6 4 [OP_LIST_EOL] 1 [OP_LIST_MIN] 1 [OP_LIST_MIN] 3 [OP_POW]
var_a = 4 var_b = 6 var_c = 4 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 1 list_b=list_a.copy() list_b.sort() var_e = list_b[var_d-1] var_f = 1 list_c=list_a.copy() list_c.sort() var_g = list_c[var_f-1] var_h = 3 var_i = var_g ** var_h print(int(var_i))
Arithmetic calculation
This year the mother is 43 years old and the daughter is 11 years old. How many years ago was the mother's age five times her daughter's age?
3
5 11 [OP_MUL] 43 [OP_SUB] 5 1 [OP_SUB] [OP_DIV]
var_a = 5 var_b = 11 var_c = var_a * var_b var_d = 43 var_e = var_c - var_d var_f = 5 var_g = 1 var_h = var_f - var_g var_i = var_e / var_h print(int(var_i))
Possibility
How many edges are there on a face of an octahedron?
3
3
var_a = 3 print(int(var_a))
Correspondence
How many multiples of 7 are three-digit numbers with 7 in the hundreds place?
15
7AB [OP_GEN_POSSIBLE_LIST] 7 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = '7AB' 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 = 7 list_b = [] var_b = int(var_b) for i in list_a: i = int(i) if i % var_b == 0: list_b.append(i) var_c = len(list_b) print(int(var_c))
Comparison
Three people each have a number card. If X is the average of the number cards of each person, the average of the number cards of two people A and B is 23 greater than X, and the average of the number cards of two people B and C is 17 less than X. The number written on B's number card was 66. Find the number written on A's number card.
124
66 23 2 [OP_MUL] [OP_ADD] 3 [OP_MUL] 17 23 [OP_ADD] 2 [OP_MUL] [OP_SUB] 66 2 [OP_MUL] [OP_SUB] 2 2 [OP_ADD] 3 [OP_SUB] [OP_DIV]
var_a = 66 var_b = 23 var_c = 2 var_d = var_b * var_c var_e = var_a + var_d var_f = 3 var_g = var_e * var_f var_h = 17 var_i = 23 var_j = var_h + var_i var_k = 2 var_l = var_j * var_k var_m = var_g - var_l var_n = 66 var_o = 2 var_p = var_n * var_o var_q = var_m - var_p var_r = 2 var_s = 2 var_t = var_r + var_s var_u = 3 var_v = var_t - var_u var_w = var_q / var_v print(int(var_w))
Geometry
A rabbit is walking in a park with a side length measuring 13 meters (m). How many meters (m) did the rabbit walk?
52
13 4 [OP_MUL]
var_a = 13 var_b = 4 var_c = var_a * var_b print(int(var_c))
Correspondence
When 10 is divided by A, the quotient is B and the remainder is C. A, B, and C are natural numbers. If B and C are equal, find the largest possible number of A.
9
10 1 [OP_SUB]
var_a = 10 var_b = 1 var_c = var_a - var_b print(int(var_c))
Correspondence
Yoongi multiplied 15 by a certain number to get 45. Find the exact result of subtracting 1 from the number.
2
45 15 [OP_DIV] 1 [OP_SUB]
var_a = 45 var_b = 15 var_c = var_a / var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
Jungkook has 3 marbles, Jimin has 4 more marbles than what Jungkook has. What is a total number of their marbles?
10
3 3 4 [OP_ADD] [OP_ADD]
var_a = 3 var_b = 3 var_c = 4 var_d = var_b + var_c var_e = var_a + var_d print(int(var_e))
Geometry
The sum of the edges of a hexagonal pyramid is 120 centimeters (cm). What is the sum of the edges divided by the number of edges?
10
120 6 2 [OP_MUL] [OP_DIV]
var_a = 120 var_b = 6 var_c = 2 var_d = var_b * var_c var_e = var_a / var_d print(int(var_e))
Correspondence
We have the expression 31+6AB=683. Find the number that goes into B
2
31+6AB=683 B [OP_DIGIT_UNK_SOLVER]
var_a = '31+6AB=683' 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))
Comparison
Jungkook ate 3 out of 6 apples. If Yoongi has 4 apples, who has more apples?
Yoongi
[OP_LIST_SOL] Jungkook Yoongi [OP_LIST_EOL] [OP_LIST_SOL] 6 3 [OP_SUB] 4 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jungkook' var_b = 'Yoongi' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 6 var_d = 3 var_e = var_c - var_d var_f = 4 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
You want to create a three-digit number using the numbers 7, 2, and 9 only once. How many three-digit numbers can you make?
6
[OP_LIST_SOL] 7 2 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 7 var_b = 2 var_c = 9 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = len(list_b) print(int(var_e))
Arithmetic calculation
At intervals of 50 meters (m), statues are erected on both sides of the street a distance of 1650 meters (m). If there are statues at the beginning and end of the street, how many statues are there on both sides of the street?
68
1650 50 [OP_DIV] 1 [OP_ADD] 2 [OP_MUL]
var_a = 1650 var_b = 50 var_c = var_a / var_b var_d = 1 var_e = var_c + var_d var_f = 2 var_g = var_e * var_f print(int(var_g))
Arithmetic calculation
Jimin had three dozen pencils. He gave 8 of them to his younger brother and a few to Yuna, so he has 17 left. If one dozen is 12 pencils, how many pencils did Jimin give Yuna?
11
3 12 [OP_MUL] 8 [OP_SUB] 17 [OP_SUB]
var_a = 3 var_b = 12 var_c = var_a * var_b var_d = 8 var_e = var_c - var_d var_f = 17 var_g = var_e - var_f print(int(var_g))
Arithmetic calculation
If the sum of three consecutive natural numbers is 30, find the smallest natural number of them.
9
30 3 [OP_DIV] 1 [OP_SUB]
var_a = 30 var_b = 3 var_c = var_a / var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Possibility
Yoongi wants to buy 3 out of 5 books at the bookstore. Find how many possible cases there are.
10
5 3 [OP_COMB]
var_a = 5 var_b = 3 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))