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
Taehyung has 22,000 won. With this money, he plans to buy a notebook that costs 1,000 won each and colored pencils that cost 2,000 won each. If he needs to buy 15 notebooks and colored pencils altogether, find out how many colored pencils he has to buy.
7
22000 1000 15 [OP_MUL] [OP_SUB] 2000 1000 [OP_SUB] [OP_DIV]
var_a = 22000 var_b = 1000 var_c = 15 var_d = var_b * var_c var_e = var_a - var_d var_f = 2000 var_g = 1000 var_h = var_f - var_g var_i = var_e / var_h print(int(var_i))
Comparison
There are three following numbers for Yoongi, Jungkook, and Yuna, respectively: 4, 6 plus 3, and 5. Find the person with the largest number.
Jungkook
[OP_LIST_SOL] Yoongi Jungkook Yuna [OP_LIST_EOL] [OP_LIST_SOL] 4 6 3 [OP_ADD] 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)
Geometry
How many circles can you draw if you draw a circle with a radius of 2 centimeters (cm) inside a square with a side length of 8 centimeters (cm) without overlapping?
4
8 2 2 [OP_MUL] [OP_DIV] 2 [OP_POW]
var_a = 8 var_b = 2 var_c = 2 var_d = var_b * var_c var_e = var_a / var_d var_f = 2 var_g = var_e ** var_f print(int(var_g))
Possibility
If you are trying to select 6 horses out of 7 to compete in a horse race, find the number of all possible cases.
7
7 6 [OP_COMB]
var_a = 7 var_b = 6 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))
Geometry
A square was created by arranging 12 coins of the same size vertically and horizontally in a regular pattern. Find the number of marbles on one side.
12
12
var_a = 12 print(int(var_a))
Geometry
Find the volume of a cuboid whose base area is 14 square centimeters (cm2) and its height is 13 centimeters (cm).
182
14 13 [OP_MUL]
var_a = 14 var_b = 13 var_c = var_a * var_b print(int(var_c))
Arithmetic calculation
Woong, Youngsoo, and Hyogeun each had a few marbles. In turn, Woong gave Youngsu 5 marbles, Youngsu gave Hyogeun 10 marbles, and Hyogeun gave Woong 7 marbles, so that all three of them have 20 marbles each. Find the number of marbles Woong had at first.
18
20 7 [OP_SUB] 5 [OP_ADD]
var_a = 20 var_b = 7 var_c = var_a - var_b var_d = 5 var_e = var_c + var_d print(int(var_e))
Possibility
Among the multiples of 123, there are numbers that look like 162ABC6. Among these numbers, find the largest one.
1629996
1620006 1629996 1 [OP_LIST_ARANGE] 123 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX]
var_a = 1620006 var_b = 1629996 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 123 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] print(int(var_f))
Correspondence
You need to subtract 35 from a number, but mistakenly add it, and got 77. Find the result of the correct calculation.
7
77 35 [OP_SUB] 35 [OP_SUB]
var_a = 77 var_b = 35 var_c = var_a - var_b var_d = 35 var_e = var_c - var_d print(int(var_e))
Comparison
Minyoung arrived 33rd in the race, and Eunji arrived 11th after Minyoung arrived. What is Eunji's rank?
44
33 11 [OP_ADD]
var_a = 33 var_b = 11 var_c = var_a + var_b print(int(var_c))
Correspondence
If A is a number equivalent to -5 multiplied by -3, and B a number -2 greater than +2, find the value of A+B.
15
-3 -5 [OP_MUL] 2 -2 [OP_ADD] [OP_ADD]
var_a = -3 var_b = -5 var_c = var_a * var_b var_d = 2 var_e = -2 var_f = var_d + var_e var_g = var_c + var_f print(int(var_g))
Possibility
What is the sum of all the digits of the numbers from 1000 to 2000?
14502
1000 2000 1 [OP_LIST_ARANGE] [OP_LIST_NUM2SUM] [OP_LIST_SUM]
var_a = 1000 var_b = 2000 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] list_b=[] for i in list_a: var_d = 0 i = int(i) while i//10 > 0: var_d = var_d + i%10 i = i//10 var_d = var_d + i%10 list_b.append(var_d) list_b = [float(i) for i in list_b] var_e = sum(list_b) print(int(var_e))
Comparison
The distance from the house to the library is 2+13/40 kilometers (km), and the distance from the house to the bank is 2.56 kilometers (km). Which is farther from home, the library or the bank?
bank
[OP_LIST_SOL] library bank [OP_LIST_EOL] [OP_LIST_SOL] 2 13/40 [OP_ADD] 2.56 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'library' var_b = 'bank' 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 = 0.325 var_e = var_c + var_d var_f = 2.56 list_b= [] if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_b.append(var_e) list_b.reverse() var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[-var_g] var_i = list_b.index(var_h)+1 var_j = list_a[var_i-1] print(var_j)
Geometry
You are trying to find the length of any side of a right triangle. If the hypotenuse has a length of 17 and the non-hypotenuse has a length of 15, what is the length of the other side?
8
17 2 [OP_POW] 15 2 [OP_POW] [OP_SUB] 1/2 [OP_POW]
var_a = 17 var_b = 2 var_c = var_a ** var_b var_d = 15 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))
Arithmetic calculation
Your mother bought some apples. Suppose you ate half of the whole quantity, and 8 apples left. How many apples did the mother buy?
16
8 2 [OP_MUL]
var_a = 8 var_b = 2 var_c = var_a * var_b print(int(var_c))
Comparison
Eunji read 14 fewer pages of children's books today than yesterday, and she read 35 pages yesterday. Hoseok read 12 more pages today than yesterday and read 23 pages yesterday. Who read more pages of children's book yesterday and today combined?
Hoseok
[OP_LIST_SOL] Hoseok Eunji [OP_LIST_EOL] [OP_LIST_SOL] 23 12 [OP_ADD] 23 [OP_ADD] 35 14 [OP_SUB] 35 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Hoseok' 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 = 23 var_d = 12 var_e = var_c + var_d var_f = 23 var_g = var_e + var_f var_h = 35 var_i = 14 var_j = var_h - var_i var_k = 35 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)
Possibility
Seoyoon has 3 indistinguishable purple balls and 2 indistinguishable green balls. How many ways can she arrange these balls when she arranges them in a row?
10
3 2 [OP_ADD] 3 [OP_COMB]
var_a = 3 var_b = 2 var_c = var_a + var_b var_d = 3 var_e = 1 var_c = int(var_c) var_d = int(var_d) for i, elem in enumerate(range(var_d)): var_e = var_e * (var_c-i) for i, elem in enumerate(range(var_d)): var_e = var_e / (i+1) print(int(var_e))
Arithmetic calculation
How many numbers greater than 50 and less than 100 have a remainder of 4 when divided by 8?
6
50 1 [OP_ADD] 100 1 [OP_SUB] 1 [OP_LIST_ARANGE] 8 4 [OP_LIST_DIVIDE_AND_REMAIN] [OP_LIST_LEN]
var_a = 50 var_b = 1 var_c = var_a + var_b var_d = 100 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 = 8 var_i = 4 list_b = [] var_h = int(var_h) var_i = int(var_i) if var_i < 0: var_i = var_i + var_h for i in list_a: i = int(i) if i%var_h == var_i: list_b.append(i) var_j = len(list_b) print(int(var_j))
Geometry
There is a cube with the sum of the lengths of all its edges equal to 144 centimeters (cm). How many centimeters (cm) is the length of one edge of this cube?
12
144 12 [OP_DIV]
var_a = 144 var_b = 12 var_c = var_a / var_b print(int(var_c))
Arithmetic calculation
A few years ago, Seokjin was 7 when his mother was 33 years old. Five years later, what is the age difference between Seokjin's mother and Seokjin's?
26
33 5 [OP_ADD] 7 5 [OP_ADD] [OP_SUB]
var_a = 33 var_b = 5 var_c = var_a + var_b var_d = 7 var_e = 5 var_f = var_d + var_e var_g = var_c - var_f print(int(var_g))
Arithmetic calculation
This year, the age of the father is 6 times the age of the son. After 6 years, the sum of the ages of father and son is 68 years old. How old is the son this year?
8
68 6 2 [OP_MUL] [OP_SUB] 1 6 [OP_ADD] [OP_DIV]
var_a = 68 var_b = 6 var_c = 2 var_d = var_b * var_c var_e = var_a - var_d var_f = 1 var_g = 6 var_h = var_f + var_g var_i = var_e / var_h print(int(var_i))
Arithmetic calculation
A 24.7 centimeters (cm) long candle was lit and 40 minutes later, the length of the candle was measured and it was 17.1 centimeters (cm). How many minutes will it take for the candle to burn all the way down?
130
24.7 24.7 17.1 [OP_SUB] 40 [OP_DIV] [OP_DIV]
var_a = 24.7 var_b = 24.7 var_c = 17.1 var_d = var_b - var_c var_e = 40 var_f = var_d / var_e var_g = var_a / var_f print(int(eval('{:.2f}'.format(round(var_g+1e-10,2)))))
Arithmetic calculation
The three male students in Doyeon's class are 161.5 centimeters (cm), 154.3 centimeters (cm), and 143.7 centimeters (cm) tall, and the four female students are 160.1 centimeters (cm), 158.0 centimeters (cm), 153.5 centimeters (cm) ,147.8 centimeters(cm) tall. Find the height of the shortest student among the 7 students.
143.7
[OP_LIST_SOL] 161.5 154.3 143.7 [OP_LIST_EOL] [OP_LIST_SOL] 160.1 158.0 153.5 147.8 [OP_LIST_EOL] [OP_SET_UNION] 1 [OP_LIST_MIN]
var_a = 161.5 var_b = 154.3 var_c = 143.7 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 = 160.1 var_e = 158 var_f = 153.5 var_g = 147.8 list_b= [] 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() list_c = list(set(list_a) | set(list_b)) var_h = 1 list_d=list_c.copy() list_d.sort() var_i = list_d[var_h-1] print('{:.2f}'.format(round(var_i+1e-10,2)))
Comparison
Following numbers are points that Hwanhee got for his Korean, Mathematics, Social studies, English, and Science: 80, 94, 82, 76, and 100. How many subjects did he score below the average?
3
[OP_LIST_SOL] 80 94 82 76 100 [OP_LIST_EOL] [OP_LIST_MEAN] [OP_LIST_LESS] [OP_LIST_LEN]
var_a = 80 var_b = 94 var_c = 82 var_d = 76 var_e = 100 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() list_a = [float(i) for i in list_a] var_f = sum(list_a)/len(list_a) 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
I bought 7 baskets of sweet potatoes with 16 in each basket. Among them, 13 sprouted and were discarded, and the remaining sweet potatoes will be divided equally into 8 baskets. How many pieces will you put in each basket?
12
16 7 [OP_MUL] 13 [OP_SUB] 8 [OP_FDIV]
var_a = 16 var_b = 7 var_c = var_a * var_b var_d = 13 var_e = var_c - var_d var_f = 8 var_g = var_e // var_f print(int(var_g))
Comparison
There are two pigs. The difference in weight between the two pigs is 72 kilograms (kg), and the sum is 348 kilograms (kg). Find the weight of the fatter pig of the two.
210
72 348 [OP_ADD] 2 [OP_DIV]
var_a = 72 var_b = 348 var_c = var_a + var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Arithmetic calculation
While reading the book, Jungkook checked the number of pages currently open to continue reading tomorrow. If the sum of the two pages is 185, what is the number of the smaller page?
92
185 2 [OP_FDIV]
var_a = 185 var_b = 2 var_c = var_a // var_b print(int(var_c))
Arithmetic calculation
It is said that the balloon, which was 3 meters (m) underground, reached the ground in 4 seconds after it went up into the sky. Assuming that the balloon bursts when it crosses 0.09 km (km) above the ground, and if it goes with the same velocity, how many seconds does the balloon pop after it rises into the sky?
124
0.09 1000 [OP_MUL] 3 [OP_ADD] 3 [OP_DIV] 4 [OP_MUL]
var_a = 0.09 var_b = 1000 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 = 4 var_i = var_g * var_h print(int(var_i))
Arithmetic calculation
A school has 210 first-year students and 473 non-first-year students. How many lines will there be if all students are lined up in line with 100 students in a row? (However, only the line where all 100 students are standing counts.)
6
210 473 [OP_ADD] 100 [OP_FDIV]
var_a = 210 var_b = 473 var_c = var_a + var_b var_d = 100 var_e = var_c // var_d print(int(var_e))
Correspondence
The equation of three-digit number and two-digit number is A82+3B=216. How much is B?
4
A82+3B=216 B [OP_DIGIT_UNK_SOLVER]
var_a = 'A82+3B=216' 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))
Possibility
Hyejeong wants to replace two products among TV, refrigerator, washing-machine, and computer. How many number of cases are there when Hyejeong chooses two products to change?
6
[OP_LIST_SOL] TV refrigerator washing-machine computer [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB]
var_a = 'TV' var_b = 'refrigerator' var_c = 'washing-machine' 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 = 2 var_g = 1 var_e = int(var_e) var_f = int(var_f) for i, elem in enumerate(range(var_f)): var_g = var_g * (var_e-i) for i, elem in enumerate(range(var_f)): var_g = var_g / (i+1) print(int(var_g))
Possibility
The numbers 1 through 9 are used only once to form a nine-digit number. When this number is divisible by 55, find the smallest 9-digit number.
126374985
1 9 1 [OP_LIST_ARANGE] 9 [OP_LIST_GET_PERM] 55 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN]
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 = 9 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 = 55 list_c = [] var_e = int(var_e) for i in list_b: i = int(i) if i % var_e == 0: list_c.append(i) var_f = 1 list_d=list_c.copy() list_d.sort() var_g = list_d[var_f-1] print(int(var_g))
Correspondence
When A is divided by 7, the quotient is B and the remainder is C. In here, A, B, and C are natural numbers. What is the largest possible B number when the quotient and remainder are equal?
6
7 1 [OP_SUB]
var_a = 7 var_b = 1 var_c = var_a - var_b print(int(var_c))
Arithmetic calculation
Jihee's group of 6 students went to the reference room with computers to take a social performance assessment. If there are only 4 computers left in the data room and they decide to use the computers in turn, if the total time taken for the performance evaluation is 3 hours and 12 minutes, find out how many minutes each person used the computer on average.
128
3 60 [OP_MUL] 12 [OP_ADD] 6 [OP_DIV] 4 [OP_MUL]
var_a = 3 var_b = 60 var_c = var_a * var_b var_d = 12 var_e = var_c + var_d var_f = 6 var_g = var_e / var_f var_h = 4 var_i = var_g * var_h print(int(var_i))
Comparison
Lee-seo used 1/2 meter (m) of ribbon tape in art class, and Won-young used 2/3 meter (m) of ribbon tape. Which of the two friends used more ribbon tape?
Won-young
[OP_LIST_SOL] Lee-seo Won-young [OP_LIST_EOL] [OP_LIST_SOL] 1/2 2/3 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Lee-seo' var_b = 'Won-young' 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.5 var_d = 0.6666666666666666 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 1 yellow marble, 1 white marble, 1 red marble, 1 purple marble, 1 green marble and 1 blue marble. How many different ways can there be to pick 2 different marbles?
15
[OP_LIST_SOL] yellow white red purple green blue [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB]
var_a = 'yellow' var_b = 'white' var_c = 'red' var_d = 'purple' var_e = 'green' var_f = 'blue' list_a= [] 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_g = len(list_a) var_h = 2 var_i = 1 var_g = int(var_g) var_h = int(var_h) for i, elem in enumerate(range(var_h)): var_i = var_i * (var_g-i) for i, elem in enumerate(range(var_h)): var_i = var_i / (i+1) print(int(var_i))
Arithmetic calculation
The lengths of the five tapes are 35 centimeters (cm), 29 centimeters (cm), 35.5 centimeters (cm), 36 centimeters (cm), and 30.5 centimeters (cm) respectively. What is the average length of these 5 tapes in centimeters (cm)? Include the decimal point in your answer.
33.2
[OP_LIST_SOL] 35 29 35.5 36 30.5 [OP_LIST_EOL] [OP_LIST_MEAN]
var_a = 35 var_b = 29 var_c = 35.5 var_d = 36 var_e = 30.5 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() list_a = [float(i) for i in list_a] var_f = sum(list_a)/len(list_a) print('{:.2f}'.format(round(var_f+1e-10,2)))
Correspondence
What is 17 divided by 10 and multiplied by 1/100?
0.02
17 10 [OP_DIV] 1/100 [OP_MUL]
var_a = 17 var_b = 10 var_c = var_a / var_b var_d = 0.01 var_e = var_c * var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Comparison
Among the five numbers 1.4, 9/10, 1.2, 0.5, and 13/10, what is the number greater than or equal to 1.1 and the least or equal to it?
1.2
[OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE_EQUAL] 1 [OP_LIST_MIN]
var_a = 1.4 var_b = 0.9 var_c = 1.2 var_d = 0.5 var_e = 1.3 list_a= [] if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_f = 1.1 list_b = [] for i in list_a: if i >= var_f: list_b.append(i) var_g = 1 list_c=list_b.copy() list_c.sort() var_h = list_c[var_g-1] print('{:.2f}'.format(round(var_h+1e-10,2)))
Arithmetic calculation
What is the third largest four-digit number that can be formed by using all four numbers 3, 5, 7, and 2 at least once?
7352
[OP_LIST_SOL] 3 5 7 2 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 3 [OP_LIST_MAX]
var_a = 3 var_b = 5 var_c = 7 var_d = 2 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 = 3 list_c=list_b.copy() list_c.sort() var_g = list_c[-var_f] print(int(var_g))
Geometry
Given a cube with an edge length of 15 centimeters (cm), find the sum of the lengths of all edges of the cube.
180
15 4 3 [OP_MUL] [OP_MUL]
var_a = 15 var_b = 4 var_c = 3 var_d = var_b * var_c var_e = var_a * var_d print(int(var_e))
Possibility
At the clothing store, there are 5 types of hoodies and 4 types of sweatshirts, 3 types of jeans, and 5 types of slacks for pants. Find the number of ways to choose one top and one bottom.
72
5 4 [OP_ADD] 3 5 [OP_ADD] [OP_MUL]
var_a = 5 var_b = 4 var_c = var_a + var_b var_d = 3 var_e = 5 var_f = var_d + var_e var_g = var_c * var_f print(int(var_g))
Geometry
Hyeonjoo stood on the 2nd prize podium with a height of 53 centimeters (cm) and 7 millimeters (mm) and measured his height from the floor, and it was 190 centimeters (cm). She stood on the 1st prize podium and measured his height from the floor, and it was 232 centimeters (cm) and 5 millimeters (mm). Find the height in centimeters (cm) of the first-place podium.
96.2
232 5 10 [OP_DIV] [OP_ADD] 190 [OP_SUB] 53 7 10 [OP_DIV] [OP_ADD] [OP_ADD]
var_a = 232 var_b = 5 var_c = 10 var_d = var_b / var_c var_e = var_a + var_d var_f = 190 var_g = var_e - var_f var_h = 53 var_i = 7 var_j = 10 var_k = var_i / var_j var_l = var_h + var_k var_m = var_g + var_l print('{:.2f}'.format(round(var_m+1e-10,2)))
Possibility
I'm going to hand out 15 pieces of colored paper to Jungkook and Eunji. Jungkook and Eunji will receive at least one piece of colored paper. How many ways are there to distribute the paper?
14
15 2 [OP_SUB] 1 [OP_ADD]
var_a = 15 var_b = 2 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Correspondence
You should have added 3, but mistakenly added 6 to a certain number, and ended up with 8. What number is this?
2
8 6 [OP_SUB]
var_a = 8 var_b = 6 var_c = var_a - var_b print(int(var_c))
Arithmetic calculation
A dozen of pencils means 12 pencils, and it weighs 182.88 grams (g). Write down the process and find how many grams (g) a pencil weighs.
15.24
182.88 12 [OP_DIV]
var_a = 182.88 var_b = 12 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Possibility
If 5 family members, including their parents, stand side by side and try to take a picture, in how many ways will their parents stand at either end?
12
5 2 [OP_SUB] 5 2 [OP_SUB] [OP_PERM] 2 [OP_MUL]
var_a = 5 var_b = 2 var_c = var_a - var_b var_d = 5 var_e = 2 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 = var_g * var_h print(int(var_i))
Possibility
Yuna and Hoseok want to share 8 candies. Find possible ways to divide the candies given that each person gets at least one.
7
8 2 [OP_SUB] 1 [OP_ADD]
var_a = 8 var_b = 2 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
Hoseok solves 4 pages of math workbook every day and has solved a total of 48 pages until today. How many days did Hoseok solve the workbook?
12
48 4 [OP_DIV]
var_a = 48 var_b = 4 var_c = var_a / var_b print(int(var_c))
Possibility
You have 2 chances to pick from a basket. If you pick a fruit from a basket with one apple, one peach, one pear, and one melon in the basket minding the order, how many possible cases are there?
12
[OP_LIST_SOL] apple peach pear melon [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_PERM]
var_a = 'apple' var_b = 'peach' var_c = 'pear' var_d = 'melon' list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = len(list_a) var_f = 2 var_g = 1 var_e = int(var_e) var_f = int(var_f) for i, elem in enumerate(range(var_f)): var_g = var_g * (var_e-i) print(int(var_g))
Arithmetic calculation
The apples in both baskets (a) and (b) are 72 kilograms (kg). If (a) the apples in the basket weigh 42 kilograms (kg), how many kilograms (kg) are the apples in (b) lighter than the apples in the basket (a)?
12
42 72 42 [OP_SUB] [OP_SUB]
var_a = 42 var_b = 72 var_c = 42 var_d = var_b - var_c var_e = var_a - var_d print(int(var_e))
Arithmetic calculation
There are three numbers 10, 11 and 12. What is the product of the largest number and the second smallest number?
132
[OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_MUL]
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 = 1 list_b=list_a.copy() list_b.sort() var_e = list_b[-var_d] var_f = 2 list_c=list_a.copy() list_c.sort() var_g = list_c[var_f-1] var_h = var_e * var_g print(int(var_h))
Correspondence
When 32+A7B=705, where A7B is three-digit number. Find A.
6
32+A7B=705 A [OP_DIGIT_UNK_SOLVER]
var_a = '32+A7B=705' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] print(int(var_c))
Geometry
What is the surface area of a tetrahedron with a side of 7 centimeters (cm)?
84.87
3 1/2 [OP_POW] 7 2 [OP_POW] [OP_MUL]
var_a = 3 var_b = 0.5 var_c = var_a ** var_b var_d = 7 var_e = 2 var_f = var_d ** var_e var_g = var_c * var_f print('{:.2f}'.format(round(var_g+1e-10,2)))
Correspondence
A number plus 2 plus 8 is equal to 3 times that number. Find the number.
5
2 8 [OP_ADD] 3 1 [OP_SUB] [OP_DIV]
var_a = 2 var_b = 8 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
Say that the equation 5A8-B14=364 holds. What number should be in B?
2
5A8-B14=364 B [OP_DIGIT_UNK_SOLVER]
var_a = '5A8-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))
Comparison
The five students, Yoongi, Jungkook, Yuna, Yoojeong, and Taehyung, each have the numbers 7, 6, 9, 8, and 10. Who has the 2nd smallest number?
Yoongi
[OP_LIST_SOL] Yoongi Jungkook Yuna Yoojeong Taehyung [OP_LIST_EOL] [OP_LIST_SOL] 7 6 9 8 10 [OP_LIST_EOL] 2 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Yoongi' var_b = 'Jungkook' var_c = 'Yuna' var_d = 'Yoojeong' var_e = 'Taehyung' 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 = 7 var_g = 6 var_h = 9 var_i = 8 var_j = 10 list_b= [] 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) list_b.reverse() var_k = 2 list_c=list_b.copy() list_c.sort() var_l = list_c[var_k-1] var_m = list_b.index(var_l)+1 var_n = list_a[var_m-1] print(var_n)
Comparison
20 students lined up in a single line. Jungkook is standing in front of Yoongi, and there are 5 students between Yoongi and Jungkook. There are 6 students standing behind Jungkook. How many students are standing in front of Yoongi?
17
20 6 [OP_SUB] 1 [OP_SUB] 5 [OP_ADD] 1 [OP_SUB]
var_a = 20 var_b = 6 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d var_f = 5 var_g = var_e + var_f var_h = 1 var_i = var_g - var_h print(int(var_i))
Arithmetic calculation
Sixteen students stood in a circle with arms spread 10.4 centimeters (cm) apart and overlapping each other by 3.5 centimeters (cm). How many centimeters (cm) is the length of this circle?
110.4
10.4 3.5 [OP_SUB] 16 [OP_MUL]
var_a = 10.4 var_b = 3.5 var_c = var_a - var_b var_d = 16 var_e = var_c * var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Arithmetic calculation
Hyunjoo drinks milk every day. She drank 250 milliliters (ml) per day for 20 days and then 600 milliliters (ml) per day for 13 days. Find how many liters (L) of milk Hyeonjoo drank for 33 days.
12.8
250 20 [OP_MUL] 600 13 [OP_MUL] [OP_ADD] 1000 [OP_DIV]
var_a = 250 var_b = 20 var_c = var_a * var_b var_d = 600 var_e = 13 var_f = var_d * var_e var_g = var_c + var_f var_h = 1000 var_i = var_g / var_h print('{:.2f}'.format(round(var_i+1e-10,2)))
Correspondence
When you multiply a number by 11, you get 103.95. What number is it?
9.45
103.95 11 [OP_DIV]
var_a = 103.95 var_b = 11 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
Seokjin had 32 apples. After eating the same number of apples every day for a week, there are 4 left. How many apples did Seokjin eat a day?
4
32 4 [OP_SUB] 7 [OP_DIV]
var_a = 32 var_b = 4 var_c = var_a - var_b var_d = 7 var_e = var_c / var_d print(int(var_e))
Possibility
What is the largest natural number that can be formed using all 0, 1, and 3 once?
310
[OP_LIST_SOL] 0 1 3 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MAX]
var_a = 0 var_b = 1 var_c = 3 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
A toy car wheel with a diameter of 30 centimeters (cm) has a circumference of 94.2 centimeters (cm). How many times the circumference of a toy car wheel is greater than the diameter?
3.14
94.2 30 [OP_DIV]
var_a = 94.2 var_b = 30 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
Eunji read 18 pages of the thesis on Wednesday, and also read it on Thursday. She read 23 pages of this thesis on Friday, resulting in 60 pages being read for 3 days. How many pages did Eunji read on Thursday?
19
60 18 [OP_SUB] 23 [OP_SUB]
var_a = 60 var_b = 18 var_c = var_a - var_b var_d = 23 var_e = var_c - var_d print(int(var_e))
Geometry
A cuboid with a total volume of 57 cubic centimeters (cm3) is about to be filled with water until it reaches half of its height. If 32 milliliters (ml) of water flow out per minute when you open the faucet, find how many minutes you need to leave the faucet running.
36
576 2 [OP_MUL] 32 [OP_DIV]
var_a = 576 var_b = 2 var_c = var_a * var_b var_d = 32 var_e = var_c / var_d print(int(var_e))
Arithmetic calculation
An additional 460 milliliters (ml) of water was poured into a bucket already containing 2 liters (L) of water. How many milliliters (ml) are there in the bucket?
2460
2 1000 [OP_MUL] 460 [OP_ADD]
var_a = 2 var_b = 1000 var_c = var_a * var_b var_d = 460 var_e = var_c + var_d print(int(var_e))
Comparison
There are 40 boxes of apples, 28 each, and 65 peaches, 15 each. Which is more, apples or peaches?
apples
[OP_LIST_SOL] apples peaches [OP_LIST_EOL] [OP_LIST_SOL] 28 40 [OP_MUL] 15 65 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'apples' var_b = 'peaches' 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 = 28 var_d = 40 var_e = var_c * var_d var_f = 15 var_g = 65 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)
Geometry
If the length of the hypotenuse of a right triangle is 10 and the length of the non-hypotenuse is 6, what is the length of the other side?
8
10 2 [OP_POW] 6 2 [OP_POW] [OP_SUB] 1/2 [OP_POW]
var_a = 10 var_b = 2 var_c = var_a ** var_b var_d = 6 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))
Comparison
There are 28 identical shelves in the warehouse. Each shelf has 6 spaces, and the number of books on each shelf is the same at 19. How many books are there in the warehouse?
3192
28 6 [OP_MUL] 19 [OP_MUL]
var_a = 28 var_b = 6 var_c = var_a * var_b var_d = 19 var_e = var_c * var_d print(int(var_e))
Arithmetic calculation
Starting in March, Yoona decided to donate 20,000 won per month to an international child support organization. How much did Yoona donate until August?
120000
20000 8 3 [OP_SUB] 1 [OP_ADD] [OP_MUL]
var_a = 20000 var_b = 8 var_c = 3 var_d = var_b - var_c var_e = 1 var_f = var_d + var_e var_g = var_a * var_f print(int(var_g))
Arithmetic calculation
Find how many grams (g) of water must be evaporated from 200 grams (g) of 5% sugar water to make it 8% sugar water.
75
200 200 5 100 [OP_DIV] [OP_MUL] 100 8 [OP_DIV] [OP_MUL] [OP_SUB]
var_a = 200 var_b = 200 var_c = 5 var_d = 100 var_e = var_c / var_d var_f = var_b * var_e var_g = 100 var_h = 8 var_i = var_g / var_h var_j = var_f * var_i var_k = var_a - var_j print(int(var_k))
Arithmetic calculation
After receiving water in the water tank for 2 hours and 30 hours, 180 liters (L) were received in the water tank. Find how many liters (L) of water flowed out in 1 hour.
72
180 2 30 60 [OP_DIV] [OP_ADD] [OP_DIV]
var_a = 180 var_b = 2 var_c = 30 var_d = 60 var_e = var_c / var_d var_f = var_b + var_e var_g = var_a / var_f print(int(var_g))
Arithmetic calculation
It is said that it takes 6.12 liters (L) of paint to paint a wall. How many milliliters (ml) are left after painting the 5 walls with 33.5 liters (L) of paint?
2900
33.5 6.12 [OP_MOD] 1000 [OP_MUL]
var_a = 33.5 var_b = 6.12 var_c = var_a % var_b var_d = 1000 var_e = var_c * var_d print(int(eval('{:.2f}'.format(round(var_e+1e-10,2)))))
Comparison
In the multiplication of two-digit numbers, number 3 was mistakenly calculated instead of 5 in the tens place, and the value turned out to be 1485. If the correct answer is 2385, write the larger number among those two-digit numbers.
45
[OP_LIST_SOL] 1485 2385 [OP_SUB] 3 5 [OP_SUB] 10 [OP_MUL] [OP_DIV] 2385 1285 2385 [OP_SUB] 3 5 [OP_SUB] 10 [OP_MUL] [OP_DIV] [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX]
var_a = 1485 var_b = 2385 var_c = var_a - var_b var_d = 3 var_e = 5 var_f = var_d - var_e var_g = 10 var_h = var_f * var_g var_i = var_c / var_h var_j = 2385 var_k = 1285 var_l = 2385 var_m = var_k - var_l var_n = 3 var_o = 5 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() var_u = 1 list_b=list_a.copy() list_b.sort() var_v = list_b[-var_u] print(int(var_v))
Geometry
There is a prism with a nonagon base shape. How many edges does this prism have?
27
9 3 [OP_MUL]
var_a = 9 var_b = 3 var_c = var_a * var_b print(int(var_c))
Geometry
You made a small square as much as possible by arranging the rectangular shape tiles of 3 centimeters (cm) wide and 4 centimeters (cm) long. How many centimeters (cm) is the length of one side of the square?
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))
Correspondence
Soccer teams in the K-League play one game against all other teams in the league in a year. If there are 91 matches in a year, how many soccer teams are there in the K-League?
14
91 2 [OP_MUL] 1/2 [OP_POW] 1 [OP_CEIL]
var_a = 91 var_b = 2 var_c = var_a * var_b var_d = 0.5 var_e = var_c ** var_d var_f = 1 var_g=int(((var_e+9*10**(var_f-2))//(10**(var_f-1)))*10**(var_f-1)) print(int(var_g))
Possibility
There are five different dinosaur dolls. Find the number of possible ways to give one each to two friends.
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))
Arithmetic calculation
Hoseok had 18 flowers. Hoseok gave 5 flowers to Minyoung and 6 to Yoojeong. How many flowers does Hoseok have left?
7
18 5 [OP_SUB] 6 [OP_SUB]
var_a = 18 var_b = 5 var_c = var_a - var_b var_d = 6 var_e = var_c - var_d print(int(var_e))
Possibility
Find the number of odd numbers less than or equal to 300 out of the three-digit natural numbers which are formed by arranging three different digits chosen among 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
72
[OP_LIST_SOL] 0 1 2 3 4 5 6 7 8 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 300 [OP_LIST_LESS_EQUAL] 2 [OP_LIST_DIVISIBLE] [OP_SET_DIFFERENCE] [OP_LIST_LEN]
var_a = 0 var_b = 1 var_c = 2 var_d = 3 var_e = 4 var_f = 5 var_g = 6 var_h = 7 var_i = 8 var_j = 9 list_a= [] if "/" in str(var_j): var_j = eval(str(var_j)) list_a.append(var_j) if "/" in str(var_i): var_i = eval(str(var_i)) list_a.append(var_i) if "/" in str(var_h): var_h = eval(str(var_h)) list_a.append(var_h) 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_k = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_k)) 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_l = 300 list_c = [] for i in list_b: if i <= var_l: list_c.append(i) var_m = 2 list_d = [] var_m = int(var_m) for i in list_c: i = int(i) if i % var_m == 0: list_d.append(i) list_e = list(set(list_c) - set(list_d)) var_n = len(list_e) print(int(var_n))
Arithmetic calculation
There are 13 carnations and 7 tulips in the flower bed. How many more carnations are there than tulips?
6
13 7 [OP_SUB]
var_a = 13 var_b = 7 var_c = var_a - var_b print(int(var_c))
Correspondence
Provided that the equation 32+A7B=705 is true, what number should go in B?
3
32+A7B=705 B [OP_DIGIT_UNK_SOLVER]
var_a = '32+A7B=705' 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
After solving 45 problems, 18 more problems were solved. What is the total number of problems solved?
63
45 18 [OP_ADD]
var_a = 45 var_b = 18 var_c = var_a + var_b print(int(var_c))
Possibility
You are trying to buy 2 fruits by combining apple, peach, pear, and melon. How many possible combinations allow for duplicates?
10
[OP_LIST_SOL] apple peach pear melon [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_ADD] 1 [OP_SUB] 2 [OP_COMB]
var_a = 'apple' var_b = 'peach' var_c = 'pear' var_d = 'melon' list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = len(list_a) var_f = 2 var_g = var_e + var_f var_h = 1 var_i = var_g - var_h var_j = 2 var_k = 1 var_i = int(var_i) var_j = int(var_j) for i, elem in enumerate(range(var_j)): var_k = var_k * (var_i-i) for i, elem in enumerate(range(var_j)): var_k = var_k / (i+1) print(int(var_k))
Correspondence
There are 40 matches and 34 cotton swabs. You are tying matches and cotton swabs together with rubber bands, tying 8 matches together and 12 cotton swabs together, and leaving the rest untied. If you use 2 rubber bands for one bundle, how many rubber bands do you need at least?
14
40 8 [OP_FDIV] 34 12 [OP_FDIV] [OP_ADD] 2 [OP_MUL]
var_a = 40 var_b = 8 var_c = var_a // var_b var_d = 34 var_e = 12 var_f = var_d // var_e var_g = var_c + var_f var_h = 2 var_i = var_g * var_h print(int(var_i))
Geometry
You want to place points on the circumference of a circle with a radius of 50 centimeters (cm) so that they are spaced 7.85 centimeters (cm) apart. How many points can you put together when the pi is 3.14?
40
50 2 [OP_MUL] 3.14 [OP_MUL] 7.85 [OP_FDIV]
var_a = 50 var_b = 2 var_c = var_a * var_b var_d = 3.14 var_e = var_c * var_d var_f = 7.85 var_g = var_e // var_f print(int(var_g))
Arithmetic calculation
My father has 45 chickens, and there are 8 more chickens than ducks. How many chickens and ducks does my father have in total?
82
45 45 8 [OP_SUB] [OP_ADD]
var_a = 45 var_b = 45 var_c = 8 var_d = var_b - var_c var_e = var_a + var_d print(int(var_e))
Arithmetic calculation
Changhee received an average score of 83.1 in ten subjects in the midterm exam this semester, and an average score of 84 in eight subjects in the final exam. What is Changhee's average score this semester?
83.5
10 83.1 [OP_MUL] 8 84 [OP_MUL] [OP_ADD] 10 8 [OP_ADD] [OP_DIV]
var_a = 10 var_b = 83.1 var_c = var_a * var_b var_d = 8 var_e = 84 var_f = var_d * var_e var_g = var_c + var_f var_h = 10 var_i = 8 var_j = var_h + var_i var_k = var_g / var_j print('{:.2f}'.format(round(var_k+1e-10,2)))
Comparison
45 boxes of different sizes are placed in a row in order from largest to smallest. The red box is 29th from the left. If you put them back in a row in order starting from the smallest, how many places from the left should the red box be?
17
45 29 [OP_SUB] 1 [OP_ADD]
var_a = 45 var_b = 29 var_c = var_a - var_b var_d = 1 var_e = var_c + var_d print(int(var_e))
Arithmetic calculation
Adding 8 consecutive even numbers gives 424. Find the largest among the 8 even numbers.
60
424 0 8 1 [OP_SUB] 2 [OP_MUL] 2 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 8 [OP_DIV] 8 1 [OP_SUB] 2 [OP_MUL] [OP_ADD]
var_a = 424 var_b = 0 var_c = 8 var_d = 1 var_e = var_c - var_d var_f = 2 var_g = var_e * var_f var_h = 2 list_a = [i for i in range(var_b, var_g + 1, var_h)] list_a = [float(i) for i in list_a] var_i = sum(list_a) var_j = var_a - var_i var_k = 8 var_l = var_j / var_k var_m = 8 var_n = 1 var_o = var_m - var_n var_p = 2 var_q = var_o * var_p var_r = var_l + var_q print(int(var_r))
Comparison
There is a reading room 4 floors higher than the academy which is on the 7th floor, and there is a bookstore that is 9 floors lower than the reading room. Find the floor where the bookstore is located.
2
7 4 [OP_ADD] 9 [OP_SUB]
var_a = 7 var_b = 4 var_c = var_a + var_b var_d = 9 var_e = var_c - var_d print(int(var_e))
Possibility
A company has 8 team members. What are the number of cases in which one of the members becomes the leader and another member becomes the assistant manager?
56
8 1 1 [OP_ADD] [OP_PERM]
var_a = 8 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))
Correspondence
What number must be in A so that the equation of A45+2B3=418 becomes true?
1
A45+2B3=418 A [OP_DIGIT_UNK_SOLVER]
var_a = 'A45+2B3=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
Junsu read one book in three days. How much did Junsu read in a day?
0.33
1 3 [OP_DIV]
var_a = 1 var_b = 3 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
My mother gave a brother and a younger brother 2800 won and 1500 won respectively. The older brother gave the younger brother some more money, and the younger brother had 360 won less than the older brother. How much money did the older brother give to the younger brother?
470
2800 1500 [OP_SUB] 360 [OP_SUB] 2 [OP_DIV]
var_a = 2800 var_b = 1500 var_c = var_a - var_b var_d = 360 var_e = var_c - var_d var_f = 2 var_g = var_e / var_f print(int(var_g))
Arithmetic calculation
I am going to melt one large iron ball to make several small iron balls. If the length of the radius of the small iron ball is 1/4 of the length of the radius of the large iron ball, how many small iron marbles can be made?
64
1 1/4 3 [OP_POW] [OP_DIV]
var_a = 1 var_b = 0.25 var_c = 3 var_d = var_b ** var_c var_e = var_a / var_d print(int(var_e))
Geometry
A figure has a perimeter of 80 centimeters (cm) and a side length of 16 centimeters (cm), and all sides are the same length. How many sides are there in total?
5
80 16 [OP_DIV]
var_a = 80 var_b = 16 var_c = var_a / var_b print(int(var_c))
Geometry
There are 125 cube-shaped boxes with one edge 2 centimeters (cm) long. When all these boxes are stacked to form a large cube, find the volume of the large cube.
1000
2 3 [OP_POW] 125 [OP_MUL]
var_a = 2 var_b = 3 var_c = var_a ** var_b var_d = 125 var_e = var_c * var_d print(int(var_e))
Geometry
The circumference of an equilateral triangle is said to be four times 21 centimeters (cm). What is the length of one side of this equilateral triangle?
28
21 4 [OP_MUL] 3 [OP_DIV]
var_a = 21 var_b = 4 var_c = var_a * var_b var_d = 3 var_e = var_c / var_d print(int(var_e))