category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Possibility | Find the fourth smallest four-digit number with using all 4 number cards of 0, 1, 4, and 8 once whose ones digit is 8, and then find the sum of 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] 4 [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 = 4
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)) |
Possibility | Find the sum of the second smallest three-digit number and the third smallest three-digit number formed by using all odd numbers from 1 to 5 once. | 468 | 1 5 [OP_LIST_ODD] 3 [OP_LIST_GET_PERM] 2 [OP_LIST_MIN] 3 [OP_LIST_MIN] [OP_ADD] | var_a = 1
var_b = 5
list_a = []
if var_a%2==0:
for i in range(var_a+1, var_b+1, 2):
list_a.append(i)
else:
for i in range(var_a, var_b+1, 2):
list_a.append(i)
var_c = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_c))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_d = 2
list_c=list_b.copy()
list_c.sort()
var_e = list_c[var_d-1]
var_f = 3
list_d=list_b.copy()
list_d.sort()
var_g = list_d[var_f-1]
var_h = var_e + var_g
print(int(var_h)) |
Geometry | What is the surface area in square centimeters (cm2) of a cube with one edge of 8 centimeters (cm)? | 384 | 8 2 [OP_POW] 6 [OP_MUL] | var_a = 8
var_b = 2
var_c = var_a ** var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | Students sit in groups of seven, and there are nine groups in each class. If there are 13 classes in this school, how many students are there? | 819 | 13 9 [OP_MUL] 7 [OP_MUL] | var_a = 13
var_b = 9
var_c = var_a * var_b
var_d = 7
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | You can make one hotteok with 6.64 grams (g) of dough. Find how many hotteoks you can make when you have 212.48 grams (g) of dough. | 32 | 212.48 6.64 [OP_FDIV] | var_a = 212.48
var_b = 6.64
var_c = var_a // var_b
print(int(var_c)) |
Possibility | How many edges are there on a face of a tetrahedron? | 3 | 3 | var_a = 3
print(int(var_a)) |
Geometry | What is the perimeter of an equilateral triangle with a side of 14/8 centimeters (cm), in centimeters (cm)? | 5.25 | 14/8 3 [OP_MUL] | var_a = 1.75
var_b = 3
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | The distance from Ga-eul's house to the taekwondo gym is 150 meters (m) farther than 3 kilometers (km), and the distance to the piano academy is 3095 meters (m). Which one is farther away from Ga-eul's house between taekwondo gym and piano academy? | taekwondo | [OP_LIST_SOL] taekwondo piano [OP_LIST_EOL] [OP_LIST_SOL] 3 1000 [OP_MUL] 150 [OP_ADD] 3095 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'taekwondo'
var_b = 'piano'
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 = 1000
var_e = var_c * var_d
var_f = 150
var_g = var_e + var_f
var_h = 3095
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) |
Geometry | How many centimeters (cm) must one side of a rectangle with a perimeter of 32 centimeters (cm) be to be the rectangle the largest? | 8 | 32 4 [OP_DIV] | var_a = 32
var_b = 4
var_c = var_a / var_b
print(int(var_c)) |
Geometry | A cube has an edge that is 12 centimeters (cm) long. I have glued 54 pieces of square paper on this cube without overlapping, and there is no empty space. Find the length of one side of this square paper. | 4 | 12 2 [OP_POW] 6 [OP_MUL] 54 [OP_DIV] 1/2 [OP_POW] | var_a = 12
var_b = 2
var_c = var_a ** var_b
var_d = 6
var_e = var_c * var_d
var_f = 54
var_g = var_e / var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i)) |
Correspondence | Find the number of divisors of 90. | 12 | 90 [OP_LIST_GET_DIVISOR] [OP_LIST_LEN] | var_a = 90
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
if var_a % i == 0:
list_a.append(i)
list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = len(list_a)
print(int(var_b)) |
Possibility | What is the sum of the largest and smallest eight-digit numbers that can be formed by using four numbers(4, 0, 2, 6) twice? | 86466666 | [OP_LIST_SOL] 4 4 0 0 2 2 6 6 [OP_LIST_EOL] 8 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD] | var_a = 4
var_b = 4
var_c = 0
var_d = 0
var_e = 2
var_f = 2
var_g = 6
var_h = 6
list_a= []
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_i = 8
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_i))
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_j = 1
list_c=list_b.copy()
list_c.sort()
var_k = list_c[-var_j]
var_l = 1
list_d=list_b.copy()
list_d.sort()
var_m = list_d[var_l-1]
var_n = var_k + var_m
print(int(var_n)) |
Comparison | There are a total of three numbers: 0.8, 1/2, and 0.5. What is the largest out of these numbers that is less than 2? | 0.8 | [OP_LIST_SOL] 0.8 1/2 0.5 [OP_LIST_EOL] 2 [OP_LIST_LESS] 1 [OP_LIST_MAX] | var_a = 0.8
var_b = 0.5
var_c = 0.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 = 2
list_b = []
for i in list_a:
if i < var_d:
list_b.append(i)
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print('{:.2f}'.format(round(var_f+1e-10,2))) |
Arithmetic calculation | I made a mistake when giving out candies, so I gave them to 5 people instead of 6. I intended to give 18 candies to each person, but I was 3 candies short. If I had given these candies to 6 people, how many would each person have? | 16 | 5 18 [OP_MUL] 3 [OP_ADD] 6 [OP_FDIV] 1 [OP_ADD] | var_a = 5
var_b = 18
var_c = var_a * var_b
var_d = 3
var_e = var_c + var_d
var_f = 6
var_g = var_e // var_f
var_h = 1
var_i = var_g + var_h
print(int(var_i)) |
Arithmetic calculation | Taehyung is the 6th shortest student in the class, and Seokjin stands right in front of him when they line up in ascending order. In what position will Seokjin's height be in ordinal number? | 5 | 6 1 [OP_SUB] | var_a = 6
var_b = 1
var_c = var_a - var_b
print(int(var_c)) |
Possibility | Jungkook is going to the mart to pick out snacks. If you are trying to choose 5 snacks out of 20, how many ways are possible to choose them? | 42504 | 20 1 [OP_SUB] 5 [OP_ADD] 5 [OP_COMB] | var_a = 20
var_b = 1
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
var_f = 5
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)) |
Comparison | There are three numbers 0.8, 1/2, and 0.9. How many numbers are less than or equal to 3? | 3 | [OP_LIST_SOL] 0.8 1/2 0.9 [OP_LIST_EOL] 3 [OP_LIST_LESS_EQUAL] [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 = 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)) |
Comparison | There are numbers 0.8, 1/2, and 0.9. Find the sum of all numbers greater than 0.3. | 2.2 | [OP_LIST_SOL] 0.8 1/2 0.9 [OP_LIST_EOL] 0.3 [OP_LIST_MORE] [OP_LIST_SUM] | 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)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Geometry | The largest equilateral triangle was created by using a 78 centimeters (cm) long string. How many centimeters (cm) is one side of this equilateral triangle? | 26 | 78 3 [OP_DIV] | var_a = 78
var_b = 3
var_c = var_a / var_b
print(int(var_c)) |
Possibility | When 4 friends shake hands with each other once, how many handshakes are made in total? | 3 | 3 3 1 [OP_SUB] [OP_MUL] 2 [OP_DIV] | var_a = 3
var_b = 3
var_c = 1
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g)) |
Correspondence | When 63 is divided by A, the quotient and remainder are B and C, respectively. A, B, and C are natural numbers. If the quotient and the remainder are equal, find the largest number among the divisors A. | 62 | 63 1 [OP_SUB] | var_a = 63
var_b = 1
var_c = var_a - var_b
print(int(var_c)) |
Geometry | There is a cube-shaped gift box. If the area of the wrapping paper used to wrap this gift box without overlapping is 600, find the volume of this gift box. | 1000 | 600 6 [OP_DIV] 1/2 [OP_POW] 3 [OP_POW] | var_a = 600
var_b = 6
var_c = var_a / var_b
var_d = 0.5
var_e = var_c ** var_d
var_f = 3
var_g = var_e ** var_f
print(int(var_g)) |
Correspondence | 2A3-36=197 is true. How much is A? | 3 | 2A3-36=197 A [OP_DIGIT_UNK_SOLVER] | var_a = '2A3-36=197'
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)) |
Correspondence | A factory makes clothes between 200 and 500 clothes a day. The number of clothes made today is a multiple of 9, subtracting 3 is a multiple of 8, subtracting 2 is a multiple of 5. Find the number of clothes made today. | 387 | 200 500 1 [OP_LIST_ARANGE] 5 2 [OP_LIST_DIVIDE_AND_REMAIN] 8 3 [OP_LIST_DIVIDE_AND_REMAIN] 9 0 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET] | var_a = 200
var_b = 500
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 5
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 = 3
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 = 9
var_i = 0
list_d = []
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
var_i = var_i + var_h
for i in list_c:
i = int(i)
if i%var_h == var_i:
list_d.append(i)
var_j = 1
var_k = list_d[var_j-1]
print(int(var_k)) |
Arithmetic calculation | It takes 9 seconds to cut a log, and the rest period after one cut is 5 seconds. Find how many seconds it takes to cut a log into 16 slices. | 210 | 16 1 [OP_SUB] 9 5 [OP_ADD] [OP_MUL] | var_a = 16
var_b = 1
var_c = var_a - var_b
var_d = 9
var_e = 5
var_f = var_d + var_e
var_g = var_c * var_f
print(int(var_g)) |
Possibility | What is the average of the following numbers? Natural numbers from 12 to 53. | 32.5 | 12 53 1 [OP_LIST_ARANGE] [OP_LIST_MEAN] | var_a = 12
var_b = 53
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
list_a = [float(i) for i in list_a]
var_d = sum(list_a)/len(list_a)
print('{:.2f}'.format(round(var_d+1e-10,2))) |
Arithmetic calculation | After putting 6 books each in a small box weighing 220 grams (g), and then putting 9 of these small boxes in a large box weighing 250 grams (g), the weight was 13.3 kilograms (kg). If each book weighs the same, how many grams (g) does one book weigh? | 205 | 13.3 1000 [OP_MUL] 250 [OP_SUB] 220 9 [OP_MUL] [OP_SUB] 6 9 [OP_MUL] [OP_DIV] | var_a = 13.3
var_b = 1000
var_c = var_a * var_b
var_d = 250
var_e = var_c - var_d
var_f = 220
var_g = 9
var_h = var_f * var_g
var_i = var_e - var_h
var_j = 6
var_k = 9
var_l = var_j * var_k
var_m = var_i / var_l
print(int(var_m)) |
Correspondence | Find the value greater than 34 and less than 18+18 among 34, 35, 36, and 37. | 35 | [OP_LIST_SOL] 34 35 36 37 [OP_LIST_EOL] 34 [OP_LIST_MORE] 18 18 [OP_ADD] [OP_LIST_LESS] 1 [OP_LIST_GET] | var_a = 34
var_b = 35
var_c = 36
var_d = 37
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 = 34
list_b = []
for i in list_a:
if i > var_e:
list_b.append(i)
var_f = 18
var_g = 18
var_h = var_f + var_g
list_c = []
for i in list_b:
if i < var_h:
list_c.append(i)
var_i = 1
var_j = list_c[var_i-1]
print(int(var_j)) |
Possibility | How many three-digit numbers can you make using the numbers 2, 3, and 8? However, the same number can be used multiple times. | 27 | [OP_LIST_SOL] 2 3 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] [OP_LIST_LEN] | var_a = 2
var_b = 3
var_c = 8
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.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 = len(list_b)
print(int(var_e)) |
Geometry | If A is the number of vertices and B is the number of edges in a triangular prism, what is the value of A+B? | 15 | 3 2 [OP_MUL] 3 3 [OP_MUL] [OP_ADD] | var_a = 3
var_b = 2
var_c = var_a * var_b
var_d = 3
var_e = 3
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g)) |
Comparison | In the exam, Yul-jeon did better than Myeong-ryun and did worse than Cheon-chun. If Myeong-ryun is the 9th and Cheoncheon is the 7th, what rank is Yul-jeon? | 8 | 9 7 [OP_ADD] 2 [OP_FDIV] | var_a = 9
var_b = 7
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e)) |
Geometry | You have multiplied the width and height of a rectangle of 3 square centimetres (cm2) by 5. Find the area in square centimetres (cm2) of this enlarged rectangle. | 750 | 30 5 5 [OP_MUL] [OP_MUL] | var_a = 30
var_b = 5
var_c = 5
var_d = var_b * var_c
var_e = var_a * var_d
print(int(var_e)) |
Arithmetic calculation | Yeongchan divided the apple into 3 equal slices and ate one slice. Minhyuk divided an apple of the same size into 12 equal slices. How many slices of apples does Minhyuk need to eat to eat the same amount of apples as Yeongchan? | 4 | 12 3 [OP_DIV] | var_a = 12
var_b = 3
var_c = var_a / var_b
print(int(var_c)) |
Correspondence | When we subtract 28 from the product of 4 and some number, divide it by 7 and add 12, we get 36. Find this number | 49 | 36 12 [OP_SUB] 7 [OP_MUL] 28 [OP_ADD] 4 [OP_DIV] | var_a = 36
var_b = 12
var_c = var_a - var_b
var_d = 7
var_e = var_c * var_d
var_f = 28
var_g = var_e + var_f
var_h = 4
var_i = var_g / var_h
print(int(var_i)) |
Geometry | You want to connect 25 centimeters (cm) long tapes by overlapping the next tape by 3 centimeters (cm). What is the total length in centimeters (cm) of 64 sheets of tape? | 1411 | 25 64 [OP_MUL] 3 64 1 [OP_SUB] [OP_MUL] [OP_SUB] | var_a = 25
var_b = 64
var_c = var_a * var_b
var_d = 3
var_e = 64
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_c - var_h
print(int(var_i)) |
Comparison | There were 20 tangerines each in five different baskets. After a few days, I noticed that some of the tangerines were rotten, so when I removed the rotten tangerines, the number of tangerines in the baskets became 10, 18, 17, 13, and 16, respectively. How many baskets contain 13 or fewer tangerines? | 2 | [OP_LIST_SOL] 10 18 17 13 16 [OP_LIST_EOL] 13 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] | 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)
var_g = len(list_b)
print(int(var_g)) |
Correspondence | There is a three-digit number whose number in the hundreds place is 7 and in the ones place 9. If it becomes 800 when this number is rounded up from the tens place, how many numbers can fit in the tens place? | 10 | [OP_LIST_SOL] 7 A 9 [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 700 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | var_a = 7
var_b = 'A'
var_c = 9
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d=""
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 = 700
list_c = []
for i in list_b:
if i >= var_e:
list_c.append(i)
var_f = len(list_c)
print(int(var_f)) |
Comparison | Eunji is jumping a rope in the 10th row from the left, the 8th row from the right, the 3rd row from the front, and the 12th row from the back. If the number of students standing in each row is the same, how many students are jumping ropes? | 238 | 10 8 [OP_ADD] 1 [OP_SUB] 3 12 [OP_ADD] 1 [OP_SUB] [OP_MUL] | var_a = 10
var_b = 8
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 3
var_g = 12
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
print(int(var_k)) |
Comparison | Yoongi collected 7 points, Jungkook 6 points, Yuna 9 points, Yoojung 8 points, and Taehyung 10 points. Who would be the one with the 2nd smallest number? | Yoongi | [OP_LIST_SOL] Yoongi Jungkook Yuna Yoojung 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 = 'Yoojung'
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) |
Possibility | What is the largest number among three-digit numbers that used each of 8, 0, and 7 once? | 870 | [OP_LIST_SOL] 0 8 7 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] | var_a = 0
var_b = 8
var_c = 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 = 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]
print(int(var_f)) |
Possibility | The same color stones cannot be distinguished. How many ways can you arrange 2 white and 1 black stones differently? | 3 | 1 2 [OP_ADD] 1 2 [OP_ADD] [OP_PERM] 2 2 [OP_PERM] [OP_DIV] | var_a = 1
var_b = 2
var_c = var_a + var_b
var_d = 1
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 = 2
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
var_j = var_j * (var_h-i)
var_k = var_g / var_j
print(int(var_k)) |
Comparison | What is the smallest number among the four numbers 5, 8, 1, and 2? | 1 | [OP_LIST_SOL] 5 8 1 2 [OP_LIST_EOL] 1 [OP_LIST_MIN] | var_a = 5
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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[var_e-1]
print(int(var_f)) |
Geometry | There are two circles A and B of different sizes. The diameter of circle A is 80 centimeters (cm). The radius of circle A is 4 times the radius of circle B. What is the radius of circle B? | 10 | 80 4 [OP_DIV] 2 [OP_DIV] | var_a = 80
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | There are 5 boxes of 25 candies each. If 13 students try to divide the candy into 8 pieces, how many candies are left after dividing? | 21 | 25 5 [OP_MUL] 13 8 [OP_MUL] [OP_SUB] | var_a = 25
var_b = 5
var_c = var_a * var_b
var_d = 13
var_e = 8
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g)) |
Geometry | If the radius of the wheel is 7 centimeters (cm), how many centimeters (cm) is the diameter of the wheel? | 14 | 7 2 [OP_MUL] | var_a = 7
var_b = 2
var_c = var_a * var_b
print(int(var_c)) |
Geometry | The cube-shaped dice have the numbers 1 through 6 written on them. If the numbers written on the opposite side add up to 7, what is the number written on the side opposite to 3? | 4 | 7 3 [OP_SUB] | var_a = 7
var_b = 3
var_c = var_a - var_b
print(int(var_c)) |
Geometry | Find the number of sides of a polygon of which one diagonal can be drawn from one vertex. | 4 | 1 3 [OP_ADD] | var_a = 1
var_b = 3
var_c = var_a + var_b
print(int(var_c)) |
Correspondence | A and B are different numbers. When the three-digit number 7AB can be divided by 3 without any remainder, how many numbers can satisfy to be 7AB? | 33 | 7AB [OP_GEN_POSSIBLE_LIST] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = '7AB'
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 = len(list_b)
print(int(var_c)) |
Arithmetic calculation | There are 57 roses and 82 tulips in the flower bed. There are 13 more tulips than the sum of roses and lilies. How many lilies are in the flower bed? | 12 | 82 13 [OP_SUB] 57 [OP_SUB] | var_a = 82
var_b = 13
var_c = var_a - var_b
var_d = 57
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | We are going to divide the road into 16 sections and install flags on the road except for both ends. It takes 9 seconds to plant one flag. We take a rest for 5 seconds after placing another flag. Find the time it takes to place all the flags. | 210 | 16 1 [OP_SUB] 9 5 [OP_ADD] [OP_MUL] | var_a = 16
var_b = 1
var_c = var_a - var_b
var_d = 9
var_e = 5
var_f = var_d + var_e
var_g = var_c * var_f
print(int(var_g)) |
Correspondence | The number is in between 2 and 5 and a single digit number less than 4. Find what the number is. | 3 | 2 1 [OP_ADD] 5 1 [OP_SUB] 1 [OP_LIST_ARANGE] 4 [OP_LIST_LESS] 1 [OP_LIST_GET] | var_a = 2
var_b = 1
var_c = var_a + var_b
var_d = 5
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 = 4
list_b = []
for i in list_a:
if i < var_h:
list_b.append(i)
var_i = 1
var_j = list_b[var_i-1]
print(int(var_j)) |
Correspondence | 3A3B rounded to the hundreds place is 3400. What is A? | 4 | 3A3B [OP_GEN_POSSIBLE_LIST] 3400 50 [OP_SUB] [OP_LIST_MORE_EQUAL] 3400 50 [OP_ADD] [OP_LIST_LESS] 3A3B A [OP_LIST_FIND_UNK] | var_a = '3A3B'
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 = 3400
var_c = 50
var_d = var_b - var_c
list_b = []
for i in list_a:
if i >= var_d:
list_b.append(i)
var_e = 3400
var_f = 50
var_g = var_e + var_f
list_c = []
for i in list_b:
if i < var_g:
list_c.append(i)
var_h = '3A3B'
var_i = 'A'
var_h = str(var_h)
var_i = str(var_i)
unk_idx = var_h.index(var_i)
var_j = 0
for elem in list_c:
elem = str(elem)
var_j = int(elem[unk_idx])
print(int(var_j)) |
Comparison | Find the difference between the largest number and the smallest number among 0.12, 0.23, and 0.22. | 0.11 | [OP_LIST_SOL] 0.12 0.23 0.22 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 0.12
var_b = 0.23
var_c = 0.22
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 = 1
list_c=list_a.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = var_e - var_g
print('{:.2f}'.format(round(var_h+1e-10,2))) |
Comparison | How many out of 1/4, 0.7, 2/3, 0.4, 2/5 are greater than 0.5? | 2 | [OP_LIST_SOL] 1/4 0.7 2/3 0.4 2/5 [OP_LIST_EOL] 0.5 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 0.25
var_b = 0.7
var_c = 0.6666666666666666
var_d = 0.4
var_e = 0.4
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 = 0.5
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 | Namjoon has 35 (a) books. Also, he has 16 fewer (b) books than (a) books, and 35 books more (c) books than (b) books. How many books does Namjoon have in all? | 108 | 35 35 16 [OP_SUB] [OP_ADD] 35 16 [OP_SUB] 35 [OP_ADD] [OP_ADD] | var_a = 35
var_b = 35
var_c = 16
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 35
var_g = 16
var_h = var_f - var_g
var_i = 35
var_j = var_h + var_i
var_k = var_e + var_j
print(int(var_k)) |
Arithmetic calculation | At one bus stop, buses 1 through 54 stop. Find how many times the number 5 occurs in bus numbers that stop at this stop. | 10 | 1 54 1 [OP_LIST_ARANGE] [OP_LIST2NUM] [OP_NUM2LIST] 5 [OP_LIST_FIND_NUM] | var_a = 1
var_b = 54
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 = 5
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)) |
Arithmetic calculation | If there are 8 2-won bills and 2 1-won bills, how much is the total? | 18 | 2 8 [OP_MUL] 1 2 [OP_MUL] [OP_ADD] | var_a = 2
var_b = 8
var_c = var_a * var_b
var_d = 1
var_e = 2
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g)) |
Comparison | In PE class, the students lined up in order of shortest height: Taehyung, Minji, Jiyoung, Jinhyung, and Jingook. Who is the 3rd shortest person? | Jiyoung | [OP_LIST_SOL] Taehyung Minji Jiyoung Jinhyung Jingook [OP_LIST_EOL] 3 [OP_LIST_GET] | var_a = 'Taehyung'
var_b = 'Minji'
var_c = 'Jiyoung'
var_d = 'Jinhyung'
var_e = 'Jingook'
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 3
var_g = list_a[var_f-1]
print(var_g) |
Geometry | How many faces does a prism have if the sum of its edges and vertices is 30? | 8 | 30 2 3 [OP_ADD] [OP_DIV] 2 [OP_ADD] | var_a = 30
var_b = 2
var_c = 3
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)) |
Comparison | It is 3.97 kilometers (km) from Kunwoo's house to the school, and it is 4028 meters (m) from Seohyeon's house to the school. Find a friend whose distance from home to school is longer. | Seohyeon | [OP_LIST_SOL] Kunwoo Seohyeon [OP_LIST_EOL] [OP_LIST_SOL] 3.97 1000 [OP_MUL] 4028 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Kunwoo'
var_b = 'Seohyeon'
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.97
var_d = 1000
var_e = var_c * var_d
var_f = 4028
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) |
Comparison | Yoongi collected 4. If Jungkook collected the sum of 6 and 3, who has the bigger number? | Jungkook | [OP_LIST_SOL] Yoongi Jungkook [OP_LIST_EOL] [OP_LIST_SOL] 4 6 3 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoongi'
var_b = 'Jungkook'
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 = 6
var_e = 3
var_f = var_d + var_e
list_b= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
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) |
Correspondence | There are three different numbers A, B, and C. Find A from the three-digit addition formula ABC+ABC+ABC=888. | 2 | ABC+ABC+ABC=888 A [OP_DIGIT_UNK_SOLVER] | var_a = 'ABC+ABC+ABC=888'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Possibility | What is the number of possible two-digit numbers that you can make using two different numbers from 1, 2, 3, 4, 5, and 6? | 30 | [OP_LIST_SOL] 1 2 3 4 5 6 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 1
var_b = 2
var_c = 3
var_d = 4
var_e = 5
var_f = 6
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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_g))
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_h = len(list_b)
print(int(var_h)) |
Comparison | Seokjin and Taehyung have 78 and 81 candies, respectively. Find the one with the most candy. | Taehyung | [OP_LIST_SOL] Seokjin Taehyung [OP_LIST_EOL] [OP_LIST_SOL] 78 81 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Seokjin'
var_b = 'Taehyung'
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 = 78
var_d = 81
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) |
Comparison | Eunji has 21 loaves of bread and Minyoung has 13 loaves. Who has more bread? | Eunji | [OP_LIST_SOL] Minyoung Eunji [OP_LIST_EOL] [OP_LIST_SOL] 13 21 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Minyoung'
var_b = 'Eunji'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 13
var_d = 21
list_b= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Correspondence | Donghyeon's ranch has bulls and black cows. Bulls and black cows both eat 3 barrels of feed. To feed all these cows, Donghyun bought 8 bundles of 15 and 60 individual feeds. If the feeds are just the right amount, and there are 52 bulls, how many black cows are there? | 8 | 15 8 [OP_MUL] 60 [OP_ADD] 3 [OP_DIV] 52 [OP_SUB] | var_a = 15
var_b = 8
var_c = var_a * var_b
var_d = 60
var_e = var_c + var_d
var_f = 3
var_g = var_e / var_f
var_h = 52
var_i = var_g - var_h
print(int(var_i)) |
Geometry | There is a cube whose perimeter of a side are 32 centimeters (cm). What is the volume of this cube in cubic centimeters? | 512 | 32 4 [OP_DIV] 3 [OP_POW] | var_a = 32
var_b = 4
var_c = var_a / var_b
var_d = 3
var_e = var_c ** var_d
print(int(var_e)) |
Comparison | B is greater than 3 and less than 150, and it is a divisor or multiple of 36. If you were to list all the possible numbers for B, starting with the smallest number, what would be the 5th number from the right? | 18 | 36 [OP_LIST_GET_DIVISOR] 36 150 1 [OP_SUB] 36 [OP_LIST_ARANGE] [OP_SET_UNION] 5 [OP_LIST_MAX] | var_a = 36
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 = 36
var_c = 150
var_d = 1
var_e = var_c - var_d
var_f = 36
list_b = [i for i in range(var_b, var_e + 1, var_f)]
list_c = list(set(list_a) | set(list_b))
var_g = 5
list_d=list_c.copy()
list_d.sort()
var_h = list_d[-var_g]
print(int(var_h)) |
Geometry | The volume of the cube-shaped box is 729 cubic centimeters (cm). At this time, how many centimeters (cm3) is the length of one corner of the box? | 9 | 729 1/3 [OP_POW] | var_a = 729
var_b = 0.3333333333333333
var_c = var_a ** var_b
print(int(eval('{:.2f}'.format(round(var_c+1e-10,2))))) |
Possibility | When all three natural numbers 1, 6, and 8 are used to form a natural number less than 1000, find the sum of the smallest number and the third smallest number. | 786 | [OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] 3 [OP_LIST_MIN] [OP_ADD] | var_a = 1
var_b = 6
var_c = 8
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = 3
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i)) |
Arithmetic calculation | Yoongi caught 5 frogs. If he caught 2 more frogs, how many frogs did Yoongi catch? | 7 | 5 2 [OP_ADD] | var_a = 5
var_b = 2
var_c = var_a + var_b
print(int(var_c)) |
Comparison | Gray cats are heavier than white cats and lighter than black cats. Yellow cats are the lightest. Which color is the heaviest among gray, white, black and yellow cats? | black | [OP_LIST_SOL] gray white black yellow [OP_LIST_EOL] [OP_LIST_SOL] gray white > gray black < yellow white < yellow gray < yellow black < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'gray'
var_b = 'white'
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 = 'gray'
var_f = 'white'
var_g = '>'
var_h = 'gray'
var_i = 'black'
var_j = '<'
var_k = 'yellow'
var_l = 'white'
var_m = '<'
var_n = 'yellow'
var_o = 'gray'
var_p = '<'
var_q = 'yellow'
var_r = 'black'
var_s = '<'
list_b= []
if "/" in str(var_s):
var_s = eval(str(var_s))
list_b.append(var_s)
if "/" in str(var_r):
var_r = eval(str(var_r))
list_b.append(var_r)
if "/" in str(var_q):
var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
if cond_ in ("<", ">", "="):
operand_right = temp_stack.pop()
operand_left = temp_stack.pop()
if cond_ == "=":
cond_ = "=="
conditions.append(f"{operand_left} {cond_} {operand_right}")
else:
if not cond_.isdigit():
cond_ = "{" + cond_ + "}"
temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
item_name_index_dict = dict(zip(items_name_list, perm))
formatted_conditions = \
[condition.format_map(item_name_index_dict) for condition in conditions]
if all(map(eval, formatted_conditions)):
break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_t = 1
var_u = list_c[var_t-1]
print(var_u) |
Geometry | Five pieces of tape, every 2.7 meters (m) long, were stacked so that there was an overlap of 0.3 meters (m). If you divide this spliced tape into 6 equal parts, what is the length of each equal part? | 2.05 | 2.7 5 [OP_MUL] 0.3 5 1 [OP_SUB] [OP_MUL] [OP_SUB] 6 [OP_DIV] | var_a = 2.7
var_b = 5
var_c = var_a * var_b
var_d = 0.3
var_e = 5
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_c - var_h
var_j = 6
var_k = var_i / var_j
print('{:.2f}'.format(round(var_k+1e-10,2))) |
Geometry | Given that the area of a trapezoid is 56 square centimeters (cm), the top side is 5 centimeters (cm), and the bottom side is 9 centimeters (cm), what is the height of the trapezoid in centimeters (cm)? | 8 | 56 2 [OP_MUL] 5 9 [OP_ADD] [OP_DIV] | var_a = 56
var_b = 2
var_c = var_a * var_b
var_d = 5
var_e = 9
var_f = var_d + var_e
var_g = var_c / var_f
print(int(var_g)) |
Correspondence | You mistakenly subtracted 13/5 from a number instead of adding 13/5 and got 9/7. How much is it when calculated correctly? | 6.49 | 9/7 13/5 [OP_ADD] 13/5 [OP_ADD] | var_a = 1.2857142857142858
var_b = 2.6
var_c = var_a + var_b
var_d = 2.6
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Geometry | There is one triangle. The length of the hypotenuse and base of this triangle is 15 centimeters (cm) and 9 centimeters (cm), respectively. Find the area. | 54 | 15 2 [OP_POW] 9 2 [OP_POW] [OP_SUB] 1/2 [OP_POW] 9 [OP_MUL] 2 [OP_DIV] | var_a = 15
var_b = 2
var_c = var_a ** var_b
var_d = 9
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
var_j = 9
var_k = var_i * var_j
var_l = 2
var_m = var_k / var_l
print(int(var_m)) |
Comparison | 20 students are waiting for the bus. If 11 people came after Yoongi, how many people came before 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)) |
Arithmetic calculation | What is the smallest 5-digit number that is a multiple of 3 and a multiple of 4? | 10008 | 10000 99999 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 4 [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 = 3
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 = 4
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)) |
Geometry | There is a quadrangular pyramid whose edges have the same length. If the sum of the lengths of the edges is 14.8 meters (m), how many meters (m) is the length of one edge? | 1.85 | 14.8 4 2 [OP_MUL] [OP_DIV] | var_a = 14.8
var_b = 4
var_c = 2
var_d = var_b * var_c
var_e = var_a / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Comparison | Three people A, B, and C have books. The average number of books owned by the three people is 23 fewer than the average of the books owned by two people A and B, and 17 more than the average number of books owned by B and C. If B has 66 books, how many books does C have? | 44 | 66 17 2 [OP_MUL] [OP_SUB] 3 [OP_MUL] 17 23 [OP_ADD] 2 [OP_MUL] [OP_ADD] 66 2 [OP_MUL] [OP_SUB] 2 2 [OP_ADD] 3 [OP_SUB] [OP_DIV] | var_a = 66
var_b = 17
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 3
var_g = var_e * var_f
var_h = 17
var_i = 23
var_j = var_h + var_i
var_k = 2
var_l = var_j * var_k
var_m = var_g + var_l
var_n = 66
var_o = 2
var_p = var_n * var_o
var_q = var_m - var_p
var_r = 2
var_s = 2
var_t = var_r + var_s
var_u = 3
var_v = var_t - var_u
var_w = var_q / var_v
print(int(var_w)) |
Geometry | You are going to build a fence in the shape of an equilateral triangle with wooden sticks that are 8 meters (m) long. Find how many meters (m) each side of the fence should be. | 2.67 | 8 3 [OP_DIV] | var_a = 8
var_b = 3
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | Jongkook drinks milk every day. He drank 3 liters (L) and 7 milliliters (㎖) on the first day, a few milliliters (㎖) on the second day, and 840 milliliters (㎖) on the third day. As he drank 6 liters (L) and 30 milliliters (㎖) in total, how many milliliters (㎖) of milk did Jongkook drink on the second day? | 2183 | 6 1000 [OP_MUL] 30 [OP_ADD] 840 [OP_SUB] 3 1000 [OP_MUL] 7 [OP_ADD] [OP_SUB] | var_a = 6
var_b = 1000
var_c = var_a * var_b
var_d = 30
var_e = var_c + var_d
var_f = 840
var_g = var_e - var_f
var_h = 3
var_i = 1000
var_j = var_h * var_i
var_k = 7
var_l = var_j + var_k
var_m = var_g - var_l
print(int(var_m)) |
Arithmetic calculation | There is no child who cannot do either of A and B. If there are 38 children who can do A and 29 children who can do B and the total number of children is 48, how many children can do both? | 19 | 38 29 [OP_ADD] 48 [OP_SUB] | var_a = 38
var_b = 29
var_c = var_a + var_b
var_d = 48
var_e = var_c - var_d
print(int(var_e)) |
Geometry | If you put 10 pieces of square paper in each horizontal and vertical line without gaps, you get a large square. Find the number of pieces of paper placed around the perimeter. | 36 | 10 4 [OP_MUL] 4 [OP_SUB] | var_a = 10
var_b = 4
var_c = var_a * var_b
var_d = 4
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | A, B, C are different numbers from 0 to 9. Find A given the two-digit addition equation AB+BC=BCB. | 9 | AB+BC=BCB A [OP_DIGIT_UNK_SOLVER] | var_a = 'AB+BC=BCB'
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 | On the first day of participating in the group activity, Miju met 11 new friends and shook hands. If Mijoo and her friends shook hands once, how many times did they all shake hands? | 66 | 11 1 [OP_ADD] 11 [OP_MUL] 2 [OP_DIV] | var_a = 11
var_b = 1
var_c = var_a + var_b
var_d = 11
var_e = var_c * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g)) |
Arithmetic calculation | Find the sum of all numbers greater than or equal to 30, less than or equal to 50, and that are multiples of 6. | 156 | 30 50 1 [OP_LIST_ARANGE] 6 [OP_LIST_DIVISIBLE] [OP_LIST_SUM] | var_a = 30
var_b = 50
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
list_b = []
var_d = int(var_d)
for i in list_a:
i = int(i)
if i % var_d == 0:
list_b.append(i)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print(int(var_e)) |
Correspondence | While painting, Hyungjun used half of the paint to paint the house and he used 5 more than 1/3 of the remaining paint to paint the fence. If there are 5 cans of paint left, how many cans of paint did Hyeongjun have to begin with? | 30 | 5 5 [OP_ADD] 1 1/3 [OP_SUB] [OP_DIV] 1 1/2 [OP_SUB] [OP_DIV] | var_a = 5
var_b = 5
var_c = var_a + var_b
var_d = 1
var_e = 0.3333333333333333
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 1
var_i = 0.5
var_j = var_h - var_i
var_k = var_g / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2))))) |
Possibility | Five animals are on the way: Rat, Cow, Tiger, Rabbit, Dragon and Snake. The mouse with the best eye sight should come first, and the snake with the longest tail should come last. Find the number of all cases in which five animals form a line. | 24 | [OP_LIST_SOL] Rat Cow Tiger Rabbit Dragon Snake [OP_LIST_EOL] [OP_LIST_SOL] Rat [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_SOL] Snake [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] | var_a = 'Rat'
var_b = 'Cow'
var_c = 'Tiger'
var_d = 'Rabbit'
var_e = 'Dragon'
var_f = 'Snake'
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 = 'Rat'
list_b= []
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_h = 'Snake'
list_d= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_d.append(var_h)
list_d.reverse()
list_e = list(set(list_c) - set(list_d))
var_i = len(list_e)
var_j = len(list_e)
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)
print(int(var_k)) |
Comparison | Among five numbers 1.4, 9/10, 1.2, 0.5, and 13/10, what is the sum of the numbers greater than 1.1? | 3.9 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE] [OP_LIST_SUM] | 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)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | It is said that a factory produces 230 TVs on average. Find how many TVs are produced in 15 days. | 3450 | 230 15 [OP_MUL] | var_a = 230
var_b = 15
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. What is the product of the 3rd largest number and the 2nd largest number? | 156 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 3 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_MUL] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
var_e = 14
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 3
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[-var_h]
var_j = var_g * var_i
print(int(var_j)) |
Possibility | Divide a picture into four sections, and try to color each one with red, blue, green, and yellow. How many times are there where you paint them all different colors? | 24 | 4 4 [OP_PERM] | var_a = 4
var_b = 4
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)) |
Geometry | I made an equilateral triangle with a wire 63 cm (cm) long, and there was neither excess nor shortage of wire. How many centimeters (cm) is the length of one side of an equilateral triangle? | 21 | 63 3 [OP_DIV] | var_a = 63
var_b = 3
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | When there are numbers from 100 to 200, what is sum of odd numbers in the range? | 7500 | 100 200 [OP_LIST_ODD] [OP_LIST_SUM] | var_a = 100
var_b = 200
list_a = []
if var_a%2==0:
for i in range(var_a+1, var_b+1, 2):
list_a.append(i)
else:
for i in range(var_a, var_b+1, 2):
list_a.append(i)
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
print(int(var_c)) |
Arithmetic calculation | There are 45 ducks and 28 geese on the farm. Also, hens are 13 less than ducks, and roosters are 9 more than geese. How many chickens are there in the farm in total? | 69 | 45 13 [OP_SUB] 28 9 [OP_ADD] [OP_ADD] | var_a = 45
var_b = 13
var_c = var_a - var_b
var_d = 28
var_e = 9
var_f = var_d + var_e
var_g = var_c + var_f
print(int(var_g)) |
Comparison | 20 students stood in a line. Jungkook stood third in line, and Yoongi stood right behind Jungkook. How many students are standing behind Yoongi? | 16 | 20 3 [OP_SUB] 1 [OP_SUB] | var_a = 20
var_b = 3
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Possibility | Joohan is about to choose a hat and pair of shoes to wear tomorrow. Joohan has 4 hats and 3 pairs of shoes. In how many ways can Juhan choose one hat and one pair of shoes? | 12 | 4 1 [OP_COMB] 3 1 [OP_COMB] [OP_MUL] | var_a = 4
var_b = 1
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)
var_d = 3
var_e = 1
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
var_f = var_f * (var_d-i)
for i, elem in enumerate(range(var_e)):
var_f = var_f / (i+1)
var_g = var_c * var_f
print(int(var_g)) |
Arithmetic calculation | The price of clay is 17.25 won per gram (g). If Seungjun buys one 1000 gram (g) clay and one 10 gram (g) clay, how much should he pay? | 17422.5 | 17.25 1000 [OP_MUL] 17.25 10 [OP_MUL] [OP_ADD] | var_a = 17.25
var_b = 1000
var_c = var_a * var_b
var_d = 17.25
var_e = 10
var_f = var_d * var_e
var_g = var_c + var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Possibility | We want to select 4 out of 10 distinguishable balls. How many ways are there to choose a ball? | 210 | 10 4 [OP_COMB] | var_a = 10
var_b = 4
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)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.