category
stringclasses
5 values
question
stringlengths
20
555
answer
stringlengths
1
20
solution_abst
stringlengths
1
287
solution_code
stringlengths
27
5.97k
Comparison
Jinsu tried to kick jegi twice, and he kicked 15 each in the first and second. Hoseok has kicked 48 times in total. How many times should Jinsu kick on the third try, in order to kick more than Hoseok?
19
48 15 15 [OP_ADD] [OP_SUB] 1 [OP_ADD]
var_a = 48 var_b = 15 var_c = 15 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
There are five numbers 10, 11, 12, 13, and 14. What is the difference between the largest number and the smallest number?
4
[OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB]
var_a = 10 var_b = 11 var_c = 12 var_d = 13 var_e = 14 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 1 list_b=list_a.copy() list_b.sort() var_g = list_b[-var_f] var_h = 1 list_c=list_a.copy() list_c.sort() var_i = list_c[var_h-1] var_j = var_g - var_i print(int(var_j))
Possibility
How many ways can you buy 2 different fruits out of Apples, Peaches, Pears, and Melons?
6
[OP_LIST_SOL] Apple Peach Pear Melon [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB]
var_a = 'Apple' var_b = 'Peach' var_c = 'Pear' var_d = 'Melon' 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 = 1 var_e = int(var_e) var_f = int(var_f) for i, elem in enumerate(range(var_f)): var_g = var_g * (var_e-i) for i, elem in enumerate(range(var_f)): var_g = var_g / (i+1) print(int(var_g))
Arithmetic calculation
An electronic device worth 800,000 won is discounted and sold for 450,000 won. I bought a few of these electronic devices, and thanks to the discount, I spent 16.45 million won less. Find how many electronic gadgets I have bought.
47
1645 80 45 [OP_SUB] [OP_DIV]
var_a = 1645 var_b = 80 var_c = 45 var_d = var_b - var_c var_e = var_a / var_d print(int(var_e))
Geometry
You made 5 identical rectangles by cutting a square-shaped paper whose side is 40 centimeters (cm) long. How many centimeters (cm) is the length of the shorter side of a rectangle when it has the largest area?
8
40 5 [OP_DIV]
var_a = 40 var_b = 5 var_c = var_a / var_b print(int(var_c))
Arithmetic calculation
There are four numbers 10, 11, 12, and 13. What is the quotient of the largest number divided by the next largest number?
1
[OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_FDIV]
var_a = 10 var_b = 11 var_c = 12 var_d = 13 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 1 list_b=list_a.copy() list_b.sort() var_f = list_b[-var_e] var_g = 2 list_c=list_a.copy() list_c.sort() var_h = list_c[-var_g] var_i = var_f // var_h print(int(var_i))
Arithmetic calculation
The two people decided to meet at an amusement park. Person A came at 3 kilometers (km) per hour, person B came at 4 kilometers (km) per hour. The distance between person B and the amusement park is 2 kilometers (km) longer than the distance between person A and the amusement park. If the two people took 4 hours together, what is the distance between the amusement park and Person B's house?
8
4 2 4 [OP_DIV] [OP_SUB] 1 3 [OP_DIV] 1 4 [OP_DIV] [OP_ADD] [OP_DIV] 2 [OP_ADD]
var_a = 4 var_b = 2 var_c = 4 var_d = var_b / var_c var_e = var_a - var_d var_f = 1 var_g = 3 var_h = var_f / var_g var_i = 1 var_j = 4 var_k = var_i / var_j var_l = var_h + var_k var_m = var_e / var_l var_n = 2 var_o = var_m + var_n print(int(var_o))
Correspondence
Yoongi wants to divide a certain number by 7. But he accidentally subtracted 5 and the result was 30. Find the correct calculation result.
5
30 5 [OP_ADD] 7 [OP_DIV]
var_a = 30 var_b = 5 var_c = var_a + var_b var_d = 7 var_e = var_c / var_d print(int(var_e))
Correspondence
When a particular number is multiplied by 15, the result is 45. What will you get when you subtract 1 from that particular 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))
Possibility
You have 2 candies of different flavors and 3 chocolates of different colors. When you can only eat one, how many cases are there?
5
2 3 [OP_ADD]
var_a = 2 var_b = 3 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
Among the 40 students, the average score excluding Jimin and Jungkook's scores is 79. If Jimin and Jungkook scored 98 and 100 respectively, what is the average score of Jimin's class?
80
40 2 [OP_SUB] 79 [OP_MUL] 98 [OP_ADD] 100 [OP_ADD] 40 [OP_DIV]
var_a = 40 var_b = 2 var_c = var_a - var_b var_d = 79 var_e = var_c * var_d var_f = 98 var_g = var_e + var_f var_h = 100 var_i = var_g + var_h var_j = 40 var_k = var_i / var_j print(int(var_k))
Arithmetic calculation
A rice container contains 12 kilograms (kg) and 400 grams (g) of rice, and B rice container contains 7600 grams (g) of rice. How many kilograms (kg) must be moved from A to B to equalize the amount of rice in the two rice containers?
2.4
12 400 1000 [OP_DIV] [OP_ADD] 7600 1000 [OP_DIV] [OP_SUB] 2 [OP_DIV]
var_a = 12 var_b = 400 var_c = 1000 var_d = var_b / var_c var_e = var_a + var_d var_f = 7600 var_g = 1000 var_h = var_f / var_g var_i = var_e - var_h var_j = 2 var_k = var_i / var_j print('{:.2f}'.format(round(var_k+1e-10,2)))
Comparison
The number of pages of two books is different by 10, and dividing the number of pages of one book by 2 equals the number of pages of the other book. Find the number of pages of the shorter book.
10
10 1 1 2 [OP_DIV] [OP_SUB] [OP_DIV] 2 [OP_DIV]
var_a = 10 var_b = 1 var_c = 1 var_d = 2 var_e = var_c / var_d var_f = var_b - var_e var_g = var_a / var_f var_h = 2 var_i = var_g / var_h print(int(var_i))
Comparison
There is a red tissue and a blue tissue. If the red tissue is 12 centimeters (cm) longer than the blue tissue, and twice the length of the red tissue equals three times the length of the blue tissue, find the length of the blue tissue.
24
12 1 1 3 [OP_DIV] 2 [OP_MUL] [OP_SUB] [OP_DIV] 3 [OP_DIV] 2 [OP_MUL]
var_a = 12 var_b = 1 var_c = 1 var_d = 3 var_e = var_c / var_d var_f = 2 var_g = var_e * var_f var_h = var_b - var_g var_i = var_a / var_h var_j = 3 var_k = var_i / var_j var_l = 2 var_m = var_k * var_l print(int(eval('{:.2f}'.format(round(var_m+1e-10,2)))))
Arithmetic calculation
When 52.5 grams (g) of sweet potatoes are divided by 5 grams (g) per person, find how many kilograms (kg) of sweet potatoes are left after sharing.
0
52.5 5 [OP_MOD] 1000 [OP_DIV]
var_a = 52.5 var_b = 5 var_c = var_a % var_b var_d = 1000 var_e = var_c / var_d print(int(eval('{:.2f}'.format(round(var_e+1e-10,2)))))
Comparison
Eight students stand in a line to borrow books. How many students are standing between the student standing 1st from the front and the student standing 4th from the back?
3
8 1 [OP_SUB] 4 [OP_SUB]
var_a = 8 var_b = 1 var_c = var_a - var_b var_d = 4 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
There are 5 apples, 4 bananas and 6 grapes. How many fruits are there in total?
15
5 6 [OP_ADD] 4 [OP_ADD]
var_a = 5 var_b = 6 var_c = var_a + var_b var_d = 4 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
How many numbers from 8 to 21 are there?
14
8 21 1 [OP_LIST_ARANGE] [OP_LIST_LEN]
var_a = 8 var_b = 21 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = len(list_a) print(int(var_d))
Correspondence
If you multiply the number of white stones among 48 stones by 4 and divide it by 37, the quotient is 2 and the remainder is 26. Find the number of black stones.
23
48 37 2 [OP_MUL] 26 [OP_ADD] 4 [OP_DIV] [OP_SUB]
var_a = 48 var_b = 37 var_c = 2 var_d = var_b * var_c var_e = 26 var_f = var_d + var_e var_g = 4 var_h = var_f / var_g var_i = var_a - var_h print(int(var_i))
Arithmetic calculation
There are 7/10 of the air left in the 10 liter (L) bag. How many liters (liters) of air would we need to put in each bag if we wanted to divide this air equally among 4 bags?
1.75
10 7/10 [OP_MUL] 4 [OP_DIV]
var_a = 10 var_b = 0.7 var_c = var_a * var_b var_d = 4 var_e = var_c / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Geometry
There is a shape consisting of 8 angles of the same size. If the side of this figure is 12 centimeters (cm), how many centimeters (cm) is the perimeter?
96
12 8 [OP_MUL]
var_a = 12 var_b = 8 var_c = var_a * var_b print(int(var_c))
Correspondence
I made the mistake of adding this number to 63, when I should have divided 36 by this number. The result of this miscalculation was 69. How much is it if I calculate it right?
6
36 69 63 [OP_SUB] [OP_DIV]
var_a = 36 var_b = 69 var_c = 63 var_d = var_b - var_c var_e = var_a / var_d print(int(var_e))
Possibility
Find how many odd numbers there are when you draw 3 cards from 5 cards each with the numbers 0, 1, 2, 3, 4 written on them to make a three-digit integer.
18
[OP_LIST_SOL] 0 1 2 3 4 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 2 [OP_LIST_DIVISIBLE] [OP_SET_DIFFERENCE] [OP_LIST_LEN]
var_a = 0 var_b = 1 var_c = 2 var_d = 3 var_e = 4 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_f)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_g = 2 list_c = [] var_g = int(var_g) for i in list_b: i = int(i) if i % var_g == 0: list_c.append(i) list_d = list(set(list_b) - set(list_c)) var_h = len(list_d) print(int(var_h))
Comparison
Minyoung, Yoojung, Yuna, and Jimin went to volunteer in the countryside during summer vacation. Jimin planted more cabbages than Minyoung, and Minyoung planted more cabbages than Yoojung. If Yuna planted fewer cabbages than Yoojung, who planted the fewest cabbages?
Yuna
[OP_LIST_SOL] Minyoung Yoojung Yuna Jimin [OP_LIST_EOL] [OP_LIST_SOL] Minyoung Yoojung > Yuna Yoojung < Jimin Minyoung > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET]
var_a = 'Minyoung' var_b = 'Yoojung' var_c = 'Yuna' var_d = 'Jimin' 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 = 'Minyoung' var_f = 'Yoojung' var_g = '>' var_h = 'Yuna' var_i = 'Yoojung' var_j = '<' var_k = 'Jimin' var_l = 'Minyoung' var_m = '>' list_b= [] if "/" in str(var_m): var_m = eval(str(var_m)) list_b.append(var_m) if "/" in str(var_l): var_l = eval(str(var_l)) list_b.append(var_l) if "/" in str(var_k): var_k = eval(str(var_k)) list_b.append(var_k) if "/" in str(var_j): var_j = eval(str(var_j)) list_b.append(var_j) if "/" in str(var_i): var_i = eval(str(var_i)) list_b.append(var_i) if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_g): var_g = eval(str(var_g)) list_b.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() global item_name_index_dict items_name_list = list_a.copy() conditions = [] condition_list = list_b.copy() temp_stack = [] for index_, cond_ in enumerate(map(str, condition_list)): if cond_ in ("<", ">", "="): operand_right = temp_stack.pop() operand_left = temp_stack.pop() if cond_ == "=": cond_ = "==" conditions.append(f"{operand_left} {cond_} {operand_right}") else: if not cond_.isdigit(): cond_ = "{" + cond_ + "}" temp_stack.append(cond_) item_name_index_dict = {} for perm in itertools.permutations(range(1, len(items_name_list) + 1)): item_name_index_dict = dict(zip(items_name_list, perm)) formatted_conditions = \ [condition.format_map(item_name_index_dict) for condition in conditions] if all(map(eval, formatted_conditions)): break list_c = list(item_name_index_dict.keys()) list_c.sort(key=item_name_index_dict.get, reverse=True) var_n = len(list_c) var_o = list_c[var_n-1] print(var_o)
Possibility
You want to create three-digit numbers that are less than 550 and greater than 850 by using three numbers from 5, 2, 8, and 0. How many can you make?
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))
Possibility
How many two-digit natural numbers can be formed by drawing and placing two of the number cards 0, 1, and 5?
4
[OP_LIST_SOL] 0 1 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 0 var_b = 1 var_c = 5 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = len(list_b) print(int(var_e))
Comparison
Numbers are written on the dolls the three people have. The average of the numbers written on the first and second person's dolls is 23 greater than the sum of the numbers written on all the dolls and divided by 3. The average of the numbers on the second and third person's dolls was 17 less than the numbers written on all the dolls and divided by 3. If the number written on the second person's doll is 66, find the average of the numbers written on the three people dolls.
44
66 17 2 [OP_MUL] [OP_SUB] 3 [OP_MUL] 17 23 [OP_ADD] 2 [OP_MUL] [OP_ADD] 66 2 [OP_MUL] [OP_SUB] 2 2 [OP_ADD] 3 [OP_SUB] [OP_DIV]
var_a = 66 var_b = 17 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
The width of the rectangle-shaped tulip flower field was measured with a tape measure of 2 meters (m) and 50 centimeters (cm) in length. If the length of the flower field is 80 centimeters (cm) longer than 5 times the tape measure, how many centimeters (cm) is the length of the tulip flower field?
1330
2 100 [OP_MUL] 50 [OP_ADD] 5 [OP_MUL] 80 [OP_ADD]
var_a = 2 var_b = 100 var_c = var_a * var_b var_d = 50 var_e = var_c + var_d var_f = 5 var_g = var_e * var_f var_h = 80 var_i = var_g + var_h print(int(var_i))
Correspondence
3A+B82=216. How much is 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))
Comparison
Yoojeong has fewer marbles than Taehyung. Yoojeong has fewer marbles than Seokjin. Seokjin has more marbles than Taehyung. Who has the most marbles?
Seokjin
[OP_LIST_SOL] Yoojeong Taehyung Seokjin [OP_LIST_EOL] [OP_LIST_SOL] Yoojeong Taehyung < Yoojeong Seokjin < Seokjin Taehyung > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET]
var_a = 'Yoojeong' var_b = 'Taehyung' var_c = 'Seokjin' 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 = 'Yoojeong' var_e = 'Taehyung' var_f = '<' var_g = 'Yoojeong' var_h = 'Seokjin' var_i = '<' var_j = 'Seokjin' var_k = 'Taehyung' 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)
Correspondence
When you multiply a number by 7 and then add 21.28, you get 50.68. Find a number.
4.2
50.68 21.28 [OP_SUB] 7 [OP_DIV]
var_a = 50.68 var_b = 21.28 var_c = var_a - var_b var_d = 7 var_e = var_c / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Arithmetic calculation
One bag in the classroom has 6 compartments and can hold 8 writing instruments in each compartment. Of the 16 bags in the classroom, 5 compartments have no writing utensils, one compartment has 6 writing instruments, and all other compartments contain 8 writing instruments. Find how many writing instruments are in the classroom.
726
16 6 [OP_MUL] 5 [OP_SUB] 1 [OP_SUB] 8 [OP_MUL] 6 [OP_ADD]
var_a = 16 var_b = 6 var_c = var_a * var_b var_d = 5 var_e = var_c - var_d var_f = 1 var_g = var_e - var_f var_h = 8 var_i = var_g * var_h var_j = 6 var_k = var_i + var_j print(int(var_k))
Geometry
There is a rectangular piece of paper measuring 36 centimeters (cm) and 72 centimeters (cm) in width and length. I am going to cut this paper to make a rectangle with the width and length of 3 centimeters (cm) and 4 centimeters (cm) respectively. How many can you make in all?
216
36 3 [OP_FDIV] 72 4 [OP_FDIV] [OP_MUL]
var_a = 36 var_b = 3 var_c = var_a // var_b var_d = 72 var_e = 4 var_f = var_d // var_e var_g = var_c * var_f print(int(var_g))
Arithmetic calculation
I wrote the numbers from 1000 to 2000 sequentially. Find the average of the numbers in each written digit.
14.49
1000 2000 1 [OP_LIST_ARANGE] [OP_LIST_NUM2SUM] [OP_LIST_MEAN]
var_a = 1000 var_b = 2000 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] list_b=[] for i in list_a: var_d = 0 i = int(i) while i//10 > 0: var_d = var_d + i%10 i = i//10 var_d = var_d + i%10 list_b.append(var_d) list_b = [float(i) for i in list_b] var_e = sum(list_b)/len(list_b) print('{:.2f}'.format(round(var_e+1e-10,2)))
Arithmetic calculation
Streetlights are standing on one side of the road at intervals of 34.1 meters (m). If the length of the road is 852.5 meters (m), find how many streetlights are on one side of the road. The thickness of the streetlight is not considered.
25
852.5 34.1 [OP_FDIV] 1 [OP_ADD]
var_a = 852.5 var_b = 34.1 var_c = var_a // var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Comparison
JungKook took the elevator from the entrance of the apartment and arrived on the third floor. At this time, Jimin was going up the stairs from the entrance of the same apartment building and passing by the 5th floor. Who climbed higher?
Jimin
[OP_LIST_SOL] Jungkook Jimin [OP_LIST_EOL] [OP_LIST_SOL] 3 5 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jungkook' var_b = 'Jimin' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 3 var_d = 5 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)
Arithmetic calculation
There are 247 first-year students at Junseo's school, and 131 more sophomores than first-year students. If you are going to distribute one loaf to each first grader and second grader, how many loaves do you need to prepare in total?
625
247 247 131 [OP_ADD] [OP_ADD]
var_a = 247 var_b = 247 var_c = 131 var_d = var_b + var_c var_e = var_a + var_d print(int(var_e))
Comparison
Shinyoung read 1/3, Seokgi 1/4, and Woong 1/5. Who has read the most children's books?
Shinyoung
[OP_LIST_SOL] Shinyoung Seokgi Woong [OP_LIST_EOL] [OP_LIST_SOL] 1 3 [OP_DIV] 1 4 [OP_DIV] 1 5 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Shinyoung' var_b = 'Seokgi' var_c = 'Woong' list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 1 var_e = 3 var_f = var_d / var_e var_g = 1 var_h = 4 var_i = var_g / var_h var_j = 1 var_k = 5 var_l = var_j / var_k list_b= [] if "/" in str(var_l): var_l = eval(str(var_l)) list_b.append(var_l) if "/" in str(var_i): var_i = eval(str(var_i)) list_b.append(var_i) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) list_b.reverse() var_m = 1 list_c=list_b.copy() list_c.sort() var_n = list_c[-var_m] var_o = list_b.index(var_n)+1 var_p = list_a[var_o-1] print(var_p)
Correspondence
When A is divided by 7, the quotient is 5 and the remainder is 3. Find A here.
38
5 7 [OP_MUL] 3 [OP_ADD]
var_a = 5 var_b = 7 var_c = var_a * var_b var_d = 3 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
If Jihye walked 1/5 of the distance to her grandmother's house and took the bus for the rest of the distance, find how many times the total distance was taken by bus.
0.8
1 1/5 [OP_SUB]
var_a = 1 var_b = 0.2 var_c = var_a - var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Possibility
There are 12 cards with 12 numbers from 1 to 12. When one of these cards is drawn, checked, and then put back in to draw another card, find the number of times a multiple of 3 comes out the first time and a multiple of 4 comes out the second time.
12
1 12 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] [OP_LIST_POP] 4 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] [OP_MUL]
var_a = 1 var_b = 12 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 3 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = len(list_b) var_f = 4 list_c = [] var_f = int(var_f) for i in list_a: i = int(i) if i % var_f == 0: list_c.append(i) var_g = len(list_c) var_h = var_e * var_g print(int(var_h))
Arithmetic calculation
Yoonhyuk is going to wrap a gift box with his friends. One gift box can hold 30 chocolates, and Yoonhyuk has 254 chocolates. After filling the gift box with these chocolates, find out how many more chocolates he will need so that there is no space left in the gift box.
16
30 254 30 [OP_MOD] [OP_SUB]
var_a = 30 var_b = 254 var_c = 30 var_d = var_b % var_c var_e = var_a - var_d print(int(var_e))
Arithmetic calculation
There are 41 students in Minji's class, and there are 3 more students living on the south side of the school than students living on the north side of the school. How many students live on the south side of the school?
22
41 3 [OP_SUB] 2 [OP_DIV] 3 [OP_ADD]
var_a = 41 var_b = 3 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 3 var_g = var_e + var_f print(int(var_g))
Comparison
Each of the three people has one card with a number on it. The average of the three number cards is 143, and A's card plus 4.5 is the average of B and C's. If the number on C's card is 3 less than B's, what is the number on C's number card?
143
143 3 [OP_MUL] 4.5 [OP_ADD] 3 [OP_DIV] 2 [OP_MUL] 3 [OP_SUB] 2 [OP_DIV]
var_a = 143 var_b = 3 var_c = var_a * var_b var_d = 4.5 var_e = var_c + var_d var_f = 3 var_g = var_e / var_f var_h = 2 var_i = var_g * var_h var_j = 3 var_k = var_i - var_j var_l = 2 var_m = var_k / var_l print(int(var_m))
Arithmetic calculation
There are 135.1 liters (L) of water. If this is divided into 7 liters (L) buckets of water, how many buckets can be filled?
19
135.1 7 [OP_FDIV]
var_a = 135.1 var_b = 7 var_c = var_a // var_b print(int(var_c))
Comparison
You going to hand out marbles to students. If you hand out 9 for each, it is 1 short, and if you hand out 10 for each, you cannot hand out to a student. How many marbles are there in total?
100
1 10 [OP_ADD] 10 9 [OP_SUB] [OP_DIV] 9 [OP_MUL] 1 [OP_ADD]
var_a = 1 var_b = 10 var_c = var_a + var_b var_d = 10 var_e = 9 var_f = var_d - var_e var_g = var_c / var_f var_h = 9 var_i = var_g * var_h var_j = 1 var_k = var_i + var_j print(int(var_k))
Correspondence
A and B are two different numbers. Find A in A7-3B=55.
8
A7-3B=55 A [OP_DIGIT_UNK_SOLVER]
var_a = 'A7-3B=55' 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
Moving a decimal point to the right by one place makes it 2.7 greater than before. Find the original decimal.
0.3
2.7 10 1 [OP_POW] 1 [OP_SUB] [OP_DIV]
var_a = 2.7 var_b = 10 var_c = 1 var_d = var_b ** var_c var_e = 1 var_f = var_d - var_e var_g = var_a / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Geometry
There is a rectangular cake whose sides are 54 centimeters (cm) long and 20 centimeters (cm) wide when viewed from above. As you try to divide it into 3 pieces to share with friends, you want to cut all 3 pieces into squares of the same size. What should be one side of a square in centimeters (cm) to make the largest square? (Given that the cake is cut only from top to bottom.)
18
[OP_LIST_SOL] 54 3 [OP_FDIV] 20 3 [OP_FDIV] [OP_LIST_EOL] 1 [OP_LIST_MAX]
var_a = 54 var_b = 3 var_c = var_a // var_b var_d = 20 var_e = 3 var_f = var_d // var_e list_a= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) list_a.reverse() var_g = 1 list_b=list_a.copy() list_b.sort() var_h = list_b[-var_g] print(int(var_h))
Comparison
Hyungjun has 324 grape-flavored candies and 541 strawberry-flavored candies, and Junghyeok has 416 orange-flavored candies and 253 cherry-flavored candies. Who has more candies, Hyungjun or Junghyeok?
Hyungjun
[OP_LIST_SOL] Hyungjun Junghyeok [OP_LIST_EOL] [OP_LIST_SOL] 324 541 [OP_ADD] 416 253 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Hyungjun' var_b = 'Junghyeok' 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 = 324 var_d = 541 var_e = var_c + var_d var_f = 416 var_g = 253 var_h = var_f + var_g list_b= [] if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[-var_i] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Arithmetic calculation
Five people hold each other's hands and stand in a circle. If they greet each other with those not holding hands, how many times do they say hello?
5
5 5 3 [OP_SUB] [OP_MUL] 2 [OP_DIV]
var_a = 5 var_b = 5 var_c = 3 var_d = var_b - var_c var_e = var_a * var_d var_f = 2 var_g = var_e / var_f print(int(var_g))
Comparison
There are 28 identical vending machines in the arcade. Each vending machine has 6 sections, and the number of drinks on each section is the same. When two drinks are dispensed from one section of a vending machine, there are three drinks left on that section. How many drinks are in all the vending machines in the arcade?
840
3 2 [OP_ADD] 6 [OP_MUL] 28 [OP_MUL]
var_a = 3 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))
Comparison
One factory makes 500 teddy bears in 30 minutes and 800 bunny dolls in 1 hour. Find which one will produce more after 5 hours.
bear
[OP_LIST_SOL] bear bunny [OP_LIST_EOL] [OP_LIST_SOL] 5 60 [OP_MUL] 30 [OP_FDIV] 500 [OP_MUL] 5 60 [OP_MUL] 60 [OP_FDIV] 800 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'bear' var_b = 'bunny' 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 = 5 var_d = 60 var_e = var_c * var_d var_f = 30 var_g = var_e // var_f var_h = 500 var_i = var_g * var_h var_j = 5 var_k = 60 var_l = var_j * var_k var_m = 60 var_n = var_l // var_m var_o = 800 var_p = var_n * var_o list_b= [] if "/" in str(var_p): var_p = eval(str(var_p)) list_b.append(var_p) if "/" in str(var_i): var_i = eval(str(var_i)) list_b.append(var_i) list_b.reverse() var_q = 1 list_c=list_b.copy() list_c.sort() var_r = list_c[-var_q] var_s = list_b.index(var_r)+1 var_t = list_a[var_s-1] print(var_t)
Correspondence
Hoseok divided a certain number by 10 to get 6. What is the result of subtracting 15 from the number?
45
6 10 [OP_MUL] 15 [OP_SUB]
var_a = 6 var_b = 10 var_c = var_a * var_b var_d = 15 var_e = var_c - var_d print(int(var_e))
Geometry
If 45 utility poles are lined up on a straight road at intervals of 60 meters (m), what is the distance in kilometers (km) between the two poles that are farthest apart?
2.64
60 1000 [OP_DIV] 45 1 [OP_SUB] [OP_MUL]
var_a = 60 var_b = 1000 var_c = var_a / var_b var_d = 45 var_e = 1 var_f = var_d - var_e var_g = var_c * var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Arithmetic calculation
How many three-digit numbers are divisible by 4 and 5?
45
100 999 1 [OP_LIST_ARANGE] 4 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 100 var_b = 999 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 4 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = 5 list_c = [] var_e = int(var_e) for i in list_b: i = int(i) if i % var_e == 0: list_c.append(i) var_f = len(list_c) print(int(var_f))
Geometry
If the area of a trapezoid with an upper side of 5 centimeters (cm) and a lower side of 9 centimeters (cm) is 56 square centimeters (cm2), what is the height in centimeters (cm) of the trapezoid?
8
56 2 [OP_MUL] 5 9 [OP_ADD] [OP_DIV]
var_a = 56 var_b = 2 var_c = var_a * var_b var_d = 5 var_e = 9 var_f = var_d + var_e var_g = var_c / var_f print(int(var_g))
Arithmetic calculation
Suhwan's car traveled 15.5 kilometers (km) in 10 minutes. How many kilometers (km) would he travel in 46 minutes at this speed?
71.3
15.5 10 [OP_DIV] 46 [OP_MUL]
var_a = 15.5 var_b = 10 var_c = var_a / var_b var_d = 46 var_e = var_c * var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Geometry
If the coins are arranged in a square and there are 240 coins at the perimeter, what is the total number of coins?
3721
240 4 [OP_DIV] 1 [OP_ADD] 2 [OP_POW]
var_a = 240 var_b = 4 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))
Geometry
You want to make the largest square out of a piece of string that is 32 centimeters (cm) long. What is the area of the square in square centimeters (cm2)?
64
32 4 [OP_DIV] 2 [OP_POW]
var_a = 32 var_b = 4 var_c = var_a / var_b var_d = 2 var_e = var_c ** var_d print(int(var_e))
Arithmetic calculation
There are five numbers 10, 11, 12, 13, and 14. What is the answer when subtracting the second largest number by the smallest number?
3
[OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 2 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB]
var_a = 10 var_b = 11 var_c = 12 var_d = 13 var_e = 14 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 2 list_b=list_a.copy() list_b.sort() var_g = list_b[-var_f] var_h = 1 list_c=list_a.copy() list_c.sort() var_i = list_c[var_h-1] var_j = var_g - var_i print(int(var_j))
Geometry
The largest circle was drawn inside a square with a side length of 16 centimeters (cm), and the largest rhombus was drawn inside the circle. What is the area of the rhombus in square centimeters?
128
16 16 [OP_MUL] 2 [OP_DIV]
var_a = 16 var_b = 16 var_c = var_a * var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Comparison
Minyoung puts her bag in the locker that is 8th from the front, 14th from the back, 7th from the left, and 13th from the right among the classroom lockers. What is the total number of lockers in the classroom?
399
8 14 [OP_ADD] 1 [OP_SUB] 7 13 [OP_ADD] 1 [OP_SUB] [OP_MUL]
var_a = 8 var_b = 14 var_c = var_a + var_b var_d = 1 var_e = var_c - var_d var_f = 7 var_g = 13 var_h = var_f + var_g var_i = 1 var_j = var_h - var_i var_k = var_e * var_j print(int(var_k))
Possibility
Jungkook and Eunji are trying to share pieces of colored paper. When there are 15 pieces of colored paper, how many ways are there to divide them so that Jungkook and Eunji both have at least one piece?
14
15 2 [OP_SUB] 1 [OP_ADD]
var_a = 15 var_b = 2 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Geometry
A regular polygon with a perimeter of 80 centimeters (cm) has a side length of 16 centimeters (cm). How many vertices are there in this regular polygon?
5
80 16 [OP_DIV]
var_a = 80 var_b = 16 var_c = var_a / var_b print(int(var_c))
Comparison
When Yeomyeong goes to school by bus, she travels 7150 meters (m), and when she goes to school by bicycle, she travels 6 kilometers (km) and 720 meters (m). Which transportation travels a shorter distance, bus or bicycle?
bicycle
[OP_LIST_SOL] bus bicycle [OP_LIST_EOL] [OP_LIST_SOL] 7150 6 1000 [OP_MUL] 720 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'bus' var_b = 'bicycle' 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 = 7150 var_d = 6 var_e = 1000 var_f = var_d * var_e var_g = 720 var_h = var_f + var_g list_b= [] if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_c): var_c = eval(str(var_c)) list_b.append(var_c) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[var_i-1] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Possibility
When two dice with numbers 1 to 12 written on each side of the dodecahedron are thrown twice, find the number of cases a multiple of 3 comes up at the first time and a multiple of 4 comes up at the second time.
12
1 12 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] [OP_LIST_POP] 4 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] [OP_MUL]
var_a = 1 var_b = 12 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 3 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = len(list_b) var_f = 4 list_c = [] var_f = int(var_f) for i in list_a: i = int(i) if i % var_f == 0: list_c.append(i) var_g = len(list_c) var_h = var_e * var_g print(int(var_h))
Correspondence
There are two natural numbers A and B. If B is A multiplied by 9 and plus 13, what is the remainder when B is divided by 9?
4
13 9 [OP_SUB]
var_a = 13 var_b = 9 var_c = var_a - var_b print(int(var_c))
Correspondence
When you wrongly multiplied a number that should have been divided by 2.4, you got 288. What is the correctly calculated value divided by 5?
10
288 2.4 [OP_DIV] 2.4 [OP_DIV] 5 [OP_DIV]
var_a = 288 var_b = 2.4 var_c = var_a / var_b var_d = 2.4 var_e = var_c / var_d var_f = 5 var_g = var_e / var_f print(int(var_g))
Comparison
The area of A circle is 25 square centimeters (cm2), and the area of B circle is 49 square centimeters (cm2). If pi is 3.1, how many centimeters (cm) is the diameter of the larger circle in A or B?
7.95
[OP_LIST_SOL] 25 49 [OP_LIST_EOL] 1 [OP_LIST_MAX] 3.1 [OP_DIV] 0.5 [OP_POW] 2 [OP_MUL]
var_a = 25 var_b = 49 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 list_b=list_a.copy() list_b.sort() var_d = list_b[-var_c] var_e = 3.1 var_f = var_d / var_e var_g = 0.5 var_h = var_f ** var_g var_i = 2 var_j = var_h * var_i print('{:.2f}'.format(round(var_j+1e-10,2)))
Correspondence
Divide this number by 2.5, subtract 10.5 from it, and multiply that by 0.3 to get 5.85. Find this number.
75
5.85 0.3 [OP_DIV] 10.5 [OP_ADD] 2.5 [OP_MUL]
var_a = 5.85 var_b = 0.3 var_c = var_a / var_b var_d = 10.5 var_e = var_c + var_d var_f = 2.5 var_g = var_e * var_f print(int(var_g))
Correspondence
Junhyung goes to the park every evening and runs 8050 meters (m). If Junhyung has run 80.5 meters (m) so far, find what percentage of the total distance was run.
0.01
80.5 8050 [OP_DIV]
var_a = 80.5 var_b = 8050 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Possibility
How many two-digit numbers can you make from 4, 5, 6, 7, and 8 using two different numbers?
20
[OP_LIST_SOL] 4 5 6 7 8 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 4 var_b = 5 var_c = 6 var_d = 7 var_e = 8 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_f)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_g = len(list_b) print(int(var_g))
Correspondence
Find the sum of the largest and the smallest numbers that becomes 3.5 when numbers with two decimals are rounded from two decimal places.
6.99
3.45 3.54 [OP_ADD]
var_a = 3.45 var_b = 3.54 var_c = var_a + var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Possibility
If you use the number cards 1, 3, 5, and 6 once each to make a four-digit number, how many numbers divided by 4 have a remainder of 0?
6
[OP_LIST_SOL] 1 3 5 6 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 4 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 1 var_b = 3 var_c = 5 var_d = 6 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] var_f = 4 list_c = [] var_f = int(var_f) for i in list_b: i = int(i) if i % var_f == 0: list_c.append(i) var_g = len(list_c) print(int(var_g))
Comparison
What is the sum of the numbers greater than or equal to 0.4 among 0.8, 1/2, 0.3, and 1/3?
1.3
[OP_LIST_SOL] 0.8 1/2 0.3 1/3 [OP_LIST_EOL] 0.4 [OP_LIST_MORE_EQUAL] [OP_LIST_SUM]
var_a = 0.8 var_b = 0.5 var_c = 0.3 var_d = 0.3333333333333333 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 0.4 list_b = [] for i in list_a: if i >= var_e: list_b.append(i) list_b = [float(i) for i in list_b] var_f = sum(list_b) print('{:.2f}'.format(round(var_f+1e-10,2)))
Geometry
If the perimeter of a rectangle whose length is 3 centimeters (cm) shorter than its width is 54 centimeters (cm), find its width.
15
54 2 [OP_DIV] 3 [OP_SUB] 2 [OP_DIV] 3 [OP_ADD]
var_a = 54 var_b = 2 var_c = var_a / var_b var_d = 3 var_e = var_c - var_d var_f = 2 var_g = var_e / var_f var_h = 3 var_i = var_g + var_h print(int(var_i))
Possibility
Find the number of ways in which 5 of the 8 students on the playground are picked and placed in order.
6720
8 5 [OP_PERM]
var_a = 8 var_b = 5 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))
Correspondence
280 is divisible by 70. Find the smallest number greater than 280 that, when divided by 70, has a remainder of 30.
310
280 30 [OP_ADD]
var_a = 280 var_b = 30 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
There are 9 bananas weighing 0.8 kilograms (kg) and 7 apples of unknown weight. The total weight of 9 bananas and 7 apples was 10.98 kilograms (kg). If all apples weigh the same, how many kilograms (kg) is one apple?
0.54
10.98 0.8 9 [OP_MUL] [OP_SUB] 7 [OP_DIV]
var_a = 10.98 var_b = 0.8 var_c = 9 var_d = var_b * var_c var_e = var_a - var_d var_f = 7 var_g = var_e / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Correspondence
I mistakenly subtracted a number that should be multiplied by 423, and I got 421. Find the value of subtracting 500 from the sum of the correctly calculated and incorrectly calculated values.
767
421 423 423 421 [OP_SUB] [OP_MUL] [OP_ADD] 500 [OP_SUB]
var_a = 421 var_b = 423 var_c = 423 var_d = 421 var_e = var_c - var_d var_f = var_b * var_e var_g = var_a + var_f var_h = 500 var_i = var_g - var_h print(int(var_i))
Possibility
Hajin wants to find the password of a lock. The password is set with one of the three numbers: 1, 7, 4, with the tens digit of 3. When password has all different numbers, find the sum of the largest and the third largest three-digit number that can be a password.
1171
[OP_LIST_SOL] 1 7 4 3 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 10 3 [OP_LIST_SEARCH_FIXED_DIGIT] 1 [OP_LIST_MAX] 3 [OP_LIST_MAX] [OP_ADD]
var_a = 1 var_b = 7 var_c = 4 var_d = 3 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 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 = 10 var_g = 3 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] var_j = 3 list_e=list_c.copy() list_e.sort() var_k = list_e[-var_j] var_l = var_i + var_k print(int(var_l))
Arithmetic calculation
There are 56 tulips. Red tulips are 3/7 of the total. Blue tulips are 3/8 of the total. If the rest are pink tulips, how many pink tulips are there?
11
56 56 3/7 [OP_MUL] 56 3/8 [OP_MUL] [OP_ADD] [OP_SUB]
var_a = 56 var_b = 56 var_c = 0.42857142857142855 var_d = var_b * var_c var_e = 56 var_f = 0.375 var_g = var_e * var_f var_h = var_d + var_g var_i = var_a - var_h print(int(var_i))
Correspondence
If A+10=15, what number should be A?
5
A+10=15 A [OP_DIGIT_UNK_SOLVER]
var_a = 'A+10=15' 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
There is a fountain in the shape of an equilateral triangle with a side length of 2 meters (m). If there are 3 chairs on one side of this fountain, how many meters (m) are the lengths of the chairs as a decimal number?
0.67
2 3 [OP_DIV]
var_a = 2 var_b = 3 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
Taehyung jumped rope 56 times a day for 3 days and Namjoon did 35 times a day for 4 days. How many times did Taehyung and Namjoon jump rope?
308
56 3 [OP_MUL] 35 4 [OP_MUL] [OP_ADD]
var_a = 56 var_b = 3 var_c = var_a * var_b var_d = 35 var_e = 4 var_f = var_d * var_e var_g = var_c + var_f print(int(var_g))
Geometry
You have a box in the shape of a regular dodecahedron. How many vertices does this box have?
20
20
var_a = 20 print(int(var_a))
Geometry
There is a fountain in the shape of a square with sides measuring 2 meters (m). We are going to create several lakes with a radius of 3 meters (m) in this park. How many lakes can you create?
25
30 3 2 [OP_MUL] [OP_FDIV] 2 [OP_POW]
var_a = 30 var_b = 3 var_c = 2 var_d = var_b * var_c var_e = var_a // var_d var_f = 2 var_g = var_e ** var_f print(int(var_g))
Correspondence
There is a number that is a multiple of 5 when subtracted by 3, a multiple of 7 when subtracted by 2. If a number is greater than 50 and less than 70, what is this number?
58
50 70 1 [OP_SUB] 1 [OP_LIST_ARANGE] 5 3 [OP_LIST_DIVIDE_AND_REMAIN] 7 2 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET]
var_a = 50 var_b = 70 var_c = 1 var_d = var_b - var_c var_e = 1 list_a = [i for i in range(var_a, var_d + 1, var_e)] var_f = 5 var_g = 3 list_b = [] var_f = int(var_f) var_g = int(var_g) if var_g < 0: var_g = var_g + var_f for i in list_a: i = int(i) if i%var_f == var_g: list_b.append(i) var_h = 7 var_i = 2 list_c = [] var_h = int(var_h) var_i = int(var_i) if var_i < 0: var_i = var_i + var_h for i in list_b: i = int(i) if i%var_h == var_i: list_c.append(i) var_j = 1 var_k = list_c[var_j-1] print(int(var_k))
Correspondence
On the day of the soccer match, 12 bottles of water and 34 bottles of soda were given to the players. After the soccer game, I counted all the remaining water and drinks and it was 30 bottles. The number of bottles of drink consumed by the players is three times the number of bottles of water consumed by the players. How many bottles of water did the players drink?
4
12 34 [OP_ADD] 30 [OP_SUB] 1 3 [OP_ADD] [OP_DIV]
var_a = 12 var_b = 34 var_c = var_a + var_b var_d = 30 var_e = var_c - var_d var_f = 1 var_g = 3 var_h = var_f + var_g var_i = var_e / var_h print(int(var_i))
Arithmetic calculation
Students who like society are 25 students in class (A). 32 students voted to like music, and 27 students voted to both social studies and music. If every student voted for one or the other, how many students are in class (A)?
30
25 32 [OP_ADD] 27 [OP_SUB]
var_a = 25 var_b = 32 var_c = var_a + var_b var_d = 27 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
Namjoon has 3 trucks and Taehyung has 2 trucks. How many trucks do Namjoon and Taehyung have?
5
3 2 [OP_ADD]
var_a = 3 var_b = 2 var_c = var_a + var_b print(int(var_c))
Geometry
There is a mirror in the shape of a regular triangle with a side length of 50 centimeters (cm). If you want to place the lights around the perimeter of this mirror with 10 centimeters (cm) of intervals, how many lights do you need?
15
50 3 [OP_MUL] 10 [OP_FDIV]
var_a = 50 var_b = 3 var_c = var_a * var_b var_d = 10 var_e = var_c // var_d print(int(var_e))
Comparison
The multiples of 3 less than 100 are written in order from smallest to biggest. Find the product of the numbers between the 21st and 24th numbers from the left.
4554
0 3 [OP_ADD] 100 3 [OP_LIST_ARANGE] 22 [OP_LIST_MIN] 23 [OP_LIST_MIN] [OP_MUL]
var_a = 0 var_b = 3 var_c = var_a + var_b var_d = 100 var_e = 3 list_a = [i for i in range(var_c, var_d + 1, var_e)] var_f = 22 list_b=list_a.copy() list_b.sort() var_g = list_b[var_f-1] var_h = 23 list_c=list_a.copy() list_c.sort() var_i = list_c[var_h-1] var_j = var_g * var_i print(int(var_j))
Arithmetic calculation
Cabbage was planted in 1/3 of the 2.4 square meters (m2) field, and peppers were planted in the remaining 1/4. Find the area of the field where the peppers were planted.
0.4
2.4 1 1/3 [OP_SUB] [OP_MUL] 1/4 [OP_MUL]
var_a = 2.4 var_b = 1 var_c = 0.3333333333333333 var_d = var_b - var_c var_e = var_a * var_d var_f = 0.25 var_g = var_e * var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Comparison
20 students are waiting for the bus. If Jungkook came right before Yoongi, and there are 11 people who came before Jungkook, how many people came later than Yoongi?
7
20 11 [OP_SUB] 1 [OP_SUB] 1 [OP_SUB]
var_a = 20 var_b = 11 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d var_f = 1 var_g = var_e - var_f print(int(var_g))
Correspondence
When AB-10=15, what number should go in A?
2
AB-10=15 A [OP_DIGIT_UNK_SOLVER]
var_a = 'AB-10=15' 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
Seokgi went hiking with his father. It is 4 kilometers (km) and 436 meters (m) from the entrance of the mountain to the temple, and 1999 meters (m) from the temple to the top of the mountain. If Seokgi went up starting from the entrance of the mountain through the temple and to the top of the mountain, and then came down the same road, how many kilometers (km) did he walk?
12.87
4 436 1000 [OP_DIV] [OP_ADD] 1999 1000 [OP_DIV] [OP_ADD] 2 [OP_MUL]
var_a = 4 var_b = 436 var_c = 1000 var_d = var_b / var_c var_e = var_a + var_d var_f = 1999 var_g = 1000 var_h = var_f / var_g var_i = var_e + var_h var_j = 2 var_k = var_i * var_j print('{:.2f}'.format(round(var_k+1e-10,2)))
Geometry
Find the sum of the lengths of the four sides of a square whose side is 13 centimeters (cm).
52
13 4 [OP_MUL]
var_a = 13 var_b = 4 var_c = var_a * var_b print(int(var_c))
Geometry
What is the surface area, in square centimeters (cm2), of a cube with one edge 7 centimeters (cm) long?
294
7 2 [OP_POW] 6 [OP_MUL]
var_a = 7 var_b = 2 var_c = var_a ** var_b var_d = 6 var_e = var_c * var_d print(int(var_e))