category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Correspondence | Su-geun's class is going to do origami in art class. After handing out colored papers to 7 students, each student had 12 pieces and 5 pieces were left over. Meanwhile, Su-geun came in late, so the colored papers should be redistributed to 8 people. Find out how many pieces would be left after equally handing the colored papers out to 8 students. | 1 | 12 7 [OP_MUL] 5 [OP_ADD] 8 [OP_MOD] | var_a = 12
var_b = 7
var_c = var_a * var_b
var_d = 5
var_e = var_c + var_d
var_f = 8
var_g = var_e % var_f
print(int(var_g)) |
Geometry | If the height of a triangle whose area is 46 square centimeters (cm2) is 10 centimeters (cm), how many centimeters (cm) is the base? | 9.2 | 46 2 [OP_MUL] 10 [OP_DIV] | var_a = 46
var_b = 2
var_c = var_a * var_b
var_d = 10
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Comparison | Thirty students are in line to catch the bus. If there are 20 students in front of Yoongi, how many students will get on the bus later than Yoongi? | 9 | 30 20 [OP_SUB] 1 [OP_SUB] | var_a = 30
var_b = 20
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Geometry | There is a right triangle. Find the length of the radius of the circumscribed circle when the lengths of the three sides of the triangle are 10 centimeters (cm), 8 centimeters (cm), and 6 centimeters (cm), respectively. | 5 | 10 2 [OP_DIV] | var_a = 10
var_b = 2
var_c = var_a / var_b
print(int(var_c)) |
Geometry | There is a rhombic kite with two diagonals measuring 9 centimeters (cm) and 14 centimeters (cm), respectively. Find the area of this kite. | 63 | 9 14 [OP_MUL] 2 [OP_DIV] | var_a = 9
var_b = 14
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Correspondence | You need to multiply 23 by a certain number, but mistakenly subtracted a certain number from 23 and got 4. Find the result of the correct calculation. | 437 | 23 23 4 [OP_SUB] [OP_MUL] | var_a = 23
var_b = 23
var_c = 4
var_d = var_b - var_c
var_e = var_a * var_d
print(int(var_e)) |
Possibility | You want to create a two-digit number by drawing two of the four number cards 1, 3, 4, and 7 and using them only once. What is the largest number that can be made greater than 36 and less than or equal to 45? | 43 | [OP_LIST_SOL] 1 3 4 7 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 36 [OP_LIST_MORE] 45 [OP_LIST_LESS_EQUAL] 1 [OP_LIST_MAX] | var_a = 1
var_b = 3
var_c = 4
var_d = 7
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 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 = 36
list_c = []
for i in list_b:
if i > var_f:
list_c.append(i)
var_g = 45
list_d = []
for i in list_c:
if i <= var_g:
list_d.append(i)
var_h = 1
list_e=list_d.copy()
list_e.sort()
var_i = list_e[-var_h]
print(int(var_i)) |
Correspondence | When we divide a number by 18 and subtract 29, we get 6. Find the number. | 630 | 6 29 [OP_ADD] 18 [OP_MUL] | var_a = 6
var_b = 29
var_c = var_a + var_b
var_d = 18
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | Yunho walks 90 steps a minute. If he takes 0.45 meters (m) in one step, and he walked for 13 minutes, how many meters (m) did Yunho walk? | 526.5 | 0.45 90 [OP_MUL] 13 [OP_MUL] | var_a = 0.45
var_b = 90
var_c = var_a * var_b
var_d = 13
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Possibility | If there are 3 bus routes and 2 subway routes going from Seohee's house to school, find the number of ways to go by bus. | 3 | [OP_LIST_SOL] 3 2 [OP_LIST_EOL] [OP_LIST_SOL] 버스 지하철 [OP_LIST_EOL] 버스 [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 3
var_b = 2
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 = '버스'
var_d = '지하철'
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 = '버스'
var_f = list_b.index(var_e)+1
var_g = list_a[var_f-1]
print(int(var_g)) |
Correspondence | Find the sum of the smallest natural numbers A and B that satisfy the equation 360÷(A×A×A/B)=5. | 9 | 360÷(A×A×A/B)=5 A [OP_NUM_UNK_SOLVER] 1 [OP_LIST_MIN] 360÷(A×A×A/B)=5 B [OP_NUM_UNK_SOLVER] 1 [OP_LIST_MIN] [OP_ADD] | var_a = '360÷(A×A×A/B)=5'
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] = []
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, 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)):
if term_list[i] == '':
new_eq += str(term_list[i])+op_list[i]
else:
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
if '=' in new_eq and '>' not in new_eq and '<' not in new_eq:
new_eq=new_eq.replace('==','=')
new_eq=new_eq.replace('>','')
new_eq=new_eq.replace('<','')
new_eq=new_eq.split('=')
for i in range(len(new_eq)-1):
eval_result = math.isclose(eval(new_eq[i]), eval(new_eq[i+1]))
if not eval_result:
break
else:
eval_result = eval(new_eq)
except:
eval_result = False
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 = 1
list_b=list_a.copy()
list_b.sort()
var_d = list_b[var_c-1]
var_e = '360÷(A×A×A/B)=5'
var_f = 'B'
ans_dict = dict()
var_e = var_e.replace('×','*')
var_e = var_e.replace('x','*')
var_e = var_e.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_e):
if v in variable_candi:
ans_dict[v] = []
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, repeat=len(ans_dict)))
for c in candi:
temp = var_e
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)):
if term_list[i] == '':
new_eq += str(term_list[i])+op_list[i]
else:
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
if '=' in new_eq and '>' not in new_eq and '<' not in new_eq:
new_eq=new_eq.replace('==','=')
new_eq=new_eq.replace('>','')
new_eq=new_eq.replace('<','')
new_eq=new_eq.split('=')
for i in range(len(new_eq)-1):
eval_result = math.isclose(eval(new_eq[i]), eval(new_eq[i+1]))
if not eval_result:
break
else:
eval_result = eval(new_eq)
except:
eval_result = False
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k].append(int(c[i]))
list_c = list(set(ans_dict[var_f]))
var_g = 1
list_d=list_c.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_d + var_h
print(int(var_i)) |
Comparison | How many three-digit numbers with 7 in the hundreds digit and 6 in the units digit are less than 756? | 5 | [OP_LIST_SOL] 7 A 6 [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 756 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 7
var_b = 'A'
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=""
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 = 756
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 | What is the smallest 4-digit multiple of 3? | 1002 | 1000 9999 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN] | var_a = 1000
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 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 = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
print(int(var_f)) |
Comparison | Students give their presentations in sequence. The 6th is Eunjeong, and the 7 students are presented after Eunjeong. How many students give presentations in total? | 13 | 6 7 [OP_ADD] | var_a = 6
var_b = 7
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | If the number of candies each of the six students in the Sikyung group is 16, 22, 30, 26, 18, and 20, what is the average number of candies each student in the Sikyung group has? | 22 | [OP_LIST_SOL] 16 22 30 26 18 20 [OP_LIST_EOL] [OP_LIST_MEAN] | var_a = 16
var_b = 22
var_c = 30
var_d = 26
var_e = 18
var_f = 20
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()
list_a = [float(i) for i in list_a]
var_g = sum(list_a)/len(list_a)
print(int(var_g)) |
Possibility | Find the number of four-digit numbers whose sum of the digits is equal to 34. | 10 | 1000 10000 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_NUM2SUM] 34 [OP_LIST_MORE_EQUAL] 34 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] | var_a = 1000
var_b = 10000
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 = 34
list_c = []
for i in list_b:
if i >= var_g:
list_c.append(i)
var_h = 34
list_d = []
for i in list_c:
if i <= var_h:
list_d.append(i)
var_i = len(list_d)
print(int(var_i)) |
Comparison | Sang-hyeon throws the ball 50 times every day to practice basketball. If Sang-hyeon hits 27, 29, 33, 34, 29, 20, and 35 balls, respectively, in a week, find how many days Sang-hyeon threw less than the average hit. | 4 | [OP_LIST_SOL] 27 29 33 34 29 20 35 [OP_LIST_EOL] [OP_LIST_MEAN] [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 27
var_b = 29
var_c = 33
var_d = 34
var_e = 29
var_f = 20
var_g = 35
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()
list_a = [float(i) for i in list_a]
var_h = sum(list_a)/len(list_a)
list_b = []
for i in list_a:
if i < var_h:
list_b.append(i)
var_i = len(list_b)
print(int(var_i)) |
Possibility | There are number cards with natural numbers from 1 to 9 written on them. How many ways can you draw 3 of these cards so that the sum is 19? | 30 | 1 9 1 [OP_LIST_ARANGE] 3 [OP_LIST_GET_PERM] [OP_LIST_NUM2SUM] 19 [OP_LIST_FIND_NUM] | var_a = 1
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.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]
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 = 19
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)) |
Geometry | All diagonals that can be drawn inside the octagon are drawn. How many diagonals are drawn? | 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)) |
Arithmetic calculation | You need 400 won to buy 0.1 kilogram (kg) of carrots. Calculate how many kilograms (kg) of carrots you can buy with 2,000 won, including the decimal point. | 0.5 | 2000 400 [OP_DIV] 0.1 [OP_MUL] | var_a = 2000
var_b = 400
var_c = var_a / var_b
var_d = 0.1
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | You want to plant street trees at intervals of 25 meters (m) on both sides of a road that is 2575 meters (m) long. What is the number of street trees planted on one side of the road if trees are also planted at the beginning and end of the road? | 104 | 2575 25 [OP_DIV] 1 [OP_ADD] | var_a = 2575
var_b = 25
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Geometry | There is a rectangular field with a length of 3.6 meters (m) and a width of 2.5 times the length. If you planted tomatoes in half of this field, what is the area in square meters (m2) of the field where tomatoes are planted? | 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))) |
Possibility | There are 6 people. Everyone shook hands with each other once. Find the total number of handshakes. | 15 | 6 2 [OP_COMB] | var_a = 6
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 | Seokgi has a square piece of red-colored paper with a side length of 5 centimeters (cm), and Mina has a rectangular piece of blue-colored paper with a side length of 4 centimeters (cm). The red colored paper and the blue colored paper have the same area. Find the length of the other side of the blue-colored paper as a decimal number. | 6.25 | 5 2 [OP_POW] 4 [OP_DIV] | var_a = 5
var_b = 2
var_c = var_a ** var_b
var_d = 4
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | Mincheol received 70 points in math, 80 points in Korean, and 90 points in English on the midterm exam. What is Mincheol's midterm average? | 80 | [OP_LIST_SOL] 70 80 90 [OP_LIST_EOL] [OP_LIST_MEAN] | var_a = 70
var_b = 80
var_c = 90
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()
list_a = [float(i) for i in list_a]
var_d = sum(list_a)/len(list_a)
print(int(var_d)) |
Possibility | How many three-digit numbers are made up of only 3 and 2? | 8 | [OP_LIST_SOL] 2 3 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] [OP_LIST_LEN] | var_a = 2
var_b = 3
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
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]
var_d = len(list_b)
print(int(var_d)) |
Possibility | Yoongi has 2 red marbles and 2 blue marbles. If marbles of the same color are indistinguishable from each other, how many ways can you arrange 4 marbles in a row? | 6 | 2 2 [OP_ADD] 2 2 [OP_ADD] [OP_PERM] 2 [OP_DIV] 2 [OP_DIV] | var_a = 2
var_b = 2
var_c = var_a + var_b
var_d = 2
var_e = 2
var_f = var_d + var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
var_g = var_g * (var_c-i)
var_h = 2
var_i = var_g / var_h
var_j = 2
var_k = var_i / var_j
print(int(var_k)) |
Arithmetic calculation | You bought a few apples and pears. The number of pears are three-fifths of the number of apples, and altogeter you got 240. How many apples did you buy? | 150 | 240 1 3/5 [OP_ADD] [OP_DIV] | var_a = 240
var_b = 1
var_c = 0.6
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e)) |
Geometry | A large cake made by Dojun measures 172 centimeters (cm) in width and 295 centimeters (cm) in length. I am going to cut this cake into as many square shapes as possible and share it with my friends. How many friends can you give the cake to? | 50740 | 172 295 [OP_MUL] | var_a = 172
var_b = 295
var_c = var_a * var_b
print(int(var_c)) |
Geometry | A parallelogram has an area of 108 square centimeters (cm2) and a height of 9 centimeters (cm). Find the length of the base of this parallelogram in centimeters (cm). | 12 | 108 9 [OP_DIV] | var_a = 108
var_b = 9
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | While the average height of A, B, and C is 130cm (cm), the average changes to 126 cm (cm) when D is added. D What is the height of D? | 114 | 126 4 [OP_MUL] 130 3 [OP_MUL] [OP_SUB] | var_a = 126
var_b = 4
var_c = var_a * var_b
var_d = 130
var_e = 3
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g)) |
Correspondence | The eight-digit number 757AB84 is a multiple of 357. What value can A be? | 5 | 757AB384 [OP_GEN_POSSIBLE_LIST] 357 [OP_LIST_DIVISIBLE] 757AB384 B [OP_LIST_FIND_UNK] | var_a = '757AB384'
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 = 357
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 = '757AB384'
var_d = 'B'
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])
print(int(var_e)) |
Correspondence | The number 125 less than B is C, and the number 197 greater than B is A. Find C when A is 509. | 187 | 509 197 [OP_SUB] 125 [OP_SUB] | var_a = 509
var_b = 197
var_c = var_a - var_b
var_d = 125
var_e = var_c - var_d
print(int(var_e)) |
Comparison | Yujeong placed balls of various colors in a row on the desk. When the red, blue, yellow, purple, and white balls are placed in that order, what is the color of the last ball? | white | [OP_LIST_SOL] red blue yellow purple white [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'red'
var_b = 'blue'
var_c = 'yellow'
var_d = 'purple'
var_e = 'white'
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = len(list_a)
var_g = list_a[var_f-1]
print(var_g) |
Arithmetic calculation | If 2 times a number minus 6 is 8 greater than 1/4 times the number, find what the number is. | 8 | 8 6 [OP_ADD] 2 1/4 [OP_SUB] [OP_DIV] | var_a = 8
var_b = 6
var_c = var_a + var_b
var_d = 2
var_e = 0.25
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g)) |
Geometry | We are going to draw a circle with a radius of 3 centimeters (cm) inside a square piece of paper with a side length of 30 centimeters (cm). How many circles can you draw in all? | 25 | 30 3 2 [OP_MUL] [OP_FDIV] 2 [OP_POW] | var_a = 30
var_b = 3
var_c = 2
var_d = var_b * var_c
var_e = var_a // var_d
var_f = 2
var_g = var_e ** var_f
print(int(var_g)) |
Correspondence | There are different single digit numbers A and B. Find the sum of A and B when AB × 6 = BBB is correct. | 11 | AB×6=BBB A [OP_DIGIT_UNK_SOLVER] AB×6=BBB B [OP_DIGIT_UNK_SOLVER] [OP_ADD] | var_a = 'AB×6=BBB'
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]
var_d = 'AB×6=BBB'
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] = 1
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] = int(c[i])
var_f = ans_dict[var_e]
var_g = var_c + var_f
print(int(var_g)) |
Comparison | The average pocket money for A, B, C, and D is 2,300 won. The average pocket money of A and B is 3000 won, and the average pocket money of C and D is 2750 won. Also, the average pocket money of B and C is 2100 won, and the pocket money of A is 800 won more than that of B. How much is D's pocket money? | 3900 | 2750 2 [OP_MUL] 2100 2 [OP_MUL] 3000 2 [OP_MUL] 800 [OP_SUB] 2 [OP_DIV] [OP_SUB] [OP_SUB] | var_a = 2750
var_b = 2
var_c = var_a * var_b
var_d = 2100
var_e = 2
var_f = var_d * var_e
var_g = 3000
var_h = 2
var_i = var_g * var_h
var_j = 800
var_k = var_i - var_j
var_l = 2
var_m = var_k / var_l
var_n = var_f - var_m
var_o = var_c - var_n
print(int(var_o)) |
Correspondence | You want to subtract 24 from a number. If the answer when wrongly divided by 4 is 50, what is the correct calculation result? | 176 | 50 4 [OP_MUL] 24 [OP_SUB] | var_a = 50
var_b = 4
var_c = var_a * var_b
var_d = 24
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | 13 is the result of mistakenly adding 3 to a particular number that should have subtracted 6 from it. What is the certain number? | 10 | 13 3 [OP_SUB] | var_a = 13
var_b = 3
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | Divide 11 from a certain number, and you can get 2. Find the result of multiplying this number by 6. | 132 | 2 11 [OP_MUL] 6 [OP_MUL] | var_a = 2
var_b = 11
var_c = var_a * var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | Yesterday, Seokjin bought 10 fish for 3,000 won. He bought some more of this fish at the same store today and paid 6,000 won more than yesterday. How many fish did Seokjin buy for two days? | 40 | 3000 6000 [OP_ADD] 3000 10 [OP_DIV] [OP_DIV] 10 [OP_ADD] | var_a = 3000
var_b = 6000
var_c = var_a + var_b
var_d = 3000
var_e = 10
var_f = var_d / var_e
var_g = var_c / var_f
var_h = 10
var_i = var_g + var_h
print(int(var_i)) |
Arithmetic calculation | The PC room fee is 500 won for the first 30 minutes and 200 won for every 10 minutes thereafter. How much do you have to pay to use the PC room for 1 hour and 20 minutes? | 1500 | 1 60 [OP_MUL] 20 [OP_ADD] 30 [OP_SUB] 10 [OP_FDIV] 200 [OP_MUL] 500 [OP_ADD] | var_a = 1
var_b = 60
var_c = var_a * var_b
var_d = 20
var_e = var_c + var_d
var_f = 30
var_g = var_e - var_f
var_h = 10
var_i = var_g // var_h
var_j = 200
var_k = var_i * var_j
var_l = 500
var_m = var_k + var_l
print(int(var_m)) |
Possibility | In how many different ways can you line up 5 indistinguishable roses and 1 tulip? | 6 | 5 1 [OP_ADD] | var_a = 5
var_b = 1
var_c = var_a + var_b
print(int(var_c)) |
Geometry | You have a rectangle with a length of 4 centimeters (cm) and an area of 25/2 square centimeters (cm2). How many centimeters (cm) is the width of this rectangle? | 3.13 | 25/2 4 [OP_DIV] | var_a = 12.5
var_b = 4
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | When dividing a number by 15 and then multiplying by 51 results in 224.8. What will be the value if the number is multiplied by 17 and then added to 5? | 1129 | 224.8 51 [OP_DIV] 15 [OP_MUL] 17 [OP_MUL] 5 [OP_ADD] | var_a = 224.8
var_b = 51
var_c = var_a / var_b
var_d = 15
var_e = var_c * var_d
var_f = 17
var_g = var_e * var_f
var_h = 5
var_i = var_g + var_h
print(int(var_i)) |
Arithmetic calculation | The average number of bananas and tangerines is 89. How many oranges are there when the average number of bananas, tangerines, and oranges is 91? | 95 | 91 3 [OP_MUL] 89 2 [OP_MUL] [OP_SUB] | var_a = 91
var_b = 3
var_c = var_a * var_b
var_d = 89
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g)) |
Comparison | Figure A is a rectangle with a width of 10 centimeters (cm) and a perimeter of 26 centimeters (cm). Figure B is a rectangle with a width of 8 centimeters (cm) and a perimeter of 40 centimeters (cm). Which of the two figures has the greater area? | B | [OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_SOL] 26 10 2 [OP_MUL] [OP_SUB] 2 [OP_DIV] 10 [OP_MUL] 40 8 2 [OP_MUL] [OP_SUB] 2 [OP_DIV] 8 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 26
var_d = 10
var_e = 2
var_f = var_d * var_e
var_g = var_c - var_f
var_h = 2
var_i = var_g / var_h
var_j = 10
var_k = var_i * var_j
var_l = 40
var_m = 8
var_n = 2
var_o = var_m * var_n
var_p = var_l - var_o
var_q = 2
var_r = var_p / var_q
var_s = 8
var_t = var_r * var_s
list_b= []
if "/" in str(var_t):
var_t = eval(str(var_t))
list_b.append(var_t)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
list_b.reverse()
var_u = 1
list_c=list_b.copy()
list_c.sort()
var_v = list_c[-var_u]
var_w = list_b.index(var_v)+1
var_x = list_a[var_w-1]
print(var_x) |
Arithmetic calculation | In the subtraction of two-digit numbers, the number 2 in the tens digit of the number to be subtracted is mistakenly regarded as 5, and the digit 6 in the ones digit is mistakenly regarded as 9, and the result is 44. Find the result of the correct calculation. | 11 | 44 10 2 5 [OP_SUB] [OP_MUL] [OP_ADD] 1 6 9 [OP_SUB] [OP_MUL] [OP_ADD] | var_a = 44
var_b = 10
var_c = 2
var_d = 5
var_e = var_c - var_d
var_f = var_b * var_e
var_g = var_a + var_f
var_h = 1
var_i = 6
var_j = 9
var_k = var_i - var_j
var_l = var_h * var_k
var_m = var_g + var_l
print(int(var_m)) |
Correspondence | Garin decided to divide her vacation homework for 24 days. It is said that if she solves 19 pages a day, she can finish her homework with nothing left. How many pages are there in Garin's vacation homework? | 456 | 19 24 [OP_MUL] | var_a = 19
var_b = 24
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | I am going to make a circle by overlapping the 10.4 centimeters (cm) ticket paper by 3.5 centimeters (cm). If there are 16 tickets, how many centimeters (cm) is the circumference of the circle? | 110.4 | 10.4 3.5 [OP_SUB] 16 [OP_MUL] | var_a = 10.4
var_b = 3.5
var_c = var_a - var_b
var_d = 16
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | There were 29 roses. I put a few in the vase, and there are 12 left. How many roses did I put in the vase? | 17 | 29 12 [OP_SUB] | var_a = 29
var_b = 12
var_c = var_a - var_b
print(int(var_c)) |
Arithmetic calculation | You are trying to insert press nails at 3 centimeters (cm) intervals on a paper strip that is 114 centimeters (cm) long. Assuming that you must insert a presser nail at the beginning and end of the paper strip, find out how many presser nails are needed. | 39 | 114 3 [OP_DIV] 1 [OP_ADD] | var_a = 114
var_b = 3
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Comparison | It is 4.3 kilometers (km) from Chaeyoung's house to the school, and from Taehoon's house to the school, you have to pass 5 blocks of a 900m (m) long road. Which of Chaeyoung and Taehoon lives farther away from school? | Taehoon | [OP_LIST_SOL] Chaeyoung Taehoon [OP_LIST_EOL] [OP_LIST_SOL] 4.3 1000 [OP_MUL] 900 5 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Chaeyoung'
var_b = 'Taehoon'
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.3
var_d = 1000
var_e = var_c * var_d
var_f = 900
var_g = 5
var_h = var_f * var_g
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Arithmetic calculation | If out of 1250 runners in a marathon, 124 more gave up while running than finished, how many total runners finished? | 563 | 1250 124 [OP_SUB] 2 [OP_DIV] | var_a = 1250
var_b = 124
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Comparison | A problem appeared before the explorer who was exploring the cave. The content of the problem was to press all the buttons smaller than 1 out of the 5 buttons. There were 5 buttons in total, with 1/10, 8, 0.9, 7/10, and 5 were written on each. How many buttons does the explorer have to press? | 3 | [OP_LIST_SOL] 1/10 8 0.9 7/10 5 [OP_LIST_EOL] 1 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 0.1
var_b = 8
var_c = 0.9
var_d = 0.7
var_e = 5
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 1
list_b = []
for i in list_a:
if i < var_f:
list_b.append(i)
var_g = len(list_b)
print(int(var_g)) |
Comparison | A has 21 coins, B has 9 coins fewer than A's, and C has 17 more than B's. If the number of coins added to A and B is 5 less than the number of coins added to C and D, how many coins does D have? | 9 | 21 21 9 [OP_SUB] [OP_ADD] 21 9 [OP_SUB] 17 [OP_ADD] [OP_SUB] 5 [OP_ADD] | var_a = 21
var_b = 21
var_c = 9
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 21
var_g = 9
var_h = var_f - var_g
var_i = 17
var_j = var_h + var_i
var_k = var_e - var_j
var_l = 5
var_m = var_k + var_l
print(int(var_m)) |
Arithmetic calculation | A school has 128 students in 3rd grade. If there are 12 more boys than girls, how many boys are there? | 70 | 128 12 [OP_SUB] 2 [OP_DIV] 12 [OP_ADD] | var_a = 128
var_b = 12
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
var_f = 12
var_g = var_e + var_f
print(int(var_g)) |
Comparison | Shinyoung ate 1/3, Seokgi ate 1/4, and Woong ate 1/5 of the cake. Who ate the most cake? | Shinyoung | [OP_LIST_SOL] Shinyoung Seokgi Woong [OP_LIST_EOL] [OP_LIST_SOL] 1/3 1 4 [OP_DIV] 1/5 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Shinyoung'
var_b = 'Seokgi'
var_c = 'Woong'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 0.3333333333333333
var_e = 1
var_f = 4
var_g = var_e / var_f
var_h = 0.2
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_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Comparison | The three students, Yoongi, Jungkook, and Yuna, have the number cards 7, 6, and 9 each. Who has the 2nd smallest number? | Yoongi | [OP_LIST_SOL] Yoongi Jungkook Yuna [OP_LIST_EOL] [OP_LIST_SOL] 7 6 9 [OP_LIST_EOL] 2 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoongi'
var_b = 'Jungkook'
var_c = 'Yuna'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 7
var_e = 6
var_f = 9
list_b= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
var_g = 2
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j) |
Geometry | If the length of the radius of a circle is 7 centimeters (cm), what is the length of the diameter in centimeters (cm)? | 14 | 7 2 [OP_MUL] | var_a = 7
var_b = 2
var_c = var_a * var_b
print(int(var_c)) |
Possibility | When 5 people V, W, X, Y, Z are lined up, find the number of ways to put V first and X and Y next to each other. | 12 | [OP_LIST_SOL] V W X Y Z [OP_LIST_EOL] [OP_LIST_SOL] V [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_SOL] X [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_LIST_SOL] X Y [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_MUL] | var_a = 'V'
var_b = 'W'
var_c = 'X'
var_d = 'Y'
var_e = 'Z'
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 = 'V'
list_b= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_g = 'X'
list_d= []
if "/" in str(var_g):
var_g = eval(str(var_g))
list_d.append(var_g)
list_d.reverse()
list_e = list(set(list_c) - set(list_d))
var_h = len(list_e)
var_i = len(list_e)
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
var_j = var_j * (var_h-i)
var_k = 'X'
var_l = 'Y'
list_f= []
if "/" in str(var_l):
var_l = eval(str(var_l))
list_f.append(var_l)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_f.append(var_k)
list_f.reverse()
var_m = len(list_f)
var_n = len(list_f)
var_o = 1
var_m = int(var_m)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
var_o = var_o * (var_m-i)
var_p = var_j * var_o
print(int(var_p)) |
Correspondence | Hoseok divides a number by 9 to get 8. What do you get when 11 is added to this number? | 83 | 8 9 [OP_MUL] 11 [OP_ADD] | var_a = 8
var_b = 9
var_c = var_a * var_b
var_d = 11
var_e = var_c + var_d
print(int(var_e)) |
Comparison | Dongkyun is taller than Jungkook, and Dongwook is taller than Jungkook. When comparing the heights of Dongwook and Dongkyun, Dongwook is shorter, Then who is the tallest? | Dongkyun | [OP_LIST_SOL] Dongkyun Jungkook Dongwook [OP_LIST_EOL] [OP_LIST_SOL] Dongkyun Jungkook > Dongwook Jungkook > Dongwook Dongkyun < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'Dongkyun'
var_b = 'Jungkook'
var_c = 'Dongwook'
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 = 'Dongkyun'
var_e = 'Jungkook'
var_f = '>'
var_g = 'Dongwook'
var_h = 'Jungkook'
var_i = '>'
var_j = 'Dongwook'
var_k = 'Dongkyun'
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) |
Geometry | If the base of a rectangle that has two parallel sides is 9 centimeters (cm) long and the area is 33.3 square centimeters (cm2), how many centimeters (cm) is the height of the rectangle? | 3.7 | 33.3 9 [OP_DIV] | var_a = 33.3
var_b = 9
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | All five different people took the same test, resulting in an average score of 81.6. It is said that the average of the remaining test scores except the 1st place's score is 6 points lower than the average of the remainder except for the 5th place's score. If the rest of the people's scores are 88, 84, and 76, find the score the 5th place has received. | 68 | 81.6 5 [OP_MUL] 88 84 [OP_ADD] 76 [OP_ADD] [OP_SUB] 6 4 [OP_MUL] [OP_SUB] 2 [OP_DIV] | var_a = 81.6
var_b = 5
var_c = var_a * var_b
var_d = 88
var_e = 84
var_f = var_d + var_e
var_g = 76
var_h = var_f + var_g
var_i = var_c - var_h
var_j = 6
var_k = 4
var_l = var_j * var_k
var_m = var_i - var_l
var_n = 2
var_o = var_m / var_n
print(int(var_o)) |
Correspondence | A certain number is greater than 7 but it is not 8. Find the number among 6, 7, 8, and 9. | 9 | [OP_LIST_SOL] 6 7 8 9 [OP_LIST_EOL] 7 [OP_LIST_MORE] [OP_LIST_SOL] 8 [OP_LIST_EOL] [OP_SET_DIFFERENCE] 1 [OP_LIST_GET] | var_a = 6
var_b = 7
var_c = 8
var_d = 9
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 7
list_b = []
for i in list_a:
if i > var_e:
list_b.append(i)
var_f = 8
list_c= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_c.append(var_f)
list_c.reverse()
list_d = list(set(list_b) - set(list_c))
var_g = 1
var_h = list_d[var_g-1]
print(int(var_h)) |
Comparison | At school, you took exams in the order of Korean, Mathematics, English, Science, and History. What subject did you take for the third time? | English | [OP_LIST_SOL] Korean Mathematics English Science History [OP_LIST_EOL] 3 [OP_LIST_GET] | var_a = 'Korean'
var_b = 'Mathematics'
var_c = 'English'
var_d = 'Science'
var_e = 'History'
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
var_g = list_a[var_f-1]
print(var_g) |
Arithmetic calculation | Junhyuk bought 15 notebooks that cost 1,000 won each and colored pencils that cost 2,000 won each, and spent 22,000 won. How many colored pencils were bought in total? | 7 | 22000 1000 15 [OP_MUL] [OP_SUB] 2000 1000 [OP_SUB] [OP_DIV] | var_a = 22000
var_b = 1000
var_c = 15
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 2000
var_g = 1000
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Arithmetic calculation | There are 17 more rabbits than chickens on the farm. If there are 64 rabbits on the farm, how many rabbits and chickens are on the farm in total? | 111 | 64 17 [OP_SUB] 64 [OP_ADD] | var_a = 64
var_b = 17
var_c = var_a - var_b
var_d = 64
var_e = var_c + var_d
print(int(var_e)) |
Correspondence | A and B are natural numbers. Find the smallest number among B that satisfies the expression 360÷(A×A×A/B)=5. | 3 | 360÷(A×A×A/B)=5 B [OP_NUM_UNK_SOLVER] 1 [OP_LIST_MIN] | var_a = '360÷(A×A×A/B)=5'
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] = []
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, 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)):
if term_list[i] == '':
new_eq += str(term_list[i])+op_list[i]
else:
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
if '=' in new_eq and '>' not in new_eq and '<' not in new_eq:
new_eq=new_eq.replace('==','=')
new_eq=new_eq.replace('>','')
new_eq=new_eq.replace('<','')
new_eq=new_eq.split('=')
for i in range(len(new_eq)-1):
eval_result = math.isclose(eval(new_eq[i]), eval(new_eq[i+1]))
if not eval_result:
break
else:
eval_result = eval(new_eq)
except:
eval_result = False
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 = 1
list_b=list_a.copy()
list_b.sort()
var_d = list_b[var_c-1]
print(int(var_d)) |
Arithmetic calculation | A honeybee was flying at 10 meters (m) per hour, seeking honey. After finding honey in a flower, it was so happy that it flew back to its nest at 15 meters (m) per hour, and it took 30 minutes less than when it was seeking honey. Find the distance between the bee's nest and the flower. | 15 | 30 60 [OP_DIV] 1 10 [OP_DIV] 1 15 [OP_DIV] [OP_SUB] [OP_DIV] | var_a = 30
var_b = 60
var_c = var_a / var_b
var_d = 1
var_e = 10
var_f = var_d / var_e
var_g = 1
var_h = 15
var_i = var_g / var_h
var_j = var_f - var_i
var_k = var_c / var_j
print(int(eval('{:.2f}'.format(round(var_k+1e-10,2))))) |
Arithmetic calculation | Find how many odd numbers less than 6 are there from 1 to 10. | 3 | 1 10 [OP_LIST_ODD] 6 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] | var_a = 1
var_b = 10
list_a = []
if var_a%2==0:
for i in range(var_a+1, var_b+1, 2):
list_a.append(i)
else:
for i in range(var_a, var_b+1, 2):
list_a.append(i)
var_c = 6
list_b = []
for i in list_a:
if i <= var_c:
list_b.append(i)
var_d = len(list_b)
print(int(var_d)) |
Geometry | After arranging the statues in a square shape and erecting them, there were six statues left. So, I tried to increase the horizontal and vertical sides by one row each, but i was short of 11 statues. If you put these statues in 7 rows, how many statues are in one row? | 10 | 6 11 [OP_ADD] 1 [OP_SUB] 2 [OP_DIV] 2 [OP_POW] 6 [OP_ADD] 7 [OP_DIV] | var_a = 6
var_b = 11
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
var_h = 2
var_i = var_g ** var_h
var_j = 6
var_k = var_i + var_j
var_l = 7
var_m = var_k / var_l
print(int(var_m)) |
Arithmetic calculation | Hoseok makes 27 A items in an hour, and Jungkook makes 32 A items in an hour. If Hoseok and Jungkook made A item at the same speed in 6 hours, how many more did Jungkook make than Hoseok? | 30 | 32 27 [OP_SUB] 6 [OP_MUL] | var_a = 32
var_b = 27
var_c = var_a - var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Geometry | You want to paint different colors on each face of the pentagon. How many colors will be used? | 7 | 2 5 [OP_ADD] | var_a = 2
var_b = 5
var_c = var_a + var_b
print(int(var_c)) |
Correspondence | Hyo-jae went to a friend's house, by travelling 300 meters (m) more than 2/5 of the total distance by subway, 200 meters (m) less than 1/2 of the remaining distance by taxi, and the remaining 800 meters (m) on foot. Find the total distance in kilometers (km) that Hyo-jae traveled to go to his friend's house. | 2.5 | 800 200 [OP_SUB] 1 1/2 [OP_SUB] [OP_DIV] 300 [OP_ADD] 1 2/5 [OP_SUB] [OP_DIV] 1000 [OP_DIV] | var_a = 800
var_b = 200
var_c = var_a - var_b
var_d = 1
var_e = 0.5
var_f = var_d - var_e
var_g = var_c / var_f
var_h = 300
var_i = var_g + var_h
var_j = 1
var_k = 0.4
var_l = var_j - var_k
var_m = var_i / var_l
var_n = 1000
var_o = var_m / var_n
print('{:.2f}'.format(round(var_o+1e-10,2))) |
Arithmetic calculation | Find the number of numbers that are multiples of 6 and are not less than 30 and not more than 50. | 4 | 1 9999 1 [OP_LIST_ARANGE] 30 [OP_LIST_MORE_EQUAL] 50 [OP_LIST_LESS_EQUAL] 6 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 1
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 30
list_b = []
for i in list_a:
if i >= var_d:
list_b.append(i)
var_e = 50
list_c = []
for i in list_b:
if i <= var_e:
list_c.append(i)
var_f = 6
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 | There is a (a) school where there are 38 more female students than male students. If there are 658 female students in the (a) school, what is the total number of students who came to (a) school if 17 students were absent? | 1261 | 658 658 38 [OP_SUB] [OP_ADD] 17 [OP_SUB] | var_a = 658
var_b = 658
var_c = 38
var_d = var_b - var_c
var_e = var_a + var_d
var_f = 17
var_g = var_e - var_f
print(int(var_g)) |
Geometry | You want to make the largest isosceles triangle with one side 6 centimeters (cm) long and the other two sides equal in length, with a piece of wire 20 centimeters (cm) long. How many centimeters (cm) should the length of the other side be? | 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)) |
Geometry | A cube with a volume of 1 cubic centimeter (cm3) was cut by the number of vertexes from a cube with one edge 3 centimeters (cm) long. Find the volume of the remaining part. | 19 | 3 3 [OP_POW] 1 3 [OP_POW] 8 [OP_MUL] [OP_SUB] | var_a = 3
var_b = 3
var_c = var_a ** var_b
var_d = 1
var_e = 3
var_f = var_d ** var_e
var_g = 8
var_h = var_f * var_g
var_i = var_c - var_h
print(int(var_i)) |
Arithmetic calculation | The length of the wooden block that Yujung has is 30 centimeters (cm) longer than 31 meters (m). Write the length in meters (m) of the wooden block that Yujung has. | 31.3 | 31 30 100 [OP_DIV] [OP_ADD] | var_a = 31
var_b = 30
var_c = 100
var_d = var_b / var_c
var_e = var_a + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Comparison | All of the heights of a red box is 4.2 centimeters (cm), and all of the heights of a yellow box is 3.3 centimeters (cm). Hyunjeong stacked up 15 red boxes, and Seulgi stacked up 20 yellow boxes. Who stacked the boxes up higher? | Seulgi | [OP_LIST_SOL] Hyunjeong Seulgi [OP_LIST_EOL] [OP_LIST_SOL] 4.2 15 [OP_MUL] 3.3 20 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Hyunjeong'
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 = 4.2
var_d = 15
var_e = var_c * var_d
var_f = 3.3
var_g = 20
var_h = var_f * var_g
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Arithmetic calculation | There were 5 more boys than girls in the classroom. Later, 3 more boys and 10 girls joined the class, bringing the total number of girls up to 22. How many boys are in the classroom now? | 20 | 22 10 [OP_SUB] 5 [OP_ADD] 3 [OP_ADD] | var_a = 22
var_b = 10
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
var_f = 3
var_g = var_e + var_f
print(int(var_g)) |
Correspondence | Both 170 minus 8 and 120 minus 12 are multiples of a certain number, and the remainder of 268 divided by the number is the number minus 2. Find the number. | 54 | 170 8 [OP_SUB] 268 2 [OP_ADD] [OP_GCD] 120 12 [OP_SUB] [OP_GCD] | var_a = 170
var_b = 8
var_c = var_a - var_b
var_d = 268
var_e = 2
var_f = var_d + var_e
var_g = math.gcd(int(var_f), int(var_c))
var_h = 120
var_i = 12
var_j = var_h - var_i
var_k = math.gcd(int(var_j), int(var_g))
print(int(var_k)) |
Correspondence | By mistakenly subtracting 20 from a number gives 52, when 4 should have divided by a number. How much do you get when you calculate it correctly? | 18 | 52 20 [OP_ADD] 4 [OP_DIV] | var_a = 52
var_b = 20
var_c = var_a + var_b
var_d = 4
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | There are four numbers 10, 11, 12, and 13. Divide the 3rd largest number by the 2nd largest number. | 0.92 | [OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 3 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_DIV] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = var_f / var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Correspondence | The number is half the product of 8 and 9 minus 12. What is the answer if the number is subtracted from 35? | 5 | 35 8 9 [OP_MUL] 12 [OP_SUB] 2 [OP_DIV] [OP_SUB] | var_a = 35
var_b = 8
var_c = 9
var_d = var_b * var_c
var_e = 12
var_f = var_d - var_e
var_g = 2
var_h = var_f / var_g
var_i = var_a - var_h
print(int(var_i)) |
Arithmetic calculation | Hyeonsu's house and Seunga's house are 2 kilometers (km) and 100 meters (m) apart. When Hyeonsu and Seunga decided to meet somewhere between their respective houses, if Hyeonsu walked 200 meters (m) longer than Seunga, how many kilometers (km) did Hyeonsu walk in total? | 1150 | 2 1000 [OP_MUL] 100 [OP_ADD] 200 [OP_ADD] 2 [OP_DIV] | var_a = 2
var_b = 1000
var_c = var_a * var_b
var_d = 100
var_e = var_c + var_d
var_f = 200
var_g = var_e + var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i)) |
Comparison | Yoojeong, Eunji, and Yuna keep track of how much water they drink. Yoojeong drank 7/10 liters (L), and Eunji drank 0.5 liters (L). If Yuna drank 6/10 liters (L), who drank the most water? | Yoojeong | [OP_LIST_SOL] Yoojeong Eunji Yuna [OP_LIST_EOL] [OP_LIST_SOL] 7 10 [OP_DIV] 0.5 6 10 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yoojeong'
var_b = 'Eunji'
var_c = 'Yuna'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 7
var_e = 10
var_f = var_d / var_e
var_g = 0.5
var_h = 6
var_i = 10
var_j = var_h / var_i
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Possibility | When 2 novels and 3 essays are placed on a bookshelf, find the number of cases in which the novels must be placed next to each other. | 48 | 1 3 [OP_ADD] 1 3 [OP_ADD] [OP_PERM] 2 2 [OP_PERM] [OP_MUL] | var_a = 1
var_b = 3
var_c = var_a + var_b
var_d = 1
var_e = 3
var_f = var_d + var_e
var_g = 1
var_c = int(var_c)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
var_g = var_g * (var_c-i)
var_h = 2
var_i = 2
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
var_j = var_j * (var_h-i)
var_k = var_g * var_j
print(int(var_k)) |
Geometry | You are going to draw as many circles with a radius of 2 centimeters (cm) on the paper as possible without overlapping them. If the given piece of paper is 20 centimeters (cm) wide and 16 centimeters (cm) long, how many can you draw? | 20 | 20 2 2 [OP_MUL] [OP_FDIV] 16 2 2 [OP_MUL] [OP_FDIV] [OP_MUL] | var_a = 20
var_b = 2
var_c = 2
var_d = var_b * var_c
var_e = var_a // var_d
var_f = 16
var_g = 2
var_h = 2
var_i = var_g * var_h
var_j = var_f // var_i
var_k = var_e * var_j
print(int(var_k)) |
Correspondence | If you multiply a number by 6/4 and then by 9/4, you get 18/5. Find the number. | 0.71 | 18/5 9/4 [OP_DIV] 9/4 [OP_DIV] | var_a = 3.6
var_b = 2.25
var_c = var_a / var_b
var_d = 2.25
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Geometry | Miyoung has 27 cube-shaped boxes with 3 centimeters (cm) edges. These boxes were stacked to form a large cube again. Find the surface area of the large cube. | 486 | 3 27 1/3 [OP_POW] [OP_MUL] 2 [OP_POW] 6 [OP_MUL] | var_a = 3
var_b = 27
var_c = 0.3333333333333333
var_d = var_b ** var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e ** var_f
var_h = 6
var_i = var_g * var_h
print(int(var_i)) |
Arithmetic calculation | (a) trees are twice as many trees as (b) trees, and (a) trees are 15 fewer trees than (c) trees. If there are 47 (c) trees, how many (a), (b), (c) trees are there in all? | 95 | 47 15 [OP_SUB] 47 15 [OP_SUB] 2 [OP_DIV] [OP_ADD] 47 [OP_ADD] | var_a = 47
var_b = 15
var_c = var_a - var_b
var_d = 47
var_e = 15
var_f = var_d - var_e
var_g = 2
var_h = var_f / var_g
var_i = var_c + var_h
var_j = 47
var_k = var_i + var_j
print(int(var_k)) |
Correspondence | Some numbers are less than 20 but not multiples of 2. Find which number it is from 16, 18, 19, and 21. | 19 | [OP_LIST_SOL] 16 18 19 21 [OP_LIST_EOL] 2 [OP_LIST_DIVISIBLE] [OP_SET_DIFFERENCE] 20 [OP_LIST_LESS] 1 [OP_LIST_GET] | var_a = 16
var_b = 18
var_c = 19
var_d = 21
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 = []
var_e = int(var_e)
for i in list_a:
i = int(i)
if i % var_e == 0:
list_b.append(i)
list_c = list(set(list_a) - set(list_b))
var_f = 20
list_d = []
for i in list_c:
if i < var_f:
list_d.append(i)
var_g = 1
var_h = list_d[var_g-1]
print(int(var_h)) |
Arithmetic calculation | Dong-jin bought a bag of tangerines with 1/2 of his money. He gave 3/8 of the money left over from buying tangerines to his younger brother. If Dong-jin's current money is 2,500 won, how much is the tangerine he bought per bag? | 4000 | 2500 1 3/8 [OP_SUB] [OP_DIV] 1/2 [OP_DIV] 1/2 [OP_MUL] | var_a = 2500
var_b = 1
var_c = 0.375
var_d = var_b - var_c
var_e = var_a / var_d
var_f = 0.5
var_g = var_e / var_f
var_h = 0.5
var_i = var_g * var_h
print(int(var_i)) |
Geometry | How many centimeters (cm) is the length of one side of a regular tetradecagon if the sum of all the sides is 154 centimeters (cm)? | 11 | 154 14 [OP_DIV] | var_a = 154
var_b = 14
var_c = var_a / var_b
print(int(var_c)) |
Correspondence | Any number divided by 3 plus 12 equals 20. Find the number that satisfies the condition. | 24 | 20 12 [OP_SUB] 3 [OP_MUL] | var_a = 20
var_b = 12
var_c = var_a - var_b
var_d = 3
var_e = var_c * var_d
print(int(var_e)) |
Geometry | Jung-woo wants to find the volume of a cube. The cube is in the shape of a cube and has a surface area of 150 square centimeters (cm2). How much is the answer? | 125 | 150 6 [OP_DIV] 1/2 [OP_POW] 3 [OP_POW] | var_a = 150
var_b = 6
var_c = var_a / var_b
var_d = 0.5
var_e = var_c ** var_d
var_f = 3
var_g = var_e ** 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.