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
If 3/4 meter (m) of reinforcing bar weighs 15/2 kilograms (kg), how many kilograms (kg) does 1 meter (m) of reinforcing bar weigh?
10
15/2 3/4 [OP_DIV]
var_a = 7.5 var_b = 0.75 var_c = var_a / var_b print(int(var_c))
Geometry
From a cube with one edge length of 9 centimeters (cm), cut a cube with one edge length of 3 centimeters (cm) as many as the number of edges, and find out how many cubic centimeters (cm3) the volume of the remaining part is.
405
9 3 [OP_POW] 3 3 [OP_POW] 12 [OP_MUL] [OP_SUB]
var_a = 9 var_b = 3 var_c = var_a ** var_b var_d = 3 var_e = 3 var_f = var_d ** var_e var_g = 12 var_h = var_f * var_g var_i = var_c - var_h print(int(var_i))
Arithmetic calculation
There are 10 go stones in 1 bundle. If there are 3 bundles of black go stones and 16 white go stones, how many go stones are there in all?
46
10 3 [OP_MUL] 16 [OP_ADD]
var_a = 10 var_b = 3 var_c = var_a * var_b var_d = 16 var_e = var_c + var_d print(int(var_e))
Correspondence
You are trying to write natural numbers from 1 to 200. How many times should the number 1 be written in all?
140
1 200 1 [OP_LIST_ARANGE] [OP_LIST2NUM] [OP_NUM2LIST] 1 [OP_LIST_FIND_NUM]
var_a = 1 var_b = 200 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d="" for i in list_a: i = str(i) var_d = var_d + i list_b = [] var_d = int(var_d) while var_d//10 > 0: list_b.append(var_d%10) var_d = var_d//10 list_b.append(var_d%10) list_b = list_b[::-1] var_e = 1 var_f = 0 var_e = int(var_e) for i in list_b: i = int(i) if i == var_e: var_f = var_f + 1 print(int(var_f))
Correspondence
48 is the result of accidentally adding 12 to a number where 22 should have been added. How much do you get if you calculate correctly?
58
48 12 [OP_SUB] 22 [OP_ADD]
var_a = 48 var_b = 12 var_c = var_a - var_b var_d = 22 var_e = var_c + var_d print(int(var_e))
Geometry
A parallelogram with an area of 33.3 square centimeters (cm2) has a base of 9 centimeters (cm). What is the height of the parallelogram?
3.7
33.3 9 [OP_DIV]
var_a = 33.3 var_b = 9 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Geometry
How many millimeters (mm) is the length of one edge of a dice with a volume of 8 cubic centimeters (cm3)?
20
8 1/3 [OP_POW] 10 [OP_MUL]
var_a = 8 var_b = 0.3333333333333333 var_c = var_a ** var_b var_d = 10 var_e = var_c * var_d print(int(var_e))
Correspondence
8500 is 8A19 rounded to the hundred place. Find the value of A.
5
8A19 [OP_GEN_POSSIBLE_LIST] 8500 50 [OP_SUB] [OP_LIST_MORE_EQUAL] 8500 50 [OP_ADD] [OP_LIST_LESS] 8A19 A [OP_LIST_FIND_UNK]
var_a = '8A19' 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 = 8500 var_c = 50 var_d = var_b - var_c list_b = [] for i in list_a: if i >= var_d: list_b.append(i) var_e = 8500 var_f = 50 var_g = var_e + var_f list_c = [] for i in list_b: if i < var_g: list_c.append(i) var_h = '8A19' var_i = 'A' var_h = str(var_h) var_i = str(var_i) unk_idx = var_h.index(var_i) var_j = 0 for elem in list_c: elem = str(elem) var_j = int(elem[unk_idx]) print(int(var_j))
Comparison
Yoongi has 4 apples, and Jungkook, who had 6 apples, got 3 more. When Yuna has 5 apples, who has the fewest apples?
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)
Geometry
If two 8.5 centimeters (cm) wooden planks and two 7.8 centimeters (cm) wooden planks are connected so that the overlapping part is 5 millimeters (mm), calculate how many centimeters (cm) the overall length of the planks will be.
31.1
8.5 2 [OP_MUL] 7.8 2 [OP_MUL] [OP_ADD] 5 10 [OP_DIV] 3 [OP_MUL] [OP_SUB]
var_a = 8.5 var_b = 2 var_c = var_a * var_b var_d = 7.8 var_e = 2 var_f = var_d * var_e var_g = var_c + var_f var_h = 5 var_i = 10 var_j = var_h / var_i var_k = 3 var_l = var_j * var_k var_m = var_g - var_l print('{:.2f}'.format(round(var_m+1e-10,2)))
Comparison
If there are 2 lines of people in front of Jungkook and 4 lines behind Jungkook, and the number of people standing in each line is equal to 8, how many people are standing in all?
56
2 4 [OP_ADD] 1 [OP_ADD] 8 [OP_MUL]
var_a = 2 var_b = 4 var_c = var_a + var_b var_d = 1 var_e = var_c + var_d var_f = 8 var_g = var_e * var_f print(int(var_g))
Possibility
Find the sum of all the numbers that are divisible by 3 and 5 when 3 different numbers, 2, 3, 5, and 7, are used to make a number less than or equal to 1000 and greater than 100.
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
Water flows out of the faucet at a rate of 10.8 liters (l) per hour. If you left the tap open for 1 hour and 24 minutes, find how many liters (L) of water flowed out.
15.12
10.8 1 24 60 [OP_DIV] [OP_ADD] [OP_MUL]
var_a = 10.8 var_b = 1 var_c = 24 var_d = 60 var_e = var_c / var_d var_f = var_b + var_e var_g = var_a * var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Comparison
Yoongi has 4 apples and Jungkook had 6 apples, but he ate 3. If Yuna has 5 apples, who has the most apples?
Yuna
[OP_LIST_SOL] Yoongi Jungkook Yuna [OP_LIST_EOL] [OP_LIST_SOL] 4 6 3 [OP_SUB] 5 [OP_LIST_EOL] 1 [OP_LIST_MAX] [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] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Arithmetic calculation
There are three numbers 10, 11 and 12. What is the sum of the 3rd and 2nd smallest numbers?
23
[OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 3 [OP_LIST_MIN] 2 [OP_LIST_MIN] [OP_ADD]
var_a = 10 var_b = 11 var_c = 12 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 3 list_b=list_a.copy() list_b.sort() var_e = list_b[var_d-1] var_f = 2 list_c=list_a.copy() list_c.sort() var_g = list_c[var_f-1] var_h = var_e + var_g print(int(var_h))
Correspondence
There is a number that is greater than 50 and less than 70. Also, this number has a remainder of 3 when divided by 5, a remainder of 2 when divided by 7, and a remainder of 2 when divided by 8. What is this number?
58
50 70 1 [OP_SUB] 1 [OP_LIST_ARANGE] 5 3 [OP_LIST_DIVIDE_AND_REMAIN] 7 2 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET]
var_a = 50 var_b = 70 var_c = 1 var_d = var_b - var_c var_e = 1 list_a = [i for i in range(var_a, var_d + 1, var_e)] var_f = 5 var_g = 3 list_b = [] var_f = int(var_f) var_g = int(var_g) if var_g < 0: var_g = var_g + var_f for i in list_a: i = int(i) if i%var_f == var_g: list_b.append(i) var_h = 7 var_i = 2 list_c = [] var_h = int(var_h) var_i = int(var_i) if var_i < 0: var_i = var_i + var_h for i in list_b: i = int(i) if i%var_h == var_i: list_c.append(i) var_j = 1 var_k = list_c[var_j-1] print(int(var_k))
Comparison
There is a book of 270 pages. If Kunyoung read 1/3 of the total in one day and Suhwan read 4/9 of the total, find out who read more books in a day.
Suhwan
[OP_LIST_SOL] Kunyoung Suhwan [OP_LIST_EOL] [OP_LIST_SOL] 1/3 4/9 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Kunyoung' var_b = 'Suhwan' 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.3333333333333333 var_d = 0.4444444444444444 list_b= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_b.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_b.append(var_c) list_b.reverse() var_e = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] var_g = list_b.index(var_f)+1 var_h = list_a[var_g-1] print(var_h)
Arithmetic calculation
There were 78 people on the train. Of these, 27 got off and a few got on, making the total people in the train to 63. How many people got on the train?
12
63 27 [OP_ADD] 78 [OP_SUB]
var_a = 63 var_b = 27 var_c = var_a + var_b var_d = 78 var_e = var_c - var_d print(int(var_e))
Correspondence
There is a number 32BA33. If this number is rounded to the nearest hundred, it is 323400. What is A?
4
32BA33 [OP_GEN_POSSIBLE_LIST] 323400 50 [OP_SUB] [OP_LIST_MORE_EQUAL] 323400 50 [OP_ADD] [OP_LIST_LESS] 32BA33 A [OP_LIST_FIND_UNK]
var_a = '32BA33' 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 = 323400 var_c = 50 var_d = var_b - var_c list_b = [] for i in list_a: if i >= var_d: list_b.append(i) var_e = 323400 var_f = 50 var_g = var_e + var_f list_c = [] for i in list_b: if i < var_g: list_c.append(i) var_h = '32BA33' var_i = 'A' var_h = str(var_h) var_i = str(var_i) unk_idx = var_h.index(var_i) var_j = 0 for elem in list_c: elem = str(elem) var_j = int(elem[unk_idx]) print(int(var_j))
Arithmetic calculation
There are 5/6 and 19/12. What is the sum of them?
2.42
5/6 19/12 [OP_ADD]
var_a = 0.8333333333333334 var_b = 1.5833333333333333 var_c = var_a + var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Geometry
Find the number of faces of a cuboid that meet at a vertex.
3
3
var_a = 3 print(int(var_a))
Comparison
Out of 5 numbers: 1.4, 9/10, 1.2, 0.5, 13/10, how many 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))
Correspondence
When you add 12 to a number and divide it by 4, the quotient is 12 and the remainder is 3. Add 12 to that number in question and multiply it by 4 to find the value.
204
12 4 [OP_MUL] 3 [OP_ADD] 12 [OP_SUB] 12 [OP_ADD] 4 [OP_MUL]
var_a = 12 var_b = 4 var_c = var_a * var_b var_d = 3 var_e = var_c + var_d var_f = 12 var_g = var_e - var_f var_h = 12 var_i = var_g + var_h var_j = 4 var_k = var_i * var_j print(int(var_k))
Comparison
Mom, Dad, and Grandpa bought clothes at the department store. Dad bought more clothes than Mom, and Grandpa bought more clothes than Dad. If you lined up people based on the number of clothes they bought in ascending order, in what position will Mom be? Please answer using an natural number.
1
[OP_LIST_SOL] Mom Dad Grandpa [OP_LIST_EOL] Mom [OP_LIST_INDEX]
var_a = 'Mom' var_b = 'Dad' var_c = 'Grandpa' 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 = 'Mom' var_e = list_a.index(var_d)+1 print(int(var_e))
Geometry
If the width of a rectangle with an area of 6 square meters (m2) is 150 centimeters (cm), what is the length in centimeters (cm)?
400
6 100 2 [OP_POW] [OP_MUL] 150 [OP_DIV]
var_a = 6 var_b = 100 var_c = 2 var_d = var_b ** var_c var_e = var_a * var_d var_f = 150 var_g = var_e / var_f print(int(var_g))
Possibility
We are going to divide Apples, Peaches, Pears, and Melons into two fruit baskets. How many possible cases are there?
16
2 [OP_LIST_SOL] Apple Peach Pear Melon [OP_LIST_EOL] [OP_LIST_LEN] [OP_POW]
var_a = 2 var_b = 'Apple' var_c = 'Peach' var_d = 'Pear' var_e = 'Melon' 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) list_a.reverse() var_f = len(list_a) var_g = var_a ** var_f print(int(var_g))
Possibility
When 2 female students and 3 male students are lined up in a row, find the number of cases where the female students must stand next to each other.
48
1 3 [OP_ADD] 1 3 [OP_ADD] [OP_PERM] 2 2 [OP_PERM] [OP_MUL]
var_a = 1 var_b = 3 var_c = var_a + var_b var_d = 1 var_e = 3 var_f = var_d + var_e var_g = 1 var_c = int(var_c) var_f = int(var_f) for i, elem in enumerate(range(var_f)): var_g = var_g * (var_c-i) var_h = 2 var_i = 2 var_j = 1 var_h = int(var_h) var_i = int(var_i) for i, elem in enumerate(range(var_i)): var_j = var_j * (var_h-i) var_k = var_g * var_j print(int(var_k))
Possibility
Find the number of ways in which one president and one secretary are selected from five different people.
20
5 1 1 [OP_ADD] [OP_PERM]
var_a = 5 var_b = 1 var_c = 1 var_d = var_b + var_c var_e = 1 var_a = int(var_a) var_d = int(var_d) for i, elem in enumerate(range(var_d)): var_e = var_e * (var_a-i) print(int(var_e))
Arithmetic calculation
You want to cut a string that is 60 meters (m) long into 0.6 meters (m) each. How many pieces of string can you cut in total?
100
60 0.6 [OP_FDIV]
var_a = 60 var_b = 0.6 var_c = var_a // var_b print(int(var_c))
Geometry
A rhombus is formed by joining the points that divide each of the four sides of a square into two halves. If the side of a square is 4 centimeters (cm), what is the area of the rhombus in square centimeters (cm2)?
8
4 4 [OP_MUL] 2 [OP_DIV]
var_a = 4 var_b = 4 var_c = var_a * var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Comparison
The shop sells gems A, B, C, and D. A is more expensive than D, and B is more expensive than A. When C is the cheapest, which gem is the most expensive?
B
[OP_LIST_SOL] A B C D [OP_LIST_EOL] [OP_LIST_SOL] A D > B A > C A < C B < C D < [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 = 'A' var_f = 'D' var_g = '>' var_h = 'B' var_i = 'A' var_j = '>' var_k = 'C' var_l = 'A' var_m = '<' var_n = 'C' var_o = 'B' var_p = '<' var_q = 'C' var_r = 'D' var_s = '<' list_b= [] if "/" in str(var_s): var_s = eval(str(var_s)) list_b.append(var_s) if "/" in str(var_r): var_r = eval(str(var_r)) list_b.append(var_r) if "/" in str(var_q): var_q = eval(str(var_q)) list_b.append(var_q) if "/" in str(var_p): var_p = eval(str(var_p)) list_b.append(var_p) if "/" in str(var_o): var_o = eval(str(var_o)) list_b.append(var_o) if "/" in str(var_n): var_n = eval(str(var_n)) list_b.append(var_n) if "/" in str(var_m): var_m = eval(str(var_m)) list_b.append(var_m) if "/" in str(var_l): var_l = eval(str(var_l)) list_b.append(var_l) if "/" in str(var_k): var_k = eval(str(var_k)) list_b.append(var_k) if "/" in str(var_j): var_j = eval(str(var_j)) list_b.append(var_j) if "/" in str(var_i): var_i = eval(str(var_i)) list_b.append(var_i) if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_g): var_g = eval(str(var_g)) list_b.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() global item_name_index_dict items_name_list = list_a.copy() conditions = [] condition_list = list_b.copy() temp_stack = [] for index_, cond_ in enumerate(map(str, condition_list)): if cond_ in ("<", ">", "="): operand_right = temp_stack.pop() operand_left = temp_stack.pop() if cond_ == "=": cond_ = "==" conditions.append(f"{operand_left} {cond_} {operand_right}") else: if not cond_.isdigit(): cond_ = "{" + cond_ + "}" temp_stack.append(cond_) item_name_index_dict = {} for perm in itertools.permutations(range(1, len(items_name_list) + 1)): item_name_index_dict = dict(zip(items_name_list, perm)) formatted_conditions = \ [condition.format_map(item_name_index_dict) for condition in conditions] if all(map(eval, formatted_conditions)): break list_c = list(item_name_index_dict.keys()) list_c.sort(key=item_name_index_dict.get, reverse=True) var_t = 1 var_u = list_c[var_t-1] print(var_u)
Correspondence
31 is the result of subtracting 13 from a number. What is this number when 11 is added?
55
31 13 [OP_ADD] 11 [OP_ADD]
var_a = 31 var_b = 13 var_c = var_a + var_b var_d = 11 var_e = var_c + var_d print(int(var_e))
Possibility
A can contain natural numbers from 1 to 9. If 57×7>65×A, how many numbers can fit in A?
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))
Possibility
Hyejeong wants to replace one product out of the TV, refrigerator, washer, and computer. How many ways are there for Hyejeong to choose one product to replace?
4
[OP_LIST_SOL] TV refrigerator washer computer [OP_LIST_EOL] [OP_LIST_LEN] 1 [OP_COMB]
var_a = 'TV' var_b = 'refrigerator' var_c = 'washer' var_d = 'computer' 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 = 1 var_g = 1 var_e = int(var_e) var_f = int(var_f) for i, elem in enumerate(range(var_f)): var_g = var_g * (var_e-i) for i, elem in enumerate(range(var_f)): var_g = var_g / (i+1) print(int(var_g))
Arithmetic calculation
If you converted $140 to 158760 Korean Won, how much is $1 in Korean Won?
1134
158760 140 [OP_DIV]
var_a = 158760 var_b = 140 var_c = var_a / var_b print(int(var_c))
Possibility
There is a card with three digits where each digit only consists of numbers 2 and 3. How many possible cards are there?
8
[OP_LIST_SOL] 2 3 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] [OP_LIST_LEN]
var_a = 2 var_b = 3 list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 3 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))
Geometry
The rectangular-shaped cell phone is 9 centimeters (cm) wide and 46 centimeters (cm) in circumference. Find the vertical length of the cell phone.
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))
Possibility
There are 6 colored pencils, all of different colors, in the pencil case. If you draw two and lend one to the friend in front and the other to the friend in the back, how many possible situations are there?
30
6 2 [OP_PERM]
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) print(int(var_c))
Comparison
Nine people are standing in a line in order of height from shortest to tallest. Hoseok is the shortest. If the people line up again in order of height from the tallest to the shortest, in what number from the back will Hoseok stand?
1
9 9 [OP_SUB] 1 [OP_ADD]
var_a = 9 var_b = 9 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Correspondence
When 1/A=-3, 2/B=4, 3/C=1/2, find the value of 6A-8B+C
0
6 1 -3 [OP_DIV] [OP_MUL] 8 2 4 [OP_DIV] [OP_MUL] [OP_SUB] 1 3 1/2 [OP_DIV] [OP_MUL] [OP_ADD]
var_a = 6 var_b = 1 var_c = -3 var_d = var_b / var_c var_e = var_a * var_d var_f = 8 var_g = 2 var_h = 4 var_i = var_g / var_h var_j = var_f * var_i var_k = var_e - var_j var_l = 1 var_m = 3 var_n = 0.5 var_o = var_m / var_n var_p = var_l * var_o var_q = var_k + var_p print(int(var_q))
Possibility
How many divisors are there in 28?
6
28 [OP_LIST_GET_DIVISOR] [OP_LIST_LEN]
var_a = 28 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 = len(list_a) print(int(var_b))
Geometry
If you toss 10, 50, and 100-won coins, find the number of ways in which the 10-won coin will come up heads and the 100-won coin will come up tails.
2
2
var_a = 2 print(int(var_a))
Correspondence
Sanghyun bought a soda at a convenience store yesterday. He drank half of the soda he bought yesterday and an additional 2000 milliliters (ml) of soda. Today, he drank half of the remaining soda and additional 2000 milliliters (ml) of soda, and there was no soda left. How many milliliters (ml) of soda did Sanghyun buy yesterday?
12000
0 2000 [OP_ADD] 2 [OP_MUL] 2000 [OP_ADD] 2 [OP_MUL]
var_a = 0 var_b = 2000 var_c = var_a + var_b var_d = 2 var_e = var_c * var_d var_f = 2000 var_g = var_e + var_f var_h = 2 var_i = var_g * var_h print(int(var_i))