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 | What is the largest three-digit number that is divisible by both 4 and 5? | 980 | 100 999 1 [OP_LIST_ARANGE] 4 [OP_LIST_DIVISIBLE] 5 [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 = 4
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 = 5
list_c = []
var_e = int(var_e)
for i in list_b:
i = int(i)
if i % var_e == 0:
list_c.append(i)
var_f = 1
list_d=list_c.copy()
list_d.sort()
var_g = list_d[-var_f]
print(int(var_g)) |
Arithmetic calculation | Eunji is 25 years younger than her uncle and Yuna is 3 years older than Eunji. If her uncle is 41 years old, what is the sum of Eunji's and Yuna's ages? | 35 | 41 25 [OP_SUB] 41 25 [OP_SUB] 3 [OP_ADD] [OP_ADD] | var_a = 41
var_b = 25
var_c = var_a - var_b
var_d = 41
var_e = 25
var_f = var_d - var_e
var_g = 3
var_h = var_f + var_g
var_i = var_c + var_h
print(int(var_i)) |
Possibility | Find out the number of three-digit numbers that are greater than 600 and less than 950, and which can be made by combining the numbers 9, 4, and 6 only once. | 3 | [OP_LIST_SOL] 9 4 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 600 [OP_LIST_MORE] 950 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 9
var_b = 4
var_c = 6
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 600
list_c = []
for i in list_b:
if i > var_e:
list_c.append(i)
var_f = 950
list_d = []
for i in list_c:
if i < var_f:
list_d.append(i)
var_g = len(list_d)
print(int(var_g)) |
Comparison | I have a group that contains A, B, C, and D. A, C, B, and D is the order of having many pencils in ascending order. E and F joined this group. E has more pencils than F, and F has more pencils than A. Who in this group has the most pencils? | E | [OP_LIST_SOL] A B C D E F [OP_LIST_EOL] [OP_LIST_SOL] A C > C B > B D > E F > F A > [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'
var_f = 'F'
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 = 'A'
var_h = 'C'
var_i = '>'
var_j = 'C'
var_k = 'B'
var_l = '>'
var_m = 'B'
var_n = 'D'
var_o = '>'
var_p = 'E'
var_q = 'F'
var_r = '>'
var_s = 'F'
var_t = 'A'
var_u = '>'
list_b= []
if "/" in str(var_u):
var_u = eval(str(var_u))
list_b.append(var_u)
if "/" in str(var_t):
var_t = eval(str(var_t))
list_b.append(var_t)
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)
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_v = 1
var_w = list_c[var_v-1]
print(var_w) |
Correspondence | I made the mistake of adding 20 to a number and multiplying it by 5, when I needed to add 20 to this number and divide it by 5. The result value was 225. Find the rightly calculated value. | 225 | 225 5 [OP_DIV] 20 [OP_SUB] 20 [OP_ADD] 5 [OP_MUL] | var_a = 225
var_b = 5
var_c = var_a / var_b
var_d = 20
var_e = var_c - var_d
var_f = 20
var_g = var_e + var_f
var_h = 5
var_i = var_g * var_h
print(int(var_i)) |
Arithmetic calculation | Taeyeon's height is 1.06 times that of Sunghee's. When Seonghee measured her height, it was 134.5 centimeters (cm). At this time, find out how tall Taeyeon is in centimeters (cm). | 142.57 | 134.5 1.06 [OP_MUL] | var_a = 134.5
var_b = 1.06
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Arithmetic calculation | If the son's age is 1 year less than 1/4 of the father's age and the father's age is 5 years less than 5 times the son's age, how old is the son? | 9 | 1/4 5 [OP_MUL] 1 [OP_ADD] 1/4 5 [OP_MUL] 1 [OP_SUB] [OP_DIV] | var_a = 0.25
var_b = 5
var_c = var_a * var_b
var_d = 1
var_e = var_c + var_d
var_f = 0.25
var_g = 5
var_h = var_f * var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e / var_j
print(int(var_k)) |
Arithmetic calculation | Tigers are said to run 3.8 kilometers (km) per hour. How many kilometers (km) could the tiger run without stopping in 2 hours and 45 minutes? | 10.45 | 3.8 2 45 60 [OP_DIV] [OP_ADD] [OP_MUL] | var_a = 3.8
var_b = 2
var_c = 45
var_d = 60
var_e = var_c / var_d
var_f = var_b + var_e
var_g = var_a * var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Possibility | There is one black go stone and two white go stones. How many ways are there to place 3 go stones in a row? | 3 | 2 1 [OP_ADD] 2 [OP_COMB] | var_a = 2
var_b = 1
var_c = var_a + var_b
var_d = 2
var_e = 1
var_c = int(var_c)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
var_e = var_e * (var_c-i)
for i, elem in enumerate(range(var_d)):
var_e = var_e / (i+1)
print(int(var_e)) |
Comparison | The average height of the three people, A, B, and C is 143 centimeters (cm). If A's height is increased by 4.5 centimeters (cm), it becomes the average height of B and C. If B is 3 centimeters (cm) taller than C, how tall is C in centimeters (cm)? | 143 | 143 3 [OP_MUL] 3 2 [OP_DIV] 4.5 [OP_SUB] [OP_SUB] 3 [OP_SUB] 3 [OP_DIV] | var_a = 143
var_b = 3
var_c = var_a * var_b
var_d = 3
var_e = 2
var_f = var_d / var_e
var_g = 4.5
var_h = var_f - var_g
var_i = var_c - var_h
var_j = 3
var_k = var_i - var_j
var_l = 3
var_m = var_k / var_l
print(int(var_m)) |
Geometry | There is a pillar with a base in the shape of a equilateral triangle. If a 78 centimeters (cm) long string is wrapped around this pillar and there is neither shortage nor excess string, how many centimeters (cm) is one side of the base of this pillar? | 26 | 78 3 [OP_DIV] | var_a = 78
var_b = 3
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | Hyogeun, Seokgi, and Gayeong weigh 106 kilograms (kg) and 600 grams (g). Gayeong is 7 kg (kg) 700 grams (g) lighter than Seokgi, and Seokgi is 4.8 kg (kg) lighter than Hyogeun. How many kilograms (kg) does Hyogeun weigh? | 41.3 | 106 600 1000 [OP_DIV] [OP_ADD] 7 700 1000 [OP_DIV] [OP_ADD] [OP_ADD] 4.8 2 [OP_MUL] [OP_ADD] 3 [OP_DIV] | var_a = 106
var_b = 600
var_c = 1000
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 7
var_g = 700
var_h = 1000
var_i = var_g / var_h
var_j = var_f + var_i
var_k = var_e + var_j
var_l = 4.8
var_m = 2
var_n = var_l * var_m
var_o = var_k + var_n
var_p = 3
var_q = var_o / var_p
print('{:.2f}'.format(round(var_q+1e-10,2))) |
Possibility | How many of the three-digit number can be formed from four natural numbers 2, 4, 6, and 8 using only 3 numbers? | 24 | [OP_LIST_SOL] 2 4 8 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 2
var_b = 4
var_c = 8
var_d = 6
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = len(list_b)
print(int(var_f)) |
Possibility | When Beomjin wants to put two math books and two English books on the bookshelf, in how many ways can the math books be placed together? | 12 | 3 3 [OP_PERM] 2 [OP_MUL] | var_a = 3
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)
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Geometry | There is a triangle whose base is 3.6 and whose height is 2.5 times the base. Find the area of the triangle. | 16.2 | 3.6 3.6 2.5 [OP_MUL] [OP_MUL] 2 [OP_DIV] | var_a = 3.6
var_b = 3.6
var_c = 2.5
var_d = var_b * var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Comparison | Yuna, Eunji, Minyoung, and Yoojung are having a flying contest. Minyoung flew farther than Eunji, Eunji flew farther than Yoojung, and Yuna flew farther than Yoojung. When Minyoung flew farther than Yoojung, who was the bottom person in the competition? | Yoojung | [OP_LIST_SOL] Yuna Eunji Minyoung Yoojung [OP_LIST_EOL] [OP_LIST_SOL] Yuna Yoojung > Minyoung Eunji > Eunji Yoojung > Yoojung Minyoung < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'Yuna'
var_b = 'Eunji'
var_c = 'Minyoung'
var_d = 'Yoojung'
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 = 'Yuna'
var_f = 'Yoojung'
var_g = '>'
var_h = 'Minyoung'
var_i = 'Eunji'
var_j = '>'
var_k = 'Eunji'
var_l = 'Yoojung'
var_m = '>'
var_n = 'Yoojung'
var_o = 'Minyoung'
var_p = '<'
list_b= []
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_q = len(list_c)
var_r = list_c[var_q-1]
print(var_r) |
Comparison | How many three-digit numbers are less than 306 and greater than or equal to 300? | 6 | 3 100 [OP_MUL] 3 100 [OP_MUL] 99 [OP_ADD] 1 [OP_LIST_ARANGE] 306 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 3
var_b = 100
var_c = var_a * var_b
var_d = 3
var_e = 100
var_f = var_d * var_e
var_g = 99
var_h = var_f + var_g
var_i = 1
list_a = [i for i in range(var_c, var_h + 1, var_i)]
var_j = 306
list_b = []
for i in list_a:
if i < var_j:
list_b.append(i)
var_k = len(list_b)
print(int(var_k)) |
Arithmetic calculation | Twenty-four sheets of 28 centimeters (cm) long paper strips were overlapped to the same length and attached to a long line. If the total length of the 24 strips is 580 cm (cm), find out how many centimeters (cm) of strips 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)) |
Arithmetic calculation | There are 36 colored pencils. The number of red colored pencils is 5/9 of the total. The number of blue colored pencils is 5/12 of the total. How many more red colored pencils are there than the blue colored pencils? | 5 | 36 5/9 [OP_MUL] 36 5/12 [OP_MUL] [OP_SUB] | var_a = 36
var_b = 0.5555555555555556
var_c = var_a * var_b
var_d = 36
var_e = 0.4166666666666667
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g)) |
Arithmetic calculation | If there are 41 students in Seonghoe's class, and there are 3 more students walking to school than those using public transportation, find out how many students walk to school. | 22 | 41 3 [OP_SUB] 2 [OP_DIV] 3 [OP_ADD] | var_a = 41
var_b = 3
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 3
var_g = var_e + var_f
print(int(var_g)) |
Comparison | Yoongi is standing in the 7th row from the left, the 13th row from the right, the 8th row from the front, and the 14th row from the back. If the number of students standing in each row is the same, how many students are doing gymnastics? | 399 | 7 13 [OP_ADD] 1 [OP_SUB] 8 14 [OP_ADD] 1 [OP_SUB] [OP_MUL] | var_a = 7
var_b = 13
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 8
var_g = 14
var_h = var_f + var_g
var_i = 1
var_j = var_h - var_i
var_k = var_e * var_j
print(int(var_k)) |
Comparison | Hanbyul and Seulgi ran. During the same time, Hanbyul ran 1/100 of 10.2 kilometers (km), and Seulgi ran 100 meters (m). Who ran more? | Hanbyul | [OP_LIST_SOL] Hanbyul Seulgi [OP_LIST_EOL] [OP_LIST_SOL] 10.2 1000 [OP_MUL] 1/100 [OP_MUL] 100 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Hanbyul'
var_b = 'Seulgi'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 10.2
var_d = 1000
var_e = var_c * var_d
var_f = 0.01
var_g = var_e * var_f
var_h = 100
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Possibility | Find the difference between the third largest number and the third smallest number among three-digit numbers, all digits of which are different and consist of 0, 2, 7, and 6. | 466 | [OP_LIST_SOL] 0 2 7 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 3 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_SUB] | var_a = 0
var_b = 2
var_c = 7
var_d = 6
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 3
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 3
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 | Jimin has 5 100-won coins and 1 50-won coin, and Seokjin has 2 100-won coins and 7 10-won coins. Find out the sum of the money they both have. | 820 | 100 5 [OP_MUL] 50 1 [OP_MUL] [OP_ADD] 100 2 [OP_MUL] [OP_ADD] 10 7 [OP_MUL] [OP_ADD] | var_a = 100
var_b = 5
var_c = var_a * var_b
var_d = 50
var_e = 1
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 100
var_i = 2
var_j = var_h * var_i
var_k = var_g + var_j
var_l = 10
var_m = 7
var_n = var_l * var_m
var_o = var_k + var_n
print(int(var_o)) |
Arithmetic calculation | There are four numbers 53, 98, 69, and 84. What is the value of the largest number minus the smallest number? | 45 | [OP_LIST_SOL] 53 98 69 84 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 53
var_b = 98
var_c = 69
var_d = 84
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 1
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f - var_h
print(int(var_i)) |
Correspondence | A and B are single-digit numbers. What is the sum of the number of all A's and the number of all B's such that 3/12<A/12<7/12 and 1/10<1/B<1/3? | 9 | 3/12<A/12<7/12 A [OP_DIGIT_UNK_SOLVER] [OP_LIST_LEN] 1/10<1/B<1/3 B [OP_DIGIT_UNK_SOLVER] [OP_LIST_LEN] [OP_ADD] | var_a = '3/12<A/12<7/12'
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] = []
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].append(int(c[i]))
list_a = list(set(ans_dict[var_b]))
var_c = len(list_a)
var_d = '1/10<1/B<1/3'
var_e = 'B'
ans_dict = dict()
var_d = var_d.replace('×','*')
var_d = var_d.replace('x','*')
var_d = var_d.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_d):
if v in variable_candi:
ans_dict[v] = []
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]))
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_d):
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].append(int(c[i]))
list_b = list(set(ans_dict[var_e]))
var_f = len(list_b)
var_g = var_c + var_f
print(int(var_g)) |
Arithmetic calculation | How many flowers are needed to plant flowers from start to finish on both sides of a 100 meter (m) field at 10 meter (m) intervals? | 22 | 100 10 [OP_DIV] 1 [OP_ADD] 2 [OP_MUL] | var_a = 100
var_b = 10
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
var_f = 2
var_g = var_e * var_f
print(int(var_g)) |
Comparison | In the math test, Jimin ranked 24th, and Seokjin ranked 19 ranks ahead of Jimin. What is Seokjin's rank? | 5 | 24 19 [OP_SUB] | var_a = 24
var_b = 19
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | If 31 is 13 less than a certain number, find a number that is 11 greater than this certain number. | 55 | 31 13 [OP_ADD] 11 [OP_ADD] | var_a = 31
var_b = 13
var_c = var_a + var_b
var_d = 11
var_e = var_c + var_d
print(int(var_e)) |
Comparison | Return the sum of the largest and smallest numbers among 0.11, 0.98, 3/4, and 2/3. | 1.09 | [OP_LIST_SOL] 0.11 0.98 3 4 [OP_DIV] 2 3 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD] | var_a = 0.11
var_b = 0.98
var_c = 3
var_d = 4
var_e = var_c / var_d
var_f = 2
var_g = 3
var_h = var_f / var_g
list_a= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_a.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_i = 1
list_b=list_a.copy()
list_b.sort()
var_j = list_b[-var_i]
var_k = 1
list_c=list_a.copy()
list_c.sort()
var_l = list_c[var_k-1]
var_m = var_j + var_l
print('{:.2f}'.format(round(var_m+1e-10,2))) |
Correspondence | When we subtract 32 from a number divided by 12, multiply it by 3, and then subtract 45 again, it becomes 159. Find this number. | 1200 | 159 45 [OP_ADD] 3 [OP_DIV] 32 [OP_ADD] 12 [OP_MUL] | var_a = 159
var_b = 45
var_c = var_a + var_b
var_d = 3
var_e = var_c / var_d
var_f = 32
var_g = var_e + var_f
var_h = 12
var_i = var_g * var_h
print(int(var_i)) |
Geometry | What is the area in square centimeters (cm2) of the wall that can be covered by 3.2 square tiles with a side length of 8.5 centimeters (cm)? | 231.2 | 8.5 2 [OP_POW] 3.2 [OP_MUL] | var_a = 8.5
var_b = 2
var_c = var_a ** var_b
var_d = 3.2
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | 18 is the result of multiplying a number by 2. What do you get when you subtract 4 from this number? | 5 | 18 2 [OP_DIV] 4 [OP_SUB] | var_a = 18
var_b = 2
var_c = var_a / var_b
var_d = 4
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | Yoongi bought a 250 won candy at the mart and received 500 won as pocket money. After that, he spent half of my money on a pencil, and he had 420 won left. How much money did Yoongi have at first? | 590 | 420 2 [OP_MUL] 500 [OP_SUB] 250 [OP_ADD] | var_a = 420
var_b = 2
var_c = var_a * var_b
var_d = 500
var_e = var_c - var_d
var_f = 250
var_g = var_e + var_f
print(int(var_g)) |
Correspondence | AB2-41=591. What should B be? | 3 | AB2-41=591 B [OP_DIGIT_UNK_SOLVER] | var_a = 'AB2-41=591'
var_b = 'B'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Correspondence | The number 397 less than B is A, and A is 742. If B equals C plus 693, find the A minus C. | 296 | 742 742 397 [OP_ADD] 693 [OP_SUB] [OP_SUB] | var_a = 742
var_b = 742
var_c = 397
var_d = var_b + var_c
var_e = 693
var_f = var_d - var_e
var_g = var_a - var_f
print(int(var_g)) |
Correspondence | When A is divided by 5, the quotient is B and the remainder is C. A, B, and C are natural numbers. If B and C are equal, what is the largest number of possible Cs? | 4 | 5 1 [OP_SUB] | var_a = 5
var_b = 1
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | Find the number between 5 and 9 that is greater than 7. | 8 | 5 1 [OP_ADD] 9 1 [OP_SUB] 1 [OP_LIST_ARANGE] 7 [OP_LIST_MORE] 1 [OP_LIST_GET] | var_a = 5
var_b = 1
var_c = var_a + var_b
var_d = 9
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 = 7
list_b = []
for i in list_a:
if i > var_h:
list_b.append(i)
var_i = 1
var_j = list_b[var_i-1]
print(int(var_j)) |
Arithmetic calculation | The distance between Hyosung and Mimi's house is 2.5 kilometers (km). Hyoseong and Mimi promised to meet, started from their respective homes at the same time, and walked toward each other's homes at a certain speed. If Mimi walks 2.4 kilometers (km) an hour and Hyosung walks 0.08 kilometers (km) a minute, what is the distance in kilometers (km) between the two after 15 minutes? | 0.7 | 2.5 0.08 15 [OP_MUL] [OP_SUB] 2.4 60 [OP_DIV] 15 [OP_MUL] [OP_SUB] | var_a = 2.5
var_b = 0.08
var_c = 15
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 2.4
var_g = 60
var_h = var_f / var_g
var_i = 15
var_j = var_h * var_i
var_k = var_e - var_j
print('{:.2f}'.format(round(var_k+1e-10,2))) |
Comparison | Jungkook ate 3 out of 6 apples. If Yoongi has 4 apples and Yuna has 5 apples, whose apples are the fewest? | Jungkook | [OP_LIST_SOL] Jungkook Yoongi Yuna [OP_LIST_EOL] [OP_LIST_SOL] 6 3 [OP_SUB] 4 5 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jungkook'
var_b = 'Yoongi'
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 = 6
var_e = 3
var_f = var_d - var_e
var_g = 4
var_h = 5
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[var_i-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Correspondence | When 6A5+B03=748 is valid, find B. | 1 | 6A5+B03=748 B [OP_DIGIT_UNK_SOLVER] | var_a = '6A5+B03=748'
var_b = 'B'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Correspondence | The number of 19 groups of 10 and 55 groups of 100 is called A, and 173 plus 224 five times is B. How much is A-B? | 4397 | 100 55 [OP_MUL] 10 19 [OP_MUL] [OP_ADD] 173 224 5 [OP_MUL] [OP_ADD] [OP_SUB] | var_a = 100
var_b = 55
var_c = var_a * var_b
var_d = 10
var_e = 19
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 173
var_i = 224
var_j = 5
var_k = var_i * var_j
var_l = var_h + var_k
var_m = var_g - var_l
print(int(var_m)) |
Comparison | Jimin, Jungkook, and Taehyung had a running competition, and as a result, Jimin came in 6th place and Jungkook came in 8th place. Taehyung did better than Jungkook but not when compared with Jimin. What is Taehyung's rank? | 7 | 6 8 [OP_ADD] 2 [OP_FDIV] | var_a = 6
var_b = 8
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e)) |
Correspondence | The 3/10 of a number is 12. Find what 1/5 of that number is. | 8 | 12 3/10 [OP_DIV] 1/5 [OP_MUL] | var_a = 12
var_b = 0.3
var_c = var_a / var_b
var_d = 0.2
var_e = var_c * var_d
print(int(var_e)) |
Possibility | We want to simultaneously draw three different numbers from natural numbers less than 10. Find the number of ways in which the sum of these three numbers become 19. | 30 | 1 10 1 [OP_SUB] 1 [OP_LIST_ARANGE] 3 [OP_LIST_GET_PERM] [OP_LIST_NUM2SUM] 19 [OP_LIST_LESS_EQUAL] 19 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | var_a = 1
var_b = 10
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 = 3
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]
list_c=[]
for i in list_b:
var_g = 0
i = int(i)
while i//10 > 0:
var_g = var_g + i%10
i = i//10
var_g = var_g + i%10
list_c.append(var_g)
var_h = 19
list_d = []
for i in list_c:
if i <= var_h:
list_d.append(i)
var_i = 19
list_e = []
for i in list_d:
if i >= var_i:
list_e.append(i)
var_j = len(list_e)
print(int(var_j)) |
Correspondence | 282 is 133 greater than this number. What is the value if 11 is subtracted from this number? | 138 | 282 133 [OP_SUB] 11 [OP_SUB] | var_a = 282
var_b = 133
var_c = var_a - var_b
var_d = 11
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | You subtracted a number from 63 and got 8, but then you realized that you were supposed to add 36 to a number. What do you get for the correct answer? | 107 | 8 63 [OP_ADD] 36 [OP_ADD] | var_a = 8
var_b = 63
var_c = var_a + var_b
var_d = 36
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | In art class, Miyoung is going to cut a rectangular colored paper measuring 32 centimeters (cm) wide by 74 centimeters (cm) long to make several identical squares without any left over. What is the size of one side of the largest square that Miyoung can make? | 2 | 32 74 [OP_GCD] | var_a = 32
var_b = 74
var_c = math.gcd(int(var_b), int(var_a))
print(int(var_c)) |
Arithmetic calculation | I'm going to connect 20 tape measurements that are 15.25 centimeters (cm) long. How many centimeters (cm) each should the tape be superimposed to make the total length of the attached tape measure 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)) |
Correspondence | Hyeonjeong's farm has 100 cows. If the milk produced by Hyeonjeong's farm for 10 days is 2804 liters (L), find the amount of milk produced per day by the cows at Hyeonjeong's farm. | 280.4 | 2804 10 [OP_DIV] | var_a = 2804
var_b = 10
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Possibility | Using the number cards 1, 6, and 8 all once, find the largest three-digit number plus the third smallest three-digit number. | 1479 | [OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 3 [OP_LIST_MIN] [OP_ADD] | var_a = 1
var_b = 6
var_c = 8
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 3
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i)) |
Comparison | A bucket was completed with 1100 milliliters (ml) of water, followed by an additional 3 liters (L) and 400 milliliters (ml) of water. While a kettle holds a capacity of 4 liters (L) and 800 milliliters (ml), which one has a large capacity: a bucket or a kettle? | kettle | [OP_LIST_SOL] kettle bucket [OP_LIST_EOL] [OP_LIST_SOL] 4 1000 [OP_MUL] 800 [OP_ADD] 1100 3 1000 [OP_MUL] 400 [OP_ADD] [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'kettle'
var_b = 'bucket'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 4
var_d = 1000
var_e = var_c * var_d
var_f = 800
var_g = var_e + var_f
var_h = 1100
var_i = 3
var_j = 1000
var_k = var_i * var_j
var_l = 400
var_m = var_k + var_l
var_n = var_h + var_m
list_b= []
if "/" in str(var_n):
var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_o = 1
list_c=list_b.copy()
list_c.sort()
var_p = list_c[-var_o]
var_q = list_b.index(var_p)+1
var_r = list_a[var_q-1]
print(var_r) |
Correspondence | Yoongi wants to subtract 57 from a four-digit number. Yoongi misspelled 9 as a 6 in the unit digit of a four-digit number. When the difference obtained by Yoongi is 1819, find a four-digit number. | 1879 | 1819 57 [OP_ADD] 6 9 [OP_SUB] [OP_SUB] | var_a = 1819
var_b = 57
var_c = var_a + var_b
var_d = 6
var_e = 9
var_f = var_d - var_e
var_g = var_c - var_f
print(int(var_g)) |
Correspondence | Rounding down 1A69 to the hundreds place gives 1600. Find A. | 6 | 1A69 [OP_GEN_POSSIBLE_LIST] 1600 [OP_LIST_MORE_EQUAL] 1600 100 [OP_ADD] [OP_LIST_LESS] 1A69 A [OP_LIST_FIND_UNK] | var_a = '1A69'
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 = 1600
list_b = []
for i in list_a:
if i >= var_b:
list_b.append(i)
var_c = 1600
var_d = 100
var_e = var_c + var_d
list_c = []
for i in list_b:
if i < var_e:
list_c.append(i)
var_f = '1A69'
var_g = 'A'
var_f = str(var_f)
var_g = str(var_g)
unk_idx = var_f.index(var_g)
var_h = 0
for elem in list_c:
elem = str(elem)
var_h = int(elem[unk_idx])
print(int(var_h)) |
Geometry | The area of a rhombus is 80 square centimeters (cm2), and the length of one diagonal of the rhombus is 16 centimeters (cm). the length of the other diagonal in centimeters (cm). | 10 | 80 2 [OP_MUL] 16 [OP_DIV] | var_a = 80
var_b = 2
var_c = var_a * var_b
var_d = 16
var_e = var_c / var_d
print(int(var_e)) |
Comparison | There are 24 vehicles. The red cars take up a quarter of the total, blue cars outnumber red cars by six, and yellow cars take up the rest. What color of the cars do you have the most? | blue | [OP_LIST_SOL] red blue yellow [OP_LIST_EOL] [OP_LIST_SOL] 24 4 [OP_DIV] 24 4 [OP_DIV] 6 [OP_ADD] 24 24 4 [OP_DIV] 6 [OP_ADD] [OP_SUB] 24 4 [OP_DIV] [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'red'
var_b = 'blue'
var_c = 'yellow'
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 = 24
var_e = 4
var_f = var_d / var_e
var_g = 24
var_h = 4
var_i = var_g / var_h
var_j = 6
var_k = var_i + var_j
var_l = 24
var_m = 24
var_n = 4
var_o = var_m / var_n
var_p = 6
var_q = var_o + var_p
var_r = var_l - var_q
var_s = 24
var_t = 4
var_u = var_s / var_t
var_v = var_r - var_u
list_b= []
if "/" in str(var_v):
var_v = eval(str(var_v))
list_b.append(var_v)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_w = 1
list_c=list_b.copy()
list_c.sort()
var_x = list_c[-var_w]
var_y = list_b.index(var_x)+1
var_z = list_a[var_y-1]
print(var_z) |
Arithmetic calculation | There were 45 chickens on the farm. If you bought 18 more chickens on day 1 and 12 more chickens on day 2, how many more chickens increased? | 30 | 18 12 [OP_ADD] | var_a = 18
var_b = 12
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | There are 3 blue balls and 5 red balls in the box. When 2 red balls are put in, how many red balls are there in the box? | 7 | 5 2 [OP_ADD] | var_a = 5
var_b = 2
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | You are going to cut the ribbon in 0.82 meter (m) to make ribbon loops. Find how many loops can be made with 5.74 meters (m) of ribbon. | 7 | 5.74 0.82 [OP_FDIV] | var_a = 5.74
var_b = 0.82
var_c = var_a // var_b
print(int(var_c)) |
Possibility | You are given three numbers 6, 0 and 3. How many two-digit numbers can be made using given numbers once? | 4 | [OP_LIST_SOL] 6 0 3 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 6
var_b = 0
var_c = 3
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 = [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 = len(list_b)
print(int(var_e)) |
Geometry | 9 cuboid blocks 18 centimeters (cm) wide, 12 centimeters (cm) long, and 1 centimeters (cm) high are stacked. Assuming that 9 blocks are a set, how many sets are needed to make a cube with this set? | 24 | 18 12 [OP_LCM] 9 [OP_LCM] 18 [OP_DIV] 18 12 [OP_LCM] 9 [OP_LCM] 9 [OP_DIV] 18 12 [OP_LCM] 9 [OP_LCM] 12 [OP_DIV] [OP_MUL] [OP_MUL] | var_a = 18
var_b = 12
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
var_d = 9
var_e = var_d * var_c / math.gcd(int(var_d), int(var_c))
var_f = 18
var_g = var_e / var_f
var_h = 18
var_i = 12
var_j = var_i * var_h / math.gcd(int(var_i), int(var_h))
var_k = 9
var_l = var_k * var_j / math.gcd(int(var_k), int(var_j))
var_m = 9
var_n = var_l / var_m
var_o = 18
var_p = 12
var_q = var_p * var_o / math.gcd(int(var_p), int(var_o))
var_r = 9
var_s = var_r * var_q / math.gcd(int(var_r), int(var_q))
var_t = 12
var_u = var_s / var_t
var_v = var_n * var_u
var_w = var_g * var_v
print(int(var_w)) |
Correspondence | The three-digit number A3B is greater than 300 and less than 400. Also, it is divisible by 3 and a multiple of 7. What is B? | 6 | A3B [OP_GEN_POSSIBLE_LIST] 300 [OP_LIST_MORE] 400 [OP_LIST_LESS] 3 [OP_LIST_DIVISIBLE] 7 [OP_LIST_DIVISIBLE] A3B B [OP_LIST_FIND_UNK] | var_a = 'A3B'
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 = 300
list_b = []
for i in list_a:
if i > var_b:
list_b.append(i)
var_c = 400
list_c = []
for i in list_b:
if i < var_c:
list_c.append(i)
var_d = 3
list_d = []
var_d = int(var_d)
for i in list_c:
i = int(i)
if i % var_d == 0:
list_d.append(i)
var_e = 7
list_e = []
var_e = int(var_e)
for i in list_d:
i = int(i)
if i % var_e == 0:
list_e.append(i)
var_f = 'A3B'
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_e:
elem = str(elem)
var_h = int(elem[unk_idx])
print(int(var_h)) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. What is the quotient of the second largest number divided by the smallest number? | 1 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 2 [OP_LIST_MAX] 1 [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 = 2
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
var_h = 1
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)) |
Correspondence | When A is divided by 8, the quotient is B and the remainder is C. A, B, and C are natural numbers. In this, the quotient and remainder are equal. Find the largest number of A which is a divided number. | 63 | 8 8 1 [OP_SUB] [OP_MUL] 8 1 [OP_SUB] [OP_ADD] | var_a = 8
var_b = 8
var_c = 1
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 8
var_g = 1
var_h = var_f - var_g
var_i = var_e + var_h
print(int(var_i)) |
Arithmetic calculation | Minjae and his father picked apples. Minjae gained 2.6 kilograms (kg), and his father 5.98 kilograms (kg). How many kilograms (kg) are all the apples Minjae and his father picked? | 8.58 | 2.6 5.98 [OP_ADD] | var_a = 2.6
var_b = 5.98
var_c = var_a + var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | When 11 is divided by the natural number A, the remainder is 2 and the quotient is 3. Find the value of A at this time. | 3 | 11 2 [OP_SUB] 3 [OP_DIV] | var_a = 11
var_b = 2
var_c = var_a - var_b
var_d = 3
var_e = var_c / var_d
print(int(var_e)) |
Comparison | There is a cargo of 127000 kilograms (kg). How many more trucks are needed to transport this cargo from Busan to Seoul by 5000 kilograms (kg) trucks than by 8000 kilograms (kg) trucks? | 10 | 127000 5000 [OP_DIV] 1 [OP_CEIL] 127000 8000 [OP_DIV] 1 [OP_CEIL] [OP_SUB] | var_a = 127000
var_b = 5000
var_c = var_a / var_b
var_d = 1
var_e=int(((var_c+9*10**(var_d-2))//(10**(var_d-1)))*10**(var_d-1))
var_f = 127000
var_g = 8000
var_h = var_f / var_g
var_i = 1
var_j=int(((var_h+9*10**(var_i-2))//(10**(var_i-1)))*10**(var_i-1))
var_k = var_e - var_j
print(int(var_k)) |
Correspondence | The number of students in Seungju's class is between 50 and 70. If the students in Seungju's class form 5 lines, there will be 3 left, and if they form 7 lines, 2 will remain. How many students are in Seungju's class? | 58 | 50 70 1 [OP_SUB] 1 [OP_LIST_ARANGE] 5 3 [OP_LIST_DIVIDE_AND_REMAIN] 7 2 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET] | var_a = 50
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 = 5
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 = 7
var_i = 2
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)) |
Possibility | If there are 6 cats A, B, C, D, E, and F, find the number of ways to select 2 vice captains and 1 captain. | 60 | [OP_LIST_SOL] A B C D E F [OP_LIST_EOL] [OP_LIST_LEN] 2 1 [OP_ADD] [OP_PERM] 2 2 [OP_PERM] [OP_DIV] | var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
var_e = 'E'
var_f = 'F'
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 = len(list_a)
var_h = 2
var_i = 1
var_j = var_h + var_i
var_k = 1
var_g = int(var_g)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
var_k = var_k * (var_g-i)
var_l = 2
var_m = 2
var_n = 1
var_l = int(var_l)
var_m = int(var_m)
for i, elem in enumerate(range(var_m)):
var_n = var_n * (var_l-i)
var_o = var_k / var_n
print(int(var_o)) |
Correspondence | When you add 3 to a certain number, you get 226. Find the value of the certain number multiplied by 3. | 669 | 226 3 [OP_SUB] 3 [OP_MUL] | var_a = 226
var_b = 3
var_c = var_a - var_b
var_d = 3
var_e = var_c * var_d
print(int(var_e)) |
Comparison | Yoongi collected 7 points, Jungkook got 6 points, Yuna got 9 points, and Yoojung got 8 points. Who has the largest number? | Yuna | [OP_LIST_SOL] Yoongi Jungkook Yuna Yoojung [OP_LIST_EOL] [OP_LIST_SOL] 7 6 9 8 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoongi'
var_b = 'Jungkook'
var_c = 'Yuna'
var_d = 'Yoojung'
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 = 7
var_f = 6
var_g = 9
var_h = 8
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
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_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Possibility | I am trying to create two-digit natural numbers with 2, 3, and 7. Find the third largest possible number that can be made by allowing duplicates. | 72 | [OP_LIST_SOL] 2 3 7 [OP_LIST_EOL] 2 [OP_LIST_GET_PRODUCT] 3 [OP_LIST_MAX] | var_a = 2
var_b = 3
var_c = 7
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 3
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f)) |
Geometry | Five sheets of 2.7meters (m) long color tape were attached together overlapping each other by 0.3meters (m). How many meters (m) is the length of one layer of colored tape if it is divided equally into 6 layers? | 2.05 | 2.7 5 [OP_MUL] 0.3 5 1 [OP_SUB] [OP_MUL] [OP_SUB] 6 [OP_DIV] | var_a = 2.7
var_b = 5
var_c = var_a * var_b
var_d = 0.3
var_e = 5
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_c - var_h
var_j = 6
var_k = var_i / var_j
print('{:.2f}'.format(round(var_k+1e-10,2))) |
Arithmetic calculation | What is the largest five-digit number that is a multiple of 3 and a multiple of 4? | 99996 | 10000 99999 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 4 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] | var_a = 10000
var_b = 99999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
list_b = []
var_d = int(var_d)
for i in list_a:
i = int(i)
if i % var_d == 0:
list_b.append(i)
var_e = 4
list_c = []
var_e = int(var_e)
for i in list_b:
i = int(i)
if i % var_e == 0:
list_c.append(i)
var_f = 1
list_d=list_c.copy()
list_d.sort()
var_g = list_d[-var_f]
print(int(var_g)) |
Arithmetic calculation | There are 11 white rabbits and 13 black rabbits. How many female rabbits are there if 15 of them are male rabbits? | 9 | 11 13 [OP_ADD] 15 [OP_SUB] | var_a = 11
var_b = 13
var_c = var_a + var_b
var_d = 15
var_e = var_c - var_d
print(int(var_e)) |
Comparison | Find a number less than 1.11 among five numbers 4, 9/10, 1.2, 0.5, and 13/10, and then find the largest among them. | 0.9 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_LESS] 1 [OP_LIST_MAX] | var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 1.1
list_b = []
for i in list_a:
if i < var_f:
list_b.append(i)
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
print('{:.2f}'.format(round(var_h+1e-10,2))) |
Possibility | There are magnets with numbers 8, 7 and 0 written respectively. What is the largest number you can make by arranging them? | 870 | [OP_LIST_SOL] 0 8 7 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] | var_a = 0
var_b = 8
var_c = 7
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f)) |
Possibility | There are 2 balls in each of the 3 boxes that Jungkook has. How many balls does Jungkook have? | 6 | 3 2 [OP_MUL] | var_a = 3
var_b = 2
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | It is said that Gyeonghun climbed the mountain at a speed of 3 kilometers (km) per hour when going up, and 4 kilometers (km) per hour when going down as he changed the route, which takes 2 kilometers (km) longer than the previous one. If he took a total of 4 hours for climbing, how long did it take to go up? | 2 | 4 2 4 [OP_DIV] [OP_SUB] 1 3 [OP_DIV] 1 4 [OP_DIV] [OP_ADD] [OP_DIV] 3 [OP_DIV] | var_a = 4
var_b = 2
var_c = 4
var_d = var_b / var_c
var_e = var_a - var_d
var_f = 1
var_g = 3
var_h = var_f / var_g
var_i = 1
var_j = 4
var_k = var_i / var_j
var_l = var_h + var_k
var_m = var_e / var_l
var_n = 3
var_o = var_m / var_n
print(int(eval('{:.2f}'.format(round(var_o+1e-10,2))))) |
Arithmetic calculation | The taxi driven by Boeun's father travels 100 kilometers (km) in 1 hour and 15 minutes. What is the average distance the taxi traveled in 1 hour in kilometers (km)? | 80 | 100 1 15 60 [OP_DIV] [OP_ADD] [OP_DIV] | var_a = 100
var_b = 1
var_c = 15
var_d = 60
var_e = var_c / var_d
var_f = var_b + var_e
var_g = var_a / var_f
print(int(var_g)) |
Possibility | Three out of five digits 0, 1, 2, 3, and 4 were chosen to make a three-digit odd number. If you can use the same number multiple times, what is the total of all the odd numbers that can be made? | 10880 | [OP_LIST_SOL] 0 1 2 3 4 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] 2 [OP_LIST_DIVISIBLE] [OP_SET_DIFFERENCE] [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_d = list(set(list_b) - set(list_c))
list_d = [float(i) for i in list_d]
var_h = sum(list_d)
print(int(var_h)) |
Arithmetic calculation | While hiking, Yunsu drank 7/15 of the water on the first day, 5/8 of the remaining water on the second day, and 2/3 of the rest on the third day. If the amount of remaining water is 2.6 liters (L), what is the amount of water Yunsu had at the beginning? | 39 | 2.6 1 7/15 [OP_SUB] 1 5/8 [OP_SUB] [OP_MUL] 1 2/3 [OP_SUB] [OP_MUL] [OP_DIV] | var_a = 2.6
var_b = 1
var_c = 0.4666666666666667
var_d = var_b - var_c
var_e = 1
var_f = 0.625
var_g = var_e - var_f
var_h = var_d * var_g
var_i = 1
var_j = 0.6666666666666666
var_k = var_i - var_j
var_l = var_h * var_k
var_m = var_a / var_l
print(int(eval('{:.2f}'.format(round(var_m+1e-10,2))))) |
Arithmetic calculation | There are 14 boxes containing 105 apples each. 84 of these apples were rotten and discarded, and the rest were put in 6 per bag and 7 bags per box. Find how many boxes there are in total. | 33 | 105 14 [OP_MUL] 84 [OP_SUB] 6 7 [OP_MUL] [OP_DIV] | var_a = 105
var_b = 14
var_c = var_a * var_b
var_d = 84
var_e = var_c - var_d
var_f = 6
var_g = 7
var_h = var_f * var_g
var_i = var_e / var_h
print(int(var_i)) |
Geometry | How many vertices are there in a 14-sided pyramid? | 8 | 14 2 [OP_DIV] 1 [OP_ADD] | var_a = 14
var_b = 2
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | There are 15 red apples, 8 green apples, and 32 pears. How many more pears are there than apples? | 9 | 32 15 8 [OP_ADD] [OP_SUB] | var_a = 32
var_b = 15
var_c = 8
var_d = var_b + var_c
var_e = var_a - var_d
print(int(var_e)) |
Arithmetic calculation | How many four-digit numbers are multiples of 5, multiples of 6, and multiples of 2 at the same time? | 300 | 1000 9999 1 [OP_LIST_ARANGE] 5 [OP_LIST_DIVISIBLE] 6 [OP_LIST_DIVISIBLE] 2 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 1000
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 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 = 6
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 = len(list_d)
print(int(var_g)) |
Arithmetic calculation | Among three numbers of 10, 11 and 12, what is the quotient if the smallest number is divided by the next smallest number? | 0 | [OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 1 [OP_LIST_MIN] 2 [OP_LIST_MIN] [OP_FDIV] | 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-1]
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)) |
Arithmetic calculation | There is a barrel with 10.4 kilograms (kg) of water. If you want to divide this water by 0.8 kg (kg) into each small bucket, how many buckets are needed? | 13 | 10.4 0.8 [OP_DIV] | var_a = 10.4
var_b = 0.8
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | When 52.5 kg (kg) of sweet potatoes are divided by 5 kg (kg) per person, find how many kg (kg) of sweet potatoes are left after sharing. | 2.5 | 52.5 5 [OP_MOD] | var_a = 52.5
var_b = 5
var_c = var_a % var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Possibility | When writing a natural number less than 100 on a piece of paper, find how many times the number 1 must be written down. | 21 | 1 100 1 [OP_LIST_ARANGE] [OP_LIST2NUM] [OP_NUM2LIST] 1 [OP_LIST_FIND_NUM] | var_a = 1
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d=""
for i in list_a:
i = str(i)
var_d = var_d + i
list_b = []
var_d = int(var_d)
while var_d//10 > 0:
list_b.append(var_d%10)
var_d = var_d//10
list_b.append(var_d%10)
list_b = list_b[::-1]
var_e = 1
var_f = 0
var_e = int(var_e)
for i in list_b:
i = int(i)
if i == var_e:
var_f = var_f + 1
print(int(var_f)) |
Geometry | There is a box 9 centimeters (cm) wide, 4 centimeters (cm) long, and 7 centimeters (cm) high. What is the volume of this box in cubic centimeters (cm3)? | 252 | 9 4 [OP_MUL] 7 [OP_MUL] | var_a = 9
var_b = 4
var_c = var_a * var_b
var_d = 7
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | Jinwoo said that he had to multiply by 1.36 while calculating, but he made a mistake and divided it by 1.36 resulting in 0.5. What was the value Jinwoo was originally trying to find? | 0.92 | 0.5 1.36 [OP_MUL] 1.36 [OP_MUL] | var_a = 0.5
var_b = 1.36
var_c = var_a * var_b
var_d = 1.36
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | A hare and a tortoise are racing. A tortoise can cover 5 meters (m) in 3 minutes when a hare can get to 5 meters (m) in 2 minutes. If the hare starts running 20 meters (m) behind the tortoise, in how many minutes will the hare and the tortoise meet? | 24 | 20 5 2 [OP_DIV] 5 3 [OP_DIV] [OP_SUB] [OP_DIV] | var_a = 20
var_b = 5
var_c = 2
var_d = var_b / var_c
var_e = 5
var_f = 3
var_g = var_e / var_f
var_h = var_d - var_g
var_i = var_a / var_h
print(int(eval('{:.2f}'.format(round(var_i+1e-10,2))))) |
Arithmetic calculation | When Hoseok bought item (a) at the mart, he paid 7, 4, and 5 1,000 won, 100 won, and 10 won coins, respectively. What is the price of the item (a)? | 7450 | 1000 7 [OP_MUL] 100 4 [OP_MUL] [OP_ADD] 10 5 [OP_MUL] [OP_ADD] | var_a = 1000
var_b = 7
var_c = var_a * var_b
var_d = 100
var_e = 4
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 10
var_i = 5
var_j = var_h * var_i
var_k = var_g + var_j
print(int(var_k)) |
Correspondence | When you divide a certain number by 4 and add 3, you get 5. Find that number. | 8 | 5 3 [OP_SUB] 4 [OP_MUL] | var_a = 5
var_b = 3
var_c = var_a - var_b
var_d = 4
var_e = var_c * var_d
print(int(var_e)) |
Comparison | Among 1.4, 9/10, 1.2, 0.5, and 13/10, pick a number greater than 1.1 and arrange them in descending order. Which number comes first? | 1.2 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE] 1 [OP_LIST_MIN] | var_a = 1.4
var_b = 0.9
var_c = 1.2
var_d = 0.5
var_e = 1.3
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 1.1
list_b = []
for i in list_a:
if i > var_f:
list_b.append(i)
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
print('{:.2f}'.format(round(var_h+1e-10,2))) |
Correspondence | There are four different numbers A, B, C, and D. Find D from the three-digit addition formula 7A4+B6C=D29. | 9 | 7A4+B6C=D29 D [OP_DIGIT_UNK_SOLVER] | var_a = '7A4+B6C=D29'
var_b = 'D'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Comparison | There are boxes A, B, C, and D with different weights. Box B is heavier than Box C, and Box A is lighter than Box C. If box D is heavier than B, which box is the heaviest? | D | [OP_LIST_SOL] A B C D [OP_LIST_EOL] [OP_LIST_SOL] B C > A C < D B > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
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 = 'B'
var_f = 'C'
var_g = '>'
var_h = 'A'
var_i = 'C'
var_j = '<'
var_k = 'D'
var_l = 'B'
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 = 1
var_o = list_c[var_n-1]
print(var_o) |
Arithmetic calculation | If 28 students were to form teams of 7 against students who had teams of 5, how many total students did not form teams? | 7 | 28 5 [OP_MOD] 28 28 5 [OP_MOD] [OP_SUB] 7 [OP_MOD] [OP_ADD] | var_a = 28
var_b = 5
var_c = var_a % var_b
var_d = 28
var_e = 28
var_f = 5
var_g = var_e % var_f
var_h = var_d - var_g
var_i = 7
var_j = var_h % var_i
var_k = var_c + var_j
print(int(var_k)) |
Geometry | You created a cube with a volume of 2744 cubic centimeters (cm3) by stacking blocks with a volume of 1 cubic centimeter (cm3). How many blocks are stacked up in this cube? | 14 | 2744 1/3 [OP_POW] | var_a = 2744
var_b = 0.3333333333333333
var_c = var_a ** var_b
print(int(eval('{:.2f}'.format(round(var_c+1e-10,2))))) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.