category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Correspondence | You want to subtract 24 from a number. If the answer when multiplied by 2 incorrectly is 50, what is the result of calculating correctly? | 1 | 50 2 [OP_DIV] 24 [OP_SUB] | var_a = 50
var_b = 2
var_c = var_a / var_b
var_d = 24
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | Donghwan packed 138 candies in a bag, 18 each, and ate the leftovers. How many candies did Donghwan eat? | 12 | 138 18 [OP_MOD] | var_a = 138
var_b = 18
var_c = var_a % var_b
print(int(var_c)) |
Possibility | To make a two-digit integer by drawing two cards from five cards with the numbers 0, 1, 2, 3, and 4 written on them, find how many odd numbers there are. | 6 | [OP_LIST_SOL] 0 1 2 3 4 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 2 [OP_LIST_DIVISIBLE] [OP_SET_DIFFERENCE] [OP_LIST_LEN] | var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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_g = 2
list_c = []
var_g = int(var_g)
for i in list_b:
i = int(i)
if i % var_g == 0:
list_c.append(i)
list_d = list(set(list_b) - set(list_c))
var_h = len(list_d)
print(int(var_h)) |
Arithmetic calculation | What is the smallest five-digit number divisible by the four numbers 2, 3, 8, and 9? | 10008 | 10000 99999 1 [OP_LIST_ARANGE] 2 [OP_LIST_DIVISIBLE] 3 [OP_LIST_DIVISIBLE] 8 [OP_LIST_DIVISIBLE] 9 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN] | var_a = 10000
var_b = 99999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 2
list_b = []
var_d = int(var_d)
for i in list_a:
i = int(i)
if i % var_d == 0:
list_b.append(i)
var_e = 3
list_c = []
var_e = int(var_e)
for i in list_b:
i = int(i)
if i % var_e == 0:
list_c.append(i)
var_f = 8
list_d = []
var_f = int(var_f)
for i in list_c:
i = int(i)
if i % var_f == 0:
list_d.append(i)
var_g = 9
list_e = []
var_g = int(var_g)
for i in list_d:
i = int(i)
if i % var_g == 0:
list_e.append(i)
var_h = 1
list_f=list_e.copy()
list_f.sort()
var_i = list_f[var_h-1]
print(int(var_i)) |
Arithmetic calculation | He bought a notebook with half the money he brought, and spent half the money on a pencil. If the remaining money is 750 won, how much money did Jungkook bring at the beginning? | 3000 | 750 4 [OP_MUL] | var_a = 750
var_b = 4
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | Find the number of elements in set A minus set B when the elements in set A are 1, 3, and 5, and in set B are 2 and 5. | 2 | [OP_LIST_SOL] 1 3 5 [OP_LIST_EOL] [OP_LIST_SOL] 2 5 [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_LEN] | var_a = 1
var_b = 3
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 = 2
var_e = 5
list_b= []
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_f = len(list_c)
print(int(var_f)) |
Possibility | You chose three numbers among 0, 1, 2, 3, and 4 to make a three-digit even number. If you can use the same number multiple times, what is the sum of all even numbers that can be made? | 16320 | [OP_LIST_SOL] 0 1 2 3 4 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] 2 [OP_LIST_DIVISIBLE] [OP_LIST_SUM] | var_a = 0
var_b = 1
var_c = 2
var_d = 3
var_e = 4
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_f))
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_g = 2
list_c = []
var_g = int(var_g)
for i in list_b:
i = int(i)
if i % var_g == 0:
list_c.append(i)
list_c = [float(i) for i in list_c]
var_h = sum(list_c)
print(int(var_h)) |
Arithmetic calculation | Minyoung has 27 more marbles than Yoojeong. If Minyoung gives Eunji 9 marbles, both Minyoung and Eunji have 45 marbles. How many marbles do Minyoung, Yoojeong, and Eunji have? | 117 | 45 27 [OP_SUB] 9 [OP_ADD] 27 [OP_ADD] 45 27 [OP_SUB] 9 [OP_ADD] [OP_ADD] 45 9 [OP_SUB] [OP_ADD] | var_a = 45
var_b = 27
var_c = var_a - var_b
var_d = 9
var_e = var_c + var_d
var_f = 27
var_g = var_e + var_f
var_h = 45
var_i = 27
var_j = var_h - var_i
var_k = 9
var_l = var_j + var_k
var_m = var_g + var_l
var_n = 45
var_o = 9
var_p = var_n - var_o
var_q = var_m + var_p
print(int(var_q)) |
Arithmetic calculation | Daeyoung bought 8 materials in total, including an eraser of 300 won and a pencil of 500 won. If he paid 3,000 won, how many pencils did Daeyoung buy? | 3 | 3000 300 8 [OP_MUL] [OP_SUB] 500 300 [OP_SUB] [OP_DIV] | var_a = 3000
var_b = 300
var_c = 8
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 500
var_g = 300
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Possibility | You want to distribute 7 apples to 2 different monkeys. The monkey takes at least 1 apple. How many ways are there to distribute apples? | 6 | 7 2 1 [OP_MUL] [OP_SUB] 1 [OP_ADD] | var_a = 7
var_b = 2
var_c = 1
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)) |
Comparison | Among gray and white cat, gray cat is the heaviest. Gray cat is lighter than black cat, and the lightest is the yellow cat. What color is the heaviest cat? | black | [OP_LIST_SOL] gray white black yellow [OP_LIST_EOL] [OP_LIST_SOL] gray white > gray black < yellow gray < yellow white < yellow black < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'gray'
var_b = 'white'
var_c = 'black'
var_d = 'yellow'
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 'gray'
var_f = 'white'
var_g = '>'
var_h = 'gray'
var_i = 'black'
var_j = '<'
var_k = 'yellow'
var_l = 'gray'
var_m = '<'
var_n = 'yellow'
var_o = 'white'
var_p = '<'
var_q = 'yellow'
var_r = 'black'
var_s = '<'
list_b= []
if "/" in str(var_s):
var_s = eval(str(var_s))
list_b.append(var_s)
if "/" in str(var_r):
var_r = eval(str(var_r))
list_b.append(var_r)
if "/" in str(var_q):
var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_p):
var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_o):
var_o = eval(str(var_o))
list_b.append(var_o)
if "/" in str(var_n):
var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_m):
var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
if cond_ in ("<", ">", "="):
operand_right = temp_stack.pop()
operand_left = temp_stack.pop()
if cond_ == "=":
cond_ = "=="
conditions.append(f"{operand_left} {cond_} {operand_right}")
else:
if not cond_.isdigit():
cond_ = "{" + cond_ + "}"
temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
item_name_index_dict = dict(zip(items_name_list, perm))
formatted_conditions = \
[condition.format_map(item_name_index_dict) for condition in conditions]
if all(map(eval, formatted_conditions)):
break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_t = 1
var_u = list_c[var_t-1]
print(var_u) |
Correspondence | A is the number 3 greater than 5 and B is A minus 2. WhenA and B are single-digit numbers, find what A+B is. | 14 | 5 3 [OP_ADD] 5 3 [OP_ADD] 2 [OP_SUB] [OP_ADD] | var_a = 5
var_b = 3
var_c = var_a + var_b
var_d = 5
var_e = 3
var_f = var_d + var_e
var_g = 2
var_h = var_f - var_g
var_i = var_c + var_h
print(int(var_i)) |
Correspondence | I need to subtract 32, but I accidentally subtracted 23 from some number and got 14. What number is it? | 37 | 14 23 [OP_ADD] | var_a = 14
var_b = 23
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | In art class, when Mijin cuts a piece of colored paper in the shape of a rectangle measuring 32 centimeters (cm) wide and 74 centimeters (cm) long, and wants to make several identical squares without any leftovers, how many squares can be the largest? ? | 592 | 32 32 74 [OP_GCD] [OP_FDIV] 74 32 74 [OP_GCD] [OP_FDIV] [OP_MUL] | var_a = 32
var_b = 32
var_c = 74
var_d = math.gcd(int(var_c), int(var_b))
var_e = var_a // var_d
var_f = 74
var_g = 32
var_h = 74
var_i = math.gcd(int(var_h), int(var_g))
var_j = var_f // var_i
var_k = var_e * var_j
print(int(var_k)) |
Correspondence | A is a single-digit natural number. Given the equation of the multiplication between single-digit numbers A×A×A=21A (21A is three-digit number), find A when A is a 1-digit number. | 6 | A×A×A=21A A [OP_DIGIT_UNK_SOLVER] | var_a = 'A×A×A=21A'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Geometry | A rectangle and a square have the same area, and the sides of the rectangle are 9 centimeters (cm) and 16 centimeters (cm), respectively. In this case, find the length of one side of the square in centimeters (cm). | 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)) |
Comparison | Miran, Junga, and Minsu each had 6, 13, and 10 pieces of colored paper. Of the three people, who has the least number of colored paper? | Miran | [OP_LIST_SOL] Miran Junga Minsu [OP_LIST_EOL] [OP_LIST_SOL] 6 13 10 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Miran'
var_b = 'Junga'
var_c = 'Minsu'
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 = 13
var_f = 10
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)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j) |
Arithmetic calculation | You are going to glue together 20 sheets of colored tape, every 15.25 centimeters (cm) long, overlapping each other. How many centimeters (cm) do you have to overlap in order to make the total length of the spliced color tape 248 centimeters (cm)? | 3 | 15.25 248 15.25 [OP_SUB] 20 1 [OP_SUB] [OP_DIV] [OP_SUB] | var_a = 15.25
var_b = 248
var_c = 15.25
var_d = var_b - var_c
var_e = 20
var_f = 1
var_g = var_e - var_f
var_h = var_d / var_g
var_i = var_a - var_h
print(int(var_i)) |
Possibility | Draw 3 of the number cards 1, 2, 3, and 4 and find the number of three-digit natural numbers that can be made. | 24 | [OP_LIST_SOL] 1 2 3 4 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 1
var_b = 2
var_c = 3
var_d = 4
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 = len(list_b)
print(int(var_f)) |
Correspondence | You need to subtract 46 from a certain number, but mistakenly subtracted 64, and got 122. Find the result of the correct calculation. | 140 | 122 64 [OP_ADD] 46 [OP_SUB] | var_a = 122
var_b = 64
var_c = var_a + var_b
var_d = 46
var_e = var_c - var_d
print(int(var_e)) |
Possibility | You want to create a five-digit number using 7, 2, 5, 0, and 1 only once. Write the smallest number in this case. | 10257 | [OP_LIST_SOL] 7 2 5 0 1 [OP_LIST_EOL] 5 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] | var_a = 7
var_b = 2
var_c = 5
var_d = 0
var_e = 1
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 = 5
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
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_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
print(int(var_h)) |
Arithmetic calculation | Some machines make one item per hour. Find how many units this machine makes if it runs non-stop for one year. | 8760 | 24 365 [OP_MUL] | var_a = 24
var_b = 365
var_c = var_a * var_b
print(int(var_c)) |
Correspondence | There are 901 candies in the bag. Candies were equally distributed among all students in the class. Each student received 53 candies, and nothing left. Find the total number of students in the class. | 17 | 1 53 901 [OP_DIV] [OP_DIV] | var_a = 1
var_b = 53
var_c = 901
var_d = var_b / var_c
var_e = var_a / var_d
print(int(var_e)) |
Comparison | Ji-Sung drank 9/25 liters (L) of milk and Young-pyo drank 0.41 liters (L). Who drank the most milk? | Young-pyo | [OP_LIST_SOL] Ji-Sung Young-pyo [OP_LIST_EOL] [OP_LIST_SOL] 9 25 [OP_DIV] 0.41 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Ji-Sung'
var_b = 'Young-pyo'
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 = 9
var_d = 25
var_e = var_c / var_d
var_f = 0.41
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 | One step of Yu-chan is 0.75 meters (m). If Yu-chan walked for 13 minutes by walking 70 steps per minute, find how many meters (m) he walked in total. | 682.5 | 0.75 70 [OP_MUL] 13 [OP_MUL] | var_a = 0.75
var_b = 70
var_c = var_a * var_b
var_d = 13
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Possibility | Jeonghwan wants to choose one of the four types of colored pencils and one of the three types of ballpoint pens. Find the number of ways you can choose. | 12 | 4 1 [OP_COMB] 3 1 [OP_COMB] [OP_MUL] | var_a = 4
var_b = 1
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
var_c = var_c / (i+1)
var_d = 3
var_e = 1
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
var_f = var_f * (var_d-i)
for i, elem in enumerate(range(var_e)):
var_f = var_f / (i+1)
var_g = var_c * var_f
print(int(var_g)) |
Arithmetic calculation | It is said that one person makes 8 origami cranes per hour. How many hours does it take 5 people to make 200 origami cranes? | 5 | 200 8 5 [OP_MUL] [OP_DIV] | var_a = 200
var_b = 8
var_c = 5
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e)) |
Arithmetic calculation | How many two-digit numbers are multiples of 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)) |
Geometry | If the length of the upper side is 6 centimeters (cm) shorter than the length of the lower side and the area of the trapezoid is 8 centimeters (cm) and the area is 72 cm (cm2), find the length of the upper side of the trapezoid. | 6 | 72 2 [OP_MUL] 8 [OP_DIV] 6 [OP_SUB] 2 [OP_DIV] | var_a = 72
var_b = 2
var_c = var_a * var_b
var_d = 8
var_e = var_c / var_d
var_f = 6
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i)) |
Geometry | If the rectangular parallelepiped's perimeter of the underlying face is 32 centimeters (cm), its width and length are the same, and its height of it is 9 centimeters (cm), what is the volume in cubic centimeters (cm3)? | 576 | 32 4 [OP_DIV] 2 [OP_POW] 9 [OP_MUL] | var_a = 32
var_b = 4
var_c = var_a / var_b
var_d = 2
var_e = var_c ** var_d
var_f = 9
var_g = var_e * var_f
print(int(var_g)) |
Arithmetic calculation | What is the average of the odd numbers from 1 to 9 that are less than 6? | 3 | 1 9 [OP_LIST_ODD] 6 [OP_LIST_LESS] [OP_LIST_MEAN] | var_a = 1
var_b = 9
list_a = []
if var_a%2==0:
for i in range(var_a+1, var_b+1, 2):
list_a.append(i)
else:
for i in range(var_a, var_b+1, 2):
list_a.append(i)
var_c = 6
list_b = []
for i in list_a:
if i < var_c:
list_b.append(i)
list_b = [float(i) for i in list_b]
var_d = sum(list_b)/len(list_b)
print(int(var_d)) |
Correspondence | You want to divide a number by 4. If the answer when adding 42 incorrectly is 50, what is the correct calculation result? | 2 | 50 42 [OP_SUB] 4 [OP_DIV] | var_a = 50
var_b = 42
var_c = var_a - var_b
var_d = 4
var_e = var_c / var_d
print(int(var_e)) |
Correspondence | The length of Siwon's ribbon is 8.8 meters longer than Seojun's. If Seojun cuts his own ribbon 4.3 meters (m) and gives it to Siwon, find out what the difference between the lengths of the two people's ribbons. | 17.4 | 8.8 4.3 [OP_ADD] 4.3 [OP_ADD] | var_a = 8.8
var_b = 4.3
var_c = var_a + var_b
var_d = 4.3
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Geometry | There are 3 triangular prisms. Find the sum of the number of non-side and side faces. | 15 | 3 2 [OP_MUL] 3 3 [OP_MUL] [OP_ADD] | var_a = 3
var_b = 2
var_c = var_a * var_b
var_d = 3
var_e = 3
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g)) |
Arithmetic calculation | Seunghwa took an express bus and a general bus to travel to Chuncheon, and arrived in Chuncheon, 120 kilometers (km) away, in 1 hour and 50 minutes. At first, she used the express bus, and later took the general bus for 1 hour and 10 minutes. This general bus used 6 liters of gasoline to travel 40.8 kilometers, and if Seunghwa used 14 liters of gasoline while taking the general bus, how many kilometers (km) Seunghwa moved by express bus for 1 minute? (The time and distance to transfer from the express bus to the bus are not considered.) | 0.62 | 120 40.8 6 [OP_DIV] 14 [OP_MUL] [OP_SUB] 1 60 [OP_MUL] 50 [OP_ADD] 1 60 [OP_MUL] 10 [OP_ADD] [OP_SUB] [OP_DIV] | var_a = 120
var_b = 40.8
var_c = 6
var_d = var_b / var_c
var_e = 14
var_f = var_d * var_e
var_g = var_a - var_f
var_h = 1
var_i = 60
var_j = var_h * var_i
var_k = 50
var_l = var_j + var_k
var_m = 1
var_n = 60
var_o = var_m * var_n
var_p = 10
var_q = var_o + var_p
var_r = var_l - var_q
var_s = var_g / var_r
print('{:.2f}'.format(round(var_s+1e-10,2))) |
Arithmetic calculation | Three numbers 10, 11 and 12 are given. What is the product of the 3rd largest and the 2nd largest number? | 110 | [OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 3 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_MUL] | var_a = 10
var_b = 11
var_c = 12
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 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(int(var_h)) |
Geometry | Hyejin tries to connect six pieces of paper in the shape of a square with a side length of 30 centimeters (cm) by gluing them together. When gluing was done, they overlapped each other by 7 centimeters (cm). How many square centimeters (cm²) is the area of the connected papers? | 4350 | 30 6 [OP_MUL] 7 6 1 [OP_SUB] [OP_MUL] [OP_SUB] 30 [OP_MUL] | var_a = 30
var_b = 6
var_c = var_a * var_b
var_d = 7
var_e = 6
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_c - var_h
var_j = 30
var_k = var_i * var_j
print(int(var_k)) |
Comparison | Minyoung and her friends are standing in a line in order of height. Minyoung is 2nd on the tall side and 4th on the short side. How many people are in line? | 5 | 2 4 [OP_ADD] 1 [OP_SUB] | var_a = 2
var_b = 4
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Possibility | Chanyeol decided to present a bouquet of carnations to his parents for Parents' Day. There are three types of carnations: red, pink, and white. When making a bouquet with a total of five carnations, find the number of possible bouquets to include at least one of each type. | 6 | 1 3 1 [OP_LIST_ARANGE] 3 [OP_LIST_GET_PRODUCT] [OP_LIST_NUM2SUM] 5 [OP_LIST_FIND_NUM] | var_a = 1
var_b = 3
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
list_c=[]
for i in list_b:
var_e = 0
i = int(i)
while i//10 > 0:
var_e = var_e + i%10
i = i//10
var_e = var_e + i%10
list_c.append(var_e)
var_f = 5
var_g = 0
var_f = int(var_f)
for i in list_c:
i = int(i)
if i == var_f:
var_g = var_g + 1
print(int(var_g)) |
Correspondence | Yoongi is trying to subtract 7 from a number. But when I accidentally added 9, the result was 30. Find the correct calculation result. | 14 | 30 9 [OP_SUB] 7 [OP_SUB] | var_a = 30
var_b = 9
var_c = var_a - var_b
var_d = 7
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | While Yoongi was subtracting the four-digit number from the two-digit number, he mistook the one-digit number 9 for the four-digit number as 2, and then changed the ones-digit number and the tens-digit number for the two-digit number to get 23. From this, Yoongi got -1299, what is the four-digit number? | 1279 | 23 1299 [OP_SUB] 2 9 [OP_SUB] [OP_SUB] | var_a = 23
var_b = 1299
var_c = var_a - var_b
var_d = 2
var_e = 9
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g)) |
Arithmetic calculation | A school has 41 students in the third grade, and there are 3 more boys than girls. How many male students are there? | 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 | You used all 15,000 won to buy 12 pencils for 1,000 won and ballpoint pens for 1,300 won. How many pencils have you purchased? | 2 | 1300 12 [OP_MUL] 15000 [OP_SUB] 1300 1000 [OP_SUB] [OP_DIV] | var_a = 1300
var_b = 12
var_c = var_a * var_b
var_d = 15000
var_e = var_c - var_d
var_f = 1300
var_g = 1000
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Geometry | Consider a triangle with one side measuring 20/9 centimeters (cm) with all the same length. If all sides of a pentagon, which has the same perimeter as this triangle, have the same length, what is the length of one side? | 1.33 | 20/9 3 [OP_MUL] 5 [OP_DIV] | var_a = 2.2222222222222223
var_b = 3
var_c = var_a * var_b
var_d = 5
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | Eunji solved 12 questions in the exam A and 15 questions in the exam B. She got 8 questions wrong in exam A, and got 2 more questions wrong in exam B than in exam A. How many questions did Eunji get right in both exams in total? | 9 | 4 15 12 4 [OP_SUB] 2 [OP_ADD] [OP_SUB] [OP_ADD] | var_a = 4
var_b = 15
var_c = 12
var_d = 4
var_e = var_c - var_d
var_f = 2
var_g = var_e + var_f
var_h = var_b - var_g
var_i = var_a + var_h
print(int(var_i)) |
Arithmetic calculation | Find the product of the quotients of two divisions 46.2 / 7 and 1.8 / 0.6. | 18 | 46.2 7 [OP_FDIV] 1.8 0.6 [OP_FDIV] [OP_MUL] | var_a = 46.2
var_b = 7
var_c = var_a // var_b
var_d = 1.8
var_e = 0.6
var_f = var_d // var_e
var_g = var_c * var_f
print(int(var_g)) |
Geometry | Miho has a square-shaped piece of land with a side measuring 6 meters (m). Each side of this land was increased by 1 meter (m), so that he got more piece of land. By how many square meters (m2) did the area of the land increase? | 13 | 6 1 [OP_ADD] 2 [OP_POW] 6 2 [OP_POW] [OP_SUB] | var_a = 6
var_b = 1
var_c = var_a + var_b
var_d = 2
var_e = var_c ** var_d
var_f = 6
var_g = 2
var_h = var_f ** var_g
var_i = var_e - var_h
print(int(var_i)) |
Arithmetic calculation | Minjun grew 0.2 meters (m) last year and 1/10 meter (m) this year. If Minjun's height was 1.1 meters (m) on January 1 last year, how tall is Minjun's height in meters (m) now? | 1.4 | 0.2 1.1 [OP_ADD] 1/10 [OP_ADD] | var_a = 0.2
var_b = 1.1
var_c = var_a + var_b
var_d = 0.1
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | There are five numbers: 10, 11, 12, 13, and 14. What is the sum of the smallest number and the second smallest number? | 21 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 1 [OP_LIST_MIN] 2 [OP_LIST_MIN] [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 = 1
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g + var_i
print(int(var_j)) |
Possibility | Write a number that can fit in the hundredth place when using the given number cards 7, 5, and 2 once to make a number greater than 520 and less than 710. | 5 | [OP_LIST_SOL] 7 5 2 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 520 [OP_LIST_MORE] 710 [OP_LIST_LESS] 1 [OP_LIST_GET] [OP_NUM2LIST] 1 [OP_LIST_GET] | var_a = 7
var_b = 5
var_c = 2
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = len(list_a)
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 520
list_c = []
for i in list_b:
if i > var_e:
list_c.append(i)
var_f = 710
list_d = []
for i in list_c:
if i < var_f:
list_d.append(i)
var_g = 1
var_h = list_d[var_g-1]
list_e = []
var_h = int(var_h)
while var_h//10 > 0:
list_e.append(var_h%10)
var_h = var_h//10
list_e.append(var_h%10)
list_e = list_e[::-1]
var_i = 1
var_j = list_e[var_i-1]
print(int(var_j)) |
Comparison | Jennie drank 9/5 liters (L) of juice. Jisoo drank 0.2 liters (L) less juice than Jennie, and Rohee drank 3/10 liters (L) more than Jisoo. Who drank the least juice? | Jisoo | [OP_LIST_SOL] Jennie Jisoo Rohee [OP_LIST_EOL] [OP_LIST_SOL] 9/5 9/5 0.2 [OP_SUB] 9/5 0.2 [OP_SUB] 3/10 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jennie'
var_b = 'Jisoo'
var_c = 'Rohee'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 1.8
var_e = 1.8
var_f = 0.2
var_g = var_e - var_f
var_h = 1.8
var_i = 0.2
var_j = var_h - var_i
var_k = 0.3
var_l = var_j + var_k
list_b= []
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[var_m-1]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p) |
Correspondence | Subtracting 10 from a number gives you 15. Find the value of 5 added to the number. | 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)) |
Correspondence | Jimin forgot the A in the two-digit numbers summation, A8+3B=99, so he asked Hoseok for help. Supposing that Hoseok finds out the correct value, what is A that Hoseok found? | 6 | A8+3B=99 A [OP_DIGIT_UNK_SOLVER] | var_a = 'A8+3B=99'
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 | I need to add 62 to a specific number, but I mistakenly added 26 and I got 61. Find the result of the correct calculation. | 97 | 61 26 [OP_SUB] 62 [OP_ADD] | var_a = 61
var_b = 26
var_c = var_a - var_b
var_d = 62
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | Find the number of balls if you have 3 boxes containing 5 balls for each. | 15 | 5 3 [OP_MUL] | var_a = 5
var_b = 3
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | You bought 7 boxes that each contain 9 apples. Of these, 7 apples were rotten and discarded, and the remaining was equally divided among 8 people. How many apples did one person receive? | 7 | 9 7 [OP_MUL] 7 [OP_SUB] 8 [OP_DIV] | var_a = 9
var_b = 7
var_c = var_a * var_b
var_d = 7
var_e = var_c - var_d
var_f = 8
var_g = var_e / var_f
print(int(var_g)) |
Comparison | How many numbers among 0.8 and 1/2 are greater than 0.4? | 2 | [OP_LIST_SOL] 0.8 1/2 [OP_LIST_EOL] 0.4 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 0.4
list_b = []
for i in list_a:
if i > var_c:
list_b.append(i)
var_d = len(list_b)
print(int(var_d)) |
Comparison | Jungkook, who already had 6 apples, got 3 more. When Yoongi has 4 apples, who has more apples? | 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 | Jimin, Jungkook, and Taehyung had a jumping rope competition. Jimin placed 51st and Jungkook placed 53rd. Taehyung did better than Jungkook but worse than Jimin. What is Taehyung's rank? | 52 | 51 53 [OP_ADD] 2 [OP_FDIV] | var_a = 51
var_b = 53
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e)) |
Arithmetic calculation | You sold 30 books on the first day. On the second day, they sold 5 times the number of books sold on the first day. How many more books were sold on Day 2 than on Day 1? | 120 | 30 5 [OP_MUL] 30 [OP_SUB] | var_a = 30
var_b = 5
var_c = var_a * var_b
var_d = 30
var_e = var_c - var_d
print(int(var_e)) |
Possibility | Using 3 of 4, 8, 1, and 2, what is the smallest number with a ones digit of 2? | 142 | [OP_LIST_SOL] 4 8 1 2 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 2 [OP_LIST_SEARCH_FIXED_DIGIT] 1 [OP_LIST_MIN] | var_a = 4
var_b = 8
var_c = 1
var_d = 2
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 1
var_g = 2
list_c = []
var_f = int(var_f)
var_g = int(var_g)
for i in list_b:
i = int(i)
if (i//var_f)%10 == var_g:
list_c.append(i)
var_h = 1
list_d=list_c.copy()
list_d.sort()
var_i = list_d[var_h-1]
print(int(var_i)) |
Arithmetic calculation | A student can solve 8 problems per hour. If she spends 5 hours a day solving problems, how many days will it take her to solve 200 problems? | 5 | 200 8 5 [OP_MUL] [OP_DIV] | var_a = 200
var_b = 8
var_c = 5
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e)) |
Arithmetic calculation | Heeju's school has 500 students. Of these, 337 students like soda and 289 students like coke. If there are 56 students who neither like soda nor coke, how many students like both soda and coke? | 182 | 289 337 [OP_ADD] 500 56 [OP_SUB] [OP_SUB] | var_a = 289
var_b = 337
var_c = var_a + var_b
var_d = 500
var_e = 56
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g)) |
Geometry | There is a polygon that has 6 diagonals that can be drawn from a vertex. Find the number of vertices of this polygon. | 9 | 6 3 [OP_ADD] | var_a = 6
var_b = 3
var_c = var_a + var_b
print(int(var_c)) |
Correspondence | I had to add a number by 2.345 but instead subtracted it to get 1.234. What is the correctly calculated value? | 5.92 | 1.234 2.345 [OP_ADD] 2.345 [OP_ADD] | var_a = 1.234
var_b = 2.345
var_c = var_a + var_b
var_d = 2.345
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | You have 8640 bottles of milk. The bottles of milk were divided into 12 per bag and 6 bags per box. How many boxes are there in total? | 120 | 8640 12 [OP_DIV] 6 [OP_DIV] | var_a = 8640
var_b = 12
var_c = var_a / var_b
var_d = 6
var_e = var_c / var_d
print(int(var_e)) |
Possibility | Yoongi wants to buy two types of fruit, apples and pears. How many ways are there to buy 4 fruits? | 5 | 2 1 [OP_SUB] 4 [OP_ADD] 4 [OP_COMB] | var_a = 2
var_b = 1
var_c = var_a - var_b
var_d = 4
var_e = var_c + var_d
var_f = 4
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)) |
Arithmetic calculation | What is the largest number that is both a factor of 108 and a multiple of 4? | 108 | 108 [OP_LIST_GET_DIVISOR] 4 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] | var_a = 108
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 = 4
list_b = []
var_b = int(var_b)
for i in list_a:
i = int(i)
if i % var_b == 0:
list_b.append(i)
var_c = 1
list_c=list_b.copy()
list_c.sort()
var_d = list_c[-var_c]
print(int(var_d)) |
Comparison | Eunji drank 0.5 liters (L) of water and Yujeong drank 7/10 liters (L) of water. Who drank the most water when Yuna drank 6/10 liters of water? | Yujeong | [OP_LIST_SOL] Yujeong 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 = 'Yujeong'
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) |
Geometry | A cube is built with 125 small cubes with an edge of 2 centimeters (cm). What is the volume of this cube in cubic centimeters (cm3)? | 1000 | 2 3 [OP_POW] 125 [OP_MUL] | var_a = 2
var_b = 3
var_c = var_a ** var_b
var_d = 125
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | Find the number of factors of 32 that are not factors of 8. | 2 | 32 [OP_LIST_GET_DIVISOR] 8 [OP_LIST_GET_DIVISOR] [OP_SET_DIFFERENCE] [OP_LIST_LEN] | 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))
var_c = len(list_c)
print(int(var_c)) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. What is the quotient when you divide the 3rd smallest number by the 2nd smallest number? | 1 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 3 [OP_LIST_MIN] 2 [OP_LIST_MIN] [OP_FDIV] | 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-1]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g // var_i
print(int(var_j)) |
Geometry | You are going to make a cube by cutting a cuboid measuring 12 centimeters (cm) wide, 16 centimeters (cm) long, and 14 centimeters (cm) high. What is the surface area of the largest cube? | 864 | [OP_LIST_SOL] 12 16 14 [OP_LIST_EOL] 1 [OP_LIST_MIN] 2 [OP_POW] 6 [OP_MUL] | var_a = 12
var_b = 16
var_c = 14
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
var_f = 2
var_g = var_e ** var_f
var_h = 6
var_i = var_g * var_h
print(int(var_i)) |
Arithmetic calculation | The average of three numbers is 3. If you take one of these numbers and change it to 1, the average is 2. What was the original number? | 4 | 3 3 [OP_MUL] 2 3 [OP_MUL] 1 [OP_SUB] [OP_SUB] | var_a = 3
var_b = 3
var_c = var_a * var_b
var_d = 2
var_e = 3
var_f = var_d * var_e
var_g = 1
var_h = var_f - var_g
var_i = var_c - var_h
print(int(var_i)) |
Arithmetic calculation | Which three-digit number is the greatest common multiple of 5, 8, and 2? | 960 | 100 999 1 [OP_LIST_ARANGE] 5 [OP_LIST_DIVISIBLE] 8 [OP_LIST_DIVISIBLE] 2 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] | var_a = 100
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 5
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 = 8
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 = 2
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 = 1
list_e=list_d.copy()
list_e.sort()
var_h = list_e[-var_g]
print(int(var_h)) |
Arithmetic calculation | It takes 0.84 meters (m) of ribbon tape to wrap one gift. When Soeun prepared gifts for 10 of her friends, there were 50 centimeters (cm) of ribbon tape left. How many meters (m) was the basic tape that Soeun had at first? | 8.9 | 0.84 10 [OP_MUL] 50 100 [OP_DIV] [OP_ADD] | var_a = 0.84
var_b = 10
var_c = var_a * var_b
var_d = 50
var_e = 100
var_f = var_d / var_e
var_g = var_c + var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Comparison | The beads are lined up in a row. There is a green marble at the 5th from the left and 3rd from the right. How many marbles are there in total? | 7 | 5 3 [OP_ADD] 1 [OP_SUB] | var_a = 5
var_b = 3
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | The ball at 120 meters (m) falls for 20 seconds at a speed of 4 meters (m) per second. Find how many meters (m) the ball is from the ground. | 40 | 120 4 20 [OP_MUL] [OP_SUB] | var_a = 120
var_b = 4
var_c = 20
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e)) |
Possibility | For lunch, there are 5 kinds of Chinese food and 4 kinds of Japanese food, and for dinner, there are 3 kinds of Chinese food and 5 kinds of Japanese food. Find the number of ways to choose one menu for lunch and one for dinner. | 72 | 5 4 [OP_ADD] 3 5 [OP_ADD] [OP_MUL] | var_a = 5
var_b = 4
var_c = var_a + var_b
var_d = 3
var_e = 5
var_f = var_d + var_e
var_g = var_c * var_f
print(int(var_g)) |
Correspondence | When a number is divided by 5 and 6, it is divisible, and when divided by 7, the remainder is 6. Find the largest three-digit possible number. | 930 | 100 999 1 [OP_LIST_ARANGE] 5 6 [OP_LCM] [OP_LIST_DIVISIBLE] 7 6 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_MAX] | var_a = 100
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 5
var_e = 6
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
list_b = []
var_f = int(var_f)
for i in list_a:
i = int(i)
if i % var_f == 0:
list_b.append(i)
var_g = 7
var_h = 6
list_c = []
var_g = int(var_g)
var_h = int(var_h)
if var_h < 0:
var_h = var_h + var_g
for i in list_b:
i = int(i)
if i%var_g == var_h:
list_c.append(i)
var_i = 1
list_d=list_c.copy()
list_d.sort()
var_j = list_d[-var_i]
print(int(var_j)) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. What is the difference between the smallest number and the next smallest number? | 0.91 | [OP_LIST_SOL] 10 11 12 13 14 [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
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 = 1
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g / var_i
print('{:.2f}'.format(round(var_j+1e-10,2))) |
Arithmetic calculation | When the bandages were connected to one another, the total length became 580 centimeters (cm). There were a total of 24 bandages, and each was 28 centimeters (cm) long. How many centimeters (cm) were overlapped? | 4 | 28 24 [OP_MUL] 580 [OP_SUB] 24 1 [OP_SUB] [OP_DIV] | var_a = 28
var_b = 24
var_c = var_a * var_b
var_d = 580
var_e = var_c - var_d
var_f = 24
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Geometry | There is a square that has the same perimeter with a regular whose side length is 4 centimeters (cm). What is the area of this square in square centimeters (cm2)? | 36 | 4 6 [OP_MUL] 4 [OP_DIV] 2 [OP_POW] | var_a = 4
var_b = 6
var_c = var_a * var_b
var_d = 4
var_e = var_c / var_d
var_f = 2
var_g = var_e ** var_f
print(int(var_g)) |
Arithmetic calculation | There is 135.1 milliliters (ml) of water. If you are to pour that amount of water into 7 milliliter (ml) buckets, how many liters (L) are left after filling the buckets with water? | 0 | 135.1 7 [OP_MOD] 1000 [OP_DIV] | var_a = 135.1
var_b = 7
var_c = var_a % var_b
var_d = 1000
var_e = var_c / var_d
print(int(eval('{:.2f}'.format(round(var_e+1e-10,2))))) |
Arithmetic calculation | Seokjin had 29 tangerines. After eating the same number of tangerines every day for 8 days, there were 5 left. How many tangerines did Seokjin eat a day? | 3 | 29 5 [OP_SUB] 8 [OP_DIV] | var_a = 29
var_b = 5
var_c = var_a - var_b
var_d = 8
var_e = var_c / var_d
print(int(var_e)) |
Geometry | There are two cubes of different sizes. If the ratio of the area of one side of the two cubes is 9:25, how many times the volume of the larger cube is the volume of the smaller cube? | 4.63 | 25 1/2 [OP_POW] 3 [OP_POW] 9 1/2 [OP_POW] 3 [OP_POW] [OP_DIV] | var_a = 25
var_b = 0.5
var_c = var_a ** var_b
var_d = 3
var_e = var_c ** var_d
var_f = 9
var_g = 0.5
var_h = var_f ** var_g
var_i = 3
var_j = var_h ** var_i
var_k = var_e / var_j
print('{:.2f}'.format(round(var_k+1e-10,2))) |
Correspondence | A number subtracted from 821 is 267. What is the value when 267 is subtracted from the number? | 287 | 821 267 [OP_SUB] 267 [OP_SUB] | var_a = 821
var_b = 267
var_c = var_a - var_b
var_d = 267
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | In the addition of two-digit numbers, the number 4 in the tens place of a number was mistaken for 6. In addition, the number 7 in the units place of the other number was mistaken for 1. As a result, the result of the addition was 146. Find the result of the correct calculation. | 132 | 146 10 4 6 [OP_SUB] [OP_MUL] [OP_ADD] 1 7 1 [OP_SUB] [OP_MUL] [OP_ADD] | var_a = 146
var_b = 10
var_c = 4
var_d = 6
var_e = var_c - var_d
var_f = var_b * var_e
var_g = var_a + var_f
var_h = 1
var_i = 7
var_j = 1
var_k = var_i - var_j
var_l = var_h * var_k
var_m = var_g + var_l
print(int(var_m)) |
Possibility | How many ways are there to make a three-digit natural number by selecting three cards from four different natural numbers? | 24 | 4 3 [OP_PERM] | var_a = 4
var_b = 3
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
print(int(var_c)) |
Comparison | When a 250-gram (g) barrel was filled with sand and weighed, it was 1 kilogram (kg) and 780 grams (g). When a box weighing 460 grams (g) was filled with sand and weighed again, it was 2 kilograms (kg) and 250 grams (g). Which sand is more heavier - the sand in the box or the barrel? | box | [OP_LIST_SOL] barrel box [OP_LIST_EOL] [OP_LIST_SOL] 1 1000 [OP_MUL] 780 [OP_ADD] 250 [OP_SUB] 2 1000 [OP_MUL] 250 [OP_ADD] 460 [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'barrel'
var_b = 'box'
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
var_d = 1000
var_e = var_c * var_d
var_f = 780
var_g = var_e + var_f
var_h = 250
var_i = var_g - var_h
var_j = 2
var_k = 1000
var_l = var_j * var_k
var_m = 250
var_n = var_l + var_m
var_o = 460
var_p = var_n - var_o
list_b= []
if "/" in str(var_p):
var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
list_b.reverse()
var_q = 1
list_c=list_b.copy()
list_c.sort()
var_r = list_c[-var_q]
var_s = list_b.index(var_r)+1
var_t = list_a[var_s-1]
print(var_t) |
Correspondence | Multiplying a number by 2 subtracting by 37 adding by 25 dividing by 8 equals 5. Find the number. | 26 | 5 8 [OP_MUL] 25 [OP_SUB] 37 [OP_ADD] 2 [OP_DIV] | var_a = 5
var_b = 8
var_c = var_a * var_b
var_d = 25
var_e = var_c - var_d
var_f = 37
var_g = var_e + var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i)) |
Arithmetic calculation | How many common divisors of 56 and 72 are divisible by 4? | 2 | 56 [OP_LIST_GET_DIVISOR] 72 [OP_LIST_GET_DIVISOR] [OP_SET_INTERSECT] 4 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 56
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 = 72
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))
var_c = 4
list_d = []
var_c = int(var_c)
for i in list_c:
i = int(i)
if i % var_c == 0:
list_d.append(i)
var_d = len(list_d)
print(int(var_d)) |
Arithmetic calculation | There are 6 (A)animals. If an (A)animal eats 4 kg (kg) of food in one month, how many kg (kg) of food do the (A)animals eat in one month? | 24 | 6 4 [OP_MUL] | var_a = 6
var_b = 4
var_c = var_a * var_b
print(int(var_c)) |
Possibility | You want to create a three-digit number by drawing three out of 5, 6, 4, and 7 and using them only once. Find the sum of the largest and smallest possible numbers. | 1221 | [OP_LIST_SOL] 5 6 4 7 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD] | var_a = 5
var_b = 6
var_c = 4
var_d = 7
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)) |
Possibility | If you try to put a total of 5 books, including 2 novels, on the bookshelf, how many times will the novels end up on 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)) |
Correspondence | If A is the number greater than -3 by -5 and B is the number less than +2 by -2, find the value of A-B. | -12 | -3 -5 [OP_ADD] 2 -2 [OP_SUB] [OP_SUB] | var_a = -3
var_b = -5
var_c = var_a + var_b
var_d = 2
var_e = -2
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g)) |
Arithmetic calculation | The box was full of sweets. Jimin ate 2/5 of the cookies in the box and weighed the box and it was 144 grams (g). After a while, Jaehee ate 2/3 of the remaining cookies and weighed the box again and it was 96 grams (g). How many grams (g) would the box weigh after all the cookies were eaten? | 72 | 144 144 96 [OP_SUB] 1 2/5 [OP_SUB] [OP_DIV] 2/3 [OP_DIV] 1 2/5 [OP_SUB] [OP_MUL] [OP_SUB] | var_a = 144
var_b = 144
var_c = 96
var_d = var_b - var_c
var_e = 1
var_f = 0.4
var_g = var_e - var_f
var_h = var_d / var_g
var_i = 0.6666666666666666
var_j = var_h / var_i
var_k = 1
var_l = 0.4
var_m = var_k - var_l
var_n = var_j * var_m
var_o = var_a - var_n
print(int(var_o)) |
Comparison | 27 students are standing in a line. If Minyoung is in the 13th from the back, where is she placed from the front? | 15 | 27 13 [OP_SUB] 1 [OP_ADD] | var_a = 27
var_b = 13
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | The number of students in class (B) is 8 fewer than the number of students in class (A). The number of students in class (C) is 5 times the number of students in the class. If there are 25 students in class (B), how many students are in (A), (B), and (C) total? | 183 | 25 8 [OP_ADD] 25 [OP_ADD] 25 5 [OP_MUL] [OP_ADD] | var_a = 25
var_b = 8
var_c = var_a + var_b
var_d = 25
var_e = var_c + var_d
var_f = 25
var_g = 5
var_h = var_f * var_g
var_i = var_e + var_h
print(int(var_i)) |
Possibility | Find the sum of the numbers that satisfy the following condition. It is a four-digit number and consists of 3, 5, 7, and 9. Also, the numbers in each digit are different. | 159984 | [OP_LIST_SOL] 3 5 7 9 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] [OP_LIST_SUM] | var_a = 3
var_b = 5
var_c = 7
var_d = 9
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 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]
list_b = [float(i) for i in list_b]
var_f = sum(list_b)
print(int(var_f)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.