category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Arithmetic calculation | Yoojung has 32 flowers. The number of flowers Yoojung has is 4 times the number of flowers Namjoon has. How many flowers do Yoojung and Namjoon have? | 40 | 32 32 4 [OP_DIV] [OP_ADD] | var_a = 32
var_b = 32
var_c = 4
var_d = var_b / var_c
var_e = var_a + var_d
print(int(var_e)) |
Arithmetic calculation | I bought 7 bags of chocolates, each containing 16 pieces. Thirteen of them melted in the hot sun, and when I try to divide the remaining chocolates equally into 8 bags, how many chocolates are left that cannot fit into the bags? | 3 | 16 7 [OP_MUL] 13 [OP_SUB] 8 [OP_MOD] | 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)) |
Geometry | Three points are not in a straight line. How many straight lines can you make with these three points? | 3 | 3 2 [OP_COMB] | var_a = 3
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)) |
Geometry | What is the area of a square with side length 3 plus the area of a parallelogram with base 3 and height 2? | 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)) |
Geometry | You are going to make the largest square out of a piece of string that is 24 centimeters (cm) long. How many centimeters (cm) is the length of one side of the square? | 6 | 24 4 [OP_DIV] | var_a = 24
var_b = 4
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | I am going to attach paintings with a width of 30 centimeters (cm) in a row on the wall of an exhibition hall with a width of 3 meters (m) and 20 centimeters (cm). How many centimeters (cm) should be the distance between the end of the wall and the artwork and between the artworks so that all six pieces are put together at the same distance? | 20 | 3 100 [OP_MUL] 20 [OP_ADD] 30 6 [OP_MUL] [OP_SUB] 6 1 [OP_ADD] [OP_DIV] | var_a = 3
var_b = 100
var_c = var_a * var_b
var_d = 20
var_e = var_c + var_d
var_f = 30
var_g = 6
var_h = var_f * var_g
var_i = var_e - var_h
var_j = 6
var_k = 1
var_l = var_j + var_k
var_m = var_i / var_l
print(int(var_m)) |
Correspondence | It is said that the total amount of sugar in 12 cups of coffee is 84.6 grams (g). If 12 cups contain the same amount of sugar, find how many grams (g) of sugar are in a cup of coffee. | 7.05 | 84.6 12 [OP_DIV] | var_a = 84.6
var_b = 12
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | When you divide 49 by a number, the remainder is 4, and when you divide the number by 66, the remainder is 6. What number is this? | 15 | 49 4 [OP_SUB] 66 6 [OP_SUB] [OP_GCD] | var_a = 49
var_b = 4
var_c = var_a - var_b
var_d = 66
var_e = 6
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
print(int(var_g)) |
Geometry | All 27 small cubes with an edge length of 1 centimeter (cm) were used to create one large cube with an edge length of 3 centimeters (cm). I painted all sides of the large cube and then separated it into smaller cubes. How many cubes have three painted faces? | 8 | 8 | var_a = 8
print(int(var_a)) |
Arithmetic calculation | Juhye used 1/4 of her money and 2/3 of the money she had left to buy a notebook and lunch, leaving 2,500 won at the end. How much money did Juhye have at first? | 10000 | 2500 1 1/4 [OP_SUB] [OP_DIV] 1 2/3 [OP_SUB] [OP_DIV] | var_a = 2500
var_b = 1
var_c = 0.25
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 1
var_g = 0.6666666666666666
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Arithmetic calculation | How many trees are needed if you plant trees from start to finish on one side of a 100-meter (m) road at 10-meter (m) intervals? | 11 | 100 10 [OP_DIV] 1 [OP_ADD] | var_a = 100
var_b = 10
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | How many numbers greater than 50 and less than 100 are divisible by 8? | 6 | 50 1 [OP_ADD] 100 1 [OP_SUB] 1 [OP_LIST_ARANGE] 8 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 50
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 = 8
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 = len(list_b)
print(int(var_i)) |
Comparison | Taehyung, Minju, Sangmin, Yoonjung, and Yoojeong crossed the finish line in that order. Who went in first? | Taehyung | [OP_LIST_SOL] Taehyung Minju Sangmin Yoonjung Yoojeong [OP_LIST_EOL] 1 [OP_LIST_GET] | var_a = 'Taehyung'
var_b = 'Minju'
var_c = 'Sangmin'
var_d = 'Yoonjung'
var_e = 'Yoojeong'
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
var_g = list_a[var_f-1]
print(var_g) |
Arithmetic calculation | How many three-digit prime numbers are there that are less than 3.01 and greater than 30.06 divided by 10? | 3 | 0 9 1 [OP_LIST_ARANGE] 6 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 0
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
list_b = []
for i in list_a:
if i > var_d:
list_b.append(i)
var_e = len(list_b)
print(int(var_e)) |
Arithmetic calculation | You can use the badminton court in the gym for 30 minutes for 4,000 won. How much would it cost for a person to rent 4 coats and use them for 3 hours with 6 friends? | 16000 | 3 60 [OP_MUL] 30 [OP_DIV] 4000 [OP_MUL] 4 [OP_MUL] 6 [OP_DIV] | var_a = 3
var_b = 60
var_c = var_a * var_b
var_d = 30
var_e = var_c / var_d
var_f = 4000
var_g = var_e * var_f
var_h = 4
var_i = var_g * var_h
var_j = 6
var_k = var_i / var_j
print(int(var_k)) |
Geometry | There is a polygonal pyramid surrounded by one regular hexagon with sides of 8 centimeters (cm) and six isosceles triangles with two sides of 13 centimeters (cm) and one side of 8 centimeters (cm). What is the sum of all the edges of this pyramid in centimeters (cm)? | 126 | 13 6 [OP_MUL] 8 6 [OP_MUL] [OP_ADD] | var_a = 13
var_b = 6
var_c = var_a * var_b
var_d = 8
var_e = 6
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g)) |
Geometry | If the radius of a round pancake is 7 centimeters (cm), how many centimeters (cm) is the diameter of the pancake? | 14 | 7 2 [OP_MUL] | var_a = 7
var_b = 2
var_c = var_a * var_b
print(int(var_c)) |
Geometry | You mistakingly divided a number by 5 that should have been multiplied and you got 30. Choose the one that is calculated correctly. | 750 | 30 5 5 [OP_MUL] [OP_MUL] | var_a = 30
var_b = 5
var_c = 5
var_d = var_b * var_c
var_e = var_a * var_d
print(int(var_e)) |
Geometry | There is a prism made up of six squares. If the sum of the lengths of all the edges of this prism is 72 centimeters (cm), how many centimeters (cm) is the length of one edge? | 6 | 72 4 3 [OP_MUL] [OP_DIV] | var_a = 72
var_b = 4
var_c = 3
var_d = var_b * var_c
var_e = var_a / var_d
print(int(var_e)) |
Comparison | Seulgi and Hyeonjeong went to the stationery store and bought pencils. If Seulgi bought 9 pencils and Hyunjeong bought 12 pencils, who bought more pencils among Seulgi and Hyunjeong? | Hyeonjeong | [OP_LIST_SOL] Seulgi Hyeonjeong [OP_LIST_EOL] [OP_LIST_SOL] 9 12 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Seulgi'
var_b = 'Hyeonjeong'
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 = 12
list_b= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Correspondence | Say that the equation 6A5+10B=748 is true. What number should go in A? | 4 | 6A5+10B=748 A [OP_DIGIT_UNK_SOLVER] | var_a = '6A5+10B=748'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Possibility | I'm going to choose two people from Jungkook, Jimin, Yoongi, and Yuna, and line them up. How many cases are there in all? | 12 | [OP_LIST_SOL] Jungkook Jimin Yoongi Yuna [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_PERM] | var_a = 'Jungkook'
var_b = 'Jimin'
var_c = 'Yoongi'
var_d = 'Yuna'
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = len(list_a)
var_f = 2
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
var_g = var_g * (var_e-i)
print(int(var_g)) |
Arithmetic calculation | Cucumbers are sold for 300 won per 100 grams (g). Determine how many kilograms (kg) of cucumbers you can buy with 7,500 won, including the decimal point. | 2.5 | 7500 100 300 [OP_DIV] [OP_MUL] 1000 [OP_DIV] | var_a = 7500
var_b = 100
var_c = 300
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 1000
var_g = var_e / var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | Seokgi had 82 sheets of colored paper. If the number of colored paper left is 6 less than the number of pieces of colored paper used for making a piece of art, find how many pieces of colored paper were used. | 44 | 82 6 [OP_SUB] 2 [OP_DIV] 6 [OP_ADD] | var_a = 82
var_b = 6
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 6
var_g = var_e + var_f
print(int(var_g)) |
Arithmetic calculation | To get to her grandmother's house, Wisdom walked one-fifth of the distance and took a bus the rest of the way. How many times the distance travelled by bus is the total distance? | 0.8 | 1 1/5 [OP_SUB] | var_a = 1
var_b = 0.2
var_c = var_a - var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | Box B is larger than box C but smaller than box E. Among boxes A and D boxes, A is smaller, and between boxes A and E, A is larger. 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 | A box of apples weighs 3/5 kilograms (kg) and a box of tangerines weighs 0.49 kilograms (kg). Which box is heavier? | apples | [OP_LIST_SOL] apples tangerines [OP_LIST_EOL] [OP_LIST_SOL] 3 5 [OP_DIV] 0.49 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'apples'
var_b = 'tangerines'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 3
var_d = 5
var_e = var_c / var_d
var_f = 0.49
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 | You plan to bake several of the largest cookies by cutting out a rectangle dough measuring 24 centimeters (cm) long and 18 centimeters (cm) wide. How many cookies can you make in all without any leftover? | 12 | 24 24 18 [OP_GCD] [OP_FDIV] 18 24 18 [OP_GCD] [OP_FDIV] [OP_MUL] | var_a = 24
var_b = 24
var_c = 18
var_d = math.gcd(int(var_c), int(var_b))
var_e = var_a // var_d
var_f = 18
var_g = 24
var_h = 18
var_i = math.gcd(int(var_h), int(var_g))
var_j = var_f // var_i
var_k = var_e * var_j
print(int(var_k)) |
Geometry | The length of one edge of a cube is 7 centimeters (cm). If you are going to glue all the colored paper to the surface of this cube, find the area of the colored paper you will need. | 294 | 7 2 [OP_POW] 6 [OP_MUL] | var_a = 7
var_b = 2
var_c = var_a ** var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Geometry | I made a figure using all 9 sticks, each 2 centimeters (cm) long. Find the perimeter of this figure with all the same angles and 9 sides. | 18 | 2 9 [OP_MUL] | var_a = 2
var_b = 9
var_c = var_a * var_b
print(int(var_c)) |
Geometry | Hyeonho's class teacher bought a large sheet of paper from a stationery store to make name tags for 24 students in the shape of a square with a side length of 4 centimeters (cm). If the teacher miscalculated the length and bought a piece of paper with a width of 34 centimeters (cm), and after making the name tag, the width of the paper is 2 centimeters (cm) left and the length is just right, how many centimeters (cm) was the perimeter of the paper the teacher bought? | 92 | 24 34 4 [OP_FDIV] [OP_DIV] 4 [OP_MUL] 34 [OP_ADD] 2 [OP_MUL] | var_a = 24
var_b = 34
var_c = 4
var_d = var_b // var_c
var_e = var_a / var_d
var_f = 4
var_g = var_e * var_f
var_h = 34
var_i = var_g + var_h
var_j = 2
var_k = var_i * var_j
print(int(var_k)) |
Arithmetic calculation | The 30 students in Minsu's class have their own attendance numbers from 1 to 30. Among the students in Minsu's class, the students wearing glasses are students 1, 3, 7, 10, 23, and 27, and the students with their hair tied are students 1, 9, 11, 20, and 23. How many students both wear glasses and have their hair tied? | 2 | [OP_LIST_SOL] 1 3 7 10 23 27 [OP_LIST_EOL] [OP_LIST_SOL] 1 9 11 20 23 [OP_LIST_EOL] [OP_SET_INTERSECT] [OP_LIST_LEN] | var_a = 1
var_b = 3
var_c = 7
var_d = 10
var_e = 23
var_f = 27
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
var_h = 9
var_i = 11
var_j = 20
var_k = 23
list_b= []
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)
list_b.reverse()
list_c = list(set(list_a) & set(list_b))
var_l = len(list_c)
print(int(var_l)) |
Arithmetic calculation | Seokjin has 3 marbles. Yuna has 1 less marble than Seokjin. Jimin has 2 times more marbles than Seokjin. How many more marbles does Jimin have than Yuna? | 4 | 3 2 [OP_MUL] 3 1 [OP_SUB] [OP_SUB] | var_a = 3
var_b = 2
var_c = var_a * var_b
var_d = 3
var_e = 1
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g)) |
Arithmetic calculation | What do you get when adding all natural numbers that are less than or equal to 31 and greater than 28? | 90 | 28 1 [OP_ADD] 31 1 [OP_LIST_ARANGE] [OP_LIST_SUM] | var_a = 28
var_b = 1
var_c = var_a + var_b
var_d = 31
var_e = 1
list_a = [i for i in range(var_c, var_d + 1, var_e)]
list_a = [float(i) for i in list_a]
var_f = sum(list_a)
print(int(var_f)) |
Possibility | How many total cases can you pay with 4 500-won coins, 2 100-won coins, and 5 10-won coins (excluding the case where the payment amount is 0 won is)? | 89 | 4 1 [OP_ADD] 2 1 [OP_ADD] [OP_MUL] 5 1 [OP_ADD] [OP_MUL] 1 [OP_SUB] | var_a = 4
var_b = 1
var_c = var_a + var_b
var_d = 2
var_e = 1
var_f = var_d + var_e
var_g = var_c * var_f
var_h = 5
var_i = 1
var_j = var_h + var_i
var_k = var_g * var_j
var_l = 1
var_m = var_k - var_l
print(int(var_m)) |
Correspondence | You are going to subtract 24 from a certain number. What is the result of the correct calculation result if you accidentally add 42 and the result is 50? | 16 | 50 42 [OP_SUB] 24 [OP_SUB] | var_a = 50
var_b = 42
var_c = var_a - var_b
var_d = 24
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | If you add A to 10, you get 15. How much is A? | 5 | 15 10 [OP_SUB] | var_a = 15
var_b = 10
var_c = var_a - var_b
print(int(var_c)) |
Comparison | Which of these has a larger volume, cuboid A with a base area is 8 square centimeters (cm2) and a height of 3 centimeters (cm), or cube B with a side length of 5 centimeters (cm)? | B | [OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 8 3 [OP_MUL] 5 5 [OP_MUL] 5 [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 = 8
var_d = 3
var_e = var_c * var_d
var_f = 5
var_g = 5
var_h = var_f * var_g
var_i = 5
var_j = var_h * var_i
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Correspondence | Subtracting 44 from a number gives 15. What number is it? | 59 | 15 44 [OP_ADD] | var_a = 15
var_b = 44
var_c = var_a + var_b
print(int(var_c)) |
Correspondence | A4461B is a six-digit number and is a multiple of 72. What is the value of A+B? | 12 | A4461B [OP_GEN_POSSIBLE_LIST] 72 [OP_LIST_DIVISIBLE] A4461B A [OP_LIST_FIND_UNK] A4461B B [OP_LIST_FIND_UNK] [OP_ADD] | var_a = 'A4461B'
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 = 72
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 = 'A4461B'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
var_e = 0
for elem in list_b:
elem = str(elem)
var_e = int(elem[unk_idx])
var_f = 'A4461B'
var_g = 'B'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_b:
elem = str(elem)
var_h = int(elem[unk_idx])
var_i = var_e + var_h
print(int(var_i)) |
Comparison | There are 28 identical bookshelves in the library. Each bookshelf has 6 floors, and the number of books on each floor is the same. It is said that when the first book and the last book were removed from a shelf, there were 20 books left on that floor. How many books are on the shelves in the library? | 3696 | 20 2 [OP_ADD] 6 [OP_MUL] 28 [OP_MUL] | var_a = 20
var_b = 2
var_c = var_a + var_b
var_d = 6
var_e = var_c * var_d
var_f = 28
var_g = var_e * var_f
print(int(var_g)) |
Correspondence | I need to add 32 to a number, but I mistakenly subtracted 32, so I got 33. Find the result of the correct calculation. | 97 | 33 32 [OP_ADD] 32 [OP_ADD] | var_a = 33
var_b = 32
var_c = var_a + var_b
var_d = 32
var_e = var_c + var_d
print(int(var_e)) |
Geometry | Sunkyung drew all the diagonals of an octagon. How many lines did she draw in total? | 20 | 8 8 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] | var_a = 8
var_b = 8
var_c = 3
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g)) |
Possibility | How many three-digit numbers have the sum of the ones, tens, and hundreds digits equal to 24? | 10 | 100 1000 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_NUM2SUM] 24 [OP_LIST_MORE_EQUAL] 24 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] | var_a = 100
var_b = 1000
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
list_b=[]
for i in list_a:
var_f = 0
i = int(i)
while i//10 > 0:
var_f = var_f + i%10
i = i//10
var_f = var_f + i%10
list_b.append(var_f)
var_g = 24
list_c = []
for i in list_b:
if i >= var_g:
list_c.append(i)
var_h = 24
list_d = []
for i in list_c:
if i <= var_h:
list_d.append(i)
var_i = len(list_d)
print(int(var_i)) |
Possibility | Eight classes are going to play a basketball game. Two teams play each other, and the losing team is eliminated, and only the winning team can play the next game, and the winning team at the end wins. Find the total number of matches. | 30 | 8/2 8/2 1 [OP_ADD] [OP_MUL] 2 8/2 [OP_MUL] 1 [OP_ADD] [OP_MUL] 6 [OP_DIV] | var_a = 4
var_b = 4
var_c = 1
var_d = var_b + var_c
var_e = var_a * var_d
var_f = 2
var_g = 4
var_h = var_f * var_g
var_i = 1
var_j = var_h + var_i
var_k = var_e * var_j
var_l = 6
var_m = var_k / var_l
print(int(var_m)) |
Geometry | The length of one side of a cube-shaped die is 9 centimeters (cm). Choose one side of the die and find how many centimeters (cm) is the sum of the lengths of the sides that make up this side. | 36 | 9 4 [OP_MUL] | var_a = 9
var_b = 4
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | Yuna's father is 27 years older than Yuna and her grandfather is 23 years older than her father. If Yuna is 9 years old this year, how old is Yuna's grandfather this year? | 59 | 9 27 [OP_ADD] 23 [OP_ADD] | var_a = 9
var_b = 27
var_c = var_a + var_b
var_d = 23
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | There are 20 apples in the bag. How many apples are in all 5 bags? | 100 | 20 5 [OP_MUL] | var_a = 20
var_b = 5
var_c = var_a * var_b
print(int(var_c)) |
Possibility | How many three-digit numbers less than 300 satisfiy the following condition that the sum of each digit needs to be 7? | 13 | 100 999 1 [OP_LIST_ARANGE] 300 [OP_LIST_LESS] [OP_LIST_NUM2SUM] 7 [OP_LIST_FIND_NUM] | 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 = 300
list_b = []
for i in list_a:
if i < var_d:
list_b.append(i)
list_c=[]
for i in list_b:
var_e = 0
i = int(i)
while i//10 > 0:
var_e = var_e + i%10
i = i//10
var_e = var_e + i%10
list_c.append(var_e)
var_f = 7
var_g = 0
var_f = int(var_f)
for i in list_c:
i = int(i)
if i == var_f:
var_g = var_g + 1
print(int(var_g)) |
Correspondence | I should add 479 to a certain number, but the result I get by accidentally subtracting 749 from a certain number is 280. Find the correct calculated value. | 1508 | 280 749 [OP_ADD] 479 [OP_ADD] | var_a = 280
var_b = 749
var_c = var_a + var_b
var_d = 479
var_e = var_c + var_d
print(int(var_e)) |
Geometry | The volume of the red box is 0.01 cubic meters (m3), and the volume of the yellow box is 4800 cubic centimeters (cm3). What is the difference between the volume of the red box and the yellow box? | 5200 | 0.01 100 100 100 [OP_MUL] [OP_MUL] [OP_MUL] 4800 [OP_SUB] [OP_ABS] | var_a = 0.01
var_b = 100
var_c = 100
var_d = 100
var_e = var_c * var_d
var_f = var_b * var_e
var_g = var_a * var_f
var_h = 4800
var_i = var_g - var_h
var_j = abs(var_i)
print(int(var_j)) |
Geometry | How many centimeters (cm) is the length of the other side of an isosceles triangle with a side of 6 centimeters (cm) and a perimeter of 20 centimeters (cm)? | 7 | 20 6 [OP_SUB] 2 [OP_DIV] | var_a = 20
var_b = 6
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Possibility | Find the sum of all two-digit numbers that can be formed by using the numbers 2 and 5 as duplicates. | 154 | [OP_LIST_SOL] 2 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PRODUCT] [OP_LIST_SUM] | var_a = 2
var_b = 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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_c))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
list_b = [float(i) for i in list_b]
var_d = sum(list_b)
print(int(var_d)) |
Comparison | The admission fee for an exhibition is 10,000 won per person. The number of visitors was 350 on the first day of opening, 427 on the second day, 384 on the third day, 402 on the fourth day, and 431 on the fifth day. What is the average ticket revenue for days when there were fewer than 400 visitors? | 3670000 | [OP_LIST_SOL] 350 427 384 402 431 [OP_LIST_EOL] 400 [OP_LIST_LESS_EQUAL] [OP_LIST_MEAN] 10000 [OP_MUL] | var_a = 350
var_b = 427
var_c = 384
var_d = 402
var_e = 431
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 = 400
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)/len(list_b)
var_h = 10000
var_i = var_g * var_h
print(int(var_i)) |
Comparison | There are 1443 students in total in one school. The total number of girls is 141 fewer than the number of boys. How many boys are there in this school? | 792 | 1443 141 [OP_ADD] 2 [OP_DIV] | var_a = 1443
var_b = 141
var_c = var_a + var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Geometry | How many faces of an icosahedron meet at a vertex? | 5 | 5 | var_a = 5
print(int(var_a)) |
Geometry | Minsu wants to color the faces of the pentagonal prism. How many colors do you need if you use a different color for each face? | 7 | 2 5 [OP_ADD] | var_a = 2
var_b = 5
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | The five different four-digit numbers 9867, 8976, 9876, 9687, and 9689 are listed from smallest on the left to largest on the right. What is the 4th number from the left? | 9867 | [OP_LIST_SOL] 9867 8976 9876 9687 9689 [OP_LIST_EOL] 4 [OP_LIST_MIN] | var_a = 9867
var_b = 8976
var_c = 9876
var_d = 9687
var_e = 9689
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 = 4
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
print(int(var_g)) |
Possibility | Yuna draws 3 out of 5 number cards and tries to line them up. How many ways can a number card be placed? | 60 | 5 3 [OP_PERM] | var_a = 5
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)) |
Geometry | A rectangle has a width of 81/4 centimeters (cm) and a height of 148/9 centimeters (cm). What is the area of this rectangle in square centimeters (cm2)? | 333 | 81/4 148/9 [OP_MUL] | var_a = 20.25
var_b = 16.444444444444443
var_c = var_a * var_b
print(int(eval('{:.2f}'.format(round(var_c+1e-10,2))))) |
Geometry | What is the number of faces of a pentagonal prism? | 7 | 5 2 [OP_ADD] | var_a = 5
var_b = 2
var_c = var_a + var_b
print(int(var_c)) |
Comparison | Kyungsoo's group of students did the long jump. Kyungsoo jumped 2.3 meters (m), Younghee jumped 9/10 meters (m), Jinju jumped 1.8 meters (m), and Chanho jumped 2.5 meters (m). Who came as the second? | Kyungsoo | [OP_LIST_SOL] Kyungsoo Younghee Jinju Chanho [OP_LIST_EOL] [OP_LIST_SOL] 2.3 9 10 [OP_DIV] 1.8 2.5 [OP_LIST_EOL] 2 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Kyungsoo'
var_b = 'Younghee'
var_c = 'Jinju'
var_d = 'Chanho'
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.3
var_f = 9
var_g = 10
var_h = var_f / var_g
var_i = 1.8
var_j = 2.5
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_k = 2
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Arithmetic calculation | There are three numbers 10, 11, and 12. What is the product of the largest number and the next largest number? | 132 | [OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 1 [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 = 1
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)) |
Comparison | In the midterm, Yeji took four tests: Korean, Mathematics, Social Studies, and Science. If she took Korean language before math, and social studies later than math but before science, which subject did she take last? | Science | [OP_LIST_SOL] Korean Mathematics Social Science [OP_LIST_EOL] [OP_LIST_SOL] Korean Mathematics > Social Mathematics < Social Science > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'Korean'
var_b = 'Mathematics'
var_c = 'Social'
var_d = 'Science'
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 = 'Korean'
var_f = 'Mathematics'
var_g = '>'
var_h = 'Social'
var_i = 'Mathematics'
var_j = '<'
var_k = 'Social'
var_l = 'Science'
var_m = '>'
list_b= []
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_n = len(list_c)
var_o = list_c[var_n-1]
print(var_o) |
Geometry | A pond in the shape of a circle has a diameter of 14 meters (m). What is the radius of the pond in meters (m)? | 7 | 14 2 [OP_DIV] | var_a = 14
var_b = 2
var_c = var_a / var_b
print(int(var_c)) |
Correspondence | A number is greater than 35 and less than 70. When a number is divided by 6, the remainder is 3. When a number is divided by 8, the remainder is 1. Find a number. | 57 | 35 70 1 [OP_SUB] 1 [OP_LIST_ARANGE] 6 3 [OP_LIST_DIVIDE_AND_REMAIN] 8 1 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET] | var_a = 35
var_b = 70
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
var_f = 6
var_g = 3
list_b = []
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
var_g = var_g + var_f
for i in list_a:
i = int(i)
if i%var_f == var_g:
list_b.append(i)
var_h = 8
var_i = 1
list_c = []
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
var_i = var_i + var_h
for i in list_b:
i = int(i)
if i%var_h == var_i:
list_c.append(i)
var_j = 1
var_k = list_c[var_j-1]
print(int(var_k)) |
Arithmetic calculation | There are three numbers 10, 11, and 12. What is the difference between the 2nd largest number and the 2nd smallest number? | 0 | [OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 2 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_SUB] | 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 = 2
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-1]
var_h = var_e - var_g
print(int(var_h)) |
Comparison | The weight of 7 students in Haengdo's class was each 35.1 kilograms (kg), 41.3 kilograms (kg), 38.6 kilograms (kg), 40.2 kilograms (kg), 39.0 kilograms (kg), 43.7 kilograms (kg), 38.4 kilograms (kg). How many students are over 39 kilograms (kg) at the time? | 4 | [OP_LIST_SOL] 35.1 41.3 38.6 40.2 39.0 43.7 38.4 [OP_LIST_EOL] 39 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | var_a = 35.1
var_b = 41.3
var_c = 38.6
var_d = 40.2
var_e = 39
var_f = 43.7
var_g = 38.4
list_a= []
if "/" in str(var_g):
var_g = eval(str(var_g))
list_a.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_h = 39
list_b = []
for i in list_a:
if i >= var_h:
list_b.append(i)
var_i = len(list_b)
print(int(var_i)) |
Correspondence | You want to divide 24 by a certain number. However, you mistakenly added some number to 40, and the result was 52. What is the correct calculation result? | 2 | 24 52 40 [OP_SUB] [OP_DIV] | var_a = 24
var_b = 52
var_c = 40
var_d = var_b - var_c
var_e = var_a / var_d
print(int(var_e)) |
Possibility | Find the sum of the largest two-digit decimal number and the smallest three-digit decimal number that can be formed by using all four cards with the numbers 3, 1, 7, and 4 only once. | 75.66 | [OP_LIST_SOL] 3 1 7 4 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 10 [OP_LIST_POP] [OP_LIST_LEN] 2 [OP_SUB] [OP_POW] [OP_DIV] 4 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] 10 [OP_LIST_POP] [OP_LIST_LEN] 1 [OP_SUB] [OP_POW] [OP_DIV] [OP_ADD] | var_a = 3
var_b = 1
var_c = 7
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 = 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 = 10
var_i = len(list_a)
var_j = 2
var_k = var_i - var_j
var_l = var_h ** var_k
var_m = var_g / var_l
var_n = 4
list_d = [str(i) for i in list_a]
list_d = list(itertools.permutations(list_d, var_n))
list_d = [''.join(num_list) for num_list in list_d]
list_d = [str_num for str_num in list_d if str_num[0] != '0']
list_d = [float(i) for i in list_d]
var_o = 1
list_e=list_d.copy()
list_e.sort()
var_p = list_e[var_o-1]
var_q = 10
var_r = len(list_a)
var_s = 1
var_t = var_r - var_s
var_u = var_q ** var_t
var_v = var_p / var_u
var_w = var_m + var_v
print('{:.2f}'.format(round(var_w+1e-10,2))) |
Correspondence | When you add 30 to a number, you get 55. What is the value of the number subtracted by 23? | 2 | 55 30 [OP_SUB] 23 [OP_SUB] | var_a = 55
var_b = 30
var_c = var_a - var_b
var_d = 23
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | There are 32 basketballs in the school. The number of basketballs is 5 more than the volleyballs and 3 less than the number of soccer balls. How many basketballs, volleyballs and soccer balls are there in total in the school? | 94 | 32 32 5 [OP_SUB] [OP_ADD] 32 3 [OP_ADD] [OP_ADD] | var_a = 32
var_b = 32
var_c = 5
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 32
var_g = 3
var_h = var_f + var_g
var_i = var_e + var_h
print(int(var_i)) |
Geometry | When a square tile is attached to a wall measuring 120 centimeters (cm) wide and 96 centimeters (cm) long, how many centimeters (cm) should one side of the tile be in length to attach the largest tile to the wall without any extra space? | 24 | 120 96 [OP_GCD] | var_a = 120
var_b = 96
var_c = math.gcd(int(var_b), int(var_a))
print(int(var_c)) |
Correspondence | There are some sheets of paper, yellow on the front and green on the back on the floor. Students flipped 16 papers that look yellow so that they look green. If there are 64 more green papers than yellow papers, what was the difference before flipping? | 32 | 64 16 [OP_SUB] 16 [OP_SUB] | var_a = 64
var_b = 16
var_c = var_a - var_b
var_d = 16
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | The number of marbles Jinwoo has is 2/3 of the number of marbles Seonghyeon has, and Cheolsu has 72 marbles. Find the number of marbles Jinwoo has when the sum of marbles Jinwoo and Cheolsu have is twice the number of marbles Seonghyeon has. | 36 | 72 2 1 2/3 [OP_DIV] [OP_MUL] 1 [OP_SUB] [OP_DIV] | var_a = 72
var_b = 2
var_c = 1
var_d = 0.6666666666666666
var_e = var_c / var_d
var_f = var_b * var_e
var_g = 1
var_h = var_f - var_g
var_i = var_a / var_h
print(int(var_i)) |
Geometry | Find the area of a square with a side of 6 centimeters (cm). | 36 | 6 2 [OP_POW] | var_a = 6
var_b = 2
var_c = var_a ** var_b
print(int(var_c)) |
Correspondence | 14AB is a multiple of 9. If A and B are different numbers, how many possible numbers are there? | 11 | 14AB [OP_GEN_POSSIBLE_LIST] 9 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = '14AB'
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 = 9
list_b = []
var_b = int(var_b)
for i in list_a:
i = int(i)
if i % var_b == 0:
list_b.append(i)
var_c = len(list_b)
print(int(var_c)) |
Arithmetic calculation | Minyoung had 17 notebooks. Among them, she gave some to Yujeong, and there were 8 left. How many notebooks did Minyoung give Yujeong? | 9 | 17 8 [OP_SUB] | var_a = 17
var_b = 8
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | If 100 candies are divided into the same amount among Hyunji's classmates and there are no candies left, how many numbers are possible to become the number of Hyunji' classmates? (However, there are students other than Hyunji in Hyunji's class, and the number of students in the class does not exceed 50.) | 7 | 100 [OP_LIST_GET_DIVISOR] 50 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] 1 [OP_SUB] | var_a = 100
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 = 50
list_b = []
for i in list_a:
if i <= var_b:
list_b.append(i)
var_c = len(list_b)
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Comparison | Jungkook's car is 5th from the right and 4th from the left in a row in a parking lot. The number of cars parked in each row is the same, and the parking lot has 10 floors. If there are a total of 1600 cars in the parking lot, how many rows are there on each floor? | 20 | 1600 5 4 [OP_ADD] 1 [OP_SUB] 10 [OP_MUL] [OP_FDIV] | var_a = 1600
var_b = 5
var_c = 4
var_d = var_b + var_c
var_e = 1
var_f = var_d - var_e
var_g = 10
var_h = var_f * var_g
var_i = var_a // var_h
print(int(var_i)) |
Geometry | Find the perimeter of the figure with 3 vertices, and the distance between the 2 vertices is the same as 7 cm (cm). | 21 | 7 3 [OP_MUL] | var_a = 7
var_b = 3
var_c = var_a * var_b
print(int(var_c)) |
Comparison | Jimin drank 0.7 liters (L) of juice. Eunji drank 1/10 liters (L) less than Jimin. Yoongi drank 4/5 liters (L), and Yuna drank 0.2 liters (L) more than Jimin. Who drank the most juice? | Yuna | [OP_LIST_SOL] Jimin Eunji Yoongi Yuna [OP_LIST_EOL] [OP_LIST_SOL] 0.7 0.7 1/10 [OP_SUB] 4/5 0.7 0.2 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jimin'
var_b = 'Eunji'
var_c = 'Yoongi'
var_d = 'Yuna'
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 0.7
var_f = 0.7
var_g = 0.1
var_h = var_f - var_g
var_i = 0.8
var_j = 0.7
var_k = 0.2
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_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_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) |
Comparison | Yoojeong, Taehyung, and Seokjin have marbles. Taehyung has more marbles than Yoojeong. Seokjin has more marbles than Yoojeong. Taehyung has more marbles than Seokjin. Who has the most marbles? | Taehyung | [OP_LIST_SOL] Yoojeong Taehyung Seokjin [OP_LIST_EOL] [OP_LIST_SOL] Yoojeong Taehyung < Yoojeong Seokjin < Seokjin Taehyung < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'Yoojeong'
var_b = 'Taehyung'
var_c = 'Seokjin'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 'Yoojeong'
var_e = 'Taehyung'
var_f = '<'
var_g = 'Yoojeong'
var_h = 'Seokjin'
var_i = '<'
var_j = 'Seokjin'
var_k = 'Taehyung'
var_l = '<'
list_b= []
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)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
if cond_ in ("<", ">", "="):
operand_right = temp_stack.pop()
operand_left = temp_stack.pop()
if cond_ == "=":
cond_ = "=="
conditions.append(f"{operand_left} {cond_} {operand_right}")
else:
if not cond_.isdigit():
cond_ = "{" + cond_ + "}"
temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
item_name_index_dict = dict(zip(items_name_list, perm))
formatted_conditions = \
[condition.format_map(item_name_index_dict) for condition in conditions]
if all(map(eval, formatted_conditions)):
break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_m = 1
var_n = list_c[var_m-1]
print(var_n) |
Comparison | Ji-sung drank 9/25 liters (L) of milk, and Young-pyo drank 0.41 liters (L). Who drank more 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) |
Geometry | There is a barrel in the shape of a cuboid. The lengths of the two sides of the base are 6 meters (m) 40 centimeters (cm) and 9 meters (m), respectively, and the height is 5 meters (m) 20 centimeters (cm). This barrel is full of beans, but you want to divide them all into several barrels whose volume is 1 cubic meter (m3). Find at least how many barrels you need. | 300 | 6 40 100 [OP_DIV] [OP_ADD] 9 [OP_MUL] 5 20 100 [OP_DIV] [OP_ADD] [OP_MUL] 1 [OP_DIV] 1 [OP_CEIL] | var_a = 6
var_b = 40
var_c = 100
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 9
var_g = var_e * var_f
var_h = 5
var_i = 20
var_j = 100
var_k = var_i / var_j
var_l = var_h + var_k
var_m = var_g * var_l
var_n = 1
var_o = var_m / var_n
var_p = 1
var_q=int(((var_o+9*10**(var_p-2))//(10**(var_p-1)))*10**(var_p-1))
print(int(var_q)) |
Arithmetic calculation | The area of a rectangle is found by multiplying its width by its length. What is the value of A if the surface area of a rectangle is 120 square centimeters which is made by increasing the width by 3 centimeters (cm) and reducing the length by A centimeters (cm) of a square whose side length is 12 centimeters (cm)? | 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)) |
Comparison | Two boxes (a) and (b) have been delivered. Yoojung is going to take the smaller of the two boxes. If (b) box is smaller than (a) box, which box should Yoojung carry? | (b) | [OP_LIST_SOL] (a) (b) [OP_LIST_EOL] [OP_LIST_SOL] (a) (b) > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [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 = '(a)'
var_d = '(b)'
var_e = '>'
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)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
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_f = len(list_c)
var_g = list_c[var_f-1]
print(var_g) |
Geometry | Find the maximum number of chocolates that can fit in a rectangular box with a perimeter of 32 centimeters (cm) and a height of 9 centimeters (cm). | 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)) |
Possibility | When Ji-An and Shin-Young play rock-paper-scissors, find the number of cases in which Ji-An wins. (However, a draw may also come out.) | 3 | 3 | var_a = 3
print(int(var_a)) |
Arithmetic calculation | The average score for Korean and Mathematics is 88. After taking the English test, the average score became 90 points. How much is the English score? | 94 | 90 3 [OP_MUL] 88 2 [OP_MUL] [OP_SUB] | var_a = 90
var_b = 3
var_c = var_a * var_b
var_d = 88
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g)) |
Correspondence | What is 23 multiplied by 37 plus 16? | 867 | 23 37 [OP_MUL] 16 [OP_ADD] | var_a = 23
var_b = 37
var_c = var_a * var_b
var_d = 16
var_e = var_c + var_d
print(int(var_e)) |
Possibility | You want to form a two-digit number by picking two numbers from 1, 3, 5, and 8. If you add a certain number to this two-digit number, you get 88, and the two-digit number is the smallest number you can make. If you cannot pick the number twice, what is that certain number? | 75 | [OP_LIST_SOL] 1 3 5 8 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] 88 [OP_SUB] | var_a = 1
var_b = 3
var_c = 5
var_d = 8
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
var_h = 88
var_i = var_g - var_h
print(int(var_i)) |
Geometry | Suppose that there is a trapezoid whose lower side is 3.4 centimeters (cm) shorter than the upper side and has a height of 5.2 centimeters (cm). If the area is 100.62 square centimeters (cm2), how many centimeters (cm) is the length of the lower side? | 17.65 | 100.62 2 [OP_MUL] 5.2 [OP_DIV] 3.4 [OP_SUB] 2 [OP_DIV] | var_a = 100.62
var_b = 2
var_c = var_a * var_b
var_d = 5.2
var_e = var_c / var_d
var_f = 3.4
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Possibility | You are going to put 5 different types of fruit on 3 plates. At this time, there may be a plate that does not contain fruit. How many number of cases are there for you to put fruit on the plates? | 243 | 3 5 [OP_POW] | var_a = 3
var_b = 5
var_c = var_a ** var_b
print(int(var_c)) |
Comparison | The weight of Jisuk's backpack is 1.49 kilograms (kg) and the weight of Miho's backpack is 9/20 kilograms (kg). Whose backpack is lighter? | Miho | [OP_LIST_SOL] Jisuk Miho [OP_LIST_EOL] [OP_LIST_SOL] 1.49 9/20 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jisuk'
var_b = 'Miho'
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.49
var_d = 0.45
list_b= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Possibility | I'm trying to make a two-digit number by picking two different numbers. When you draw a number from 9, 4, 2, or 5, what is the difference between the smallest number and the largest possible number? | 71 | [OP_LIST_SOL] 9 4 2 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 9
var_b = 4
var_c = 2
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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 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 | The total number of pigeons is 21. If the initial number of pigeons was 15, how many more pigeons increased? | 6 | 21 15 [OP_SUB] | var_a = 21
var_b = 15
var_c = var_a - var_b
print(int(var_c)) |
Comparison | How many three-digit numbers with 2 in the hundreds digit and 5 in the tens digit are greater than 256? | 3 | [OP_LIST_SOL] 2 5 A [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 256 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 2
var_b = 5
var_c = 'A'
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 = 256
list_c = []
for i in list_b:
if i > var_e:
list_c.append(i)
var_f = len(list_c)
print(int(var_f)) |
Arithmetic calculation | Three pigeons sitting on a telephone pole flew away. When there were 8 pigeons sitting on the telephone pole at first, how many pigeons are left? | 5 | 8 3 [OP_SUB] | var_a = 8
var_b = 3
var_c = var_a - var_b
print(int(var_c)) |
Arithmetic calculation | There were 25 cars in the parking lot. After 18 cars went out, another 12 came in. How many cars fell in number in the parking lot? | 6 | 25 25 18 [OP_SUB] 12 [OP_ADD] [OP_SUB] | var_a = 25
var_b = 25
var_c = 18
var_d = var_b - var_c
var_e = 12
var_f = var_d + var_e
var_g = var_a - var_f
print(int(var_g)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.