category
stringclasses
5 values
question
stringlengths
20
555
answer
stringlengths
1
20
solution_abst
stringlengths
1
287
solution_code
stringlengths
27
5.97k
Comparison
Among the five numbers 1.4, 9/10, 1.2, 0.5, and 13/10, you picked the number that is smaller than or equal to 1.1. And you arranged them in order of their size. Which number is in the first place?
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)))
Comparison
You are comparing the heights of 20 students. If there are 11 students shorter than Yoongi, how many students are taller than Yoongi?
8
20 11 [OP_SUB] 1 [OP_SUB]
var_a = 20 var_b = 11 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Correspondence
This candle is currently 48 centimeters (cm) long. If it was originally 1.33 times the current length, find the length of the original candle.
63.84
48 1.33 [OP_MUL]
var_a = 48 var_b = 1.33 var_c = var_a * var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
Among the people who came to watch the soccer game, there were 1518 adults, and 536 of them were women. There were 525 more students than adults, 1257 of whom were male. How many women came to watch a soccer game?
1322
1518 525 [OP_ADD] 1257 [OP_SUB] 536 [OP_ADD]
var_a = 1518 var_b = 525 var_c = var_a + var_b var_d = 1257 var_e = var_c - var_d var_f = 536 var_g = var_e + var_f print(int(var_g))
Arithmetic calculation
I bought 3 sets of top and bottom pajama sets and paid 21,000 won. If the top costs 300 won more than the bottom, what is the price of the bottom?
3350
21000 3 [OP_DIV] 300 [OP_SUB] 2 [OP_DIV]
var_a = 21000 var_b = 3 var_c = var_a / var_b var_d = 300 var_e = var_c - var_d var_f = 2 var_g = var_e / var_f print(int(var_g))
Comparison
There are three different numbers A, B, and C. A is 38 greater than 18, and B is A minus 26. If C is equal to the quotient of B divided by 3, which of the three numbers is the smallest?
C
[OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] 18 38 [OP_ADD] 18 38 [OP_ADD] 26 [OP_SUB] 18 38 [OP_ADD] 26 [OP_SUB] 3 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'A' var_b = 'B' var_c = 'C' list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 18 var_e = 38 var_f = var_d + var_e var_g = 18 var_h = 38 var_i = var_g + var_h var_j = 26 var_k = var_i - var_j var_l = 18 var_m = 38 var_n = var_l + var_m var_o = 26 var_p = var_n - var_o var_q = 3 var_r = var_p / var_q list_b= [] if "/" in str(var_r): var_r = eval(str(var_r)) list_b.append(var_r) if "/" in str(var_k): var_k = eval(str(var_k)) list_b.append(var_k) if "/" in str(var_f): var_f = eval(str(var_f)) list_b.append(var_f) list_b.reverse() var_s = 1 list_c=list_b.copy() list_c.sort() var_t = list_c[var_s-1] var_u = list_b.index(var_t)+1 var_v = list_a[var_u-1] print(var_v)
Correspondence
B+B+A=814.8. Multiplying B by 10 equals A. Find the value of A-B including the decimal point.
34.92
814.8 10 10 [OP_ADD] 1 [OP_ADD] [OP_DIV] 814.8 10 10 [OP_ADD] 1 [OP_ADD] [OP_DIV] 10 [OP_DIV] [OP_SUB]
var_a = 814.8 var_b = 10 var_c = 10 var_d = var_b + var_c var_e = 1 var_f = var_d + var_e var_g = var_a / var_f var_h = 814.8 var_i = 10 var_j = 10 var_k = var_i + var_j var_l = 1 var_m = var_k + var_l var_n = var_h / var_m var_o = 10 var_p = var_n / var_o var_q = var_g - var_p print('{:.2f}'.format(round(var_q+1e-10,2)))
Comparison
Jungkook has a card with the number 0.8 on it, Yoongi has 1/2, and Yoojeong has 0.9. How many people have number cards less than 0.3?
0
[OP_LIST_SOL] 0.8 1/2 0.9 [OP_LIST_EOL] 0.3 [OP_LIST_LESS] [OP_LIST_LEN]
var_a = 0.8 var_b = 0.5 var_c = 0.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 = 0.3 list_b = [] for i in list_a: if i < var_d: list_b.append(i) var_e = len(list_b) print(int(var_e))
Arithmetic calculation
How many two-digit numbers are there that are greater than 29 and less than 36?
6
29 1 [OP_ADD] 36 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_LEN]
var_a = 29 var_b = 1 var_c = var_a + var_b var_d = 36 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 = len(list_a) print(int(var_h))
Arithmetic calculation
When the grandpa's age was 71 last year, Jung-min was 8. Find how many times the grandpa's age is Jung-min's age this year.
8
71 1 [OP_ADD] 8 1 [OP_ADD] [OP_DIV]
var_a = 71 var_b = 1 var_c = var_a + var_b var_d = 8 var_e = 1 var_f = var_d + var_e var_g = var_c / var_f print(int(var_g))
Comparison
People are standing in a line at an amusement park. If Eunji is able to ride the ride in 6th place, and there are 7 people behind Eunji, how many people are in line to ride the ride?
13
6 7 [OP_ADD]
var_a = 6 var_b = 7 var_c = var_a + var_b print(int(var_c))
Possibility
Find the difference between the largest three-digit number and the smallest three-digit number made by using the number cards 6, 2, and 5 all once.
650
[OP_LIST_SOL] 6 2 5 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] [OP_LIST_POP] 1 [OP_LIST_MIN] [OP_SUB] [OP_ABS]
var_a = 6 var_b = 2 var_c = 5 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 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 = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] var_g = 1 list_d=list_a.copy() list_d.sort() var_h = list_d[var_g-1] var_i = var_f - var_h var_j = abs(var_i) print(int(var_j))
Possibility
Using 1, 5, 6, and 9 once, find the second smaller three-digit number whose hundreds digit is 5.
519
[OP_LIST_SOL] 1 5 6 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 100 5 [OP_LIST_SEARCH_FIXED_DIGIT] 2 [OP_LIST_MIN]
var_a = 1 var_b = 5 var_c = 6 var_d = 9 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 100 var_g = 5 list_c = [] var_f = int(var_f) var_g = int(var_g) for i in list_b: i = int(i) if (i//var_f)%10 == var_g: list_c.append(i) var_h = 2 list_d=list_c.copy() list_d.sort() var_i = list_d[var_h-1] print(int(var_i))
Correspondence
You subtracted a particular number from 423 and it became 421. Find the number multiplied by 423 plus 421.
1267
421 423 423 421 [OP_SUB] [OP_MUL] [OP_ADD]
var_a = 421 var_b = 423 var_c = 423 var_d = 421 var_e = var_c - var_d var_f = var_b * var_e var_g = var_a + var_f print(int(var_g))
Geometry
Jungkook has 5 red balls, 4 blue balls, and 3 yellow balls. When Yoongi gives Jungkook 1 red ball, how many blue balls does Jungkook have?
4
4
var_a = 4 print(int(var_a))
Arithmetic calculation
Jungkook is trying to put 14/3 liters (l) of milk into several 1/7 liters (l) bottles, and Seokjin is trying to put 15/6 liters (l) of milk into several 1/8 liters (l) bottles. How many bottles can Jungkook and Seokjin fill with milk?
51
14/3 1/7 [OP_DIV] 0 [OP_FLOOR] 15/6 1/8 [OP_DIV] 0 [OP_FLOOR] [OP_ADD]
var_a = 4.666666666666667 var_b = 0.14285714285714285 var_c = var_a / var_b var_d = 0 var_e=int((var_c//(10**(var_d-1)))*10**(var_d-1)) var_f = 2.5 var_g = 0.125 var_h = var_f / var_g var_i = 0 var_j=int((var_h//(10**(var_i-1)))*10**(var_i-1)) var_k = var_e + var_j print(int(var_k))
Arithmetic calculation
There are 156 chocolates in each bag. If you bought 20 bags of these chocolates, find how many chocolates there are in all.
3120
156 20 [OP_MUL]
var_a = 156 var_b = 20 var_c = var_a * var_b print(int(var_c))
Comparison
If there are 2 people in front of Jungkook and 4 people behind Jungkook, and the number of people in each row and column is the same, how many people are there in total?
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))
Correspondence
There are marbles in the bag. Divide these marbles into groups of 3, so that you have 2 left, and divide them into groups of 8, so that you have 5 left. Find the 20th smallest number of possible marbles.
461
0 9999 1 [OP_LIST_ARANGE] 3 2 [OP_LIST_DIVIDE_AND_REMAIN] 8 5 [OP_LIST_DIVIDE_AND_REMAIN] 20 [OP_LIST_MIN]
var_a = 0 var_b = 9999 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 3 var_e = 2 list_b = [] var_d = int(var_d) var_e = int(var_e) if var_e < 0: var_e = var_e + var_d for i in list_a: i = int(i) if i%var_d == var_e: list_b.append(i) var_f = 8 var_g = 5 list_c = [] var_f = int(var_f) var_g = int(var_g) if var_g < 0: var_g = var_g + var_f for i in list_b: i = int(i) if i%var_f == var_g: list_c.append(i) var_h = 20 list_d=list_c.copy() list_d.sort() var_i = list_d[var_h-1] print(int(var_i))
Possibility
Find the largest three-digit number that can be formed by using the numbers 2, 5, and 6 when repetition is allowed.
666
[OP_LIST_SOL] 2 5 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] 1 [OP_LIST_MAX]
var_a = 2 var_b = 5 var_c = 6 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.product(list_b, repeat=var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = 1 list_c=list_b.copy() list_c.sort() var_f = list_c[-var_e] print(int(var_f))
Correspondence
The quotient of 172 divided by this number is equal to the quotient of 172 divided by 4 minus 28. Find the number when the remainder of 172 divided by this number is 7.
11
172 7 [OP_SUB] 172 4 [OP_DIV] 28 [OP_SUB] [OP_DIV]
var_a = 172 var_b = 7 var_c = var_a - var_b var_d = 172 var_e = 4 var_f = var_d / var_e var_g = 28 var_h = var_f - var_g var_i = var_c / var_h print(int(var_i))
Arithmetic calculation
Minji drank 0.26 liters (L) of water in the morning and 0.37 liters (L) in the afternoon. Find how many liters (L) of water Minji drank during the day.
0.63
0.26 0.37 [OP_ADD]
var_a = 0.26 var_b = 0.37 var_c = var_a + var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Correspondence
The six-digit number 14A56A is a multiple of 4 and also a multiple of 3. Find this six-digit number.
144564
14A56A [OP_GEN_POSSIBLE_LIST] 3 [OP_LIST_DIVISIBLE] 4 [OP_LIST_DIVISIBLE] 1 [OP_LIST_GET]
var_a = '14A56A' 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 = 3 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 = 4 list_c = [] var_c = int(var_c) for i in list_b: i = int(i) if i % var_c == 0: list_c.append(i) var_d = 1 var_e = list_c[var_d-1] print(int(var_e))
Arithmetic calculation
It is said that out of 1256 Go stones, there are 408 more white ones than black ones. Find the number of black Go stones.
424
1256 408 [OP_SUB] 2 [OP_DIV]
var_a = 1256 var_b = 408 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d print(int(var_e))
Arithmetic calculation
Jungkook picked 25 persimmons. If 3 times the persimmons that Hoseok picked is 4 less than the number of persimmons that Jungkook picked, how many persimmons did Hoseok pick?
7
25 4 [OP_SUB] 3 [OP_FDIV]
var_a = 25 var_b = 4 var_c = var_a - var_b var_d = 3 var_e = var_c // var_d print(int(var_e))
Correspondence
How many A's from 1 to 9 make A345>5555 true?
4
A345>5555 A [OP_DIGIT_UNK_SOLVER] [OP_LIST_LEN]
var_a = 'A345>5555' 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] = [] 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].append(int(c[i])) list_a = list(set(ans_dict[var_b])) var_c = len(list_a) print(int(var_c))
Arithmetic calculation
There is a ball that bounces 1/10 of the height it is dropped. If this ball is dropped from a height of 15 meters (m), find the height in meters (m) of the third jump round to two decimal places.
0.02
15 1/10 3 [OP_POW] [OP_MUL] 2 [OP_ROUND]
var_a = 15 var_b = 0.1 var_c = 3 var_d = var_b ** var_c var_e = var_a * var_d var_f = 2 var_g = round(float(var_e)+1e-10, var_f) print('{:.2f}'.format(round(var_g+1e-10,2)))
Correspondence
When A82+3B=216 is valid, find A.
1
A82+3B=216 A [OP_DIGIT_UNK_SOLVER]
var_a = 'A82+3B=216' var_b = 'A' ans_dict = dict() var_a = var_a.replace('×','*') var_a = var_a.replace('x','*') var_a = var_a.replace('÷','/') variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']) for v in set(var_a): if v in variable_candi: ans_dict[v] = 1 candi = list(itertools.product('0123456789', repeat=len(ans_dict))) for c in candi: temp = var_a for i, (k, _) in enumerate(ans_dict.items()): temp = temp.replace(k, str(c[i])) term_list = [] op_list = [] temp_c = '' for tc in temp: if tc not in '+-*/=><().': temp_c += tc else: op_list.append(tc) term_list.append(temp_c) temp_c = '' term_list.append(temp_c) new_eq = '' for i in range(len(op_list)): new_eq += str(int(term_list[i]))+op_list[i] new_eq += str(int(term_list[-1])) if len(new_eq) == len(var_a): new_eq=new_eq.replace('=', '==') new_eq=new_eq.replace('>==', '>=') new_eq=new_eq.replace('<==', '<=') eval_result = False try: eval_result = eval(new_eq) except: pass if eval_result: for i, (k, _) in enumerate(ans_dict.items()): ans_dict[k] = int(c[i]) var_c = ans_dict[var_b] print(int(var_c))
Geometry
There is a prism whose base side is a regular triangle with sides of 10 centimeters (cm). If the sum of the lengths of all the edges of this prism is 84 centimeters (cm), what is the height of the prism in centimeters (cm)?
8
84 10 3 [OP_MUL] 2 [OP_MUL] [OP_SUB] 3 [OP_DIV]
var_a = 84 var_b = 10 var_c = 3 var_d = var_b * var_c var_e = 2 var_f = var_d * var_e var_g = var_a - var_f var_h = 3 var_i = var_g / var_h print(int(var_i))
Correspondence
5A8-B14=364. What is A?
7
5A8-B14=364 A [OP_DIGIT_UNK_SOLVER]
var_a = '5A8-B14=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))
Comparison
Which shape has the greater area: a square with a side of 4 centimeters (cm) or a triangle with a base of 6 centimeters (cm) and a height of 4 centimeters (cm)?
square
[OP_LIST_SOL] square triangle [OP_LIST_EOL] [OP_LIST_SOL] 4 2 [OP_POW] 6 4 [OP_MUL] 2 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'square' var_b = 'triangle' 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 = 4 var_d = 2 var_e = var_c ** var_d var_f = 6 var_g = 4 var_h = var_f * var_g var_i = 2 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_e): var_e = eval(str(var_e)) list_b.append(var_e) 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)
Geometry
If the width of a rectangular desk is 9 centimeters (cm) and the perimeter is 46 centimeters (cm), what is the length of the desk?
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))
Geometry
The width of the monitor is 12 centimeters (cm) and the circumference is 38 centimeters (cm). Find the height of the monitor.
7
38 2 [OP_DIV] 12 [OP_SUB]
var_a = 38 var_b = 2 var_c = var_a / var_b var_d = 12 var_e = var_c - var_d print(int(var_e))
Correspondence
Yoongi tried to add a three-digit number to 57. Yoongi misread the 9 in the ones in the three-digit number as 6. When the sum obtained by Yoongi was 823, find the correct calculation result.
826
823 57 [OP_SUB] 6 9 [OP_SUB] [OP_SUB] 57 [OP_ADD]
var_a = 823 var_b = 57 var_c = var_a - var_b var_d = 6 var_e = 9 var_f = var_d - var_e var_g = var_c - var_f var_h = 57 var_i = var_g + var_h print(int(var_i))
Arithmetic calculation
Juwon has 105.8 meters (m) of wire. If he needs 4 meters (m) of wire to make one mobile, find how many meters (m) of wire are left after making as many mobiles as Juwon can make.
1.8
105.8 4 [OP_MOD]
var_a = 105.8 var_b = 4 var_c = var_a % var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Arithmetic calculation
There were 4 carrots and a few cucumbers in a total of 10. Today your mother bought 2 more cucumbers. How many cucumbers are there now?
8
10 4 [OP_SUB] 2 [OP_ADD]
var_a = 10 var_b = 4 var_c = var_a - var_b var_d = 2 var_e = var_c + var_d print(int(var_e))
Geometry
Three of the quadrilateral's four angles measure 75 degrees (angle), 80 degrees (angle), and 120 degrees (angle), respectively. What degree (angle) is the other angle of this rectangle?
85
360 75 [OP_SUB] 80 [OP_SUB] 120 [OP_SUB]
var_a = 360 var_b = 75 var_c = var_a - var_b var_d = 80 var_e = var_c - var_d var_f = 120 var_g = var_e - var_f print(int(var_g))
Arithmetic calculation
In Seokjin's class, 37 students submitted math homework and 42 Korean language homework. If the total number of students is 48 and no student has missed both homework assignments, how many students have completed both homework assignments?
31
37 42 [OP_ADD] 48 [OP_SUB]
var_a = 37 var_b = 42 var_c = var_a + var_b var_d = 48 var_e = var_c - var_d print(int(var_e))
Possibility
There are number-shaped sweets. If there are three in the shape of 3, 0 and 6, you want to put two dalgonas in a row to make it look like a two-digit number. How many can you make in total?
4
[OP_LIST_SOL] 3 0 6 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN]
var_a = 3 var_b = 0 var_c = 6 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 2 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_e = len(list_b) print(int(var_e))
Geometry
There is a pyramid that has 15 faces and whose edges are all the same as 9 centimeters (cm). What is the sum of the lengths of the edges of this pyramid in centimeters (cm)?
126
15 1 [OP_SUB] 9 [OP_MUL]
var_a = 15 var_b = 1 var_c = var_a - var_b var_d = 9 var_e = var_c * var_d print(int(var_e))
Geometry
I am trying to make a cube as small as possible by stacking cuboid-shaped boxes that are 8 centimeters (cm) wide, 12 centimeters (cm) long, and 30 centimeters (cm) high in a certain direction. Find the number of boxes needed at this time.
600
8 12 [OP_LCM] 30 [OP_LCM] 8 [OP_DIV] 8 12 [OP_LCM] 30 [OP_LCM] 12 [OP_DIV] 8 12 [OP_LCM] 30 [OP_LCM] 30 [OP_DIV] [OP_MUL] [OP_MUL]
var_a = 8 var_b = 12 var_c = var_b * var_a / math.gcd(int(var_b), int(var_a)) var_d = 30 var_e = var_d * var_c / math.gcd(int(var_d), int(var_c)) var_f = 8 var_g = var_e / var_f var_h = 8 var_i = 12 var_j = var_i * var_h / math.gcd(int(var_i), int(var_h)) var_k = 30 var_l = var_k * var_j / math.gcd(int(var_k), int(var_j)) var_m = 12 var_n = var_l / var_m var_o = 8 var_p = 12 var_q = var_p * var_o / math.gcd(int(var_p), int(var_o)) var_r = 30 var_s = var_r * var_q / math.gcd(int(var_r), int(var_q)) var_t = 30 var_u = var_s / var_t var_v = var_n * var_u var_w = var_g * var_v print(int(var_w))
Comparison
Car A is traveling at 92 kilometers (km) per hour and car B is traveling at 1500 meters (m) per minute. Which car, A or B, is faster?
A
[OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 92 1500 1000 [OP_DIV] 60 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'A' var_b = 'B' 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 = 92 var_d = 1500 var_e = 1000 var_f = var_d / var_e var_g = 60 var_h = var_f * var_g list_b= [] if "/" in str(var_h): var_h = eval(str(var_h)) list_b.append(var_h) if "/" in str(var_c): var_c = eval(str(var_c)) list_b.append(var_c) list_b.reverse() var_i = 1 list_c=list_b.copy() list_c.sort() var_j = list_c[-var_i] var_k = list_b.index(var_j)+1 var_l = list_a[var_k-1] print(var_l)
Comparison
Jungkook has 0.8 written on a card, and Yoongi has 1/2 written on a card. How many people have number that is greater than 0.3 written on their cards?
2
[OP_LIST_SOL] 0.8 1/2 [OP_LIST_EOL] 0.3 [OP_LIST_MORE] [OP_LIST_LEN]
var_a = 0.8 var_b = 0.5 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.3 list_b = [] for i in list_a: if i > var_c: list_b.append(i) var_d = len(list_b) print(int(var_d))
Geometry
What is the sum of the lengths of all the sides of a regular octagon with a side length of 2.3 centimeters (cm), in meters (m)?
1840
2.3 100 [OP_DIV] 8 [OP_MUL]
var_a = 2.3 var_b = 100 var_c = var_a / var_b var_d = 8 var_e = var_c * var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Possibility
We are going to use four number cards of 0, 1, 4, and 8 once to make the 6th smallest of four-digit numbers which have 8 in the thousands. Then we are going to sum up all the numbers in each digit.
13
[OP_LIST_SOL] 0 1 4 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 8 [OP_LIST_SEARCH_FIXED_DIGIT] 2 [OP_LIST_MIN] [OP_NUM2LIST] [OP_LIST_SUM]
var_a = 0 var_b = 1 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 = 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 = 1 var_g = 8 list_c = [] var_f = int(var_f) var_g = int(var_g) for i in list_b: i = int(i) if (i//var_f)%10 == var_g: list_c.append(i) var_h = 2 list_d=list_c.copy() list_d.sort() var_i = list_d[var_h-1] list_e = [] var_i = int(var_i) while var_i//10 > 0: list_e.append(var_i%10) var_i = var_i//10 list_e.append(var_i%10) list_e = list_e[::-1] list_e = [float(i) for i in list_e] var_j = sum(list_e) print(int(var_j))
Geometry
You are going to cut a rectangular wooden board that is 24 centimeters (cm) wide by 18 centimeters (cm) long, without any remaining, to make several pieces of the largest square wooden piece of the same size. How many wooden pieces can you make in all?
12
24 24 18 [OP_GCD] [OP_FDIV] 18 24 18 [OP_GCD] [OP_FDIV] [OP_MUL]
var_a = 24 var_b = 24 var_c = 18 var_d = math.gcd(int(var_c), int(var_b)) var_e = var_a // var_d var_f = 18 var_g = 24 var_h = 18 var_i = math.gcd(int(var_h), int(var_g)) var_j = var_f // var_i var_k = var_e * var_j print(int(var_k))
Correspondence
You handed out 170 pencils, 268 notebooks, and 120 erasers to each of the students on the playground equally. There were 8 pencils left, 2 notebooks short, and 12 erasers left. What is the maximum number of students that were on the playground?
54
170 8 [OP_SUB] 268 2 [OP_ADD] [OP_GCD] 120 12 [OP_SUB] [OP_GCD]
var_a = 170 var_b = 8 var_c = var_a - var_b var_d = 268 var_e = 2 var_f = var_d + var_e var_g = math.gcd(int(var_f), int(var_c)) var_h = 120 var_i = 12 var_j = var_h - var_i var_k = math.gcd(int(var_j), int(var_g)) print(int(var_k))
Possibility
Try to make a three-digit number by using 2, 4, 7, and 9 once. What is the third least three-digit number with 7 in the tens place?
472
[OP_LIST_SOL] 2 4 7 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 10 7 [OP_LIST_SEARCH_FIXED_DIGIT] 3 [OP_LIST_MIN]
var_a = 2 var_b = 4 var_c = 7 var_d = 9 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 10 var_g = 7 list_c = [] var_f = int(var_f) var_g = int(var_g) for i in list_b: i = int(i) if (i//var_f)%10 == var_g: list_c.append(i) var_h = 3 list_d=list_c.copy() list_d.sort() var_i = list_d[var_h-1] print(int(var_i))
Comparison
Which of the five numbers 1.4, 9/10, 1.2, 0.5, and 13/10 is the largest number less than 1.1?
0.9
[OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_LESS] 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)))
Correspondence
When 14A+B73=418, what number should go in B?
2
14A+B73=418 B [OP_DIGIT_UNK_SOLVER]
var_a = '14A+B73=418' 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
Hoseok bought the same number of marbles at 80 won each with the money he could buy for several marbles at 100 won each, and he had 260 won left. How many marbles did Hoseok buy?
13
260 100 80 [OP_SUB] [OP_DIV]
var_a = 260 var_b = 100 var_c = 80 var_d = var_b - var_c var_e = var_a / var_d print(int(var_e))
Arithmetic calculation
Find the largest number other than 15 among the divisors of 15.
5
15 [OP_LIST_GET_DIVISOR] 2 [OP_LIST_MAX]
var_a = 15 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 = 2 list_b=list_a.copy() list_b.sort() var_c = list_b[-var_b] print(int(var_c))
Comparison
Jaeho and Kyunghwan took a walk at the same time. Jaeho walked one hundredth of 10.2 kilometers (km), and Kyunghwan walked 100 meters (m). Who walked more?
Jaeho
[OP_LIST_SOL] Jaeho Kyunghwan [OP_LIST_EOL] [OP_LIST_SOL] 10.2 1000 [OP_MUL] 100 [OP_DIV] 100 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Jaeho' var_b = 'Kyunghwan' 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 = 10.2 var_d = 1000 var_e = var_c * var_d var_f = 100 var_g = var_e / var_f var_h = 100 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)
Arithmetic calculation
I am going to make a 50.5 centimeters (cm) bridge by overlapping three 18 centimeters (cm) wooden blocks in the same length and then joining them together. How many centimeters (cm) should each overlapping section be?
1.75
18 3 [OP_MUL] 50.5 [OP_SUB] 3 1 [OP_SUB] [OP_DIV]
var_a = 18 var_b = 3 var_c = var_a * var_b var_d = 50.5 var_e = var_c - var_d var_f = 3 var_g = 1 var_h = var_f - var_g var_i = var_e / var_h print('{:.2f}'.format(round(var_i+1e-10,2)))
Correspondence
Rounding the three-digit number 8A2 to the nearest hundred gives 800. Find the sum of the numbers from 0 to 9 that can be A.
35
[OP_LIST_SOL] 8 A 2 [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 850 [OP_LIST_MORE_EQUAL] 8A2 A [OP_LIST_FIND_UNK] [OP_LIST_SUM]
var_a = 8 var_b = 'A' 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="" for i in list_a: i = str(i) var_d = var_d + i ans_dict = dict() var_d = str(var_d) list_b = [] 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] = 0 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])) if len(var_d) == len(str(int(temp))): new_elem = int(temp) list_b.append(new_elem) var_e = 850 list_c = [] for i in list_b: if i >= var_e: list_c.append(i) var_f = '8A2' var_g = 'A' var_f = str(var_f) var_g = str(var_g) unk_idx = var_f.index(var_g) list_d = [] for elem in list_c: elem = str(elem) list_d.append(int(elem[unk_idx])) list_d = list(set(list_d)) list_d = [float(i) for i in list_d] var_h = sum(list_d) print(int(var_h))
Correspondence
You are trying to write natural numbers from 1 to 100. How many times should the number 1 be written in all?
21
1 100 1 [OP_LIST_ARANGE] [OP_LIST2NUM] [OP_NUM2LIST] 1 [OP_LIST_FIND_NUM]
var_a = 1 var_b = 100 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))
Geometry
A cube with a side length of 1 meter (m) was cut 3 times each along the horizontal, vertical, and height directions, resulting in 64 small cuboids. What is the sum of the surface areas in square meters (m2) of these small cuboids?
24
1 4 [OP_DIV] 1 4 [OP_DIV] [OP_MUL] 6 [OP_MUL] 64 [OP_MUL]
var_a = 1 var_b = 4 var_c = var_a / var_b var_d = 1 var_e = 4 var_f = var_d / var_e var_g = var_c * var_f var_h = 6 var_i = var_g * var_h var_j = 64 var_k = var_i * var_j print(int(var_k))
Geometry
Cube is a cube-shaped toy made up of 27 small cubes. If the length of all the edges of the cube is 82.8 centimeters (cm), what is the sum of one edge of the large cube and one edge of the small cube that make up the cube in centimeters (cm)?
9.2
82.8 4 3 [OP_MUL] [OP_DIV] 82.8 4 3 [OP_MUL] [OP_DIV] 1 2 3 [OP_DIV] [OP_SUB] [OP_MUL] [OP_ADD]
var_a = 82.8 var_b = 4 var_c = 3 var_d = var_b * var_c var_e = var_a / var_d var_f = 82.8 var_g = 4 var_h = 3 var_i = var_g * var_h var_j = var_f / var_i var_k = 1 var_l = 2 var_m = 3 var_n = var_l / var_m var_o = var_k - var_n var_p = var_j * var_o var_q = var_e + var_p print('{:.2f}'.format(round(var_q+1e-10,2)))
Possibility
What is the third largest number with the ones digit of 2 using 3 of 4, 8, 1, and 2?
482
[OP_LIST_SOL] 4 8 1 2 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 2 [OP_LIST_SEARCH_FIXED_DIGIT] 3 [OP_LIST_MAX]
var_a = 4 var_b = 8 var_c = 1 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 = 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 = 1 var_g = 2 list_c = [] var_f = int(var_f) var_g = int(var_g) for i in list_b: i = int(i) if (i//var_f)%10 == var_g: list_c.append(i) var_h = 3 list_d=list_c.copy() list_d.sort() var_i = list_d[-var_h] print(int(var_i))
Correspondence
A and B are different natural numbers. When A is divided by 17, the quotient is 25 and the remainder is B. Find A when B is the largest number possible.
441
17 25 [OP_MUL] 16 [OP_ADD]
var_a = 17 var_b = 25 var_c = var_a * var_b var_d = 16 var_e = var_c + var_d print(int(var_e))
Comparison
Nine students stand in a line. How many students are standing between the 3rd from the left and the 7th from the left?
3
7 3 [OP_SUB] 1 [OP_SUB]
var_a = 7 var_b = 3 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Arithmetic calculation
The four-digit natural number 5AB0 is divisible by 4 and 5. How many combinations of A and B are possible?
50
5AB0 [OP_GEN_POSSIBLE_LIST] 4 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = '5AB0' 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 = 4 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 = 5 list_c = [] var_c = int(var_c) for i in list_b: i = int(i) if i % var_c == 0: list_c.append(i) var_d = len(list_c) print(int(var_d))
Correspondence
Yoongi wants to subtract a two-digit number from a three-digit number. Yoongi has mistaken the unit digit of the two-digit 9 for 6 and changed the three-digit hundreds and ones to make the number 253. If Yoongi's difference is 299, find the two-digit number.
43
253 299 [OP_SUB] 6 9 [OP_SUB] [OP_SUB]
var_a = 253 var_b = 299 var_c = var_a - var_b var_d = 6 var_e = 9 var_f = var_d - var_e var_g = var_c - var_f print(int(var_g))
Geometry
A square has been made by arranging several rectangular pieces of colored paper of the same size so that there are 8 pieces on each side. If you place more pieces around the perimeter of this square, how many more pieces will you need?
36
8 4 [OP_MUL] 4 [OP_ADD]
var_a = 8 var_b = 4 var_c = var_a * var_b var_d = 4 var_e = var_c + var_d print(int(var_e))
Possibility
The buttons 7, 6, 2, 0 are colored on the calculator. Find the sum of the third largest three-digit number and the third smallest three-digit number that can be made by using only the number of the colored button once.
986
[OP_LIST_SOL] 7 6 2 0 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 3 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_ADD]
var_a = 7 var_b = 6 var_c = 2 var_d = 0 list_a= [] if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_e = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.permutations(list_b, var_e)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] var_f = 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))
Comparison
There are two numbers A and B. A is the number of 50 plus 7, and B is the number of 6 groups of 10 minus 7. Which number is greater?
A
[OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 50 7 [OP_ADD] 10 6 [OP_MUL] 7 [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'A' var_b = 'B' 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 = 50 var_d = 7 var_e = var_c + var_d var_f = 10 var_g = 6 var_h = var_f * var_g var_i = 7 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_e): var_e = eval(str(var_e)) list_b.append(var_e) 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
I made an ade with 3 and 2/6 spoons of blueberry syrup and 21/6 spoons of grapefruit syrup. Find the answer with more blueberry syrup or grapefruit syrup.
grapefruit
[OP_LIST_SOL] blueberry grapefruit [OP_LIST_EOL] [OP_LIST_SOL] 3 2/6 [OP_ADD] 21/6 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'blueberry' var_b = 'grapefruit' list_a= [] if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_c = 3 var_d = 0.3333333333333333 var_e = var_c + var_d var_f = 3.5 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)
Arithmetic calculation
A box with 6 billiard balls of equal weight weighs 1.82 kilograms (kg). Find the weight in kilograms (kg) of one billiard ball if the empty box weighs 0.5 kilograms (kg).
0.22
1.82 0.5 [OP_SUB] 6 [OP_DIV]
var_a = 1.82 var_b = 0.5 var_c = var_a - var_b var_d = 6 var_e = var_c / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Possibility
Three of the six numbers 0, 1, 2, 3, 4, 5, and 8 have been chosen to form a three-digit number. If you can use the same number more than once, what is the sum of all the possible numbers?
123326
[OP_LIST_SOL] 0 1 2 3 4 5 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] [OP_LIST_SUM]
var_a = 0 var_b = 1 var_c = 2 var_d = 3 var_e = 4 var_f = 5 var_g = 8 list_a= [] if "/" in str(var_g): var_g = eval(str(var_g)) list_a.append(var_g) if "/" in str(var_f): var_f = eval(str(var_f)) list_a.append(var_f) if "/" in str(var_e): var_e = eval(str(var_e)) list_a.append(var_e) if "/" in str(var_d): var_d = eval(str(var_d)) list_a.append(var_d) if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_h = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.product(list_b, repeat=var_h)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] list_b = [float(i) for i in list_b] var_i = sum(list_b) print(int(var_i))
Correspondence
Rounding off 34A5 to the tens place gives 3420. Find the value of A.
2
34A5 [OP_GEN_POSSIBLE_LIST] 3420 [OP_LIST_MORE_EQUAL] 3420 10 [OP_ADD] [OP_LIST_LESS] 34A5 A [OP_LIST_FIND_UNK]
var_a = '34A5' 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 = 3420 list_b = [] for i in list_a: if i >= var_b: list_b.append(i) var_c = 3420 var_d = 10 var_e = var_c + var_d list_c = [] for i in list_b: if i < var_e: list_c.append(i) var_f = '34A5' var_g = 'A' var_f = str(var_f) var_g = str(var_g) unk_idx = var_f.index(var_g) var_h = 0 for elem in list_c: elem = str(elem) var_h = int(elem[unk_idx]) print(int(var_h))
Arithmetic calculation
You bought 5 erasers for 200 won and 7 pencils for 800 won at a stationery store. Four of your friends are willing to pay the same amount. Find out how much you will have to pay per friend.
1650
200 5 [OP_MUL] 800 7 [OP_MUL] [OP_ADD] 4 [OP_DIV]
var_a = 200 var_b = 5 var_c = var_a * var_b var_d = 800 var_e = 7 var_f = var_d * var_e var_g = var_c + var_f var_h = 4 var_i = var_g / var_h print(int(var_i))
Correspondence
I have to add 95 to a number, but I accidentally added 65 to a number, and it became 125. Find the correct result.
155
125 65 [OP_SUB] 95 [OP_ADD]
var_a = 125 var_b = 65 var_c = var_a - var_b var_d = 95 var_e = var_c + var_d print(int(var_e))
Geometry
A cuboid has a square base and a perimeter of 32 centimeters (cm). If the height of a cuboid is 9 centimeters (cm), how many cubic centimeters (cm3) is its volume?
576
32 4 [OP_DIV] 2 [OP_POW] 9 [OP_MUL]
var_a = 32 var_b = 4 var_c = var_a / var_b var_d = 2 var_e = var_c ** var_d var_f = 9 var_g = var_e * var_f print(int(var_g))
Arithmetic calculation
How many three-digit numbers are both multiples of 4 and multiples of 5?
45
100 999 1 [OP_LIST_ARANGE] 4 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] [OP_LIST_LEN]
var_a = 100 var_b = 999 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 4 list_b = [] var_d = int(var_d) for i in list_a: i = int(i) if i % var_d == 0: list_b.append(i) var_e = 5 list_c = [] var_e = int(var_e) for i in list_b: i = int(i) if i % var_e == 0: list_c.append(i) var_f = len(list_c) print(int(var_f))
Geometry
There is a fishbowl in the shape of a rectangular cuboid. This fishbowl is 16 centimeters (cm) wide, 14 centimeters (cm) long, and 9 centimeters (cm) high. The water was 4 centimeters (cm) high in this bowl. When a stone was placed in this bowl, the water level rose to 9 centimeters (cm). Find the volume of the stone.
1120
16 14 [OP_MUL] 9 4 [OP_SUB] [OP_MUL]
var_a = 16 var_b = 14 var_c = var_a * var_b var_d = 9 var_e = 4 var_f = var_d - var_e var_g = var_c * var_f print(int(var_g))
Arithmetic calculation
The average length of the 11 sticks is 145.7 centimeters (cm). But if the average of the lengths of two of them is 142.1 centimeters (cm), find the average of the lengths of the remaining bars.
146.5
145.7 11 [OP_MUL] 142.1 2 [OP_MUL] [OP_SUB] 11 2 [OP_SUB] [OP_DIV]
var_a = 145.7 var_b = 11 var_c = var_a * var_b var_d = 142.1 var_e = 2 var_f = var_d * var_e var_g = var_c - var_f var_h = 11 var_i = 2 var_j = var_h - var_i var_k = var_g / var_j print('{:.2f}'.format(round(var_k+1e-10,2)))
Comparison
There were 20 tangerines in each of five different baskets. After a few days, you noticed that some of the tangerines were rotten, so when you removed the rotten tangerines, the number of tangerines in the basket became 10, 18, 17, 13, and 16, respectively. If you move the tangerines from the basket containing 13 or less to a new basket, how many tangerines will be in the new basket?
23
[OP_LIST_SOL] 10 18 17 13 16 [OP_LIST_EOL] 13 [OP_LIST_LESS_EQUAL] [OP_LIST_SUM]
var_a = 10 var_b = 18 var_c = 17 var_d = 13 var_e = 16 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 = 13 list_b = [] for i in list_a: if i <= var_f: list_b.append(i) list_b = [float(i) for i in list_b] var_g = sum(list_b) print(int(var_g))
Geometry
Find the perimeter of the largest square that can be made by arranging as many squares with sides of 7 centimeters (cm) as possible without overlapping.
168
36 0.5 [OP_POW] 7 [OP_MUL] 4 [OP_MUL]
var_a = 36 var_b = 0.5 var_c = var_a ** var_b var_d = 7 var_e = var_c * var_d var_f = 4 var_g = var_e * var_f print(int(var_g))
Arithmetic calculation
There were 7 numbers with an average of 7, and when you changed one of them to 9, the average was 8. What was the original number before changing?
2
7 7 [OP_MUL] 7 8 [OP_MUL] 9 [OP_SUB] [OP_SUB]
var_a = 7 var_b = 7 var_c = var_a * var_b var_d = 7 var_e = 8 var_f = var_d * var_e var_g = 9 var_h = var_f - var_g var_i = var_c - var_h print(int(var_i))
Geometry
Find how long it would take to drive a road that is 28/3 kilometers (km) at 14/5 kilometers (km) per hour.
3.33
28/3 14/5 [OP_DIV]
var_a = 9.333333333333334 var_b = 2.8 var_c = var_a / var_b print('{:.2f}'.format(round(var_c+1e-10,2)))
Comparison
Hohyun has 32 yellow marbles and Miran has 34 blue marbles. If Seulgi has 23 red marbles, who has more marbles, Seulgi or Hohyun?
Hohyun
[OP_LIST_SOL] Seulgi Hohyun [OP_LIST_EOL] [OP_LIST_SOL] 23 32 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET]
var_a = 'Seulgi' var_b = 'Hohyun' 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 = 32 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
What is the smallest five-digit number divisible by the numbers 2, 3, 8, and 9?
10008
10000 99999 1 [OP_LIST_ARANGE] 2 [OP_LIST_DIVISIBLE] 3 [OP_LIST_DIVISIBLE] 8 [OP_LIST_DIVISIBLE] 9 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN]
var_a = 10000 var_b = 99999 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 2 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 = 3 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 = 8 list_d = [] var_f = int(var_f) for i in list_c: i = int(i) if i % var_f == 0: list_d.append(i) var_g = 9 list_e = [] var_g = int(var_g) for i in list_d: i = int(i) if i % var_g == 0: list_e.append(i) var_h = 1 list_f=list_e.copy() list_f.sort() var_i = list_f[var_h-1] print(int(var_i))
Correspondence
You are going to divide 20 by a certain number. If you mistakenly divide 10 by the number, the result is 2. What is the correct calculation result?
4
20 10 2 [OP_DIV] [OP_DIV]
var_a = 20 var_b = 10 var_c = 2 var_d = var_b / var_c var_e = var_a / var_d print(int(var_e))
Correspondence
A is 14 and B is 24. If we add A to a particular number and multiply it by A, then subtract B, then divide it by B, we get 13. Find that particular number.
10
13 24 [OP_MUL] 24 [OP_ADD] 14 [OP_DIV] 14 [OP_SUB]
var_a = 13 var_b = 24 var_c = var_a * var_b var_d = 24 var_e = var_c + var_d var_f = 14 var_g = var_e / var_f var_h = 14 var_i = var_g - var_h print(int(var_i))
Arithmetic calculation
How many odd numbers are less than 10?
5
1 10 [OP_LIST_ODD] [OP_LIST_LEN]
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) var_c = len(list_a) print(int(var_c))
Arithmetic calculation
Ryeowoon and Miyeon shared 85 sheets of colored paper. Ryeowoon decided not to have pink-colored paper, and there were 11 sheets of pink-colored paper. Colored paper in every other color was in even numbers to be shared equally by two friends. How many sheets of colored paper did Miyeon get?
48
85 11 [OP_SUB] 2 [OP_DIV] 11 [OP_ADD]
var_a = 85 var_b = 11 var_c = var_a - var_b var_d = 2 var_e = var_c / var_d var_f = 11 var_g = var_e + var_f print(int(var_g))
Comparison
Yuna, Eunji, and Minyoung are playing rock-paper-scissors game. Eunji lost to Minyoung and Yuna defeated Minyoung. Who's in last place?
Eunji
[OP_LIST_SOL] Yuna Eunji Minyoung [OP_LIST_EOL] [OP_LIST_SOL] Yuna Minyoung > Eunji Minyoung < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET]
var_a = 'Yuna' var_b = 'Eunji' var_c = 'Minyoung' 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 = 'Yuna' var_e = 'Minyoung' var_f = '>' var_g = 'Eunji' var_h = 'Minyoung' 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)
Geometry
How many faces are perpendicular to any one face of a cube?
4
4
var_a = 4 print(int(var_a))
Correspondence
There is a relay race that covers 115.15 kilometers (km). The total distance of the race is divided into 7 sections, and 7 people are divided into each group to run each section. If every participants run the same distance, how long does each participant covers?
2.35
115.15 7 [OP_DIV] 7 [OP_DIV]
var_a = 115.15 var_b = 7 var_c = var_a / var_b var_d = 7 var_e = var_c / var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Arithmetic calculation
Thirty balls each weighing 0.36 kilograms (kg) are placed in a box. Find how many kilograms (kg) the box without the balls is when the box containing the balls weighed 11.26 killograms (kg).
0.46
11.26 0.36 30 [OP_MUL] [OP_SUB]
var_a = 11.26 var_b = 0.36 var_c = 30 var_d = var_b * var_c var_e = var_a - var_d print('{:.2f}'.format(round(var_e+1e-10,2)))
Possibility
You are trying to get 2 balls out of a box containing a red ball, a blue ball, a black ball, and a yellow ball. How many ways are there for balls can be drawn if allowing duplication? However, the order in which the balls are retrieved is not considered.
10
[OP_LIST_SOL] red blue black yellow [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_ADD] 1 [OP_SUB] 2 [OP_COMB]
var_a = 'red' var_b = 'blue' var_c = 'black' var_d = 'yellow' 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))
Arithmetic calculation
I'm trying to make 1000 toys. Assuming that the speed of making toys is the same every day, how many days are left if I have made 100 toys a day for 6 days?
4
1000 100 6 [OP_MUL] [OP_SUB] 100 [OP_DIV]
var_a = 1000 var_b = 100 var_c = 6 var_d = var_b * var_c var_e = var_a - var_d var_f = 100 var_g = var_e / var_f print(int(var_g))
Arithmetic calculation
Adding 8 consecutive even numbers gives 424. Find the smallest of 8 even numbers.
46
424 0 8 1 [OP_SUB] 2 [OP_MUL] 2 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 8 [OP_DIV]
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 print(int(var_l))
Possibility
How many times can you use the natural numbers 4, 5, and 6 once to form a number greater than 560?
3
[OP_LIST_SOL] 4 5 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 560 [OP_LIST_MORE] [OP_LIST_LEN]
var_a = 4 var_b = 5 var_c = 6 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 = 560 list_c = [] for i in list_b: if i > var_e: list_c.append(i) var_f = len(list_c) print(int(var_f))
Correspondence
When a certain number that should be divided by 8 is divided by 7, the quotient is 13 and the remainder is 1. Find the sum of the correctly calculated quotient and remainder.
15
13 7 [OP_MUL] 1 [OP_ADD] 8 [OP_FDIV] 13 7 [OP_MUL] 1 [OP_ADD] 8 [OP_MOD] [OP_ADD]
var_a = 13 var_b = 7 var_c = var_a * var_b var_d = 1 var_e = var_c + var_d var_f = 8 var_g = var_e // var_f var_h = 13 var_i = 7 var_j = var_h * var_i var_k = 1 var_l = var_j + var_k var_m = 8 var_n = var_l % var_m var_o = var_g + var_n print(int(var_o))
Geometry
You are going to make the largest square out of 60 centimeters (cm) of wire. How many centimeters (cm) should be the length of one side?
15
60 4 [OP_DIV]
var_a = 60 var_b = 4 var_c = var_a / var_b print(int(var_c))
Comparison
20 students are waiting for the bus. Jungkook came later than Yoongi, and there are 5 students between Yoongi and Jungkook. There are 6 students standing in front of Jungkook. How many students are standing behind Yoongi?
13
20 6 [OP_SUB] 1 [OP_SUB]
var_a = 20 var_b = 6 var_c = var_a - var_b var_d = 1 var_e = var_c - var_d print(int(var_e))
Possibility
We created a three-digit natural number among the number cards 1 to 9 and overlaps were allowed. Find how many numbers there are whose sum of each digit is 7.
15
1 9 1 [OP_LIST_ARANGE] 3 [OP_LIST_GET_PRODUCT] [OP_LIST_NUM2SUM] 7 [OP_LIST_FIND_NUM]
var_a = 1 var_b = 9 var_c = 1 list_a = [i for i in range(var_a, var_b + 1, var_c)] var_d = 3 list_b = [str(i) for i in list_a] list_b = list(itertools.product(list_b, repeat=var_d)) list_b = [''.join(num_list) for num_list in list_b] list_b = [str_num for str_num in list_b if str_num[0] != '0'] list_b = [float(i) for i in list_b] list_c=[] for i in list_b: var_e = 0 i = int(i) while i//10 > 0: var_e = var_e + i%10 i = i//10 var_e = var_e + i%10 list_c.append(var_e) var_f = 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))
Possibility
Make the smallest number with the number cards of 1, 4, and 5 one at a time.
145
[OP_LIST_SOL] 1 4 5 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MIN]
var_a = 1 var_b = 4 var_c = 5 list_a= [] if "/" in str(var_c): var_c = eval(str(var_c)) list_a.append(var_c) if "/" in str(var_b): var_b = eval(str(var_b)) list_a.append(var_b) if "/" in str(var_a): var_a = eval(str(var_a)) list_a.append(var_a) list_a.reverse() var_d = 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
Minjeong put a red ball, a blue ball, an orange ball, and a black ball in order. What is the color of the third ball?
orange
[OP_LIST_SOL] red blue orange black [OP_LIST_EOL] 3 [OP_LIST_GET]
var_a = 'red' var_b = 'blue' var_c = 'orange' var_d = 'black' 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 var_f = list_a[var_e-1] print(var_f)