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
An item was wrapped with tape measuring 16 meters (m) in length. If 5 meters (m) were used to wrap the 1 item, how many meters (m) of tape are left after wrapping 2 items?
6
16 5 2 [OP_MUL] [OP_SUB]
var_a = 16 var_b = 5 var_c = 2 var_d = var_b * var_c var_e = var_a - var_d print(int(var_e))
Arithmetic calculation
It costs 30 won to eat an apple. If you eat 25 apples, how much do you need?
750
30 25 [OP_MUL]
var_a = 30 var_b = 25 var_c = var_a * var_b print(int(var_c))
Possibility
You want to distribute 10 apples among 4 students. Given that at least one apple is given to each student, find the number of possible cases.
84
1 9 1 [OP_LIST_ARANGE] 4 [OP_LIST_GET_PRODUCT] [OP_LIST_NUM2SUM] 10 [OP_LIST_FIND_NUM]
var_a = 1 var_b = 9 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 4 list_b = [str(i) for i in list_a] list_b = list(itertools.product(list_b, repeat=var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] list_c=[] for i in list_b: var_e = 0 i = int(i) while i//10 > 0: var_e = var_e + i%10 i = i//10 var_e = var_e + i%10 list_c.append(var_e) var_f = 10 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))
Correspondence
Find B to satisfy 57A-B14=364.
2
57A-B14=364 B [OP_DIGIT_UNK_SOLVER]
var_a = '57A-B14=364' 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))
Arithmetic calculation
Jimin had 12 tangerines. 7 of them were eaten. How many tangerines are left to Jimin?
5
12 7 [OP_SUB]
var_a = 12 var_b = 7 var_c = var_a - var_b print(int(var_c))
Geometry
The surface area of a rectangular cuboid is 442 square centimeters (cm2). If the width is 7 centimeters (cm) and the length is 8 centimeters (cm), how many centimeters (cm) is the height?
11
442 2 [OP_DIV] 7 8 [OP_MUL] [OP_SUB] 7 8 [OP_ADD] [OP_DIV]
var_a = 442 var_b = 2 var_c = var_a / var_b var_d = 7 var_e = 8 var_f = var_d * var_e var_g = var_c - var_f var_h = 7 var_i = 8 var_j = var_h + var_i var_k = var_g / var_j print(int(var_k))
Arithmetic calculation
Your younger brother is 1.1 meters (m) taller, you are 0.2 meters (m) taller than your younger brother, and your older brother is 1/10 meter (m) taller than you. How tall is your brother in meters (m)?
1.4
0.2 1.1 [OP_ADD] 1/10 [OP_ADD]
var_a = 0.2 var_b = 1.1 var_c = var_a + var_b var_d = 0.1 var_e = var_c + var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Possibility
You want to find the difference between the third smallest and the second smallest number of three number cards. If you have cards with 1, 6, and 8 written on them, what is the difference?
432
[OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 3 [OP_LIST_MIN] 2 [OP_LIST_MIN] [OP_SUB]
var_a = 1 var_b = 6 var_c = 8 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = 3 list_c=list_b.copy() list_c.sort() var_f = list_c[var_e-1] var_g = 2 list_d=list_b.copy() list_d.sort() var_h = list_d[var_g-1] var_i = var_f - var_h print(int(var_i))
Geometry
When the toy train was completely submerged in a cuboid-shaped water tank whose two sides of the bottom is 44 centimeters (cm) and 35 centimeters (cm), respectively, the height of the water increased by 7 centimeters (cm). And then the toy car was completely submerged, which increased the height of the water by 3 centimeters (cm). Find the sum of the volumes of the toy train and the car in cubic centimeters (cm3).
15400
44 35 [OP_MUL] 7 3 [OP_ADD] [OP_MUL]
var_a = 44 var_b = 35 var_c = var_a * var_b var_d = 7 var_e = 3 var_f = var_d + var_e var_g = var_c * var_f print(int(var_g))
Correspondence
66 is the result of mistakenly subtracting 3 and adding 49 when should have multiplifed the number by 3 and adding 49. Find the difference between the incorrectly calculated value and the correct calculated value.
43
66 49 [OP_SUB] 3 [OP_ADD] 3 [OP_MUL] 49 [OP_ADD] 66 [OP_SUB]
var_a = 66 var_b = 49 var_c = var_a - var_b var_d = 3 var_e = var_c + var_d var_f = 3 var_g = var_e * var_f var_h = 49 var_i = var_g + var_h var_j = 66 var_k = var_i - var_j print(int(var_k))
Possibility
Find the product of the largest three-digit number and the smallest three-digit number when numbers can be formed of 4 number cards 1, 3, 5, and 8 allowing the duplicates.
98568
[OP_LIST_SOL] 1 3 5 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_MUL]
var_a = 1 var_b = 3 var_c = 5 var_d = 8 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.product(list_b, repeat=var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 1 list_c=list_b.copy() list_c.sort() var_g = list_c[-var_f] var_h = 1 list_d=list_b.copy() list_d.sort() var_i = list_d[var_h-1] var_j = var_g * var_i print(int(var_j))
Comparison
Jimin, Taehyung, and Hoseok each bought and ate a bag of the same candy. Jimin ate 1/9 of the total, Taehyung ate 1/3 of the total, and Hoseok ate 1/6 of the total. Who has the most candy left?
Jimin
[OP_LIST_SOL] Jimin Taehyung Hoseok [OP_LIST_EOL] [OP_LIST_SOL] 1/9 1/3 1/6 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jimin' var_b = 'Taehyung' var_c = 'Hoseok' 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 = 0.1111111111111111 var_e = 0.3333333333333333 var_f = 0.16666666666666666 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-1] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Possibility
Using the four digits 1, 4, 5, and 9 once, find the second large three-digit number with 9 in the tens place.
591
[OP_LIST_SOL] 1 4 5 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 10 9 [OP_LIST_SEARCH_FIXED_DIGIT] 2 [OP_LIST_MAX]
var_a = 1 var_b = 4 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 = 10 var_g = 9 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 = 2 list_d=list_c.copy() list_d.sort() var_i = list_d[-var_h] print(int(var_i))
Geometry
Find the area of a rectangular wall whose sides are 5 meters (m) long and 17/20 meters (m) wide.
4.25
5 17/20 [OP_MUL]
var_a = 5 var_b = 0.85 var_c = var_a * var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
There are 28 notebooks. I gave 1/4 of the 28 books to Yeonju, and 3/7 of the 28 books to Minji. Find how many notebooks are left.
9
28 1 1/4 [OP_SUB] 3/7 [OP_SUB] [OP_MUL]
var_a = 28 var_b = 1 var_c = 0.25 var_d = var_b - var_c var_e = 0.42857142857142855 var_f = var_d - var_e var_g = var_a * var_f print(int(var_g))
Geometry
People are standing in 5 rows of 5 people. How many people are standing on the circumference?
16
5 4 [OP_MUL] 4 [OP_SUB]
var_a = 5 var_b = 4 var_c = var_a * var_b var_d = 4 var_e = var_c - var_d print(int(var_e))
Comparison
There are 28 students in Jungkook's class, and each is a different height. If you line up these students in order of height, Jungkook will be 14th from the front and Eunji will be 20th from the front. How many students are standing between Jungkook and Eunji?
5
20 14 [OP_SUB] 1 [OP_SUB]
var_a = 20 var_b = 14 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Possibility
Find the sum of all numbers that are divisible by 3 and 5 when choosing three different numbers from 2, 3, 5, and 7 to make a three-digit number.
1110
[OP_LIST_SOL] 2 5 3 7 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 3 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] [OP_LIST_SUM]
var_a = 2 var_b = 5 var_c = 3 var_d = 7 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 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 = 3 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 = 5 list_d = [] var_g = int(var_g) for i in list_c: i = int(i) if i % var_g == 0: list_d.append(i) list_d = [float(i) for i in list_d] var_h = sum(list_d) print(int(var_h))
Arithmetic calculation
Some apartment complex has 1 to 22 apartment buildings, each with up to 6 floors. If there are 5 apartments on each floor, how many apartments can live in this apartment complex?
660
22 6 [OP_MUL] 5 [OP_MUL]
var_a = 22 var_b = 6 var_c = var_a * var_b var_d = 5 var_e = var_c * var_d print(int(var_e))
Correspondence
55 is a number obtained by adding 45 to some number and subtracting 62 from it. What is the result when 7 is multiplied by this number?
504
55 45 [OP_SUB] 62 [OP_ADD] 7 [OP_MUL]
var_a = 55 var_b = 45 var_c = var_a - var_b var_d = 62 var_e = var_c + var_d var_f = 7 var_g = var_e * var_f print(int(var_g))
Comparison
Students are standing in a line. Yoojeong is standing at the very back. When 8 people are standing in front of Yoojeong, how many students are standing in the line?
9
8 1 [OP_ADD]
var_a = 8 var_b = 1 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
You want to plant trees on one side of a road that is 156 meters (m) long at 6 meters (m) intervals. How many trees will you need if you plant trees at the beginning and at the end?
27
156 6 [OP_DIV] 1 [OP_ADD]
var_a = 156 var_b = 6 var_c = var_a / var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
I am going to sell 200 carnations parceling into 25 bundles. If 1 carnation is 500 won, how much is a bundle?
4000
200 25 [OP_DIV] 500 [OP_MUL]
var_a = 200 var_b = 25 var_c = var_a / var_b var_d = 500 var_e = var_c * var_d print(int(var_e))
Geometry
Gasoline was filled in a cuboid-shaped oil tank with dimensions of 350 centimeters (cm), 260 centimeters (cm), and 165 centimeters (cm) in width, length, and height, respectively. If gasoline is 1,600 won per liter (L), how much money is needed to fill the gas tank?
24024000
350 260 [OP_MUL] 165 [OP_MUL] 1000 [OP_DIV] 1600 [OP_MUL]
var_a = 350 var_b = 260 var_c = var_a * var_b var_d = 165 var_e = var_c * var_d var_f = 1000 var_g = var_e / var_f var_h = 1600 var_i = var_g * var_h print(int(var_i))
Possibility
Find the number of ways where numbers from 1 to 100 are smaller than 40 and each digit is not equal to one another and consists of only 1, 3, 7, and 8?
6
[OP_LIST_SOL] 1 3 7 8 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 40 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN]
var_a = 1 var_b = 3 var_c = 7 var_d = 8 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 40 list_c = [] for i in list_b: if i <= var_f: list_c.append(i) var_g = len(list_c) print(int(var_g))
Arithmetic calculation
Yuna and her grandmother are 12 and 72 years old, respectively. A few years later, grandmother's age is 5 times Yuna's age. How old is your grandmother at that year?
75
72 12 [OP_SUB] 5 [OP_MUL] 5 1 [OP_SUB] [OP_DIV]
var_a = 72 var_b = 12 var_c = var_a - var_b var_d = 5 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))
Arithmetic calculation
Yuna threaded 380 beads and Eunji threaded 325 beads in 1 hour. How many beads did Yuna thread more than Eunji when the two of them threaded at a constant speed for 8 hours?
440
380 325 [OP_SUB] 8 [OP_MUL]
var_a = 380 var_b = 325 var_c = var_a - var_b var_d = 8 var_e = var_c * var_d print(int(var_e))
Geometry
Find the number of faces of a square pillar.
6
4 2 [OP_ADD]
var_a = 4 var_b = 2 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
There are persimmons of the same size and weight. Five persimmons weigh 1 kilogram (kg). How many persimmons are there if all persimmons are 3 kg (kg)?
15
5 1 [OP_MUL] 3 [OP_MUL]
var_a = 5 var_b = 1 var_c = var_a * var_b var_d = 3 var_e = var_c * var_d print(int(var_e))
Geometry
A rectangular parallelepiped barrel with the lengths of the bottom two sides measuring 6 meters (m) 40 centimeters (cm) and 9 meters (m) respectively and the height measuring 5 meters (m) 20 centimeters (cm) is filled with sand. We want to divide this sand into several barrels whose volume is one cubic meter (m3). Find at least how many barrels you need.
300
6 40 100 [OP_DIV] [OP_ADD] 9 [OP_MUL] 5 20 100 [OP_DIV] [OP_ADD] [OP_MUL] 1 [OP_DIV] 1 [OP_CEIL]
var_a = 6 var_b = 40 var_c = 100 var_d = var_b / var_c var_e = var_a + var_d var_f = 9 var_g = var_e * var_f var_h = 5 var_i = 20 var_j = 100 var_k = var_i / var_j var_l = var_h + var_k var_m = var_g * var_l var_n = 1 var_o = var_m / var_n var_p = 1 var_q=int(((var_o+9*10**(var_p-2))//(10**(var_p-1)))*10**(var_p-1)) print(int(var_q))
Correspondence
A number multiplied by 2 subtracted by 3 equals 7. Find the number.
5
7 3 [OP_ADD] 2 [OP_DIV]
var_a = 7 var_b = 3 var_c = var_a + var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Correspondence
When I cut wire into pieces of 7 centimeters (cm), it becomes 12 pieces leaving 4 centimeters (cm). If you cut this wire into pieces of 3 centimeters (cm), how many centimeters (cm) remains?
1
7 12 [OP_MUL] 4 [OP_ADD] 3 [OP_MOD]
var_a = 7 var_b = 12 var_c = var_a * var_b var_d = 4 var_e = var_c + var_d var_f = 3 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 remainder of the second largest number divided by the second smallest number?
2
[OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 2 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_MOD]
var_a = 10 var_b = 11 var_c = 12 var_d = 13 var_e = 14 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 2 list_b=list_a.copy() list_b.sort() var_g = list_b[-var_f] var_h = 2 list_c=list_a.copy() list_c.sort() var_i = list_c[var_h-1] var_j = var_g % var_i print(int(var_j))
Geometry
I made a square by arranging go stones without gaps. If the number of go stones on the perimeter is 52, how many go stones are on the outermost of one side?
14
52 4 [OP_SUB] 4 [OP_DIV] 2 [OP_ADD]
var_a = 52 var_b = 4 var_c = var_a - var_b var_d = 4 var_e = var_c / var_d var_f = 2 var_g = var_e + var_f print(int(var_g))
Geometry
How many square centimeters (cm2) is the sum of the widths of two squares, every 11 centimeters (cm) and 5 centimeters (cm) long?
146
11 2 [OP_POW] 5 2 [OP_POW] [OP_ADD]
var_a = 11 var_b = 2 var_c = var_a ** var_b var_d = 5 var_e = 2 var_f = var_d ** var_e var_g = var_c + var_f print(int(var_g))
Possibility
There are one card 5, one card 1, one card 7, and one card 6 in the pocket. When you want to make decimal numbers with three decimal places bigger than 7 with all of each card, how many can you make?
6
[OP_LIST_SOL] 5 1 7 6 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 7 10 4 1 [OP_SUB] [OP_POW] [OP_MUL] [OP_LIST_MORE] [OP_LIST_LEN]
var_a = 5 var_b = 1 var_c = 7 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 = 7 var_g = 10 var_h = 4 var_i = 1 var_j = var_h - var_i var_k = var_g ** var_j var_l = var_f * var_k list_c = [] for i in list_b: if i > var_l: list_c.append(i) var_m = len(list_c) print(int(var_m))
Comparison
A is the sum of 4 groups of 10 and 8 units. B is 50 minus 1. C is 40 plus 7. Which of the three numbers A, B, and C is the greatest?
B
[OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] 10 4 [OP_MUL] 8 [OP_ADD] 50 1 [OP_SUB] 40 7 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [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 = 10 var_e = 4 var_f = var_d * var_e var_g = 8 var_h = var_f + var_g var_i = 50 var_j = 1 var_k = var_i - var_j var_l = 40 var_m = 7 var_n = var_l + var_m list_b= [] if "/" in str(var_n): var_n = eval(str(var_n)) list_b.append(var_n) if "/" in str(var_k): var_k = eval(str(var_k)) list_b.append(var_k) if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) list_b.reverse() var_o = 1 list_c=list_b.copy() list_c.sort() var_p = list_c[-var_o] var_q = list_b.index(var_p)+1 var_r = list_a[var_q-1] print(var_r)
Arithmetic calculation
Ji-yeon bought tteokbokki with 1/2 of her pocket money. And she used 3/8 of the rest to buy pencils. How much is the tteokbokki Jiyeon bought when the remaining money is 2,500 won?
4000
2500 1 3/8 [OP_SUB] [OP_DIV] 1/2 [OP_DIV] 1/2 [OP_MUL]
var_a = 2500 var_b = 1 var_c = 0.375 var_d = var_b - var_c var_e = var_a / var_d var_f = 0.5 var_g = var_e / var_f var_h = 0.5 var_i = var_g * var_h print(int(var_i))
Geometry
I made a rectangular parallelepiped by attaching certain cubes, and the length and width of its base were twice the height. If the sum of the lengths of all the edges of this rectangular parallelepiped is 100 centimeters (cm), what is the surface area of this rectangular parallelepiped?
400
100 4 [OP_DIV] 2 2 [OP_ADD] 1 [OP_ADD] [OP_DIV] 2 [OP_POW] 2 2 [OP_MUL] 2 [OP_MUL] 1 2 [OP_MUL] 2 [OP_MUL] 1 2 [OP_MUL] 2 [OP_MUL] [OP_ADD] [OP_ADD] [OP_MUL]
var_a = 100 var_b = 4 var_c = var_a / var_b var_d = 2 var_e = 2 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 var_l = 2 var_m = 2 var_n = var_l * var_m var_o = 2 var_p = var_n * var_o var_q = 1 var_r = 2 var_s = var_q * var_r var_t = 2 var_u = var_s * var_t var_v = 1 var_w = 2 var_x = var_v * var_w var_y = 2 var_z = var_x * var_y var_A = var_u + var_z var_B = var_p + var_A var_C = var_k * var_B print(int(var_C))
Comparison
Nine students are standing in a line to get on the bus. How many students are standing between the student standing third from the front and the student standing second from the back?
4
9 3 [OP_SUB] 2 [OP_SUB]
var_a = 9 var_b = 3 var_c = var_a - var_b var_d = 2 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
Dohyeon is 1.46 meters (m) tall, and his older brother's height is 1.15 times of Dohyeon's. How tall is his brother in meters (m)?
1.68
1.46 1.15 [OP_MUL]
var_a = 1.46 var_b = 1.15 var_c = var_a * var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Geometry
If the area of a cube-shaped box is 600, what is the volume of this box?
1000
600 6 [OP_DIV] 1/2 [OP_POW] 3 [OP_POW]
var_a = 600 var_b = 6 var_c = var_a / var_b var_d = 0.5 var_e = var_c ** var_d var_f = 3 var_g = var_e ** var_f print(int(var_g))
Possibility
If 6 basketball teams play with each other once, how many matches will there be in total?
15
6 2 [OP_COMB]
var_a = 6 var_b = 2 var_c = 1 var_a = int(var_a) var_b = int(var_b) for i, elem in enumerate(range(var_b)): var_c = var_c * (var_a-i) for i, elem in enumerate(range(var_b)): var_c = var_c / (i+1) print(int(var_c))
Correspondence
Yoongi wants to add a four-digit number to 57. Yoongi saw 9 in the ones place of a four-digit number wrong, and saw it as 6. When the sum Yoongi got is 1823, find this four-digit number.
1769
1823 57 [OP_SUB] 6 9 [OP_SUB] [OP_SUB]
var_a = 1823 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 print(int(var_g))
Arithmetic calculation
When performing multiplication between two-digit numbers, when the tens digit of the multiplier is mistakenly considered as 6 instead of 2, the calculated value is 2496. However, the correct calculation yields 936. What is the sum of these two two-digit numbers?
63
[OP_LIST_SOL] 2496 936 [OP_SUB] 6 2 [OP_SUB] 10 [OP_MUL] [OP_DIV] 936 2496 936 [OP_SUB] 6 2 [OP_SUB] 10 [OP_MUL] [OP_DIV] [OP_DIV] [OP_LIST_EOL] [OP_LIST_SUM]
var_a = 2496 var_b = 936 var_c = var_a - var_b var_d = 6 var_e = 2 var_f = var_d - var_e var_g = 10 var_h = var_f * var_g var_i = var_c / var_h var_j = 936 var_k = 2496 var_l = 936 var_m = var_k - var_l var_n = 6 var_o = 2 var_p = var_n - var_o var_q = 10 var_r = var_p * var_q var_s = var_m / var_r var_t = var_j / var_s list_a= [] if "/" in str(var_t): var_t = eval(str(var_t)) list_a.append(var_t) if "/" in str(var_i): var_i = eval(str(var_i)) list_a.append(var_i) list_a.reverse() list_a = [float(i) for i in list_a] var_u = sum(list_a) print(int(var_u))
Arithmetic calculation
There are 8 boxes of soccer balls of 12 each, and 5 boxes of basketballs of 12 each. How many more soccer balls are there than basketballs?
36
12 8 [OP_MUL] 12 5 [OP_MUL] [OP_SUB]
var_a = 12 var_b = 8 var_c = var_a * var_b var_d = 12 var_e = 5 var_f = var_d * var_e var_g = var_c - var_f print(int(var_g))
Possibility
Find the number of ways when the value of one of the cards numbered from 1 to 9 is drawn and multiplied by 65, and is greater than the value of 57 multiplied by 7.
6
1 9 1 [OP_LIST_ARANGE] 57 7 [OP_MUL] 65 [OP_DIV] [OP_LIST_LESS] [OP_LIST_LEN]
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 = 57 var_e = 7 var_f = var_d * var_e var_g = 65 var_h = var_f / var_g list_b = [] for i in list_a: if i < var_h: list_b.append(i) var_i = len(list_b) print(int(var_i))
Comparison
Choose a number greater than or equal to 1.1 from 1.4, 9/10, 1.2, 0.5, and 13/10, and count the number of selected numbers.
3
[OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN]
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 = len(list_b) print(int(var_g))
Arithmetic calculation
Hyeonsu went around the promenade for 4 hours. What is the ratio of the distance Hyeonsoo walked in 1 hour on the walking trail?
0.25
1 4 [OP_DIV]
var_a = 1 var_b = 4 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Geometry
Miho has a field with a side measuring 6 meters (m). How big is this field?
36
6 2 [OP_POW]
var_a = 6 var_b = 2 var_c = var_a ** var_b print(int(var_c))
Possibility
What is the third largest three-digit number with 7 in the hundreds place using 2, 4, 7, and 9 once?
749
[OP_LIST_SOL] 2 4 7 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 100 7 [OP_LIST_SEARCH_FIXED_DIGIT] 3 [OP_LIST_MAX]
var_a = 2 var_b = 4 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 = 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 = 100 var_g = 7 list_c = [] var_f = int(var_f) var_g = int(var_g) for i in list_b: i = int(i) if (i//var_f)%10 == var_g: list_c.append(i) var_h = 3 list_d=list_c.copy() list_d.sort() var_i = list_d[-var_h] print(int(var_i))
Geometry
The width of a monitor is 9 centimeters (cm). If the circumference is 46 centimeters (cm), how long is the length of a monitor in centimeters (cm)?
14
46 2 [OP_DIV] 9 [OP_SUB]
var_a = 46 var_b = 2 var_c = var_a / var_b var_d = 9 var_e = var_c - var_d print(int(var_e))
Comparison
Seulgi has 9 pencils, and Hyeonjeong has 12 pencils. Who has more pencils?
Hyeonjeong
[OP_LIST_SOL] Seulgi Hyeonjeong [OP_LIST_EOL] [OP_LIST_SOL] 9 12 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Seulgi' var_b = 'Hyeonjeong' 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 = 9 var_d = 12 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)
Possibility
There are one carrot, one cucumber, and one radish each. How many ways can you choose to buy 2 of these?
3
[OP_LIST_SOL] carrot cucumber radish [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB]
var_a = 'carrot' var_b = 'cucumber' var_c = 'radish' list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = len(list_a) var_e = 2 var_f = 1 var_d = int(var_d) var_e = int(var_e) for i, elem in enumerate(range(var_e)): var_f = var_f * (var_d-i) for i, elem in enumerate(range(var_e)): var_f = var_f / (i+1) print(int(var_f))
Comparison
There are circle-shaped pizzas (a), (b), (c), and (d). The area of the pizza (a) is 314 square centimeters (㎠) and the circumference of the pizza (b) is 99.2 centimeters (㎝). The diameter of the pizza (c) is 16 centimeters (cm) and the radius of the pizza (d) is 12 centimeters (cm). If the pizzas are sorted from the left in order from smallest to largest, find the pizza that is second from the right. It is assumed that the pi ratio is 3.1.
(a)
[OP_LIST_SOL] (a) (b) (c) (d) [OP_LIST_EOL] [OP_LIST_SOL] 314 99.2 3.1 [OP_DIV] 2 [OP_DIV] 2 [OP_POW] 3.1 [OP_MUL] 16 2 [OP_DIV] 2 [OP_POW] 3.1 [OP_MUL] 12 2 [OP_POW] 3.1 [OP_MUL] [OP_LIST_EOL] 2 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = '(a)' var_b = '(b)' var_c = '(c)' var_d = '(d)' list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 314 var_f = 99.2 var_g = 3.1 var_h = var_f / var_g var_i = 2 var_j = var_h / var_i var_k = 2 var_l = var_j ** var_k var_m = 3.1 var_n = var_l * var_m var_o = 16 var_p = 2 var_q = var_o / var_p var_r = 2 var_s = var_q ** var_r var_t = 3.1 var_u = var_s * var_t var_v = 12 var_w = 2 var_x = var_v ** var_w var_y = 3.1 var_z = var_x * var_y list_b= [] if "/" in str(var_z): var_z = eval(str(var_z)) list_b.append(var_z) if "/" in str(var_u): var_u = eval(str(var_u)) list_b.append(var_u) if "/" in str(var_n): var_n = eval(str(var_n)) list_b.append(var_n) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() var_A = 2 list_c=list_b.copy() list_c.sort() var_B = list_c[var_A-1] var_C = list_b.index(var_B)+1 var_D = list_a[var_C-1] print(var_D)
Correspondence
14A+B73=418. How much is A, where 14A and B73 are three-digit numbers?
5
14A+B73=418 A [OP_DIGIT_UNK_SOLVER]
var_a = '14A+B73=418' 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 are four numbers 10, 11, 12, and 13. What is the quotient if you divide the 3rd smallest number by the 2nd smallest number?
1
[OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 3 [OP_LIST_MIN] 2 [OP_LIST_MIN] [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 = 3 list_b=list_a.copy() list_b.sort() var_f = list_b[var_e-1] var_g = 2 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))
Correspondence
You have to divide a number by 4 and add 16, but if you accidentally multiplied a number by 4 and added 16 to get 32. Find out how much it is if you calculate it correctly.
17
32 16 [OP_SUB] 4 [OP_DIV] 4 [OP_DIV] 16 [OP_ADD]
var_a = 32 var_b = 16 var_c = var_a - var_b var_d = 4 var_e = var_c / var_d var_f = 4 var_g = var_e / var_f var_h = 16 var_i = var_g + var_h print(int(var_i))
Correspondence
Add 143 to a number and multiply it by 27 to get 9693. Find the number.
216
9693 27 [OP_DIV] 143 [OP_SUB]
var_a = 9693 var_b = 27 var_c = var_a / var_b var_d = 143 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
There is a scale that can weigh more than 2 kilograms (kg). If you have lifted 3 weights of 200 grams (g) so far, find how many more weights you need to lift to measure the weight.
7
2 1000 [OP_MUL] 200 3 [OP_MUL] [OP_SUB] 200 [OP_DIV] 1 [OP_CEIL]
var_a = 2 var_b = 1000 var_c = var_a * var_b var_d = 200 var_e = 3 var_f = var_d * var_e var_g = var_c - var_f var_h = 200 var_i = var_g / var_h var_j = 1 var_k=int(((var_i+9*10**(var_j-2))//(10**(var_j-1)))*10**(var_j-1)) print(int(var_k))
Arithmetic calculation
I plan to sell 254 erasers by packing 30 in each box. How many more erasers would you need to pack and sell if there should be no leftover erasers?
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))
Comparison
Seonho has 1 more marble than Minjeong. Jinyoung has 3 fewer than Joohwan , Minjeong has 6 marbles, and Joohwan has 7 marbles. Which of these has the fewest marbles?
Jinyoung
[OP_LIST_SOL] Minjeong Joohwan Seonho Jinyoung [OP_LIST_EOL] [OP_LIST_SOL] 6 7 6 1 [OP_SUB] 7 3 [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Minjeong' var_b = 'Joohwan' var_c = 'Seonho' var_d = 'Jinyoung' 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 = 6 var_f = 7 var_g = 6 var_h = 1 var_i = var_g - var_h var_j = 7 var_k = 3 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) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) 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)
Arithmetic calculation
You want to divide 10.4 kilograms (kg) of flour into 0.8 kilograms (kg) of each bowl. How many bowls do you need?
13
10.4 0.8 [OP_DIV] 1 [OP_CEIL]
var_a = 10.4 var_b = 0.8 var_c = var_a / var_b var_d = 1 var_e=int(((var_c+9*10**(var_d-2))//(10**(var_d-1)))*10**(var_d-1)) print(int(var_e))
Correspondence
ABC+ABC+ABC=888. If A, B, and C are all different single digit numbers, what is A?
2
ABC+ABC+ABC=888 A [OP_DIGIT_UNK_SOLVER]
var_a = 'ABC+ABC+ABC=888' 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
You mistakenly distributed colored papers equally to 5 people instead of to 4 people, and each person got 15 papers and 2 papers were left. If you divide these papers equally to 4 people, how many papers will each person recieve at the maximum?
19
5 15 [OP_MUL] 2 [OP_ADD] 4 [OP_FDIV]
var_a = 5 var_b = 15 var_c = var_a * var_b var_d = 2 var_e = var_c + var_d var_f = 4 var_g = var_e // var_f print(int(var_g))
Geometry
When the go stones are lined up without gaps to form a large square, there are three go stones left. It is said that 44 more go stones are needed to increase each horizontal and vertical side of the square by 2 columns. How many go stones are there in all?
103
44 4 [OP_SUB] 4 [OP_DIV] 2 [OP_POW] 3 [OP_ADD]
var_a = 44 var_b = 4 var_c = var_a - var_b var_d = 4 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))
Arithmetic calculation
There are 445 yellow fish, which is 38 fewer than blue fish. How many yellow and blue fish are there altogether?
928
445 445 38 [OP_ADD] [OP_ADD]
var_a = 445 var_b = 445 var_c = 38 var_d = var_b + var_c var_e = var_a + var_d print(int(var_e))
Possibility
Find the difference between the largest even number and the smallest odd number when forming a four-digit number using each of the four numbers 0, 1, 2, 3, 4, 5, and 6 only once.
5519
[OP_LIST_SOL] 0 1 2 3 4 5 6 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 2 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] [OP_SET_DIFFERENCE] 1 [OP_LIST_MIN] [OP_SUB]
var_a = 0 var_b = 1 var_c = 2 var_d = 3 var_e = 4 var_f = 5 var_g = 6 list_a= [] if "/" in str(var_g): var_g = eval(str(var_g)) list_a.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_h = 4 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_h)) 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_i = 2 list_c = [] var_i = int(var_i) for i in list_b: i = int(i) if i % var_i == 0: list_c.append(i) var_j = 1 list_d=list_c.copy() list_d.sort() var_k = list_d[-var_j] list_e = list(set(list_b) - set(list_c)) var_l = 1 list_f=list_e.copy() list_f.sort() var_m = list_f[var_l-1] var_n = var_k - var_m print(int(var_n))
Correspondence
When this number is divided by 9, the result came out as 8. What do you get when you add 11 to this number?
83
8 9 [OP_MUL] 11 [OP_ADD]
var_a = 8 var_b = 9 var_c = var_a * var_b var_d = 11 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
There are 5 boxes of 14 red marbles per box and 9 boxes of 14 blue marbles per box. How many more blue marbles are there than red marbles?
56
14 9 [OP_MUL] 14 5 [OP_MUL] [OP_SUB]
var_a = 14 var_b = 9 var_c = var_a * var_b var_d = 14 var_e = 5 var_f = var_d * var_e var_g = var_c - var_f print(int(var_g))
Comparison
Students are standing in a line at the bus stop. When Minseok is standing 12th from the front and Junho is standing 9th from the back, Junho is standing right behind Minseok. Find the total number of students standing in line at the bus stop.
21
12 9 [OP_ADD]
var_a = 12 var_b = 9 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
There were 8 marbles before, but only 6 are in the bag now. How many marbles are lost?
2
8 6 [OP_SUB]
var_a = 8 var_b = 6 var_c = var_a - var_b print(int(var_c))
Geometry
How many boxes are needed to make a cube by stacking cuboid-shaped boxes with a width of 18 centimeters (cm), a length of 12 centimeters (cm), and a height of 9 centimeters (cm), in minimum?
24
18 12 [OP_LCM] 9 [OP_LCM] 18 [OP_DIV] 18 12 [OP_LCM] 9 [OP_LCM] 12 [OP_DIV] 18 12 [OP_LCM] 9 [OP_LCM] 9 [OP_DIV] [OP_MUL] [OP_MUL]
var_a = 18 var_b = 12 var_c = var_b * var_a / math.gcd(int(var_b), int(var_a)) var_d = 9 var_e = var_d * var_c / math.gcd(int(var_d), int(var_c)) var_f = 18 var_g = var_e / var_f var_h = 18 var_i = 12 var_j = var_i * var_h / math.gcd(int(var_i), int(var_h)) var_k = 9 var_l = var_k * var_j / math.gcd(int(var_k), int(var_j)) var_m = 12 var_n = var_l / var_m var_o = 18 var_p = 12 var_q = var_p * var_o / math.gcd(int(var_p), int(var_o)) var_r = 9 var_s = var_r * var_q / math.gcd(int(var_r), int(var_q)) var_t = 9 var_u = var_s / var_t var_v = var_n * var_u var_w = var_g * var_v print(int(var_w))
Arithmetic calculation
There are 15 cucumbers in the mart. There are three times as many radishes as there are cucumbers. There are 9 carrots. How many times the number of radishes is equal to the number of carrots?
5
15 3 [OP_MUL] 9 [OP_DIV]
var_a = 15 var_b = 3 var_c = var_a * var_b var_d = 9 var_e = var_c / var_d print(int(var_e))
Possibility
How many ways are there to line up 5 students?
120
5 5 [OP_PERM]
var_a = 5 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
A is a number from 1 to 9, and B is a number from 0 to 9, and AB40C is a multiple of 45. How many five-digit numbers like this can you think of?
20
AB40C [OP_GEN_POSSIBLE_LIST] 45 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 'AB40C' 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 = 45 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))
Arithmetic calculation
There are five numbers 10, 11, 12, 13, and 14. What is the quotient of the largest number divided by the second largest number?
1
[OP_LIST_SOL] 10 11 12 13 14 [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 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 = 2 list_c=list_a.copy() list_c.sort() var_i = list_c[-var_h] var_j = var_g // var_i print(int(var_j))
Arithmetic calculation
It takes 6.64 kg (kg) of glutinous rice flour to make one glutinous rice cake. How many glutinous rice cakes can you make with 212.48 kg (kg) of glutinous rice flour?
32
212.48 6.64 [OP_FDIV]
var_a = 212.48 var_b = 6.64 var_c = var_a // var_b print(int(var_c))
Comparison
The distance from Ahyeon's house to grandma's house is 7150 meters (m), and the distance to aunt's house is 6 kilometers (km) and 720 meters (m). Find out which of grandmother's house or aunt's house is closer to Ahyeon's house.
aunt
[OP_LIST_SOL] grandma aunt [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 = 'grandma' var_b = 'aunt' 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)
Arithmetic calculation
Joonyoung jumped rope 56 times a month for 3 months and Namyoung did 35 times a month for 4 months. How many times did Junyoung and Namyeong 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))
Comparison
Suppose there are seven numbers 1.7, 1/5, 1/5, 1, 3/5, 3/8, and 1.4. Which of these numbers is the fourth largest?
0.6
[OP_LIST_SOL] 1.7 1/5 1/5 1 3/5 3/8 1.4 [OP_LIST_EOL] 4 [OP_LIST_MAX]
var_a = 1.7 var_b = 0.2 var_c = 0.2 var_d = 1 var_e = 0.6 var_f = 0.375 var_g = 1.4 list_a= [] if "/" in str(var_g): var_g = eval(str(var_g)) list_a.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_h = 4 list_b=list_a.copy() list_b.sort() var_i = list_b[-var_h] print('{:.2f}'.format(round(var_i+1e-10,2)))
Geometry
Five rows of eight square tiles each measuring 30 centimeters (cm) in width and 30 centimeters (cm) in length were attached to the floor. How many square meters (m2) is the tiled floor?
3.6
30 100 [OP_DIV] 2 [OP_POW] 8 [OP_MUL] 5 [OP_MUL]
var_a = 30 var_b = 100 var_c = var_a / var_b var_d = 2 var_e = var_c ** var_d var_f = 8 var_g = var_e * var_f var_h = 5 var_i = var_g * var_h print('{:.2f}'.format(round(var_i+1e-10,2)))
Possibility
You are to pick 2 cards at the same time out of 9 cards numbered 1 through 9. Find how many ways there are the sum of the two cards is 3.
1
1 9 1 [OP_LIST_ARANGE] 2 [OP_LIST_GET_PERM] [OP_LIST_NUM2SUM] 3 [OP_LIST_FIND_NUM] 2 [OP_DIV]
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 = 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] 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 = 3 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 var_h = 2 var_i = var_g / var_h print(int(var_i))
Arithmetic calculation
Twelve students are about to line up on the playground. The total length of the playground is 200 meters (m) and students must keep 20 meters (m) apart. How many students can line up in total?
2
12 200 20 [OP_DIV] [OP_SUB]
var_a = 12 var_b = 200 var_c = 20 var_d = var_b / var_c var_e = var_a - var_d print(int(var_e))
Arithmetic calculation
Ho-seok and Min-yeong ran 34 laps around the playground. How many more laps does Min-yeong have to make to equal the number of times Hoseok ran?
17
51 34 [OP_SUB]
var_a = 51 var_b = 34 var_c = var_a - var_b print(int(var_c))
Geometry
Mijin made a regular pentagon with a side of 16 centimeters (cm) long using wire. When she stretches out this wire again and uses all of it to make a regular octagon, find the length of one side of this regular octagon.
10
16 5 [OP_MUL] 8 [OP_DIV]
var_a = 16 var_b = 5 var_c = var_a * var_b var_d = 8 var_e = var_c / var_d print(int(var_e))
Correspondence
Find the number between 4 and 9 that is less than 6.
4
4 9 1 [OP_LIST_ARANGE] 6 [OP_LIST_LESS] 1 [OP_LIST_GET]
var_a = 4 var_b = 9 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 6 list_b = [] for i in list_a: if i < var_d: list_b.append(i) var_e = 1 var_f = list_b[var_e-1] print(int(var_f))
Comparison
Jinho and Youngsu have a pencil respectively. Jinho lost 3 out of 9 pencils, and Youngsu gave 7 out of 14 pencils to his younger brother. Who has more pencils between Jinho and Youngsu?
Youngsu
[OP_LIST_SOL] Jinho Youngsu [OP_LIST_EOL] [OP_LIST_SOL] 9 3 [OP_SUB] 14 7 [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jinho' var_b = 'Youngsu' 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 = 9 var_d = 3 var_e = var_c - var_d var_f = 14 var_g = 7 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
Yuna went to the stationery store and bought a notebook with half of the money she took, and a pencil with half of the rest, and she had 800 won left. How much money did Yuna take with her in the beginning?
3200
800 2 [OP_MUL] 2 [OP_MUL]
var_a = 800 var_b = 2 var_c = var_a * var_b var_d = 2 var_e = var_c * var_d print(int(var_e))
Comparison
Several children are sitting in a circle equally spaced. The 15th child sitting clockwise from a standard child is facing the child who is the standard. How many children are there in total?
30
15 1 [OP_SUB] 2 [OP_MUL] 2 [OP_ADD]
var_a = 15 var_b = 1 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))
Correspondence
Given two different numbers A and B that satisfy 6A-B2=36, what is the value of subtracting B from A?
5
6A-B2=36 A [OP_DIGIT_UNK_SOLVER] 6A-B2=36 B [OP_DIGIT_UNK_SOLVER] [OP_SUB]
var_a = '6A-B2=36' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] var_d = '6A-B2=36' var_e = 'B' ans_dict = dict() var_d = var_d.replace('×','*') var_d = var_d.replace('x','*') var_d = var_d.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_d): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_d for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_d): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_f = ans_dict[var_e] var_g = var_c - var_f print(int(var_g))
Possibility
There are 4 balls numbered 1, 2, 3 and 5. Find the sum of the numbers divisible by 7 when you pick two balls and use them only once to form a two-digit number.
56
[OP_LIST_SOL] 1 2 3 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 7 [OP_LIST_DIVISIBLE] [OP_LIST_SUM]
var_a = 1 var_b = 2 var_c = 3 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 = 7 list_c = [] var_f = int(var_f) for i in list_b: i = int(i) if i % var_f == 0: list_c.append(i) list_c = [float(i) for i in list_c] var_g = sum(list_c) print(int(var_g))
Comparison
There is a refrigerator that has bowl A, B, and C full of food. Bowl B has more food than bowl A, and bowl C has more food than bowl B. When you try to empty the bowl with the least food in it, which bowl is emptied first?
A
[OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] B A > C B > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [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 = 'B' var_e = 'A' var_f = '>' var_g = 'C' var_h = 'B' 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 = len(list_c) var_k = list_c[var_j-1] print(var_k)
Arithmetic calculation
There are 6 giraffes, 8 pigs and 4 dogs. How many animals are there in total?
18
6 8 [OP_ADD] 4 [OP_ADD]
var_a = 6 var_b = 8 var_c = var_a + var_b var_d = 4 var_e = var_c + var_d print(int(var_e))
Geometry
A rectangular prism with a volume of 252 cubic centimeters (cm3) was made by stacking 36 stacking blocks with a volume of 1 cubic centimeter (cm3). How many layers are there in this cuboid's stacking blocks?
7
252 36 1 [OP_MUL] [OP_DIV]
var_a = 252 var_b = 36 var_c = 1 var_d = var_b * var_c var_e = var_a / var_d print(int(var_e))
Possibility
I am trying to create a two-digit number by using two numbers 1 and 9 allowing for repetition. How many two-digit numbers can you make?
4
[OP_LIST_SOL] 1 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PRODUCT] [OP_LIST_LEN]
var_a = 1 var_b = 9 list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.product(list_b, repeat=var_c)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_d = len(list_b) print(int(var_d))
Possibility
If there are 6 students A, B, C, D, E, and F, find the number of ways to elect 1 president, 1 vice president, and 1 manager.
120
6 1 1 [OP_ADD] 1 [OP_ADD] [OP_PERM]
var_a = 6 var_b = 1 var_c = 1 var_d = var_b + var_c var_e = 1 var_f = var_d + var_e var_g = 1 var_a = int(var_a) var_f = int(var_f) for i, elem in enumerate(range(var_f)): var_g = var_g * (var_a-i) print(int(var_g))
Geometry
Find the number of vertices of the regular hexagonal pyramid.
7
6 1 [OP_ADD]
var_a = 6 var_b = 1 var_c = var_a + var_b print(int(var_c))
Arithmetic calculation
You want to buy cucumbers for 7,500 won. Cucumbers are currently sold at 300 won per 100 grams (g). Find how many kilograms (kg) of cucumbers you can buy with your current money, including the digits after the decimal point.
2.5
7500 100 300 [OP_DIV] [OP_MUL] 1000 [OP_DIV]
var_a = 7500 var_b = 100 var_c = 300 var_d = var_b / var_c var_e = var_a * var_d var_f = 1000 var_g = var_e / var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Geometry
The area of a trapezoid is 96.9 square centimeters (cm2). If the top side is 3.6 centimeters (cm) longer than the bottom side and the height is 5.2 centimeters (cm), what is the length of the bottom side in centimeters (cm)?
16.85
96.98 2 [OP_MUL] 5.2 [OP_DIV] 3.6 [OP_SUB] 2 [OP_DIV]
var_a = 96.98 var_b = 2 var_c = var_a * var_b var_d = 5.2 var_e = var_c / var_d var_f = 3.6 var_g = var_e - var_f var_h = 2 var_i = var_g / var_h print('{:.2f}'.format(round(var_i+1e-10,2)))