category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Arithmetic calculation | There are 41 students in the piano academy that Yejun attends, and among them, 3 more students attend Purum Elementary School than those who do not attend Purum Elementary School. How many students attend Purum Elementary School? | 22 | 41 3 [OP_SUB] 2 [OP_DIV] 3 [OP_ADD] | var_a = 41
var_b = 3
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 3
var_g = var_e + var_f
print(int(var_g)) |
Arithmetic calculation | There are 20 bags of chocolates, each containing 156 pieces. How many chocolates are there in all? | 3120 | 156 20 [OP_MUL] | var_a = 156
var_b = 20
var_c = var_a * var_b
print(int(var_c)) |
Correspondence | Yoongi subtracts 56 from a certain number to get 11. Find the number. | 67 | 11 56 [OP_ADD] | var_a = 11
var_b = 56
var_c = var_a + var_b
print(int(var_c)) |
Possibility | Using the four digits 1, 5, 6, and 9 once, find the second smallest two-digit number whose tens digit is 5. | 56 | [OP_LIST_SOL] 1 5 6 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 10 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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 10
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)) |
Arithmetic calculation | Which four-digit number is the smallest common multiple of 2, 3, 8, and 9? | 1008 | 1000 9999 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 = 1000
var_b = 9999
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 | Some number minus 7 returns 9. What will be the answer if the number is multiplied by 5? | 80 | 9 7 [OP_ADD] 5 [OP_MUL] | var_a = 9
var_b = 7
var_c = var_a + var_b
var_d = 5
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | Find the sum of odd numbers from 100 to 200. | 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)) |
Geometry | If you fold a 94 centimeters (cm) shoelace to be 68 centimeters (cm) so that the middle overlaps, how long is the overlapped part in centimeters (cm)? | 13 | 94 68 [OP_SUB] 2 [OP_DIV] | var_a = 94
var_b = 68
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Comparison | Chinese cabbage was planted on 2/7 of the field and eggplant on 3/8. Cabbage or eggplant, which planted area is larger? | eggplant | [OP_LIST_SOL] cabbage eggplant [OP_LIST_EOL] [OP_LIST_SOL] 2/7 3/8 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'cabbage'
var_b = 'eggplant'
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.2857142857142857
var_d = 0.375
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) |
Geometry | There are 96 stakes at 10-meter (m) intervals around the sheep pasture, and 82 stakes at 20-meter (m) intervals around the perimeter of the horse pasture. What is the difference between the perimeters of the two ranches in meters (m)? | 680 | 10 96 [OP_MUL] 20 82 [OP_MUL] [OP_SUB] [OP_ABS] | var_a = 10
var_b = 96
var_c = var_a * var_b
var_d = 20
var_e = 82
var_f = var_d * var_e
var_g = var_c - var_f
var_h = abs(var_g)
print(int(var_h)) |
Possibility | How many total four-digit numbers can be formed by using all the natural numbers 2, 5, 6, and 9 without overlapping? | 24 | [OP_LIST_SOL] 2 5 9 6 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 2
var_b = 5
var_c = 9
var_d = 6
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = len(list_b)
print(int(var_f)) |
Arithmetic calculation | While a centipede can crawl 5 meters (m) in 3 minutes, an earthworm can crawl 5 meters (m) in 2 minutes. If the centipede starts crawling 20 meters (m) ahead of the earthworm and they both start crawling at the same time, find how many minutes takes for them to meet after the departure. | 24 | 20 5 2 [OP_DIV] 5 3 [OP_DIV] [OP_SUB] [OP_DIV] | var_a = 20
var_b = 5
var_c = 2
var_d = var_b / var_c
var_e = 5
var_f = 3
var_g = var_e / var_f
var_h = var_d - var_g
var_i = var_a / var_h
print(int(eval('{:.2f}'.format(round(var_i+1e-10,2))))) |
Comparison | Jungkook has 0.8, Yoongi has 1/2, Yoojung has 0.9, Yuna has 1/3 number card. How many people have number cards greater than or equal to 0.3? | 4 | [OP_LIST_SOL] 0.8 1/2 0.9 1/3 [OP_LIST_EOL] 0.3 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
var_c = 0.9
var_d = 0.3333333333333333
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 = 0.3
list_b = []
for i in list_a:
if i >= var_e:
list_b.append(i)
var_f = len(list_b)
print(int(var_f)) |
Arithmetic calculation | There are 34 roses. There are 13 more lilies than roses. There are 23 fewer tulips than lilies. How many roses, lilies and tulips are there in all? | 105 | 34 34 13 [OP_ADD] [OP_ADD] 34 13 [OP_ADD] 23 [OP_SUB] [OP_ADD] | var_a = 34
var_b = 34
var_c = 13
var_d = var_b + var_c
var_e = var_a + var_d
var_f = 34
var_g = 13
var_h = var_f + var_g
var_i = 23
var_j = var_h - var_i
var_k = var_e + var_j
print(int(var_k)) |
Arithmetic calculation | On day 1, 215 liters (l) of water was added to the pool, and on day 2, 76 liters (l) of water was added than on day 1. On the third day, I put 53 liters (l) less than on the second day. How many liters (l) of water do you drink on average each day? | 248 | 215 215 76 [OP_ADD] [OP_ADD] 215 76 [OP_ADD] 53 [OP_SUB] [OP_ADD] 3 [OP_DIV] | var_a = 215
var_b = 215
var_c = 76
var_d = var_b + var_c
var_e = var_a + var_d
var_f = 215
var_g = 76
var_h = var_f + var_g
var_i = 53
var_j = var_h - var_i
var_k = var_e + var_j
var_l = 3
var_m = var_k / var_l
print(int(var_m)) |
Possibility | You want to create a three-digit number by selecting three numbers from 0, 2, 4, and 6. If only the number can be used once, find the product of the largest possible number and the smallest possible number. | 130968 | [OP_LIST_SOL] 0 2 4 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_MUL] | var_a = 0
var_b = 2
var_c = 4
var_d = 6
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
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 1
list_d=list_b.copy()
list_d.sort()
var_i = list_d[var_h-1]
var_j = var_g * var_i
print(int(var_j)) |
Geometry | A square was created by arranging 10 square-shaped ttakjis for each vertical and horizontal line without gaps. Find the number of ttakjis placed at 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 | 13+4A=58. How much is A? | 5 | 13+4A=58 A [OP_DIGIT_UNK_SOLVER] | var_a = '13+4A=58'
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 | A car travels 2 kilometers (km) per minute on a 6-kilometer (km) road. If the car is at a 2-kilometer (km) point, find how many minutes have passed after the car set off. | 1 | 2 2 [OP_DIV] | var_a = 2
var_b = 2
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | If 60 notebooks and 84 pencils should be distributed equally to all students, think of the maximum number of students that can receive the supplies. | 5 | 60 60 84 [OP_GCD] [OP_DIV] | var_a = 60
var_b = 60
var_c = 84
var_d = math.gcd(int(var_c), int(var_b))
var_e = var_a / var_d
print(int(var_e)) |
Possibility | Use the four number cards 0, 1, 4, and 8 in duplicate to find the largest three-digit number with zero in the tens digit. | 808 | [OP_LIST_SOL] 0 1 4 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] 10 0 [OP_LIST_SEARCH_FIXED_DIGIT] 1 [OP_LIST_MAX] | 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.product(list_b, repeat=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 = 0
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 = 1
list_d=list_c.copy()
list_d.sort()
var_i = list_d[-var_h]
print(int(var_i)) |
Possibility | When tossing two coins, A and B, how many times can you get 2 heads or 1 heads? | 3 | 2 [OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_SUB] [OP_POW] 2 [OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_LEN] 1 [OP_SUB] [OP_POW] [OP_ADD] | var_a = 2
var_b = 'A'
var_c = 'B'
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)
list_a.reverse()
var_d = len(list_a)
var_e = 2
var_f = var_d - var_e
var_g = var_a ** var_f
var_h = 2
var_i = 'A'
var_j = 'B'
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)
list_b.reverse()
var_k = len(list_b)
var_l = 1
var_m = var_k - var_l
var_n = var_h ** var_m
var_o = var_g + var_n
print(int(var_o)) |
Geometry | The area of a square with a side of 5 centimeters (cm) is equal to the area of a rectangle with a side of 4 centimeters (cm). Find the length of the other side of the rectangle as a decimal number. | 6.25 | 5 2 [OP_POW] 4 [OP_DIV] | var_a = 5
var_b = 2
var_c = var_a ** var_b
var_d = 4
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | There are 5 bottles of 120 milliliters (ml) of soda and 3 bottles of 350 milliliters (ml) of coke. If you want to drink 2500 milliliters (ml), find how many milliliters (ml) more you need to drink. | 850 | 2500 120 5 [OP_MUL] 350 3 [OP_MUL] [OP_ADD] [OP_SUB] | var_a = 2500
var_b = 120
var_c = 5
var_d = var_b * var_c
var_e = 350
var_f = 3
var_g = var_e * var_f
var_h = var_d + var_g
var_i = var_a - var_h
print(int(var_i)) |
Arithmetic calculation | They are going to give each person 2/5 of a pizza. How many pizzas are needed to serve 10 people? | 4 | 2/5 10 [OP_MUL] | var_a = 0.4
var_b = 10
var_c = var_a * var_b
print(int(var_c)) |
Possibility | Some numbers are greater than or equal to 1620006 and less than or equal to 1629996. Find the largest of these numbers that is a multiple of 123. | 1629996 | 1620006 1629996 1 [OP_LIST_ARANGE] 123 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] | var_a = 1620006
var_b = 1629996
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 123
list_b = []
var_d = int(var_d)
for i in list_a:
i = int(i)
if i % var_d == 0:
list_b.append(i)
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f)) |
Possibility | Find the 6th largest number among four digits that can be formed by using 1, 3, 0, and 5 only once. | 5013 | [OP_LIST_SOL] 1 3 0 5 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 6 [OP_LIST_MAX] | var_a = 1
var_b = 3
var_c = 0
var_d = 5
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 6
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
print(int(var_g)) |
Comparison | The five students, Yoongi, Jungkook, Yuna, Yoojung, and Taehyung, each have the numbers 7, 6, 9, 8, and 10. Who has the 2nd largest number? | Yuna | [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_MAX] [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]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Comparison | From Donggil's house, it takes 0.76 kilometers (km) to get to the mart, and it takes 17/25 kilometers (km) to get to the hospital. Which place is closer to Donggil's house? | hospital | [OP_LIST_SOL] mart hospital [OP_LIST_EOL] [OP_LIST_SOL] 0.76 17/25 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'mart'
var_b = 'hospital'
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.76
var_d = 0.68
list_b= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Correspondence | What number in A makes A78-2B4=364 true? | 5 | A78-2B4=364 A [OP_DIGIT_UNK_SOLVER] | var_a = 'A78-2B4=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)) |
Arithmetic calculation | If the elements of set A are 1/2, 1/3, 1/5 and the elements of set B are 0.2, 0.4, 0.5, 0.7, find the number of elements in the union of sets A and B. | 5 | [OP_LIST_SOL] 1/2 1/3 1/5 [OP_LIST_EOL] [OP_LIST_SOL] 0.2 0.4 0.5 0.7 [OP_LIST_EOL] [OP_SET_UNION] [OP_LIST_LEN] | var_a = 0.5
var_b = 0.3333333333333333
var_c = 0.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 = 0.2
var_e = 0.4
var_f = 0.5
var_g = 0.7
list_b= []
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
list_c = list(set(list_a) | set(list_b))
var_h = len(list_c)
print(int(var_h)) |
Comparison | 20 students stood in a line. Jungkook stands third in line, and Yoongi stands behind Jungkook. If there are 5 students between Yoongi and Jungkook, how many students are standing behind Yoongi? | 11 | 20 3 [OP_SUB] 5 [OP_SUB] 1 [OP_SUB] | var_a = 20
var_b = 3
var_c = var_a - var_b
var_d = 5
var_e = var_c - var_d
var_f = 1
var_g = var_e - var_f
print(int(var_g)) |
Comparison | What is the sum of all numbers less than 0.4 among 0.8, 1/2, and 0.9? | 0 | [OP_LIST_SOL] 0.8 1/2 0.9 [OP_LIST_EOL] 0.4 [OP_LIST_LESS] [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.4
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(int(var_e)) |
Comparison | When 35 students including Minyoung are standing in a line, 27 students are standing in front of Minyeong. How many students are behind Minyoung? | 7 | 35 27 [OP_SUB] 1 [OP_SUB] | var_a = 35
var_b = 27
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | Jiyeol took Korean, Math, and English tests in the midterm exam. If the mean between the two different test scores is 26.5, 34.5, and 29 respectively, what is Jiyeol's whole average score? | 30 | 26.5 34.5 [OP_ADD] 29 [OP_ADD] 3 [OP_DIV] | var_a = 26.5
var_b = 34.5
var_c = var_a + var_b
var_d = 29
var_e = var_c + var_d
var_f = 3
var_g = var_e / var_f
print(int(var_g)) |
Possibility | If you are trying to decorate a fruit basket with 5 different fruits, including 2 pineapples, what is the number of cases that pineapples are placed at both ends? | 12 | 5 2 [OP_SUB] 5 2 [OP_SUB] [OP_PERM] 2 [OP_MUL] | var_a = 5
var_b = 2
var_c = var_a - var_b
var_d = 5
var_e = 2
var_f = var_d - var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
var_g = var_g * (var_c-i)
var_h = 2
var_i = var_g * var_h
print(int(var_i)) |
Possibility | There is a volleyball, soccerball, basketball, and baseball. If Youngbin buys two different balls, how many ways can he choose the ball? | 6 | [OP_LIST_SOL] volleyball soccerball basketball baseball [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB] | var_a = 'volleyball'
var_b = 'soccerball'
var_c = 'basketball'
var_d = 'baseball'
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = len(list_a)
var_f = 2
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
var_g = var_g * (var_e-i)
for i, elem in enumerate(range(var_f)):
var_g = var_g / (i+1)
print(int(var_g)) |
Correspondence | Minsu plans to go on a bicycle trip for 28 days. If the total distance to be traveled is 82.04 kilometers (km) and he travels an equal distance every day, find how many kilometers (km) must be traveled per day. | 2.93 | 82.04 28 [OP_DIV] | var_a = 82.04
var_b = 28
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Arithmetic calculation | There are four numbers 10, 11, 12, and 13. Divide the smallest number by the second smallest number. | 0.91 | [OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 1 [OP_LIST_MIN] 2 [OP_LIST_MIN] [OP_DIV] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
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]
var_g = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f / var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Correspondence | When 6A+B2=77, what is B? | 1 | 6A+B2=77 B [OP_DIGIT_UNK_SOLVER] | var_a = '6A+B2=77'
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 | There are three numbers 10, 11, and 12. What is the 3rd largest number divided by the 2nd largest number? | 0.91 | [OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 3 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_DIV] | var_a = 10
var_b = 11
var_c = 12
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b=list_a.copy()
list_b.sort()
var_e = list_b[-var_d]
var_f = 2
list_c=list_a.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = var_e / var_g
print('{:.2f}'.format(round(var_h+1e-10,2))) |
Comparison | The distance from the house to the library is 2 + 13/40 kilometers (km), and from the house to the bank is 2.56 kilometers (km). Which is farther from home, the library or the bank? | bank | [OP_LIST_SOL] library bank [OP_LIST_EOL] [OP_LIST_SOL] 2 13 40 [OP_DIV] [OP_ADD] 2.56 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'library'
var_b = 'bank'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 2
var_d = 13
var_e = 40
var_f = var_d / var_e
var_g = var_c + var_f
var_h = 2.56
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) |
Comparison | 20 ducks are waiting their turn to drink. If 11 ducks drank before the (a) duck, how many ducks drank after the (a) duck? | 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)) |
Geometry | A large square was created by arranging the square-shaped ttakji regularly without gaps. If the number of ttakjis placed at the perimeter was 240, how many ttakjis in total were used? | 3721 | 240 4 [OP_DIV] 1 [OP_ADD] 2 [OP_POW] | var_a = 240
var_b = 4
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
var_f = 2
var_g = var_e ** var_f
print(int(var_g)) |
Comparison | What is the probability of getting a card with a number less than or equal to 9 when you draw one of the number cards 1, 3, 4, 6, 7, or 9? | 1 | [OP_LIST_SOL] 1 3 4 6 7 9 [OP_LIST_EOL] 9 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] [OP_LIST_SOL] 1 3 4 6 7 9 [OP_LIST_EOL] [OP_LIST_LEN] [OP_DIV] | var_a = 1
var_b = 3
var_c = 4
var_d = 6
var_e = 7
var_f = 9
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 = 9
list_b = []
for i in list_a:
if i <= var_g:
list_b.append(i)
var_h = len(list_b)
var_i = 1
var_j = 3
var_k = 4
var_l = 6
var_m = 7
var_n = 9
list_c= []
if "/" in str(var_n):
var_n = eval(str(var_n))
list_c.append(var_n)
if "/" in str(var_m):
var_m = eval(str(var_m))
list_c.append(var_m)
if "/" in str(var_l):
var_l = eval(str(var_l))
list_c.append(var_l)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_c.append(var_k)
if "/" in str(var_j):
var_j = eval(str(var_j))
list_c.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_c.append(var_i)
list_c.reverse()
var_o = len(list_c)
var_p = var_h / var_o
print(int(var_p)) |
Correspondence | I need to divide a number by 5, but I mistakenly multiplied it by 7 and then added 2/9 to get 5 and 4/9. If you calculate correctly, show how much it is to 2 decimal places. | 0.15 | 5 4/9 [OP_ADD] 2/9 [OP_SUB] 7 [OP_DIV] 5 [OP_DIV] | var_a = 5
var_b = 0.4444444444444444
var_c = var_a + var_b
var_d = 0.2222222222222222
var_e = var_c - var_d
var_f = 7
var_g = var_e / var_f
var_h = 5
var_i = var_g / var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Possibility | There are 3 pairs of birds. How many birds are there in total? | 6 | 3 2 [OP_MUL] | var_a = 3
var_b = 2
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | In the division process, Namjoon omitted the 0 in the one's place of the three-digit divisor and misrepresented it as 12. After calculating, the quotient is divided by 210. Find the correctly calculated quotient. | 21 | 210 12 [OP_MUL] 120 [OP_FDIV] | var_a = 210
var_b = 12
var_c = var_a * var_b
var_d = 120
var_e = var_c // var_d
print(int(var_e)) |
Geometry | If the area of a piece of paper in the shape of a rhombus is 80 square centimeters (cm2) and one diagonal is 16 centimeters (cm), how long is the other diagonal in centimeters (cm)? | 10 | 80 2 [OP_MUL] 16 [OP_DIV] | var_a = 80
var_b = 2
var_c = var_a * var_b
var_d = 16
var_e = var_c / var_d
print(int(var_e)) |
Comparison | Find the number of numbers less than 0.4 among 0.8, 1/2, 0.3, and 1/3. | 2 | [OP_LIST_SOL] 0.8 1/2 0.3 1/3 [OP_LIST_EOL] 0.4 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
var_c = 0.3
var_d = 0.3333333333333333
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 = 0.4
list_b = []
for i in list_a:
if i < var_e:
list_b.append(i)
var_f = len(list_b)
print(int(var_f)) |
Arithmetic calculation | There is a box with a width of 24 centimeters (cm), a length of 15 centimeters (cm), and a height of 28 centimeters (cm). If you fill this box with as many milk cartons as possible, with a width of 4 centimeters (cm), a length of 5 centimeters (cm), and a height of 7 centimeters (cm), how many milk cartons will it fit? | 72 | 24 15 [OP_MUL] 28 [OP_MUL] 4 5 [OP_MUL] 7 [OP_MUL] [OP_DIV] | var_a = 24
var_b = 15
var_c = var_a * var_b
var_d = 28
var_e = var_c * var_d
var_f = 4
var_g = 5
var_h = var_f * var_g
var_i = 7
var_j = var_h * var_i
var_k = var_e / var_j
print(int(var_k)) |
Possibility | Find the difference between the second largest and the third smallest three-digit numbers, each of which has 1, 6, and 8 on each digit. | 198 | [OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 2 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_SUB] | 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 = 2
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
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)) |
Comparison | Jungkook has 10 pieces of colored paper, and Hoseok has 7 pieces of colored paper. Seokjin has 2 fewer pieces of colored paper than Jungkook. Who has the least colored paper? | Hoseok | [OP_LIST_SOL] Jungkook Hoseok Seokjin [OP_LIST_EOL] [OP_LIST_SOL] 10 7 10 2 [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jungkook'
var_b = 'Hoseok'
var_c = 'Seokjin'
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 = 10
var_e = 7
var_f = 10
var_g = 2
var_h = var_f - var_g
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[var_i-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Correspondence | There are two different numbers A and B. Find A in the two-digit subtraction formula A7-3B=55. | 8 | A7-3B=55 A [OP_DIGIT_UNK_SOLVER] | var_a = 'A7-3B=55'
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 | If 5 pieces of 400 centimeters (cm) long tape are joined together and the total length is 1904 centimeters (cm), how many millimeters (mm) is the length of each overlapping part? | 2400 | 400 5 [OP_MUL] 1904 [OP_SUB] 5 1 [OP_SUB] [OP_DIV] 100 [OP_MUL] | var_a = 400
var_b = 5
var_c = var_a * var_b
var_d = 1904
var_e = var_c - var_d
var_f = 5
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 100
var_k = var_i * var_j
print(int(var_k)) |
Arithmetic calculation | There are four numbers: 10, 11, 12, and 13. What is the product of the largest number and the second largest number? | 156 | [OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_MUL] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
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]
var_g = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = var_f * var_h
print(int(var_i)) |
Arithmetic calculation | On the first day, 318 liters (L) of water were added to the pool, and on the second day, 312 liters (L) of water were added. On the third day, 180 liters (L) of water were added in the morning and 162 liters (L) in the afternoon. How many liters (L) of water were added to the pool on average each day? | 324 | 318 312 [OP_ADD] 180 162 [OP_ADD] [OP_ADD] 3 [OP_DIV] | var_a = 318
var_b = 312
var_c = var_a + var_b
var_d = 180
var_e = 162
var_f = var_d + var_e
var_g = var_c + var_f
var_h = 3
var_i = var_g / var_h
print(int(var_i)) |
Comparison | There are 28 identical egg containers in the mart. Each egg container has the same number of eggs. When you select the 14th egg from the front, the 20th from the back, the 3rd from the left, and the 2nd from the right in an egg container, find all the number of eggs in the egg containers at this mart. | 3696 | 14 20 [OP_ADD] 1 [OP_SUB] 3 2 [OP_ADD] 1 [OP_SUB] [OP_MUL] 28 [OP_MUL] | var_a = 14
var_b = 20
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 3
var_g = 2
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
var_l = 28
var_m = var_k * var_l
print(int(var_m)) |
Correspondence | Subtracting some number from 88 gives 54. Find the number. | 34 | 88 54 [OP_SUB] | var_a = 88
var_b = 54
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | A and B are single-digit numbers. If A56B is a multiple of 36, how many digits can A be? | 3 | A56B [OP_GEN_POSSIBLE_LIST] 36 [OP_LIST_DIVISIBLE] A56B A [OP_LIST_FIND_UNK] [OP_LIST_LEN] | var_a = 'A56B'
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 = 36
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 = 'A56B'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
elem = str(elem)
list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_e = len(list_c)
print(int(var_e)) |
Comparison | Jihee collected 7 and 8. Seokjin collected 3 and 10. Suzy collected 9 and 2. Who is the person whose sum of the collected numbers is less than Seokjin? | Suzy | [OP_LIST_SOL] Jihee Seokjin Suzy [OP_LIST_EOL] Seokjin [OP_LIST_INDEX] [OP_LIST_SOL] 7 8 [OP_ADD] 3 10 [OP_ADD] 9 2 [OP_ADD] [OP_LIST_EOL] [OP_LIST_GET] [OP_LIST_LESS] 1 [OP_LIST_GET] [OP_LIST_POP] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jihee'
var_b = 'Seokjin'
var_c = 'Suzy'
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 = 'Seokjin'
var_e = list_a.index(var_d)+1
var_f = 7
var_g = 8
var_h = var_f + var_g
var_i = 3
var_j = 10
var_k = var_i + var_j
var_l = 9
var_m = 2
var_n = var_l + var_m
list_b= []
if "/" in str(var_n):
var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
var_o = list_b[var_e-1]
list_c = []
for i in list_b:
if i < var_o:
list_c.append(i)
var_p = 1
var_q = list_c[var_p-1]
var_r = list_b.index(var_q)+1
var_s = list_a[var_r-1]
print(var_s) |
Geometry | The lengths of the two wires are 36 centimeters (cm) and 38 centimeters (cm), respectively. Make a square with the 36 centimeters (cm) wire and a rectangle 15 centimeters (cm) wide with the 38 centimeters (cm) wire. Find the difference between the area of the square and the rectangle. | 21 | 36 4 [OP_DIV] 2 [OP_POW] 38 2 [OP_DIV] 15 [OP_SUB] 15 [OP_MUL] [OP_SUB] [OP_ABS] | var_a = 36
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
var_f = 38
var_g = 2
var_h = var_f / var_g
var_i = 15
var_j = var_h - var_i
var_k = 15
var_l = var_j * var_k
var_m = var_e - var_l
var_n = abs(var_m)
print(int(var_n)) |
Comparison | There are three triangles (A), (B), and (C). Triangle (A) has a base length of 8 centimeters (cm) and a height of 6 centimeters (cm), triangle (B) has a base length of 5 centimeters (cm) and a height of 9 centimeters (cm), triangle (C) has a base of 7 centimeters (cm) and a height of 7 centimeters (cm). Which triangle has the largest area among (A), (B), and (C)? | (C) | [OP_LIST_SOL] (A) (B) (C) [OP_LIST_EOL] [OP_LIST_SOL] 8 6 [OP_MUL] 2 [OP_DIV] 5 9 [OP_MUL] 2 [OP_DIV] 7 7 [OP_MUL] 2 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [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 = 8
var_e = 6
var_f = var_d * var_e
var_g = 2
var_h = var_f / var_g
var_i = 5
var_j = 9
var_k = var_i * var_j
var_l = 2
var_m = var_k / var_l
var_n = 7
var_o = 7
var_p = var_n * var_o
var_q = 2
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_m):
var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
var_s = 1
list_c=list_b.copy()
list_c.sort()
var_t = list_c[-var_s]
var_u = list_b.index(var_t)+1
var_v = list_a[var_u-1]
print(var_v) |
Comparison | The distance from the house to the school is 11/4 kilometers (km), and the distance from the house to the stationery store is 2.89 kilometers (km). Which is farther from your house, the school or the stationery? | stationery | [OP_LIST_SOL] school stationery [OP_LIST_EOL] [OP_LIST_SOL] 11 4 [OP_DIV] 2.89 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'school'
var_b = 'stationery'
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 = 11
var_d = 4
var_e = var_c / var_d
var_f = 2.89
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 | There are magic bags. The length becomes 10 times longer when a thing gets in and out of the red bag, and the length becomes 1/100 of the original length when a thing gets through the blue bag. Yeonwoo had 13.5 centimeters (cm) of sorghum straw put in and out of the red bag 3 times and the blue bag 2 times. How many centimeters (cm) is Yeonwoo's sorghum straw now? | 1.35 | 13.5 10 3 [OP_POW] [OP_MUL] 1/100 2 [OP_POW] [OP_MUL] | var_a = 13.5
var_b = 10
var_c = 3
var_d = var_b ** var_c
var_e = var_a * var_d
var_f = 0.01
var_g = 2
var_h = var_f ** var_g
var_i = var_e * var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Comparison | There are students queuing up to get on the bus, and Yoojung is standing at the 5th from the front. If Hoseok stands right behind Yoojung, what place does Hoseok take in the line? | 6 | 5 1 [OP_ADD] | var_a = 5
var_b = 1
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | Consider Namjoon had 15 more pieces of colored paper than what Seokjin had. And Seokjin and Yoongi ended up having the same amount of colored paper after Seokjin gave Yoongi 7 pieces of colored paper. What would be the total amount of colored paper of three people? | 142 | 40 7 [OP_ADD] 40 7 [OP_SUB] [OP_ADD] 40 7 [OP_ADD] 15 [OP_ADD] [OP_ADD] | var_a = 40
var_b = 7
var_c = var_a + var_b
var_d = 40
var_e = 7
var_f = var_d - var_e
var_g = var_c + var_f
var_h = 40
var_i = 7
var_j = var_h + var_i
var_k = 15
var_l = var_j + var_k
var_m = var_g + var_l
print(int(var_m)) |
Arithmetic calculation | One bundle of notebooks is 25. 5 bundles were divided into 8 groups of 13 students. How many notebooks have left after dividing to students? | 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)) |
Arithmetic calculation | Yongchan walked 1.05 kilometers (km) in 10 minutes. If Yongchan walked 460 meters (m) longer than Min-joo, how many kilometers (km) did Min-joo walk? | 0.59 | 1.05 460 1000 [OP_DIV] [OP_SUB] | var_a = 1.05
var_b = 460
var_c = 1000
var_d = var_b / var_c
var_e = var_a - var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | It is said that 155.2 liters (L) of water is needed to produce 55.99 kilograms (kg) of apples, and the amount of water in one bucket is 2 liters (L). If you produce 1556.5 kilograms (kg) of apples, how many buckets of water are needed? | 2158 | 155.2 55.99 [OP_DIV] 1556.5 [OP_MUL] 2 [OP_DIV] 1 [OP_CEIL] | var_a = 155.2
var_b = 55.99
var_c = var_a / var_b
var_d = 1556.5
var_e = var_c * var_d
var_f = 2
var_g = var_e / var_f
var_h = 1
var_i=int(((var_g+9*10**(var_h-2))//(10**(var_h-1)))*10**(var_h-1))
print(int(var_i)) |
Correspondence | 345A rounded up to the nearest ten is 3460. Find the total sum of possible values of A. | 45 | 345A [OP_GEN_POSSIBLE_LIST] 3460 10 [OP_SUB] [OP_LIST_MORE] 3460 [OP_LIST_LESS] 345A A [OP_LIST_FIND_UNK] [OP_LIST_SUM] | var_a = '345A'
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 = 3460
var_c = 10
var_d = var_b - var_c
list_b = []
for i in list_a:
if i > var_d:
list_b.append(i)
var_e = 3460
list_c = []
for i in list_b:
if i < var_e:
list_c.append(i)
var_f = '345A'
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)) |
Geometry | A regular polyhedron has 8 faces. Find the number of edges of this regular polyhedron. | 12 | 4 4 [OP_ADD] 4 [OP_ADD] | var_a = 4
var_b = 4
var_c = var_a + var_b
var_d = 4
var_e = var_c + var_d
print(int(var_e)) |
Comparison | Yoongi has 4 apples, Yuna has 5, and Jungkook has 6 divided by 3 apples. Who has the fewest apples? | Jungkook | [OP_LIST_SOL] Yoongi Yuna Jungkook [OP_LIST_EOL] [OP_LIST_SOL] 4 5 6 3 [OP_FDIV] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoongi'
var_b = 'Yuna'
var_c = 'Jungkook'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 4
var_e = 5
var_f = 6
var_g = 3
var_h = var_f // var_g
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[var_i-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Arithmetic calculation | Sangcheol is reading a book. Yesterday he read 1/3 of the total, today he read 1/2 of the total. How much did he read in the two days? | 0.83 | 1/3 1/2 [OP_ADD] | var_a = 0.3333333333333333
var_b = 0.5
var_c = var_a + var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | Write down what results from 426 multiplied by 0.06. | 25.56 | 426 0.06 [OP_MUL] | var_a = 426
var_b = 0.06
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | Yoon Jeong stood in line at the ticket office to buy a train ticket. How many people are all in line to buy train tickets when there are 6 people waiting in front of Yoon Jeong and Yoon Jeong is the 5th person from the back? | 11 | 6 5 [OP_ADD] | var_a = 6
var_b = 5
var_c = var_a + var_b
print(int(var_c)) |
Comparison | Jungkook saved as much as 3 divided by 6, and Yoongi saved as much as 4. Whose number is greater? | Yoongi | [OP_LIST_SOL] Jungkook Yoongi [OP_LIST_EOL] [OP_LIST_SOL] 6 3 [OP_FDIV] 4 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jungkook'
var_b = 'Yoongi'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 6
var_d = 3
var_e = var_c // var_d
var_f = 4
list_b= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j) |
Arithmetic calculation | The amount of water used per day is 215 liters (L). How many liters (L) of water are saved when you save 0.32 times? | 68.8 | 215 0.32 [OP_MUL] | var_a = 215
var_b = 0.32
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | The sum of the weights of the bags of 10 people traveling together on a European tour is divided by 42, there is no rest, and the quotient is 10. Suji, one of the party, bought a souvenir and the bag weighed 50 kg (kg). If the average weight of the bags is 44 kilograms (kg), how many kilograms (kg) does the Suji bag weigh before buying the souvenir? | 30 | 50 44 42 [OP_SUB] 10 [OP_MUL] [OP_SUB] | var_a = 50
var_b = 44
var_c = 42
var_d = var_b - var_c
var_e = 10
var_f = var_d * var_e
var_g = var_a - var_f
print(int(var_g)) |
Arithmetic calculation | There is a car that is 20 meters (m) long and travels at 288 centimeters (cm) in one second. When this car takes 25 seconds to get through the tunnel, find the length in meters (m) of the tunnel. | 52 | 288 100 [OP_DIV] 25 [OP_MUL] 20 [OP_SUB] | var_a = 288
var_b = 100
var_c = var_a / var_b
var_d = 25
var_e = var_c * var_d
var_f = 20
var_g = var_e - var_f
print(int(var_g)) |
Correspondence | I have two different numbers, A and B. Find B from the two-digit addition equation 6A+B2=77. | 1 | 6A+B2=77 B [OP_DIGIT_UNK_SOLVER] | var_a = '6A+B2=77'
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 | We had 8 rabbits and decided to raise 5 more rabbits. How many rabbits are we raising now? | 13 | 8 5 [OP_ADD] | var_a = 8
var_b = 5
var_c = var_a + var_b
print(int(var_c)) |
Possibility | What is the largest three-digit number minus the smallest one that can be formed by choosing three different numbers from 2, 7, 4, and 9? | 727 | [OP_LIST_SOL] 2 7 4 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 2
var_b = 7
var_c = 4
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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 1
list_d=list_b.copy()
list_d.sort()
var_i = list_d[var_h-1]
var_j = var_g - var_i
print(int(var_j)) |
Comparison | Junseop's hair is 9 centimeters (cm) 8 millimeters (mm) long, Taehun's hair is 8.9 centimeters (cm), and Hayul's hair is 9.3 centimeters (cm) long. Which of the three friends has the shortest hair? | Taehun | [OP_LIST_SOL] Junseop Taehun Hayul [OP_LIST_EOL] [OP_LIST_SOL] 9 8 10 [OP_DIV] [OP_ADD] 8.9 9.3 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Junseop'
var_b = 'Taehun'
var_c = 'Hayul'
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 = 9
var_e = 8
var_f = 10
var_g = var_e / var_f
var_h = var_d + var_g
var_i = 8.9
var_j = 9.3
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)
list_b.reverse()
var_k = 1
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) |
Arithmetic calculation | This year, the father is 35 years old, and the son is 5 years old. In how many years does the sum of the ages of the father and son become 60? | 10 | 60 35 5 [OP_ADD] [OP_SUB] 2 [OP_DIV] | var_a = 60
var_b = 35
var_c = 5
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 you add 99 to a certain number and multiply that by 17, it becomes 3111. Find that number in question. | 84 | 3111 17 [OP_DIV] 99 [OP_SUB] | var_a = 3111
var_b = 17
var_c = var_a / var_b
var_d = 99
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | If you mistakenly divide 6 by a number, you get 52 when you should have subtracted 40 from the number. What do you get when you calculate correctly? | 272 | 52 6 [OP_MUL] 40 [OP_SUB] | var_a = 52
var_b = 6
var_c = var_a * var_b
var_d = 40
var_e = var_c - var_d
print(int(var_e)) |
Possibility | Find the largest odd number not more than 300 among the three-digit natural numbers formed by arranging three different numbers from 0, 1, 2, 3, 4, 5, 6, 7, and 8. | 297 | [OP_LIST_SOL] 0 1 2 3 4 5 6 7 8 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 300 [OP_LIST_LESS_EQUAL] 2 [OP_LIST_DIVISIBLE] [OP_SET_DIFFERENCE] 1 [OP_LIST_MAX] | var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
var_f = 5
var_g = 6
var_h = 7
var_i = 8
var_j = 9
list_a= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_a.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_a.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_a.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_a.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_k = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_k))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_l = 300
list_c = []
for i in list_b:
if i <= var_l:
list_c.append(i)
var_m = 2
list_d = []
var_m = int(var_m)
for i in list_c:
i = int(i)
if i % var_m == 0:
list_d.append(i)
list_e = list(set(list_c) - set(list_d))
var_n = 1
list_f=list_e.copy()
list_f.sort()
var_o = list_f[-var_n]
print(int(var_o)) |
Possibility | There are 5 different people. We are trying to select three of them to be the president, vice president, and manager. Find the number of cases. | 60 | 5 1 1 [OP_ADD] 1 [OP_ADD] [OP_PERM] | var_a = 5
var_b = 1
var_c = 1
var_d = var_b + var_c
var_e = 1
var_f = var_d + var_e
var_g = 1
var_a = int(var_a)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
var_g = var_g * (var_a-i)
print(int(var_g)) |
Arithmetic calculation | Yeonju received 1/4 of the total number of notebooks, and Minji received 3/7. If there were 28 notebooks, how many notebooks are left? | 9 | 28 1 1/4 [OP_SUB] 3/7 [OP_SUB] [OP_MUL] | var_a = 28
var_b = 1
var_c = 0.25
var_d = var_b - var_c
var_e = 0.42857142857142855
var_f = var_d - var_e
var_g = var_a * var_f
print(int(var_g)) |
Arithmetic calculation | If a farmer bought 23 chicks and 12 more chicks on the first day and the second day, how many chicks are increased? | 35 | 23 12 [OP_ADD] | var_a = 23
var_b = 12
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | Ki-woo used 1/2 of the winnings to buy school supplies and saved 3/8 of the rest. If the remaining money is 2,500 won, how much money did Ki-woo use to buy school supplies? | 4000 | 2500 1 3/8 [OP_SUB] [OP_DIV] 1/2 [OP_DIV] 1/2 [OP_MUL] | var_a = 2500
var_b = 1
var_c = 0.375
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 0.5
var_g = var_e / var_f
var_h = 0.5
var_i = var_g * var_h
print(int(var_i)) |
Possibility | Jihyung is trying to pick up a school supply from a pencil case that contains two pencils of different colors and four erasers of different shapes. How many cases are there in which Jihyung picks up a school supply? | 6 | 2 4 [OP_ADD] 1 [OP_COMB] | var_a = 2
var_b = 4
var_c = var_a + var_b
var_d = 1
var_e = 1
var_c = int(var_c)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
var_e = var_e * (var_c-i)
for i, elem in enumerate(range(var_d)):
var_e = var_e / (i+1)
print(int(var_e)) |
Arithmetic calculation | Jinwoo and Seongmin can do 7/12 of the work if they do something for 8 days together. The two of them did this together for 8 days, and the rest was done by Jinwoo alone for 10 days. How many days will it take if Seongmin finishes this task by himself from the beginning? | 32 | 1 7/12 8 [OP_DIV] 1 7/12 [OP_SUB] 10 [OP_DIV] [OP_SUB] [OP_DIV] | var_a = 1
var_b = 0.5833333333333334
var_c = 8
var_d = var_b / var_c
var_e = 1
var_f = 0.5833333333333334
var_g = var_e - var_f
var_h = 10
var_i = var_g / var_h
var_j = var_d - var_i
var_k = var_a / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2))))) |
Correspondence | Adding 4.372 to a number and subtracting 43.72 gives us 16.398. What is the value of subtracting 3.48 from this number? | 52.27 | 16.398 43.72 [OP_ADD] 4.372 [OP_SUB] 3.48 [OP_SUB] | var_a = 16.398
var_b = 43.72
var_c = var_a + var_b
var_d = 4.372
var_e = var_c - var_d
var_f = 3.48
var_g = var_e - var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | Of the 48 roses, 3/8 are red and 5/16 are yellow. Find how many more red roses are there than yellow roses. | 3 | 48 3/8 [OP_MUL] 48 5/16 [OP_MUL] [OP_SUB] | var_a = 48
var_b = 0.375
var_c = var_a * var_b
var_d = 48
var_e = 0.3125
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g)) |
Comparison | In a multiplication of two two-digit numbers, you incorrectly saw the tens digit 2 in the number being multiplied as a 6, resulting in a computed value of 2432. Write the smaller of the two two-digit numbers when the correct result is 912. | 24 | [OP_LIST_SOL] 2432 912 [OP_SUB] 6 2 [OP_SUB] 10 [OP_MUL] [OP_DIV] 912 2432 912 [OP_SUB] 6 2 [OP_SUB] 10 [OP_MUL] [OP_DIV] [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MIN] | var_a = 2432
var_b = 912
var_c = var_a - var_b
var_d = 6
var_e = 2
var_f = var_d - var_e
var_g = 10
var_h = var_f * var_g
var_i = var_c / var_h
var_j = 912
var_k = 2432
var_l = 912
var_m = var_k - var_l
var_n = 6
var_o = 2
var_p = var_n - var_o
var_q = 10
var_r = var_p * var_q
var_s = var_m / var_r
var_t = var_j / var_s
list_a= []
if "/" in str(var_t):
var_t = eval(str(var_t))
list_a.append(var_t)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_a.append(var_i)
list_a.reverse()
var_u = 1
list_b=list_a.copy()
list_b.sort()
var_v = list_b[var_u-1]
print(int(var_v)) |
Correspondence | You were supposed to multiply 3 by a number, but mistakenly multiplied 6 by a number, and got 42. Find the result of the correct calculation. | 21 | 42 6 [OP_DIV] 3 [OP_MUL] | var_a = 42
var_b = 6
var_c = var_a / var_b
var_d = 3
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | You had to multiply a number by 6 but mistakenly subtracted instead to get 51. Find the correctly calculated result. | 342 | 51 6 [OP_ADD] 6 [OP_MUL] | var_a = 51
var_b = 6
var_c = var_a + var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Geometry | Find the area in centimeters (cm) of a rectangle whose length is 4 centimeters (cm) and width is 2 centimeters (cm). | 8 | 4 2 [OP_MUL] | var_a = 4
var_b = 2
var_c = var_a * var_b
print(int(var_c)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.