category
stringclasses
5 values
question
stringlengths
20
555
answer
stringlengths
1
20
solution_abst
stringlengths
1
287
solution_code
stringlengths
27
5.97k
Comparison
Jaeyoon spun the hula hoop for 2 minutes and 5 seconds, and Seungah spun it for 183 seconds. Find out who spun the hula hoop longer.
Seungah
[OP_LIST_SOL] Jaeyoon Seungah [OP_LIST_EOL] [OP_LIST_SOL] 2 60 [OP_MUL] 5 [OP_ADD] 183 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jaeyoon' var_b = 'Seungah' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 2 var_d = 60 var_e = var_c * var_d var_f = 5 var_g = var_e + var_f var_h = 183 list_b= [] 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) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[-var_i] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Correspondence
There are single digit numbers A and B. Given the number A4461B which is a multiple of 72, what is the sum of A and B?
12
A4461B [OP_GEN_POSSIBLE_LIST] 72 [OP_LIST_DIVISIBLE] A4461B A [OP_LIST_FIND_UNK] A4461B B [OP_LIST_FIND_UNK] [OP_ADD]
var_a = 'A4461B' 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 = 72 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 = 'A4461B' var_d = 'A' var_c = str(var_c) var_d = str(var_d) unk_idx = var_c.index(var_d) var_e = 0 for elem in list_b: elem = str(elem) var_e = int(elem[unk_idx]) var_f = 'A4461B' var_g = 'B' var_f = str(var_f) var_g = str(var_g) unk_idx = var_f.index(var_g) var_h = 0 for elem in list_b: elem = str(elem) var_h = int(elem[unk_idx]) var_i = var_e + var_h print(int(var_i))
Correspondence
Minyeong multiplied 107.8 by a certain number and it was 9.8. Find out what number it is.
0.09
9.8 107.8 [OP_DIV]
var_a = 9.8 var_b = 107.8 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
Add all odd numbers from 1 to 20.
100
1 20 [OP_LIST_ODD] [OP_LIST_SUM]
var_a = 1 var_b = 20 list_a = [] if var_a%2==0: for i in range(var_a+1, var_b+1, 2): list_a.append(i) else: for i in range(var_a, var_b+1, 2): list_a.append(i) list_a = [float(i) for i in list_a] var_c = sum(list_a) print(int(var_c))
Correspondence
Some cookies come in bundles of 9 in a box, and there are 7 cookies in each bundle. If there are 13 boxes of these cookies, how many cookies are there?
819
13 9 [OP_MUL] 7 [OP_MUL]
var_a = 13 var_b = 9 var_c = var_a * var_b var_d = 7 var_e = var_c * var_d print(int(var_e))
Geometry
How many pieces can be cut if a wire of length 27.9 centimeters (cm) is cut by 3.1 centimeters (cm)?
9
27.9 3.1 [OP_DIV]
var_a = 27.9 var_b = 3.1 var_c = var_a / var_b print(int(var_c))
Geometry
There is a frame in the shape of a square with a side length of 20 centimeters (cm). What is the area of the largest medallion that can be stored in a circular medallion? However, the ratio of circumference is assumed to be 3.14.
314
3.14 20 2 [OP_DIV] [OP_MUL] 20 2 [OP_DIV] [OP_MUL]
var_a = 3.14 var_b = 20 var_c = 2 var_d = var_b / var_c var_e = var_a * var_d var_f = 20 var_g = 2 var_h = var_f / var_g var_i = var_e * var_h print(int(var_i))
Possibility
What is the 2nd largest minus the 3rd smallest 3-digit number that can be formed by drawing 3 different numbers from 5, 0, 8, 6, and 2?
654
[OP_LIST_SOL] 5 0 8 6 2 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 2 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_SUB]
var_a = 5 var_b = 0 var_c = 8 var_d = 6 var_e = 2 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 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=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = 3 list_d=list_b.copy() list_d.sort() var_j = list_d[var_i-1] var_k = var_h - var_j print(int(var_k))
Arithmetic calculation
The sum of five consecutive natural numbers is 90. What is the largest of these natural numbers?
20
90 0 5 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 5 [OP_DIV] 5 1 [OP_SUB] [OP_ADD]
var_a = 90 var_b = 0 var_c = 5 var_d = 1 var_e = var_c - var_d var_f = 1 list_a = [i for i in range(var_b, var_e + 1, var_f)] list_a = [float(i) for i in list_a] var_g = sum(list_a) var_h = var_a - var_g var_i = 5 var_j = var_h / var_i var_k = 5 var_l = 1 var_m = var_k - var_l var_n = var_j + var_m print(int(var_n))
Arithmetic calculation
I had a few persimmons. I ate 5 of them, and there are 12 left. How many persimmons were there at first?
17
12 5 [OP_ADD]
var_a = 12 var_b = 5 var_c = var_a + var_b print(int(var_c))
Comparison
Minyoung and Eunji picked tangerines. Minyoung picked up 10/12 kg (kg), and Eunji picked up 5/12 kg (kg). Who picked more tangerines?
Minyoung
[OP_LIST_SOL] Minyoung Eunji [OP_LIST_EOL] [OP_LIST_SOL] 10/12 5/12 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Minyoung' var_b = 'Eunji' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 0.8333333333333334 var_d = 0.4166666666666667 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
If you use a machine that produces 370 pencils a day to produce 1000 pencils, how many days will it be finished?
3
1000 370 [OP_DIV] 1 [OP_CEIL]
var_a = 1000 var_b = 370 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))
Comparison
Compare the number they have: Jungkook is with the number of 6 multiplied by 3, and Yoongi is with 4. Whose number is smaller?
Yoongi
[OP_LIST_SOL] Jungkook Yoongi [OP_LIST_EOL] [OP_LIST_SOL] 6 3 [OP_MUL] 4 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jungkook' var_b = 'Yoongi' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 6 var_d = 3 var_e = var_c * var_d var_f = 4 list_b= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[var_g-1] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Correspondence
A certain number is a single digit number that is between 4 and 9. That number is less than 6. Find that number.
5
4 1 [OP_ADD] 9 1 [OP_SUB] 1 [OP_LIST_ARANGE] 6 [OP_LIST_LESS] 1 [OP_LIST_GET]
var_a = 4 var_b = 1 var_c = var_a + var_b var_d = 9 var_e = 1 var_f = var_d - var_e var_g = 1 list_a = [i for i in range(var_c, var_f + 1, var_g)] var_h = 6 list_b = [] for i in list_a: if i < var_h: list_b.append(i) var_i = 1 var_j = list_b[var_i-1] print(int(var_j))
Geometry
If all sides of a five-sided figure are the same length and the perimeter of the figure is 23.4 centimeters (cm), how many centimeters (cm) is the length of one side?
4.68
23.4 5 [OP_DIV]
var_a = 23.4 var_b = 5 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
There were 35 people on the subway, 18 got off and 15 got on. Find out the number of passengers decreased in the subway.
3
35 35 18 [OP_SUB] 15 [OP_ADD] [OP_SUB]
var_a = 35 var_b = 35 var_c = 18 var_d = var_b - var_c var_e = 15 var_f = var_d + var_e var_g = var_a - var_f print(int(var_g))
Geometry
Each side of the square-shaped park is 200 meters (m). Find the area of this park.
40000
200 2 [OP_POW]
var_a = 200 var_b = 2 var_c = var_a ** var_b print(int(var_c))
Possibility
If 6 people shake each other's hand once, how many handshakes are there in total?
15
6 6 1 [OP_SUB] [OP_MUL] 2 [OP_DIV]
var_a = 6 var_b = 6 var_c = 1 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
3A4B plus 1000 is less than 6233. How many digits from 0 to 9 can be written for A?
10
3A4B [OP_GEN_POSSIBLE_LIST] 6233 1000 [OP_SUB] [OP_LIST_LESS] 3A4B A [OP_LIST_FIND_UNK] [OP_LIST_LEN]
var_a = '3A4B' 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 = 6233 var_c = 1000 var_d = var_b - var_c list_b = [] for i in list_a: if i < var_d: list_b.append(i) var_e = '3A4B' var_f = 'A' var_e = str(var_e) var_f = str(var_f) unk_idx = var_e.index(var_f) list_c = [] for elem in list_b: elem = str(elem) list_c.append(int(elem[unk_idx])) list_c = list(set(list_c)) var_g = len(list_c) print(int(var_g))
Arithmetic calculation
Three friends are going to share 3 liters (L) of banana milk. How many milliliters (mL) of banana milk do you have to share with Hyeonju so that Jinsol drinks 200 milliliters (㎖) more than Hyeonju, and Hyunju drinks 200 milliliters (㎖) more than Changhyeok?
1000
3 1000 [OP_MUL] 200 [OP_ADD] 200 [OP_SUB] 3 [OP_DIV]
var_a = 3 var_b = 1000 var_c = var_a * var_b var_d = 200 var_e = var_c + var_d var_f = 200 var_g = var_e - var_f var_h = 3 var_i = var_g / var_h print(int(var_i))
Correspondence
A-B-B-B=303.1 . Dividing A by 10 equals B. find A
433
303.1 10 3 [OP_SUB] [OP_DIV] 10 [OP_MUL]
var_a = 303.1 var_b = 10 var_c = 3 var_d = var_b - var_c var_e = var_a / var_d var_f = 10 var_g = var_e * var_f print(int(eval('{:.2f}'.format(round(var_g+1e-10,2)))))
Possibility
How many 3-digit numbers greater than 500 are such that the sum of each digit is 7?
6
100 999 1 [OP_LIST_ARANGE] 500 [OP_LIST_MORE] [OP_LIST_NUM2SUM] 7 [OP_LIST_FIND_NUM]
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 = 500 list_b = [] for i in list_a: if i > var_d: list_b.append(i) 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 = 7 var_g = 0 var_f = int(var_f) for i in list_c: i = int(i) if i == var_f: var_g = var_g + 1 print(int(var_g))
Arithmetic calculation
Yoongi's average score on the English test taken in August and September was 86. If Yoongi's English test score was 98 points in October, find the average score of the English test for 3 months.
90
86 2 [OP_MUL] 98 [OP_ADD] 3 [OP_DIV]
var_a = 86 var_b = 2 var_c = var_a * var_b var_d = 98 var_e = var_c + var_d var_f = 3 var_g = var_e / var_f print(int(var_g))
Geometry
A cuboid box is made without a lid, and it is 50 centimeters (cm) wide, 35 centimeters (cm) long, and 40 centimeters (cm) high. How many tiles do you need at least if you want to attach tiles that are 1 centimeter (cm) wide and 1 centimeter (cm) long to the outer surface of the box without any gap?
8550
50 35 [OP_MUL] 50 40 [OP_MUL] 2 [OP_MUL] 40 35 [OP_MUL] 2 [OP_MUL] [OP_ADD] [OP_ADD]
var_a = 50 var_b = 35 var_c = var_a * var_b var_d = 50 var_e = 40 var_f = var_d * var_e var_g = 2 var_h = var_f * var_g var_i = 40 var_j = 35 var_k = var_i * var_j var_l = 2 var_m = var_k * var_l var_n = var_h + var_m var_o = var_c + var_n print(int(var_o))
Geometry
Find the perimeter of a figure with a total of 9 sides, each 2 centimeters (cm) long.
18
2 9 [OP_MUL]
var_a = 2 var_b = 9 var_c = var_a * var_b print(int(var_c))
Comparison
In 1.4, 9/10, 1.2, 0.5, and 13/10, if you list the numbers less than or equal to 1.1, what is the largest number?
0.9
[OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_LESS_EQUAL] 1 [OP_LIST_MAX]
var_a = 1.4 var_b = 0.9 var_c = 1.2 var_d = 0.5 var_e = 1.3 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 1.1 list_b = [] for i in list_a: if i <= var_f: list_b.append(i) var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] print('{:.2f}'.format(round(var_h+1e-10,2)))
Arithmetic calculation
If there is a plan to plant trees on one side of the road at intervals of 25 meters (m) including the first and the last point, how many trees will be planted when the length of the road is 2575 meters (m)?
104
2575 25 [OP_DIV] 1 [OP_ADD]
var_a = 2575 var_b = 25 var_c = var_a / var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Comparison
Yoongi got 4, and Yuna got 5, and Jungkook got the numbr that is 6 multiplied by 3. Who got the smallest number?
Yoongi
[OP_LIST_SOL] Yoongi Yuna Jungkook [OP_LIST_EOL] [OP_LIST_SOL] 4 5 6 3 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yoongi' var_b = 'Yuna' var_c = 'Jungkook' 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 = 4 var_e = 5 var_f = 6 var_g = 3 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) if "/" in str(var_d): var_d = eval(str(var_d)) list_b.append(var_d) 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
Jaewoong's father does 130 sit-ups every day. How many sit-ups will he do in 2 weeks?
1820
130 7 [OP_MUL] 2 [OP_MUL]
var_a = 130 var_b = 7 var_c = var_a * var_b var_d = 2 var_e = var_c * var_d print(int(var_e))
Possibility
When the number cards 7, 1, and 0 are given, find the largest number that can be made by using all of the given number cards at least once.
710
[OP_LIST_SOL] 7 1 0 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MAX]
var_a = 7 var_b = 1 var_c = 0 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = len(list_a) list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] print(int(var_f))
Geometry
Jinwoo has several square-shaped tiles. These tiles are lined up to make a large square, and there are 3 tiles left. It is said that 44 more tiles are needed to increase each side of the square by 2 columns. How many tiles does Jinwoo have?
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
Packs of 45 contain 10 each. If we repeat the process of adding 100 to the total number 3 times, what is the total number?
750
10 45 [OP_MUL] 100 3 [OP_MUL] [OP_ADD]
var_a = 10 var_b = 45 var_c = var_a * var_b var_d = 100 var_e = 3 var_f = var_d * var_e var_g = var_c + var_f print(int(var_g))
Geometry
Twenty sheets of paper with a length of 10 centimeters (cm) were joined together with a joint of 5 millimeters (mm). How many centimeters (cm) is the total length of the joined paper?
190.5
10 20 [OP_MUL] 5 10 [OP_DIV] 20 1 [OP_SUB] [OP_MUL] [OP_SUB]
var_a = 10 var_b = 20 var_c = var_a * var_b var_d = 5 var_e = 10 var_f = var_d / var_e var_g = 20 var_h = 1 var_i = var_g - var_h var_j = var_f * var_i var_k = var_c - var_j print('{:.2f}'.format(round(var_k+1e-10,2)))
Arithmetic calculation
The concentration of 200 grams (g) of sugar water is 25%. If 300 grams (g) of another sugar water contains 60 grams (g) of sugar, find the percent concentration of the sugar water when the two sugar waters are mixed.
22
200 25 100 [OP_DIV] [OP_MUL] 60 [OP_ADD] 200 300 [OP_ADD] [OP_DIV] 100 [OP_MUL]
var_a = 200 var_b = 25 var_c = 100 var_d = var_b / var_c var_e = var_a * var_d var_f = 60 var_g = var_e + var_f var_h = 200 var_i = 300 var_j = var_h + var_i var_k = var_g / var_j var_l = 100 var_m = var_k * var_l print(int(var_m))
Comparison
The sum of the 3rd and 4th year students at Mina's school is 531. There are 31 more 4th year students than 3rd year students, and 22 more 3rd year boys than 3rd year girls. Find the number of boys in 3rd grade.
136
531 31 [OP_SUB] 2 [OP_DIV] 22 [OP_SUB] 2 [OP_DIV] 22 [OP_ADD]
var_a = 531 var_b = 31 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 22 var_g = var_e - var_f var_h = 2 var_i = var_g / var_h var_j = 22 var_k = var_i + var_j print(int(var_k))
Comparison
The locker for the new transfer student, Yunjeong, is 7th from the left, 13th from the right, 8th from the front, and 14th from the back. If the number of lockers in each row is the same, what is the total number of lockers?
399
7 13 [OP_ADD] 1 [OP_SUB] 8 14 [OP_ADD] 1 [OP_SUB] [OP_MUL]
var_a = 7 var_b = 13 var_c = var_a + var_b var_d = 1 var_e = var_c - var_d var_f = 8 var_g = 14 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))
Geometry
Two identical rectangular-shaped postcards were attached horizontally so that they did not overlap. If the entire perimeter of the stitched postcard is 70 centimeters (cm) and the vertical length is 15 centimeters (cm), how many square centimeters (cm2) is the area of one postcard?
150
70 2 [OP_DIV] 15 [OP_SUB] 15 [OP_MUL] 2 [OP_DIV]
var_a = 70 var_b = 2 var_c = var_a / var_b var_d = 15 var_e = var_c - var_d var_f = 15 var_g = var_e * var_f var_h = 2 var_i = var_g / var_h print(int(var_i))
Arithmetic calculation
It takes 5 days to make 60 toys with an (a) machine. How many days does it take to make 540 toys with an (a) machine?
45
540 60 [OP_DIV] 5 [OP_MUL]
var_a = 540 var_b = 60 var_c = var_a / var_b var_d = 5 var_e = var_c * var_d print(int(var_e))
Arithmetic calculation
If Yoojeong and Minyeong share 10 snacks, how many snacks can one person eat?
5
10 2 [OP_DIV]
var_a = 10 var_b = 2 var_c = var_a / var_b print(int(var_c))
Comparison
Gahee, Nahee, Dahee, Rahee, and Mahee each bought drinks at the convenience store. Assuming that the average price of the drinks Gahee, Nahee, and Dahee bought was 2 won higher than the average price of each drink, and that Rahee bought a 72 won drink and Mahee bought a 80 won drink, how much is the average price of the drinks for these five people?
79
72 80 [OP_ADD] 3 [OP_MUL] 2 3 5 [OP_MUL] [OP_MUL] [OP_ADD] 5 3 [OP_SUB] [OP_DIV] 72 [OP_ADD] 80 [OP_ADD] 5 [OP_DIV]
var_a = 72 var_b = 80 var_c = var_a + var_b var_d = 3 var_e = var_c * var_d var_f = 2 var_g = 3 var_h = 5 var_i = var_g * var_h var_j = var_f * var_i var_k = var_e + var_j var_l = 5 var_m = 3 var_n = var_l - var_m var_o = var_k / var_n var_p = 72 var_q = var_o + var_p var_r = 80 var_s = var_q + var_r var_t = 5 var_u = var_s / var_t print(int(var_u))
Comparison
Yoona is with Yoona's friends Heejin and Miyoung. Yoona is 23 years old, Miyoung is 22 years old, and Heejin is 24 years old. Who is the oldest?
Heejin
[OP_LIST_SOL] Yoona Miyoung Heejin [OP_LIST_EOL] [OP_LIST_SOL] 23 22 24 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yoona' var_b = 'Miyoung' var_c = 'Heejin' 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 = 23 var_e = 22 var_f = 24 list_b= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_b.append(var_d) list_b.reverse() var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Comparison
Nine people stand in a line in order of shortest to tallest. Hoseok is standing 5th from the front. If you line up again in order of tallest to smallest, what number will Hoseok stand from the front?
5
9 5 [OP_SUB] 1 [OP_ADD]
var_a = 9 var_b = 5 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
How many natural numbers that are 1000 or less are multiples of 5 while are not multiples of 10?
100
1 1000 1 [OP_LIST_ARANGE] 1 5 [OP_LIST_SEARCH_FIXED_DIGIT] [OP_LIST_LEN]
var_a = 1 var_b = 1000 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 1 var_e = 5 list_b = [] var_d = int(var_d) var_e = int(var_e) for i in list_a: i = int(i) if (i//var_d)%10 == var_e: list_b.append(i) var_f = len(list_b) print(int(var_f))
Comparison
The size of the Jisuk backpack is 1.49 liters (L) and the size of the Miho backpack is 9/20 liters (L). Whose backpack is smaller?
Miho
[OP_LIST_SOL] Jisuk Miho [OP_LIST_EOL] [OP_LIST_SOL] 1.49 9/20 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jisuk' var_b = 'Miho' 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.49 var_d = 0.45 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-1] var_g = list_b.index(var_f)+1 var_h = list_a[var_g-1] print(var_h)
Geometry
There are 10-won, 100-won, and 500-won coins each. If you pick and flip two of these three coins, what are the total number of possible outcomes?
6
3 2 [OP_PERM]
var_a = 3 var_b = 2 var_c = 1 var_a = int(var_a) var_b = int(var_b) for i, elem in enumerate(range(var_b)): var_c = var_c * (var_a-i) print(int(var_c))
Correspondence
We need to multiply 15 by a number, but we mistakenly divide a number by 15, which is 6. Find the result of the correct calculation.
1350
15 6 15 [OP_MUL] [OP_MUL]
var_a = 15 var_b = 6 var_c = 15 var_d = var_b * var_c var_e = var_a * var_d print(int(var_e))
Correspondence
When 3A5-2B=364 is true, what number should go in B?
1
3A5-2B=364 B [OP_DIGIT_UNK_SOLVER]
var_a = '3A5-2B=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))
Comparison
Hyenas run at a steady speed of 2.1 kilometers (km) per minute, and cheetahs run at 10.5 kilometers (km) in 4 minutes. Which animal can be said to be faster?
cheetah
[OP_LIST_SOL] Hyena cheetah [OP_LIST_EOL] [OP_LIST_SOL] 2.1 1 [OP_DIV] 10.5 4 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Hyena' var_b = 'cheetah' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 2.1 var_d = 1 var_e = var_c / var_d var_f = 10.5 var_g = 4 var_h = var_f / var_g list_b= [] if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[-var_i] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Arithmetic calculation
Jimin has 2 times more marbles than Seokjin and Yuna has 1 less marble than Seokjin. If Seokjin has 3 marbles, how many more marbles does Jimin have than Yuna?
4
3 2 [OP_MUL] 3 1 [OP_SUB] [OP_SUB]
var_a = 3 var_b = 2 var_c = var_a * var_b var_d = 3 var_e = 1 var_f = var_d - var_e var_g = var_c - var_f print(int(var_g))
Correspondence
There are two different numbers A and B. Find the sum of A and B in the two-digit subtraction formula A5-2A=B7.
13
A5-2A=B7 A [OP_DIGIT_UNK_SOLVER] A5-2A=B7 B [OP_DIGIT_UNK_SOLVER] [OP_ADD]
var_a = 'A5-2A=B7' 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 = 'A5-2A=B7' 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
You are going to create a three-digit number using the numbers from 0 to 7, excluding odd numbers. What is the sum of the three-digit numbers that can be created with different digits?
7728
0 7 [OP_LIST_EVEN] 3 [OP_LIST_GET_PERM] [OP_LIST_SUM]
var_a = 0 var_b = 7 list_a = [] if var_a%2!=0: for i in range(var_a+1, var_b+1, 2): list_a.append(i) else: for i in range(var_a, var_b+1, 2): list_a.append(i) var_c = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_c)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] list_b = [float(i) for i in list_b] var_d = sum(list_b) print(int(var_d))
Correspondence
Subtract 25 from 3/4 of a number, divide by 7, and add 50 to get 100. Find the number.
500
100 50 [OP_SUB] 7 [OP_MUL] 25 [OP_ADD] 3/4 [OP_DIV]
var_a = 100 var_b = 50 var_c = var_a - var_b var_d = 7 var_e = var_c * var_d var_f = 25 var_g = var_e + var_f var_h = 0.75 var_i = var_g / var_h print(int(var_i))
Correspondence
When 26 is divided by A, the quotient is 8 and the remainder is 2. A is a natural number. What is A in this case?
3
26 2 [OP_SUB] 8 [OP_DIV]
var_a = 26 var_b = 2 var_c = var_a - var_b var_d = 8 var_e = var_c / var_d print(int(var_e))
Possibility
Write the difference between the largest 4-digit number and the smallest 4-digit number that can be made by using all of the given number marbles 0, 3, 4, and 8 once.
5382
[OP_LIST_SOL] 0 3 4 8 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] [OP_ABS]
var_a = 0 var_b = 3 var_c = 4 var_d = 8 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 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 = 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 var_k = abs(var_j) print(int(var_k))
Correspondence
38A-B1=364 holds. What is A?
5
38A-B1=364 A [OP_DIGIT_UNK_SOLVER]
var_a = '38A-B1=364' 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))
Possibility
Find the smallest number that can be formed by using the numbers 1, 5, and 2 all at once.
125
[OP_LIST_SOL] 1 5 2 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MIN]
var_a = 1 var_b = 5 var_c = 2 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = len(list_a) list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[var_e-1] print(int(var_f))
Comparison
There are 4 vases, (a), (b), (c), and (d). Vase (a) is smaller than vase (c). Vase (d) is smaller than vase (a). Vase (b) is larger than vase (c). What is the largest vase?
(b)
[OP_LIST_SOL] (a) (b) (c) (d) [OP_LIST_EOL] [OP_LIST_SOL] (c) (a) > (d) (a) < (c) (b) < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [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 = '(c)' var_f = '(a)' var_g = '>' var_h = '(d)' var_i = '(a)' var_j = '<' var_k = '(c)' var_l = '(b)' 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 = 1 var_o = list_c[var_n-1] print(var_o)
Possibility
How many two-digit numbers can be made using even numbers only once among the unit digit less than 10?
16
0 10 1 [OP_SUB] [OP_LIST_EVEN] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 0 var_b = 10 var_c = 1 var_d = var_b - var_c list_a = [] if var_a%2!=0: for i in range(var_a+1, var_d+1, 2): list_a.append(i) else: for i in range(var_a, var_d+1, 2): list_a.append(i) var_e = 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 = len(list_b) print(int(var_f))
Correspondence
The fruit basket at the supermarket contains 4 bananas and 3 apples. Today, 25 more fruit baskets came in, resulting in the number of apples in the fruit basket to 150. Find the number of bananas by yesterday.
100
150 3 [OP_DIV] 25 [OP_SUB] 4 [OP_MUL]
var_a = 150 var_b = 3 var_c = var_a / var_b var_d = 25 var_e = var_c - var_d var_f = 4 var_g = var_e * var_f print(int(var_g))
Arithmetic calculation
Taehyung and Jimin are folding scabs together. If Taehyung can fold 256 in 4 hours and Jimin can fold 111 in 3 hours, how many scabs did Taehyung and Jimin fold after 3 hours?
303
256 3 4 [OP_DIV] [OP_MUL] 111 [OP_ADD]
var_a = 256 var_b = 3 var_c = 4 var_d = var_b / var_c var_e = var_a * var_d var_f = 111 var_g = var_e + var_f print(int(var_g))
Possibility
I want to create four-digit numbers by using all the natural numbers 7, 6, 5, and 8 once. Among the numbers I can make, what is the sum of the third largest number and the third smallest number?
14443
[OP_LIST_SOL] 7 6 8 5 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 3 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_ADD]
var_a = 7 var_b = 6 var_c = 8 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 = len(list_a) 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=list_b.copy() list_c.sort() var_g = list_c[-var_f] var_h = 3 list_d=list_b.copy() list_d.sort() var_i = list_d[var_h-1] var_j = var_g + var_i print(int(var_j))
Possibility
There are 5 employees. Among them, you are going to select two people and give one a special prize and the other a second prize. How many cases are there?
20
5 2 [OP_PERM]
var_a = 5 var_b = 2 var_c = 1 var_a = int(var_a) var_b = int(var_b) for i, elem in enumerate(range(var_b)): var_c = var_c * (var_a-i) print(int(var_c))
Possibility
You want to create a three-digit number by drawing three out of 5, 6, 4, and 7 and using them only once. After finding the fourth smallest possible number, find the sum of its digits.
17
[OP_LIST_SOL] 5 6 4 7 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 4 [OP_LIST_MIN] [OP_NUM2LIST] [OP_LIST_SUM]
var_a = 5 var_b = 6 var_c = 4 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 = 4 list_c=list_b.copy() list_c.sort() var_g = list_c[var_f-1] list_d = [] var_g = int(var_g) while var_g//10 > 0: list_d.append(var_g%10) var_g = var_g//10 list_d.append(var_g%10) list_d = list_d[::-1] list_d = [float(i) for i in list_d] var_h = sum(list_d) print(int(var_h))
Arithmetic calculation
Three of the number cards from 1 to 9 were drawn to make the number 735. Find the sum of the numbers greater than 4 among the number cards drawn.
12
735 [OP_NUM2LIST] 4 [OP_LIST_MORE] [OP_LIST_SUM]
var_a = 735 list_a = [] var_a = int(var_a) while var_a//10 > 0: list_a.append(var_a%10) var_a = var_a//10 list_a.append(var_a%10) list_a = list_a[::-1] var_b = 4 list_b = [] for i in list_a: if i > var_b: list_b.append(i) list_b = [float(i) for i in list_b] var_c = sum(list_b) print(int(var_c))
Comparison
The weight of the clay Yerim used to make the pottery is 0.65 kg (kg) and the weight of the clay used by Chanwoo is 0.645 kg (kg). Who used more clay?
Yerim
[OP_LIST_SOL] Yerim Chanwoo [OP_LIST_EOL] [OP_LIST_SOL] 0.65 0.645 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yerim' var_b = 'Chanwoo' 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 = 0.65 var_d = 0.645 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)
Correspondence
I mistakenly divide a number by 23 when a number should be divided by 32 and it turns out that the quotient is 3 and the remainder is 17. Find the sum of the quotient and remainder when calculated correctly.
24
3 23 [OP_MUL] 17 [OP_ADD] 32 [OP_FDIV] 3 23 [OP_MUL] 17 [OP_ADD] 32 [OP_MOD] [OP_ADD]
var_a = 3 var_b = 23 var_c = var_a * var_b var_d = 17 var_e = var_c + var_d var_f = 32 var_g = var_e // var_f var_h = 3 var_i = 23 var_j = var_h * var_i var_k = 17 var_l = var_j + var_k var_m = 32 var_n = var_l % var_m var_o = var_g + var_n print(int(var_o))
Possibility
You want to divide 10 identical flowers into 2 different vases. You must place at least one flower in a vase. What is the number of possible ways to divide flowers?
9
10 2 [OP_SUB] 1 [OP_ADD]
var_a = 10 var_b = 2 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
The average score for Korean, English, and Mathematics is 92 points. If Social Studies is 90 points and Physical Education is 95 points, what is the average score for Korean, English, Mathematics, Social Studies, and Physical Education?
92.2
92 3 [OP_MUL] 90 [OP_ADD] 95 [OP_ADD] 5 [OP_DIV]
var_a = 92 var_b = 3 var_c = var_a * var_b var_d = 90 var_e = var_c + var_d var_f = 95 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
Jungkook has 3 red balls and 2 yellow balls. When Jungkook gives 1 yellow ball to Yoongi, how many red balls does Jungkook have?
3
3
var_a = 3 print(int(var_a))
Comparison
How many numbers in 1.4, 9/10, 1.2, 0.5, 13/10 are less than or equal to 1.1?
2
[OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_LESS_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))
Possibility
I'm going to pick two out of apples, peaches, pears, and melons and put them in different fruit baskets. How many possible cases are there?
12
[OP_LIST_SOL] apples peaches pears melons [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_PERM]
var_a = 'apples' var_b = 'peaches' var_c = 'pears' var_d = 'melons' 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) print(int(var_g))
Comparison
Cheolmin read 518 pages of a children's book in 2 weeks, and Seongmin read 328 pages in 8 days. Who read more in one day?
Seongmin
[OP_LIST_SOL] Cheolmin Seongmin [OP_LIST_EOL] [OP_LIST_SOL] 518 2 7 [OP_MUL] [OP_DIV] 328 8 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Cheolmin' var_b = 'Seongmin' 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 = 518 var_d = 2 var_e = 7 var_f = var_d * var_e var_g = var_c / var_f var_h = 328 var_i = 8 var_j = var_h / var_i list_b= [] if "/" in str(var_j): var_j = eval(str(var_j)) list_b.append(var_j) if "/" in str(var_g): var_g = eval(str(var_g)) list_b.append(var_g) list_b.reverse() var_k = 1 list_c=list_b.copy() list_c.sort() var_l = list_c[-var_k] var_m = list_b.index(var_l)+1 var_n = list_a[var_m-1] print(var_n)
Comparison
Yoongi collects 4, Jungkook collects a number adding 3 to 6, and Yuna collects 5. Who has the smallest number?
Yoongi
[OP_LIST_SOL] Yoongi Jungkook Yuna [OP_LIST_EOL] [OP_LIST_SOL] 4 6 3 [OP_ADD] 5 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yoongi' var_b = 'Jungkook' var_c = 'Yuna' 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 = 4 var_e = 6 var_f = 3 var_g = var_e + var_f var_h = 5 list_b= [] 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_d): var_d = eval(str(var_d)) list_b.append(var_d) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[var_i-1] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Correspondence
I made a mistake in dividing a number by 20, so I divided a number by 22 and got 2. How much is it if I calculate it correctly?
2.2
2 22 [OP_MUL] 20 [OP_DIV]
var_a = 2 var_b = 22 var_c = var_a * var_b var_d = 20 var_e = var_c / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Arithmetic calculation
How many trees will be needed if trees are planted on both ends of the road, evenly spaced at 32.5 m (m) intervals on a road that is 650 meters (m) long? However, the thickness of the wood is not considered.
21
650 32.5 [OP_FDIV] 1 [OP_ADD]
var_a = 650 var_b = 32.5 var_c = var_a // var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Correspondence
There are four different numbers A, B, C, and D. Find C from the four-digit addition formula 4A5B+C2D7=7070.
2
4A5B+C2D7=7070 C [OP_DIGIT_UNK_SOLVER]
var_a = '4A5B+C2D7=7070' var_b = 'C' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] print(int(var_c))
Geometry
There is a wall in the shape of a rectangle with a width of 36 centimeters (cm) and a height of 72 centimeters (cm). On this wall, you want to attach tiles that are 3 centimeters (cm) and 4 centimeters (cm) in length and width, respectively, without any empty space. If it costs 2500 won per tile, how much does it cost?
540000
36 3 [OP_FDIV] 72 4 [OP_FDIV] [OP_MUL] 2500 [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 var_h = 2500 var_i = var_g * var_h print(int(var_i))
Geometry
Using yarn, I made a regular pentagon with a side of 16 centimeters (cm). I used all of these yarns 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))
Geometry
Find the height in centimeters (cm) of a cuboid whose base area is 50 square centimeters (cm2) and its volume is 2000 cubic centimeters (cm3).
40
2000 50 [OP_DIV]
var_a = 2000 var_b = 50 var_c = var_a / var_b print(int(var_c))
Geometry
Minjeong is taking a walk in a square-shaped park. Given that one side of this park is 40 meters (m) long, how many meters (m) did Minjeong walk?
160
40 4 [OP_MUL]
var_a = 40 var_b = 4 var_c = var_a * var_b print(int(var_c))
Geometry
Find how much it will be if you divide the area of a circle with a radius of 8 centimeters (cm) by the area of a circle with a diameter of 8 centimeters (cm). Note that the pi is assumed to be 3.14.
4
3.14 8 [OP_MUL] 8 [OP_MUL] 3.14 8 2 [OP_DIV] [OP_MUL] 8 2 [OP_DIV] [OP_MUL] [OP_DIV]
var_a = 3.14 var_b = 8 var_c = var_a * var_b var_d = 8 var_e = var_c * var_d var_f = 3.14 var_g = 8 var_h = 2 var_i = var_g / var_h var_j = var_f * var_i var_k = 8 var_l = 2 var_m = var_k / var_l var_n = var_j * var_m var_o = var_e / var_n print(int(var_o))
Comparison
You are going to load three cargoes, A, B, and C, into the cargo hold. Cargo A is larger than cargo B, and cargo C is larger than cargo A. If you want to load the smallest cargo first, which cargo should be loaded first?
B
[OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] A B > C A > [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 = 'A' var_e = 'B' var_f = '>' var_g = 'C' var_h = 'A' 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
Yuna gave 12 of the marbles she had to her younger sister and received 5 from her older sister. Then she gave half of the marbles she had to Namjoon and received 3 from Yoongi, making 17. How many marbles did Yuna have in the beginning?
35
17 3 [OP_SUB] 2 [OP_MUL] 5 [OP_SUB] 12 [OP_ADD]
var_a = 17 var_b = 3 var_c = var_a - var_b var_d = 2 var_e = var_c * var_d var_f = 5 var_g = var_e - var_f var_h = 12 var_i = var_g + var_h print(int(var_i))
Correspondence
Multiplying 0.55 by a number gives 4.235. What is the value of the number divided by 0.55?
14
4.235 0.55 [OP_DIV] 0.55 [OP_DIV]
var_a = 4.235 var_b = 0.55 var_c = var_a / var_b var_d = 0.55 var_e = var_c / var_d print(int(var_e))
Arithmetic calculation
There are 25 girls in class (A), and there are 3 more girls than boys. How many students are in class (A)?
47
25 25 3 [OP_SUB] [OP_ADD]
var_a = 25 var_b = 25 var_c = 3 var_d = var_b - var_c var_e = var_a + var_d print(int(var_e))
Correspondence
Jung Hyun used 10 more than 1/4 of the 100 won coins she had at the mart, 5 less than 3/5 of the remaining coins to ride the bus, and gave 12 of the remaining coins to her younger brother. Find the number of 100 won coins that Jung Hyun had at the beginning when the number of coins she had at the end was 13.
80
13 12 [OP_ADD] 5 [OP_SUB] 1 3/5 [OP_SUB] [OP_DIV] 10 [OP_ADD] 1 1/4 [OP_SUB] [OP_DIV]
var_a = 13 var_b = 12 var_c = var_a + var_b var_d = 5 var_e = var_c - var_d var_f = 1 var_g = 0.6 var_h = var_f - var_g var_i = var_e / var_h var_j = 10 var_k = var_i + var_j var_l = 1 var_m = 0.25 var_n = var_l - var_m var_o = var_k / var_n print(int(var_o))
Arithmetic calculation
The ducks laid 1925 eggs yesterday and 138 fewer eggs today than yesterday. Find out the sum of the eggs laid yesterday and today.
3712
1925 1925 138 [OP_SUB] [OP_ADD]
var_a = 1925 var_b = 1925 var_c = 138 var_d = var_b - var_c var_e = var_a + var_d print(int(var_e))
Geometry
Any number is divisible by 3 and even divisible by 4. Find the smallest value of any possible number.
12
3 4 [OP_LCM]
var_a = 3 var_b = 4 var_c = var_b * var_a / math.gcd(int(var_b), int(var_a)) print(int(var_c))
Geometry
What is the length of the hypotenuse of a right triangle if the length of the non-hypotenuse is 5 and the other non-hypotenuse is 12?
13
12 2 [OP_POW] 5 2 [OP_POW] [OP_ADD] 1/2 [OP_POW]
var_a = 12 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 var_h = 0.5 var_i = var_g ** var_h print(int(var_i))
Possibility
How many 3-digit numbers can be made by using all three 0, 2, and 9 number cards once?
4
[OP_LIST_SOL] 0 2 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 0 var_b = 2 var_c = 9 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = len(list_b) print(int(var_e))
Geometry
I used all of the ribbon with a length of 78 centimeters (cm) to make one triangle and one square. If the perimeter of the triangle is 46 centimeters (cm), how many centimeters (cm) is the length of one side of the square?
8
78 46 [OP_SUB] 4 [OP_DIV]
var_a = 78 var_b = 46 var_c = var_a - var_b var_d = 4 var_e = var_c / var_d print(int(var_e))
Arithmetic calculation
When Minjun was late, he went to school at 15 kilometers (km) per hour, and when he came back at a leisurely pace of 10 kilometers (km) per hour, it took 30 minutes longer than when he went to school. How long did it take to go to school?
1
10 30 60 [OP_DIV] [OP_MUL] 15 10 [OP_SUB] [OP_DIV]
var_a = 10 var_b = 30 var_c = 60 var_d = var_b / var_c var_e = var_a * var_d var_f = 15 var_g = 10 var_h = var_f - var_g var_i = var_e / var_h print(int(var_i))
Arithmetic calculation
What is the sum of all even numbers from 1 to 10?
30
1 10 [OP_LIST_EVEN] [OP_LIST_SUM]
var_a = 1 var_b = 10 list_a = [] if var_a%2!=0: for i in range(var_a+1, var_b+1, 2): list_a.append(i) else: for i in range(var_a, var_b+1, 2): list_a.append(i) list_a = [float(i) for i in list_a] var_c = sum(list_a) print(int(var_c))
Correspondence
Find the number. The number results in 24 when you add 12 and subtract 27.
39
24 27 [OP_ADD] 12 [OP_SUB]
var_a = 24 var_b = 27 var_c = var_a + var_b var_d = 12 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
Find the number of numbers that are divisors of 32 or factors of 24.
10
32 [OP_LIST_GET_DIVISOR] 24 [OP_LIST_GET_DIVISOR] [OP_SET_UNION] [OP_LIST_LEN]
var_a = 32 list_a = [] num_sqrt = int(math.sqrt(var_a)) for i in range(1, num_sqrt+1): if var_a % i == 0: list_a.append(i) list_a.append(int(var_a/i)) list_a = sorted(set(list_a)) var_b = 24 list_b = [] num_sqrt = int(math.sqrt(var_b)) for i in range(1, num_sqrt+1): if var_b % i == 0: list_b.append(i) list_b.append(int(var_b/i)) list_b = sorted(set(list_b)) list_c = list(set(list_a) | set(list_b)) var_c = len(list_c) print(int(var_c))
Arithmetic calculation
Hyungjun drinks 200 milliliters (ml) of Coke every day, which contains 2 liters (L). How many days will it take him to finish drinking Coke if he has been drinking Coke for 3 days?
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))
Comparison
If you put 5 notebooks of the same weight on a bookshelf, the total weight is 2.9 kilograms (kg). If three books of the same weight are placed on a bookshelf, the total weight is 2.51 kilograms (kg). If the weight of the bookshelf is 0.2 kilograms (kg), find out which one is heavier, one book or one notebook.
book
[OP_LIST_SOL] notebook book [OP_LIST_EOL] [OP_LIST_SOL] 2.9 0.2 [OP_SUB] 5 [OP_DIV] 2.51 0.2 [OP_SUB] 3 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'notebook' var_b = 'book' 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.9 var_d = 0.2 var_e = var_c - var_d var_f = 5 var_g = var_e / var_f var_h = 2.51 var_i = 0.2 var_j = var_h - var_i 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_g): var_g = eval(str(var_g)) list_b.append(var_g) 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)
Geometry
We made a square with a side length of 6 centimeters (cm) by wire. If you increase the length of each side by 1 centimeters (cm), how much is the difference of the area from the original square?
13
6 1 [OP_ADD] 2 [OP_POW] 6 2 [OP_POW] [OP_SUB]
var_a = 6 var_b = 1 var_c = var_a + var_b var_d = 2 var_e = var_c ** var_d var_f = 6 var_g = 2 var_h = var_f ** var_g var_i = var_e - var_h print(int(var_i))
Correspondence
When 7 strings of the same length were thread together, the total length of it was 98 centimeters (cm). Find the length of one string.
14
98 7 [OP_DIV]
var_a = 98 var_b = 7 var_c = var_a / var_b print(int(var_c))
Geometry
How many bases are there in a pyramid?
1
1
var_a = 1 print(int(var_a))