category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Comparison | There is a radish field and a cabbage field with a length of 364 meters (m). When radishes are planted at intervals of 22.75 meters (m) and cabbages are planted at intervals of 45.5 meters (m), find out which of radishes and cabbages was planted more. | radish | [OP_LIST_SOL] radish cabbage [OP_LIST_EOL] [OP_LIST_SOL] 364 22.75 [OP_DIV] 364 45.5 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'radish'
var_b = 'cabbage'
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 = 364
var_d = 22.75
var_e = var_c / var_d
var_f = 364
var_g = 45.5
var_h = var_f / var_g
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Geometry | A figure with one side of 16 centimeters (cm) and all sides of the same length has a perimeter of 80 centimeters (cm). How many sides does this figure have? | 5 | 80 16 [OP_DIV] | var_a = 80
var_b = 16
var_c = var_a / var_b
print(int(var_c)) |
Possibility | How many cases are there to choose and study two subjects among English, Mathematics, and Korean? | 3 | [OP_LIST_SOL] English Mathematics Korean [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB] | var_a = 'English'
var_b = 'Mathematics'
var_c = 'Korean'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = len(list_a)
var_e = 2
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)
print(int(var_f)) |
Arithmetic calculation | If a pencil sold at a store is 200 won cheaper than 5,000 won, find the price of the pencil in units of 10,000 won. | 0.48 | 5000 200 [OP_SUB] 10000 [OP_DIV] | var_a = 5000
var_b = 200
var_c = var_a - var_b
var_d = 10000
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Comparison | There are 5 and 6 rows of cars parked on either side of the father's car in the parking lot, 6 and 7 rows of cars parked in the front and back. Assuming the number of cars in each row is the same, how many cars are in the parking lot? | 168 | 5 6 [OP_ADD] 1 [OP_ADD] 6 7 [OP_ADD] 1 [OP_ADD] [OP_MUL] | var_a = 5
var_b = 6
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
var_f = 6
var_g = 7
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)) |
Arithmetic calculation | How many two-digit numbers are divisible by 3? | 30 | 10 99 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 10
var_b = 99
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 = len(list_b)
print(int(var_e)) |
Arithmetic calculation | You want to divide candies equally among the students, but if you distribute 7 candies to all students, 12 candies are in short, and if you distribute 3 candies, 20 candies are left over. If the number of students is A and the number of candies is B, find the value of A+B. | 52 | 20 12 [OP_ADD] 7 3 [OP_SUB] [OP_DIV] 7 [OP_MUL] 12 [OP_SUB] 20 12 [OP_ADD] 7 3 [OP_SUB] [OP_DIV] [OP_ADD] | var_a = 20
var_b = 12
var_c = var_a + var_b
var_d = 7
var_e = 3
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 7
var_i = var_g * var_h
var_j = 12
var_k = var_i - var_j
var_l = 20
var_m = 12
var_n = var_l + var_m
var_o = 7
var_p = 3
var_q = var_o - var_p
var_r = var_n / var_q
var_s = var_k + var_r
print(int(var_s)) |
Arithmetic calculation | Find the sum of the aliquots of 32 that are not aliquots of 8. | 48 | 32 [OP_LIST_GET_DIVISOR] 8 [OP_LIST_GET_DIVISOR] [OP_SET_DIFFERENCE] [OP_LIST_SUM] | var_a = 32
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 = 8
list_b = []
num_sqrt = int(math.sqrt(var_b))
for i in range(1, num_sqrt+1):
if var_b % i == 0:
list_b.append(i)
list_b.append(int(var_b/i))
list_b = sorted(set(list_b))
list_c = list(set(list_a) - set(list_b))
list_c = [float(i) for i in list_c]
var_c = sum(list_c)
print(int(var_c)) |
Arithmetic calculation | A children's book was placed on one side of the two-arm scale, and two 0.3 kilograms (kg) dolls and 0.5 kilograms (kg) toy cars were placed on the other side. How many kilograms (kg) is one children's book? | 1.1 | 0.5 0.3 2 [OP_MUL] [OP_ADD] | var_a = 0.5
var_b = 0.3
var_c = 2
var_d = var_b * var_c
var_e = var_a + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Geometry | There is a rectangle with a length of 10 centimeters (cm) and a width of 8 centimeters (cm) and a square with the same perimeter. Find the length of one side of this square. | 9 | 10 8 [OP_ADD] 2 [OP_MUL] 4 [OP_DIV] | var_a = 10
var_b = 8
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g)) |
Possibility | You are about to make a three-digit number by selecting three from 0, 2, 4, and 6 and using them only once. What is the sum of the largest and smallest possible numbers. | 846 | [OP_LIST_SOL] 0 2 4 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD] | 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)) |
Arithmetic calculation | What is the product of the numbers 4, 6, 7, and 14? | 2352 | 4 6 [OP_MUL] 7 [OP_MUL] 14 [OP_MUL] | var_a = 4
var_b = 6
var_c = var_a * var_b
var_d = 7
var_e = var_c * var_d
var_f = 14
var_g = var_e * var_f
print(int(var_g)) |
Correspondence | Rounding 42A3 to the hundreds place makes it 4300. How many possible A's are there? | 5 | 42A3 [OP_GEN_POSSIBLE_LIST] 4300 50 [OP_SUB] [OP_LIST_MORE_EQUAL] 4300 50 [OP_ADD] [OP_LIST_LESS] 42A3 A [OP_LIST_FIND_UNK] [OP_LIST_LEN] | var_a = '42A3'
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 = 4300
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 = 4300
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 = '42A3'
var_i = 'A'
var_h = str(var_h)
var_i = str(var_i)
unk_idx = var_h.index(var_i)
list_d = []
for elem in list_c:
elem = str(elem)
list_d.append(int(elem[unk_idx]))
list_d = list(set(list_d))
var_j = len(list_d)
print(int(var_j)) |
Correspondence | Dividing a number by 6 gives a remainder of 4, dividing a number by 8 leaves a remainder of 6, and dividing a number by 10 leaves a remainder of 8. Find the smallest number that satisfies the above condition. | 118 | 0 9999 1 [OP_LIST_ARANGE] 6 4 [OP_LIST_DIVIDE_AND_REMAIN] 8 6 [OP_LIST_DIVIDE_AND_REMAIN] 10 8 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_MIN] | var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
var_e = 4
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 = 6
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 = 10
var_i = 8
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
list_e=list_d.copy()
list_e.sort()
var_k = list_e[var_j-1]
print(int(var_k)) |
Arithmetic calculation | There is a square with a side length of 12 centimeters (cm). If the area of the new rectangle made by increasing the horizontal length of this square by 3 centimeters (cm) and reducing the vertical length by A centimeters (cm) is 120 square cm (cm2), find the value of A. | 4 | 12 120 12 3 [OP_ADD] [OP_DIV] [OP_SUB] | var_a = 12
var_b = 120
var_c = 12
var_d = 3
var_e = var_c + var_d
var_f = var_b / var_e
var_g = var_a - var_f
print(int(var_g)) |
Arithmetic calculation | There are 12 crates of 200 and 150 in total. When 2180 apples were divided into these boxes, leaving 30 apples. How many boxes of 200 are there? | 7 | 2180 30 [OP_SUB] 150 12 [OP_MUL] [OP_SUB] 200 150 [OP_SUB] [OP_DIV] | var_a = 2180
var_b = 30
var_c = var_a - var_b
var_d = 150
var_e = 12
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 200
var_i = 150
var_j = var_h - var_i
var_k = var_g / var_j
print(int(var_k)) |
Comparison | Yoongi has 4 apples and Jungkook has 6 plus 3 apples. Who has more apples? | 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) |
Arithmetic calculation | Taesoo read a 161-page storybook for a week. How many pages did he read on average per day? | 23 | 161 7 [OP_DIV] | var_a = 161
var_b = 7
var_c = var_a / var_b
print(int(var_c)) |
Correspondence | When 68A+3=691, find what A is. | 8 | 68A+3=691 A [OP_DIGIT_UNK_SOLVER] | var_a = '68A+3=691'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Comparison | There are 5 boxes A, B, C, D, and E. Box B is larger than box C and smaller than box E. Box A is smaller than box D. Box A is larger than box E. Which box is the largest? | D | [OP_LIST_SOL] A B C D E [OP_LIST_EOL] [OP_LIST_SOL] B C > B E < A D < A E > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
var_e = 'E'
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 = 'B'
var_g = 'C'
var_h = '>'
var_i = 'B'
var_j = 'E'
var_k = '<'
var_l = 'A'
var_m = 'D'
var_n = '<'
var_o = 'A'
var_p = 'E'
var_q = '>'
list_b= []
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)
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_r = 1
var_s = list_c[var_r-1]
print(var_s) |
Comparison | The numbers 2.23, 3.12, 9.434, and 2.453 are placed in ascending order. What should come first? | 2.23 | [OP_LIST_SOL] 2.23 3.12 9.434 2.453 [OP_LIST_EOL] 1 [OP_LIST_MIN] | var_a = 2.23
var_b = 3.12
var_c = 9.434
var_d = 2.453
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('{:.2f}'.format(round(var_f+1e-10,2))) |
Arithmetic calculation | The climbing speed was 15 kilometers (km) per hour and the descending speed was 10 kilometers (km) per hour. If the difference between the two times is 30 minutes, how hours did it take to go down the mountain? | 1.5 | 10 30 60 [OP_DIV] [OP_MUL] 15 10 [OP_SUB] [OP_DIV] 30 60 [OP_DIV] [OP_ADD] | var_a = 10
var_b = 30
var_c = 60
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 15
var_g = 10
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 30
var_k = 60
var_l = var_j / var_k
var_m = var_i + var_l
print('{:.2f}'.format(round(var_m+1e-10,2))) |
Correspondence | You add 7/5 to a number by mistake instead of taking it away, and you get 81/20. Find the value correctly calculated. | 1.25 | 81/20 7/5 [OP_SUB] 7/5 [OP_SUB] | var_a = 4.05
var_b = 1.4
var_c = var_a - var_b
var_d = 1.4
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | If you add a number twice to 0.46, you get 0.72. What number is it? | 0.2 | 0.72 0.46 [OP_SUB] 0.46 [OP_SUB] | var_a = 0.72
var_b = 0.46
var_c = var_a - var_b
var_d = 0.46
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | 3A1+2B=327. What is B? | 6 | 3A1+2B=327 B [OP_DIGIT_UNK_SOLVER] | var_a = '3A1+2B=327'
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)) |
Correspondence | You had to subtract 19 from a certain number and add 27 but you accidentally subtract 27 and add 19 and you get 84. Find the correct result. | 100 | 84 19 [OP_SUB] 27 [OP_ADD] 19 [OP_SUB] 27 [OP_ADD] | var_a = 84
var_b = 19
var_c = var_a - var_b
var_d = 27
var_e = var_c + var_d
var_f = 19
var_g = var_e - var_f
var_h = 27
var_i = var_g + var_h
print(int(var_i)) |
Correspondence | There is a three-digit number that has a hundreds digit of 5, a tens digit of A, and a ones digit of 5. If we round down this number to the tens place, we get 500. If A is a single digit number, find the sum of the numbers that can be written for A. | 45 | [OP_LIST_SOL] 5 A 5 [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 600 [OP_LIST_LESS_EQUAL] A [OP_LIST_FIND_UNK] [OP_LIST_SUM] | var_a = 5
var_b = 'A'
var_c = 5
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d=""
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 = 600
list_c = []
for i in list_b:
if i <= var_e:
list_c.append(i)
var_f = 'A'
var_d = str(var_d)
var_f = str(var_f)
unk_idx = var_d.index(var_f)
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_g = sum(list_d)
print(int(var_g)) |
Geometry | How many centimeters (cm) is the side of the largest equilateral triangle that can be made with a wire of 78 centimeters (cm)? | 26 | 78 3 [OP_DIV] | var_a = 78
var_b = 3
var_c = var_a / var_b
print(int(var_c)) |
Correspondence | Jinho spent half of his money and 300 won at the first store, then half of his money and 400 won at the second store, and he had no money left. Find how much money Jinho had at the beginning. | 2200 | 0 400 [OP_ADD] 1 1/2 [OP_SUB] [OP_DIV] 300 [OP_ADD] 1 1/2 [OP_SUB] [OP_DIV] | var_a = 0
var_b = 400
var_c = var_a + var_b
var_d = 1
var_e = 0.5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 300
var_i = var_g + var_h
var_j = 1
var_k = 0.5
var_l = var_j - var_k
var_m = var_i / var_l
print(int(var_m)) |
Comparison | (A) is a cube with an edge length of 7 centimeters (cm), (B) is a cube with an edge length of 11 centimeters (cm), and (C) is a cube with an edge length of 9 centimeters (cm). Which cube has the largest surface area among (A), (B), and (C)? | (B) | [OP_LIST_SOL] (A) (B) (C) [OP_LIST_EOL] [OP_LIST_SOL] 6 7 2 [OP_POW] [OP_MUL] 6 11 2 [OP_POW] [OP_MUL] 6 9 2 [OP_POW] [OP_MUL] [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 = 6
var_e = 7
var_f = 2
var_g = var_e ** var_f
var_h = var_d * var_g
var_i = 6
var_j = 11
var_k = 2
var_l = var_j ** var_k
var_m = var_i * var_l
var_n = 6
var_o = 9
var_p = 2
var_q = var_o ** var_p
var_r = var_n * 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) |
Correspondence | A is a single digit number. Find A from the multiplication formula AA×AA=5929 between two digit numbers. | 7 | AA×AA=5929 A [OP_DIGIT_UNK_SOLVER] | var_a = 'AA×AA=5929'
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 | Chocolate and candies go into a gift set at a confectionery store at the same time. Chocolate is 69 pieces and candy is 86 pieces. When chocolates and candies are divided equally into a gift set, there are 5 chocolates left and 6 candies left. Find the maximum number of gift sets that can be made. | 16 | 69 5 [OP_SUB] 86 6 [OP_SUB] [OP_GCD] | var_a = 69
var_b = 5
var_c = var_a - var_b
var_d = 86
var_e = 6
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
print(int(var_g)) |
Comparison | Youngsik and Mingi shared 1000 apples. Youngsik took 50 more than Mingi, and while Mingi was carrying apples, he met Nogi and shared them with him. Mingi's apples were 35 more than Nogi's. If Mingi wants to sell her apples in 17 boxes, how many apples are in one box? | 15 | 1000 50 [OP_SUB] 2 [OP_DIV] 35 [OP_SUB] 2 [OP_DIV] 35 [OP_ADD] 17 [OP_DIV] | var_a = 1000
var_b = 50
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 35
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
var_j = 35
var_k = var_i + var_j
var_l = 17
var_m = var_k / var_l
print(int(var_m)) |
Arithmetic calculation | The lottery winning numbers for this week are 11, 25, 42, 15, 28, and 39. Find the difference between the largest number and the second largest number. | 3 | [OP_LIST_SOL] 11 25 42 15 28 39 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_SUB] | var_a = 11
var_b = 25
var_c = 42
var_d = 15
var_e = 28
var_f = 39
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 = 1
list_b=list_a.copy()
list_b.sort()
var_h = list_b[-var_g]
var_i = 2
list_c=list_a.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = var_h - var_j
print(int(var_k)) |
Comparison | Choa can jump 1.1 meters (m), and Junga can jump 20/22 meters (m). Who can jump higher? | Choa | [OP_LIST_SOL] Choa Junga [OP_LIST_EOL] [OP_LIST_SOL] 1.1 20/22 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Choa'
var_b = 'Junga'
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 = 1.1
var_d = 0.9090909090909091
list_b= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Possibility | If 5 people shake each other's hands once, how many handshakes will they all do? | 10 | 5 2 [OP_COMB] | var_a = 5
var_b = 2
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
var_c = var_c / (i+1)
print(int(var_c)) |
Correspondence | A three-digit number with 3 in the hundreds is divisible when divided by 4. How many three-digit numbers that meet this condition are there? | 25 | 3 100 [OP_MUL] 3 100 [OP_MUL] 99 [OP_ADD] 1 [OP_LIST_ARANGE] 4 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 3
var_b = 100
var_c = var_a * var_b
var_d = 3
var_e = 100
var_f = var_d * var_e
var_g = 99
var_h = var_f + var_g
var_i = 1
list_a = [i for i in range(var_c, var_h + 1, var_i)]
var_j = 4
list_b = []
var_j = int(var_j)
for i in list_a:
i = int(i)
if i % var_j == 0:
list_b.append(i)
var_k = len(list_b)
print(int(var_k)) |
Comparison | Jungkook did 81 jump ropes. Yuna did 26 jump ropes each in the first and second times. At least how many times should Yuna jump rope more than Jungkook in the third? | 30 | 81 26 26 [OP_ADD] [OP_SUB] 1 [OP_ADD] | var_a = 81
var_b = 26
var_c = 26
var_d = var_b + var_c
var_e = var_a - var_d
var_f = 1
var_g = var_e + var_f
print(int(var_g)) |
Arithmetic calculation | You can make one mobile with 4 meters (m) of wire. After making multiple mobiles of the same size with 117.6 meters (m) of wire, how many meters (m) of wire is left? | 1.6 | 117.6 4 [OP_MOD] | var_a = 117.6
var_b = 4
var_c = var_a % var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | Jinho's number has 4 digits for 1, 2 digits for 0.1, 0.01 digits for 0, and 7 digits for 0.001. Younghee has a number that is 100 times as large as Jinho's, and the Jungsoo have a number that is 0.05 larger than Younghee's. What number does Jungsoo have? | 420.75 | 1 4 [OP_MUL] 0.1 2 [OP_MUL] [OP_ADD] 0.001 7 [OP_MUL] [OP_ADD] 100 [OP_MUL] 0.05 [OP_ADD] | var_a = 1
var_b = 4
var_c = var_a * var_b
var_d = 0.1
var_e = 2
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 0.001
var_i = 7
var_j = var_h * var_i
var_k = var_g + var_j
var_l = 100
var_m = var_k * var_l
var_n = 0.05
var_o = var_m + var_n
print('{:.2f}'.format(round(var_o+1e-10,2))) |
Correspondence | When you multiply a number by 4, you get 166.08. Divide a number by 4 and add 0.48 to find the value. | 10.86 | 166.08 4 [OP_DIV] 4 [OP_DIV] 0.48 [OP_ADD] | var_a = 166.08
var_b = 4
var_c = var_a / var_b
var_d = 4
var_e = var_c / var_d
var_f = 0.48
var_g = var_e + var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | What is the largest five-digit number divisible by 8? | 99992 | 10000 99999 1 [OP_LIST_ARANGE] 8 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] | 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 = 8
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)) |
Comparison | Yoojeong drank 7/10 liters (L) of milk. Eunji drank 0.5 liters (L) of milk. Yuna drank 6/10 liters (L) of milk. Who drank the most milk? | Yoojeong | [OP_LIST_SOL] Yoojeong Eunji Yuna [OP_LIST_EOL] [OP_LIST_SOL] 7 10 [OP_DIV] 0.5 6 10 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoojeong'
var_b = 'Eunji'
var_c = 'Yuna'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 7
var_e = 10
var_f = var_d / var_e
var_g = 0.5
var_h = 6
var_i = 10
var_j = var_h / var_i
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_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 = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Possibility | Two fruits were taken out from a basket containing one apple, one peach, one pear, one melon, and a strawberry. How many ways are there for the selected fruit? | 10 | [OP_LIST_SOL] apple peach pear melon strawberry [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB] | var_a = 'apple'
var_b = 'peach'
var_c = 'pear'
var_d = 'melon'
var_e = 'strawberry'
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 = len(list_a)
var_g = 2
var_h = 1
var_f = int(var_f)
var_g = int(var_g)
for i, elem in enumerate(range(var_g)):
var_h = var_h * (var_f-i)
for i, elem in enumerate(range(var_g)):
var_h = var_h / (i+1)
print(int(var_h)) |
Arithmetic calculation | Minyoung's 5th graders have 30 students in class (a), 27 students in class (b), and 28 students in class (c). I'm going to give out 4 notebooks to every 5th grader. If there are 400 notebooks, find how many notebooks would be left after giving them to all 5th graders. | 60 | 400 30 27 [OP_ADD] 28 [OP_ADD] 4 [OP_MUL] [OP_SUB] | var_a = 400
var_b = 30
var_c = 27
var_d = var_b + var_c
var_e = 28
var_f = var_d + var_e
var_g = 4
var_h = var_f * var_g
var_i = var_a - var_h
print(int(var_i)) |
Geometry | A large square was created by placing 10 square-shaped tiles, both horizontally and vertically, without gaps. If the tiles on the perimeter are blue and the tiles on the inside are yellow, how many yellow tiles are there? | 64 | 10 2 [OP_SUB] 2 [OP_POW] | var_a = 10
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = var_c ** var_d
print(int(var_e)) |
Correspondence | A number is first divided by 8, and then added by 8. When the result is subtracted by 30 and then multiplied by 6 to get 12, what is the number? | 192 | 12 6 [OP_DIV] 30 [OP_ADD] 8 [OP_SUB] 8 [OP_MUL] | var_a = 12
var_b = 6
var_c = var_a / var_b
var_d = 30
var_e = var_c + var_d
var_f = 8
var_g = var_e - var_f
var_h = 8
var_i = var_g * var_h
print(int(var_i)) |
Possibility | There are 15 cards, 5 each of yellow, blue, and red cards, representing a natural number from 1 to 5. If 4 cards are selected from 15 cards, in how many ways can 2 cards with the same number be selected? | 30 | 5 2 [OP_COMB] 3 2 [OP_COMB] [OP_MUL] | var_a = 5
var_b = 2
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
var_c = var_c / (i+1)
var_d = 3
var_e = 2
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 | Minyoung is 7 years old this year. When Minyoung's grandmother turns 65 in the year Minyoung turns 10, how old is her grandmother this year? | 62 | 65 10 7 [OP_SUB] [OP_SUB] | var_a = 65
var_b = 10
var_c = 7
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e)) |
Correspondence | A, B, C, and D are different numbers. When these numbers satisfy the three-digit addition equation 7A4+B6C=D29, find the value of D. | 9 | 7A4+B6C=D29 D [OP_DIGIT_UNK_SOLVER] | var_a = '7A4+B6C=D29'
var_b = 'D'
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 | How many two decimal places less than 6 can you make by using 2, 4, 6 and the decimal point only once? | 4 | [OP_LIST_SOL] 2 4 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 6 10 3 1 [OP_SUB] [OP_POW] [OP_MUL] [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 2
var_b = 4
var_c = 6
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 6
var_f = 10
var_g = 3
var_h = 1
var_i = var_g - var_h
var_j = var_f ** var_i
var_k = var_e * var_j
list_c = []
for i in list_b:
if i < var_k:
list_c.append(i)
var_l = len(list_c)
print(int(var_l)) |
Comparison | Jungkook collects number that adds 3 to 6, and Yoongi collects 4. Who has the bigger number? | Jungkook | [OP_LIST_SOL] Jungkook Yoongi [OP_LIST_EOL] [OP_LIST_SOL] 6 3 [OP_ADD] 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) |
Comparison | Wheel A makes 10 revolutions in 2 minutes and Wheel B makes 7 revolutions in 1 minute 30 seconds. Which of the two wheels spins faster? | A | [OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 10 2 60 [OP_MUL] [OP_DIV] 7 1 60 [OP_MUL] 30 [OP_ADD] [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 10
var_d = 2
var_e = 60
var_f = var_d * var_e
var_g = var_c / var_f
var_h = 7
var_i = 1
var_j = 60
var_k = var_i * var_j
var_l = 30
var_m = var_k + var_l
var_n = var_h / var_m
list_b= []
if "/" in str(var_n):
var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_o = 1
list_c=list_b.copy()
list_c.sort()
var_p = list_c[-var_o]
var_q = list_b.index(var_p)+1
var_r = list_a[var_q-1]
print(var_r) |
Geometry | The area of a quadrilateral whose all four sides are equal is 21.46 square centimeters (cm2). If the length of one diagonal of this rectangle is 7.4 centimeters (cm), how many centimeters (cm) is the other diagonal? | 5.8 | 21.46 2 [OP_MUL] 7.4 [OP_DIV] | var_a = 21.46
var_b = 2
var_c = var_a * var_b
var_d = 7.4
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Possibility | There are 4 indistinguishable marbles and 1 eraser. How many ways are there to list these on a single line? | 5 | 4 1 [OP_ADD] 4 [OP_COMB] | var_a = 4
var_b = 1
var_c = var_a + var_b
var_d = 4
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)) |
Comparison | Nine people are standing in a line in order from shortest to tallest. Hoseok is standing second from the front, and Yuna is standing right behind Hoseok. If you line up again in order of tallest to shortest, what number will Yuna stand in from the front? | 7 | 9 2 [OP_SUB] 1 [OP_SUB] 1 [OP_ADD] | var_a = 9
var_b = 2
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
var_f = 1
var_g = var_e + var_f
print(int(var_g)) |
Correspondence | When a number is multiplied by 6, the result is 72. What is the result when the number is added to 8? | 20 | 72 6 [OP_DIV] 8 [OP_ADD] | var_a = 72
var_b = 6
var_c = var_a / var_b
var_d = 8
var_e = var_c + var_d
print(int(var_e)) |
Comparison | There are five numbers 1.4, 9/10, 1, 0.5, and 13/10. How many of these numbers are greater than 1? | 2 | [OP_LIST_SOL] 1.4 9/10 1 0.5 13/10 [OP_LIST_EOL] 1 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 1.4
var_b = 0.9
var_c = 1
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
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 | If you take a coupon to the mart, there is an event that gives you 3 bottles of soda per coupon. However, while taking the coupon, 3 coupons were blown away, so there are 4 remaining coupons. How many bottles of drinks would you receive if the coupons were not blown away? | 21 | 4 3 [OP_ADD] 3 [OP_MUL] | var_a = 4
var_b = 3
var_c = var_a + var_b
var_d = 3
var_e = var_c * var_d
print(int(var_e)) |
Comparison | Minhyun drank 0.41 times as much milk as 6 liters (L) and Jinyoung drank 2.3 liters (L). Who drank more milk? | Minhyun | [OP_LIST_SOL] Minhyun Jinyoung [OP_LIST_EOL] [OP_LIST_SOL] 6 0.41 [OP_MUL] 2.3 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Minhyun'
var_b = 'Jinyoung'
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 = 0.41
var_e = var_c * var_d
var_f = 2.3
list_b= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j) |
Geometry | A cube is said to have a side length of 8 centimeters (cm). What is the surface area of this cube in square centimeters (cm2)? | 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)) |
Geometry | How many vertices are in a pyramid with 10 edges? | 6 | 10 2 [OP_DIV] 1 [OP_ADD] | var_a = 10
var_b = 2
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Geometry | How many faces does an octahedron have? | 8 | 8 | var_a = 8
print(int(var_a)) |
Arithmetic calculation | With 10,000 won, Seonwoo bought 2 packets of bubblegum at 600 won each and 9 bags of ramen that costs 1600 won for 2 bags. How much change did Seonwoo receive? | 1600 | 10000 600 2 [OP_MUL] 1600 2 [OP_DIV] 9 [OP_MUL] [OP_ADD] [OP_SUB] | var_a = 10000
var_b = 600
var_c = 2
var_d = var_b * var_c
var_e = 1600
var_f = 2
var_g = var_e / var_f
var_h = 9
var_i = var_g * var_h
var_j = var_d + var_i
var_k = var_a - var_j
print(int(var_k)) |
Arithmetic calculation | If the sum of three consecutive even numbers is 1194, what is the first even number? | 396 | 1194 0 3 1 [OP_SUB] 2 [OP_MUL] 2 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 3 [OP_DIV] | var_a = 1194
var_b = 0
var_c = 3
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e * var_f
var_h = 2
list_a = [i for i in range(var_b, var_g + 1, var_h)]
list_a = [float(i) for i in list_a]
var_i = sum(list_a)
var_j = var_a - var_i
var_k = 3
var_l = var_j / var_k
print(int(var_l)) |
Possibility | I'm trying to put the books in order on the bookshelf. Find the number of cases when there are 1 math book and 1 science book. | 2 | [OP_LIST_SOL] math science [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] | var_a = 'math'
var_b = 'science'
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 = len(list_a)
var_d = len(list_a)
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)
print(int(var_e)) |
Correspondence | Subtracting 10 from a number gives you 15. What number do you get when you add 5 to it? | 30 | 15 10 [OP_ADD] 5 [OP_ADD] | var_a = 15
var_b = 10
var_c = var_a + var_b
var_d = 5
var_e = var_c + var_d
print(int(var_e)) |
Comparison | Multiples of 4 are written sequentially. Those multiples are greater than 0 and less than 100. How many numbers are there between the 5th from the left and the 8th from the right? | 11 | 0 1 [OP_ADD] 100 1 [OP_SUB] 1 [OP_LIST_ARANGE] 4 [OP_LIST_DIVISIBLE] 5 [OP_LIST_MIN] 8 [OP_LIST_MAX] [OP_LIST_LESS] [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 0
var_b = 1
var_c = var_a + var_b
var_d = 100
var_e = 1
var_f = var_d - var_e
var_g = 1
list_a = [i for i in range(var_c, var_f + 1, var_g)]
var_h = 4
list_b = []
var_h = int(var_h)
for i in list_a:
i = int(i)
if i % var_h == 0:
list_b.append(i)
var_i = 5
list_c=list_b.copy()
list_c.sort()
var_j = list_c[var_i-1]
var_k = 8
list_d=list_b.copy()
list_d.sort()
var_l = list_d[-var_k]
list_e = []
for i in list_b:
if i < var_l:
list_e.append(i)
list_f = []
for i in list_e:
if i > var_j:
list_f.append(i)
var_m = len(list_f)
print(int(var_m)) |
Arithmetic calculation | Jinhee is looking for multiples of 16, Minjun is looking for multiples of 24, and Minwoo is looking for natural numbers less than 200. How many of the numbers found by the three people are included in common? | 4 | 1 200 1 [OP_LIST_ARANGE] 16 [OP_LIST_DIVISIBLE] 24 [OP_LIST_DIVISIBLE] [OP_SET_INTERSECT] [OP_LIST_LEN] | var_a = 1
var_b = 200
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 16
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 = 24
list_c = []
var_e = int(var_e)
for i in list_b:
i = int(i)
if i % var_e == 0:
list_c.append(i)
list_d = list(set(list_b) & set(list_c))
var_f = len(list_d)
print(int(var_f)) |
Comparison | Figure A is a rectangle measuring 12 centimeters (cm) wide and 5 centimeters (cm) tall. Figure B is a rectangle with a perimeter of 32 centimeters (cm) and a length of 8 centimeters (cm). Which of the two figures has the greater area? | B | [OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 12 5 [OP_MUL] 32 2 [OP_DIV] 8 [OP_SUB] 8 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 12
var_d = 5
var_e = var_c * var_d
var_f = 32
var_g = 2
var_h = var_f / var_g
var_i = 8
var_j = var_h - var_i
var_k = 8
var_l = var_j * var_k
list_b= []
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p) |
Correspondence | A3B-41=591. How much is B? | 2 | A3B-41=591 B [OP_DIGIT_UNK_SOLVER] | var_a = 'A3B-41=591'
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 35, 68, 57 and 95. What is the second-largest number minus the smallest number? | 33 | [OP_LIST_SOL] 35 68 57 95 [OP_LIST_EOL] 2 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 35
var_b = 68
var_c = 57
var_d = 95
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=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 1
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f - var_h
print(int(var_i)) |
Arithmetic calculation | Jungkook's family picked apples. My father got 8, my mother got 13, Jungkook got 7, and my younger brother got 5. How many more apples did the person who picked the most apples pick than the person who picked the least? | 8 | [OP_LIST_SOL] 8 13 7 5 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 8
var_b = 13
var_c = 7
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 = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 1
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f - var_h
print(int(var_i)) |
Correspondence | There are single digit numbers A and B. When five-digit number A835B is a multiple of 12, what is the difference between the largest and smallest possible numbers of A835B? | 69996 | A835B [OP_GEN_POSSIBLE_LIST] 12 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 'A835B'
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 = 12
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 = 1
list_c=list_b.copy()
list_c.sort()
var_d = list_c[-var_c]
var_e = 1
list_d=list_b.copy()
list_d.sort()
var_f = list_d[var_e-1]
var_g = var_d - var_f
print(int(var_g)) |
Possibility | How many 3-digit numbers are less than 560 and contain all 4, 5, and 6? | 3 | [OP_LIST_SOL] 4 5 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 560 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 4
var_b = 5
var_c = 6
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 560
list_c = []
for i in list_b:
if i < var_e:
list_c.append(i)
var_f = len(list_c)
print(int(var_f)) |
Geometry | I have two rectangles, one is large and the other is small. The horizontal ratio of these two rectangles is 8:7, and the vertical ratio is 9:4. If the area of the larger rectangle is 108 square centimeters (cm2), how many square centimeters (cm2) is the area of the smaller rectangle? | 42 | 108 8 [OP_DIV] 7 [OP_MUL] 9 [OP_DIV] 4 [OP_MUL] | var_a = 108
var_b = 8
var_c = var_a / var_b
var_d = 7
var_e = var_c * var_d
var_f = 9
var_g = var_e / var_f
var_h = 4
var_i = var_g * var_h
print(int(var_i)) |
Arithmetic calculation | The total number of students in Changhyeon's school is 32 fewer than eight times the number of fourth-year students. Of the fourth-year students, there are 10 more students who wear glasses than those who do not wear glasses. If the total number of students in Changhyeon's school is 1152, find out the number of 4th graders that do not wear glasses. | 69 | 1152 32 [OP_ADD] 8 [OP_DIV] 10 [OP_SUB] 2 [OP_DIV] | var_a = 1152
var_b = 32
var_c = var_a + var_b
var_d = 8
var_e = var_c / var_d
var_f = 10
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i)) |
Geometry | Kiyoung drew a circle with a diameter of 80 centimeters (cm). The radius of the circle drawn by Kiyoung is 4 times longer than the radius of the circle drawn by Gayeong. Find the radius of the circle Gayoung drew. | 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)) |
Correspondence | When 14A+B73=418 is valid, what number should go into B? | 2 | 14A+B73=418 B [OP_DIGIT_UNK_SOLVER] | var_a = '14A+B73=418'
var_b = 'B'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Arithmetic calculation | When the sum of carrots and cucumbers was 10, the number of carrots was 4. If you bought 2 more cucumbers, how many cucumbers do you have now? | 8 | 10 4 [OP_SUB] 2 [OP_ADD] | var_a = 10
var_b = 4
var_c = var_a - var_b
var_d = 2
var_e = var_c + var_d
print(int(var_e)) |
Comparison | Hyomin and Jinseop each solved the same math problem book. Hyomin solved 4/15 of the total, and Jinseop solved 6/15 of the total. Who has solved more math problems? | Jinseop | [OP_LIST_SOL] Hyomin Jinseop [OP_LIST_EOL] [OP_LIST_SOL] 4 15 [OP_DIV] 6 15 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Hyomin'
var_b = 'Jinseop'
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 = 15
var_e = var_c / var_d
var_f = 6
var_g = 15
var_h = var_f / var_g
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Geometry | I made a rectangle and a square using the same area of the paper. If a rectangular-shaped paper has sides of 9 centimeters (cm) and 16 centimeters (cm), how many centimeters (cm) is the length of one side of a square-shaped paper? | 12 | 9 16 [OP_MUL] 1/2 [OP_POW] | var_a = 9
var_b = 16
var_c = var_a * var_b
var_d = 0.5
var_e = var_c ** var_d
print(int(var_e)) |
Geometry | A regular tetrahedron has a side length of 7 centimeters (cm). What is the surface area of this tetrahedron? | 84.87 | 3 1/2 [OP_POW] 7 2 [OP_POW] [OP_MUL] | var_a = 3
var_b = 0.5
var_c = var_a ** var_b
var_d = 7
var_e = 2
var_f = var_d ** var_e
var_g = var_c * var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Comparison | What is the sum of the numbers that are greater than 1.1 among five numbers 1.4, 9/10, 1.2, 0.5, and 13/10? | 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))) |
Comparison | Eunji is doing gymnastics standing in the 8th column from the right, the 14th column from the left, the 7th row from the back, and the 15th row from the front. If the number of students standing in each row is the same, how many students are doing gymnastics? | 441 | 8 14 [OP_ADD] 1 [OP_SUB] 7 15 [OP_ADD] 1 [OP_SUB] [OP_MUL] | var_a = 8
var_b = 14
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 7
var_g = 15
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)) |
Arithmetic calculation | I bought 7 bags of chocolates, each containing 16 pieces. Thirteen of them have melted in the hot sun. You want to split the remaining chocolate equally into 8 bags. How many chocolates should you put in one bag? | 12 | 16 7 [OP_MUL] 13 [OP_SUB] 8 [OP_FDIV] | var_a = 16
var_b = 7
var_c = var_a * var_b
var_d = 13
var_e = var_c - var_d
var_f = 8
var_g = var_e // var_f
print(int(var_g)) |
Arithmetic calculation | There are five numbers: 10, 11, 12, 13, and 14. What is the sum of the 3rd largest number and the 2nd largest number? | 25 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 3 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_ADD] | 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)) |
Geometry | You want to make a square with a side of 8 centimeters (cm) by cutting a square of paper with a side length of 72 centimeters (cm). How many can you make? | 81 | 72 8 [OP_DIV] 72 8 [OP_DIV] [OP_MUL] | var_a = 72
var_b = 8
var_c = var_a / var_b
var_d = 72
var_e = 8
var_f = var_d / var_e
var_g = var_c * var_f
print(int(var_g)) |
Arithmetic calculation | Minsu distributed 240 marbles by putting every 35 marbles in 4 large boxes and putting every 6 marbles in 3 small boxes. How many marbles are left after distributing them into boxes? | 82 | 240 4 35 [OP_MUL] [OP_SUB] 3 6 [OP_MUL] [OP_SUB] | var_a = 240
var_b = 4
var_c = 35
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 3
var_g = 6
var_h = var_f * var_g
var_i = var_e - var_h
print(int(var_i)) |
Correspondence | There are 9 candies in the candy box, but only 3 of them are strawberry-flavored candies. If there are 27 strawberry-flavored candies in multiple candy tins, find the number of candy tins. | 9 | 27 3 [OP_MUL] 9 [OP_DIV] | var_a = 27
var_b = 3
var_c = var_a * var_b
var_d = 9
var_e = var_c / var_d
print(int(var_e)) |
Geometry | Find how many times the area of a square increases if the length of one side of the square is tripled. | 9 | 3 2 [OP_POW] | var_a = 3
var_b = 2
var_c = var_a ** var_b
print(int(var_c)) |
Possibility | You want to create a random four-digit number using the four numbers 1, 2, 3, and 6 only once. How many can you make in all? | 24 | [OP_LIST_SOL] 1 2 3 6 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 1
var_b = 2
var_c = 3
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)) |
Comparison | The playground of Kyungsoo's school is 7800 square meters (㎡), and the number of students is 600. And Mira's school's playground is 7000 square meters (㎡), and the number of students is 500. Whose school's students can use more area of the playground each? | Mira | [OP_LIST_SOL] Kyungsoo Mira [OP_LIST_EOL] [OP_LIST_SOL] 7800 600 [OP_DIV] 7000 500 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Kyungsoo'
var_b = 'Mira'
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 = 7800
var_d = 600
var_e = var_c / var_d
var_f = 7000
var_g = 500
var_h = var_f / var_g
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Arithmetic calculation | There is a drain through which the water drains consistently. When there were 24.7 liters (L) of water, I opened the drain stopper to drain the water, and after 40 minutes, the amount of water have become 17.1 liters (L). Find how many minutes it takes for all the water to drain out. | 130 | 24.7 24.7 17.1 [OP_SUB] 40 [OP_DIV] [OP_DIV] | var_a = 24.7
var_b = 24.7
var_c = 17.1
var_d = var_b - var_c
var_e = 40
var_f = var_d / var_e
var_g = var_a / var_f
print(int(eval('{:.2f}'.format(round(var_g+1e-10,2))))) |
Arithmetic calculation | The sum of 6 consecutive natural numbers is 105. Find the sum of the largest and smallest of the six natural numbers. | 35 | 105 0 6 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 6 [OP_DIV] 2 [OP_MUL] 6 1 [OP_SUB] [OP_ADD] | var_a = 105
var_b = 0
var_c = 6
var_d = 1
var_e = var_c - var_d
var_f = 1
list_a = [i for i in range(var_b, var_e + 1, var_f)]
list_a = [float(i) for i in list_a]
var_g = sum(list_a)
var_h = var_a - var_g
var_i = 6
var_j = var_h / var_i
var_k = 2
var_l = var_j * var_k
var_m = 6
var_n = 1
var_o = var_m - var_n
var_p = var_l + var_o
print(int(var_p)) |
Possibility | Round down the largest four-digit number you can make by playing four 7, 9, 3, and 6 cards only once, to the hundredth place. | 9700 | [OP_LIST_SOL] 7 9 3 6 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 3 [OP_FLOOR] | var_a = 7
var_b = 9
var_c = 3
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 = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 3
var_i=int((var_g//(10**(var_h-1)))*10**(var_h-1))
print(int(var_i)) |
Correspondence | There are two different natural numbers, A and B. When A is divided by 7, the quotient is 15 and the remainder is B. Find A when the remainder B is the smallest number. | 105 | 7 15 [OP_MUL] | var_a = 7
var_b = 15
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | There are 44 students in the A class. A class has 2 fewer students than B class, and B class has 1 more student than C class. How many students are there in C class? | 45 | 44 2 [OP_ADD] 1 [OP_SUB] | var_a = 44
var_b = 2
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | Seong-ho and Min-soo are trying to interpret a page from an English newspaper. It takes 5 hours for Seong-ho alone and 3 hours for Min-su alone to complete the translation. Find out the time it takes for the two people to complete the task together when the amount of pages to be interpreted is 16 pages. | 30 | 1 16 [OP_MUL] 1 5 [OP_DIV] 1 3 [OP_DIV] [OP_ADD] [OP_DIV] | var_a = 1
var_b = 16
var_c = var_a * var_b
var_d = 1
var_e = 5
var_f = var_d / var_e
var_g = 1
var_h = 3
var_i = var_g / var_h
var_j = var_f + var_i
var_k = var_c / var_j
print(int(var_k)) |
Arithmetic calculation | When I investigated the amount of time 10 students in Seyoon's class spent doing volunteer work this month, they were 5, 6, 5, 5, 6, 4, 5, 5, 6, and 7 hours respectively. Find how many students did 5 hours of volunteer work this month. | 5 | [OP_LIST_SOL] 5 6 5 5 6 4 5 5 6 7 [OP_LIST_EOL] 5 [OP_LIST_FIND_NUM] | var_a = 5
var_b = 6
var_c = 5
var_d = 5
var_e = 6
var_f = 4
var_g = 5
var_h = 5
var_i = 6
var_j = 7
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 = 5
var_l = 0
var_k = int(var_k)
for i in list_a:
i = int(i)
if i == var_k:
var_l = var_l + 1
print(int(var_l)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.