category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Geometry | The square and the rectangle have the same area. If one side of the square is 5 centimeters (cm) and one side of the rectangle is 4 centimeters (cm), what is the length of the other side of the rectangle in centimeters (cm)? | 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))) |
Correspondence | If you multiply the age of the Seongju by the age of Seongju's younger brother, you get 16. How many possible numbers are there for the age of Seongju? (However, Seongju and his younger brother are not twins.) | 2 | 16 [OP_LIST_GET_DIVISOR] [OP_LIST_LEN] 2 [OP_FDIV] | var_a = 16
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
if var_a % i == 0:
list_a.append(i)
list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = len(list_a)
var_c = 2
var_d = var_b // var_c
print(int(var_d)) |
Correspondence | If 57A-B14=364, what number should go in A? | 8 | 57A-B14=364 A [OP_DIGIT_UNK_SOLVER] | var_a = '57A-B14=364'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Correspondence | I had to divide a number by 3, add 14, then multiply by 2, but I made a mistake by multiplying by 3, adding 14, then multiplying by 2 and got 946. How much is the original calculation? | 130 | 946 2 [OP_DIV] 14 [OP_SUB] 3 [OP_DIV] 3 [OP_DIV] 14 [OP_ADD] 2 [OP_MUL] | var_a = 946
var_b = 2
var_c = var_a / var_b
var_d = 14
var_e = var_c - var_d
var_f = 3
var_g = var_e / var_f
var_h = 3
var_i = var_g / var_h
var_j = 14
var_k = var_i + var_j
var_l = 2
var_m = var_k * var_l
print(int(var_m)) |
Correspondence | There are different numbers A, B, and C. 3×A-A=10, B+A=12, C-B=6. Get C. | 13 | 12 3×A-A=10 A [OP_NUM_UNK_SOLVER] [OP_SUB] 6 [OP_ADD] | var_a = 12
var_b = '3×A-A=10'
var_c = 'A'
ans_dict = dict()
var_b = var_b.replace('×','*')
var_b = var_b.replace('x','*')
var_b = var_b.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_b):
if v in variable_candi:
ans_dict[v] = 0
candidate_num = [i for i in range(51)]
candi = list(itertools.product(candidate_num, repeat=len(ans_dict)))
for c in candi:
temp = var_b
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] = int(c[i])
var_d = ans_dict[var_c]
var_e = var_a - var_d
var_f = 6
var_g = var_e + var_f
print(int(var_g)) |
Geometry | How many times bigger is the diameter of a circle compared to its radius? | 2 | 2 | var_a = 2
print(int(var_a)) |
Possibility | Taehyung, who participated in the running match, shook hands with everyone else once, and he shook hands a total of 25 times. How many people participated in the running test at this time? | 26 | 25 1 [OP_ADD] | var_a = 25
var_b = 1
var_c = var_a + var_b
print(int(var_c)) |
Comparison | 127,000 toys were made at the factory in Ulsan. How many more trucks do you need to transport these toys to Seoul by trucks with a capacity of 5000 toys than by trucks with a capacity of 8000 toys? | 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)) |
Arithmetic calculation | Find the difference between the largest and smallest odd numbers from 1 to 100. | 98 | 1 100 [OP_LIST_ODD] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 1
var_b = 100
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 = 1
list_b=list_a.copy()
list_b.sort()
var_d = list_b[-var_c]
var_e = 1
list_c=list_a.copy()
list_c.sort()
var_f = list_c[var_e-1]
var_g = var_d - var_f
print(int(var_g)) |
Correspondence | I made the mistake of multiplying 7 by a number, which was supposed to be the subtraction of 36 and a number, so I got 70. Find the correctly calculated answer. | 26 | 36 70 7 [OP_DIV] [OP_SUB] | var_a = 36
var_b = 70
var_c = 7
var_d = var_b / var_c
var_e = var_a - var_d
print(int(var_e)) |
Comparison | Yoongi collected 7 points, Jungkook 6 points, Yuna 9 points, Yoojung 8 points, and Taehyung 10 points. Who collected the largest number? | Taehyung | [OP_LIST_SOL] Yoongi Jungkook Yuna Yoojung Taehyung [OP_LIST_EOL] [OP_LIST_SOL] 7 6 9 8 10 [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'
var_e = 'Taehyung'
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 = 7
var_g = 6
var_h = 9
var_i = 8
var_j = 10
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_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) |
Correspondence | Yoongi subtracted 7 from a particular number and got 9. Now we want to multiply that particular number by 5. What will be the result then? | 80 | 9 7 [OP_ADD] 5 [OP_MUL] | var_a = 9
var_b = 7
var_c = var_a + var_b
var_d = 5
var_e = var_c * var_d
print(int(var_e)) |
Geometry | You want to find the perimeter of an isosceles triangle. If the length of each side of an isosceles triangle is 12 centimeters (cm) and the length of the other side is 17 centimeters (cm), what is the perimeter in centimeters (cm)? | 41 | 12 2 [OP_MUL] 17 [OP_ADD] | var_a = 12
var_b = 2
var_c = var_a * var_b
var_d = 17
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | I'm trying to make 161 ribbons in one week. How many ribbons do I need to make on average per day? | 23 | 161 7 [OP_DIV] | var_a = 161
var_b = 7
var_c = var_a / var_b
print(int(var_c)) |
Possibility | Find the largest number that can be formed by using 1, 4, and 5 all once. | 541 | [OP_LIST_SOL] 1 4 5 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] | var_a = 1
var_b = 4
var_c = 5
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 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)) |
Geometry | What is the area of a triangle whose hypotenuse is 15 centimeters (cm) and the base is 9 centimeters (cm)? | 54 | 15 2 [OP_POW] 9 2 [OP_POW] [OP_SUB] 1/2 [OP_POW] 9 [OP_MUL] 2 [OP_DIV] | var_a = 15
var_b = 2
var_c = var_a ** var_b
var_d = 9
var_e = 2
var_f = var_d ** var_e
var_g = var_c - var_f
var_h = 0.5
var_i = var_g ** var_h
var_j = 9
var_k = var_i * var_j
var_l = 2
var_m = var_k / var_l
print(int(var_m)) |
Correspondence | A can be 0 to 9. Given the five-digit number 62A94, which, when rounded to the thousands place, is 63000, find the sum of the numbers that can fit in A. | 35 | 62A94 [OP_GEN_POSSIBLE_LIST] 62500 [OP_LIST_MORE_EQUAL] 62A94 A [OP_LIST_FIND_UNK] [OP_LIST_SUM] | var_a = '62A94'
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 = 62500
list_b = []
for i in list_a:
if i >= var_b:
list_b.append(i)
var_c = '62A94'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
elem = str(elem)
list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
list_c = [float(i) for i in list_c]
var_e = sum(list_c)
print(int(var_e)) |
Arithmetic calculation | How many three-digit numbers are there in the numbers from 1 to 365? | 365 | 1 365 1 [OP_LIST_ARANGE] 100 [OP_LIS_MORE_EQUAL] [OP_LIST_LEN] | var_a = 1
var_b = 365
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 100
var_e = '[OP_LIS_MORE_EQUAL]'
var_f = len(list_a)
print(int(var_f)) |
Possibility | Find the value of subtracting the smallest two-digit number from the largest two-digit number that can be formed by drawing two different numbers from 9, 4, 2, and 5. | 71 | [OP_LIST_SOL] 9 4 2 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_SUB] | var_a = 9
var_b = 4
var_c = 2
var_d = 5
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 1
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 1
list_d=list_b.copy()
list_d.sort()
var_i = list_d[var_h-1]
var_j = var_g - var_i
print(int(var_j)) |
Arithmetic calculation | In two-digit subtraction, 62 was obtained by incorrectly misrepresenting 8 in the ones digit of the number being subtracted as another number and incorrectly misrepresenting 7 in the tens digit of the subtracting number as another number. If the numbers incorrectly misrepresented were 5 and 2, respectively, find the result of the correct calculation. | 15 | 62 1 8 5 [OP_SUB] [OP_MUL] [OP_ADD] 10 7 2 [OP_SUB] [OP_MUL] [OP_SUB] | var_a = 62
var_b = 1
var_c = 8
var_d = 5
var_e = var_c - var_d
var_f = var_b * var_e
var_g = var_a + var_f
var_h = 10
var_i = 7
var_j = 2
var_k = var_i - var_j
var_l = var_h * var_k
var_m = var_g - var_l
print(int(var_m)) |
Possibility | What is the sum of four digit numbers made up of only the natural numbers 1, 2, and 3? | 179982 | [OP_LIST_SOL] 1 2 3 [OP_LIST_EOL] 4 [OP_LIST_GET_PRODUCT] [OP_LIST_SUM] | var_a = 1
var_b = 2
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 = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print(int(var_e)) |
Geometry | What is the sum of the lengths in meters (m) of the four sides of a rectangle whose longer side is 1 meter (m) and whose longer side is 2/8 meter (m) longer than its shorter side? | 3.5 | 1 1 2/8 [OP_SUB] [OP_ADD] 2 [OP_MUL] | var_a = 1
var_b = 1
var_c = 0.25
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))) |
Correspondence | At Junwoo's school, 37 marbles each were distributed to 23 classes, and there are 16 left. How many marbles were distributed to students at Junwoo's school? | 867 | 23 37 [OP_MUL] 16 [OP_ADD] | var_a = 23
var_b = 37
var_c = var_a * var_b
var_d = 16
var_e = var_c + var_d
print(int(var_e)) |
Geometry | In an isosceles triangle, two sides are said to be 12 centimeters (cm) long, and the other side is said to be 17 centimeters (cm) long. At this time, how many centimeters (cm) is the length of the perimeter? | 41 | 12 2 [OP_MUL] 17 [OP_ADD] | var_a = 12
var_b = 2
var_c = var_a * var_b
var_d = 17
var_e = var_c + var_d
print(int(var_e)) |
Correspondence | 2AB+36=269 is true. How much is B? | 3 | 2AB+36=269 B [OP_DIGIT_UNK_SOLVER] | var_a = '2AB+36=269'
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)) |
Comparison | I am trying to find three words persimmon, banana, and melon in the Korean dictionary. Persimmon comes out before banana, and banana comes out before melon. Find the word that comes out the last in the dictionary. | melon | [OP_LIST_SOL] persimmon banana melon [OP_LIST_EOL] [OP_LIST_SOL] persimmon banana < banana melon < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'persimmon'
var_b = 'banana'
var_c = 'melon'
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 = 'persimmon'
var_e = 'banana'
var_f = '<'
var_g = 'banana'
var_h = 'melon'
var_i = '<'
list_b= []
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_j = 1
var_k = list_c[var_j-1]
print(var_k) |
Correspondence | How many 3-digit numbers are there where each digit is different and the sum of the digits is 9? | 34 | 0 9 1 [OP_LIST_ARANGE] 3 [OP_LIST_GET_PERM] [OP_LIST_NUM2SUM] 9 [OP_LIST_MORE_EQUAL] 9 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] | var_a = 0
var_b = 9
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 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 = 9
list_d = []
for i in list_c:
if i >= var_f:
list_d.append(i)
var_g = 9
list_e = []
for i in list_d:
if i <= var_g:
list_e.append(i)
var_h = len(list_e)
print(int(var_h)) |
Geometry | What is the surface area of a regular tetrahedron with a side of 2 centimeters (cm)? | 6.93 | 3 1/2 [OP_POW] 2 2 [OP_POW] [OP_MUL] | var_a = 3
var_b = 0.5
var_c = var_a ** var_b
var_d = 2
var_e = 2
var_f = var_d ** var_e
var_g = var_c * var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Correspondence | There is a number that is less than 18 but not a multiple of 3. Which number is it out of 12, 14, 15, or 20? | 14 | [OP_LIST_SOL] 12 14 15 20 [OP_LIST_EOL] 3 [OP_LIST_DIVISIBLE] [OP_SET_DIFFERENCE] 18 [OP_LIST_LESS] 1 [OP_LIST_GET] | var_a = 12
var_b = 14
var_c = 15
var_d = 20
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 = []
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 = 18
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 | Sangwoo draws 3 out of 9 cards numbered 1 through 9 and wants to use all of them to create the third largest three-digit number. When he drew 1, 6, and 8, what number should Sangwoo make? | 681 | [OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_GET_PERM] 3 [OP_LIST_MAX] | 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 = 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 = 3
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
print(int(var_f)) |
Geometry | How many centimeters (cm) must the compass be spread out to draw a circle with a diameter of 14 centimeters (cm)? | 7 | 14 2 [OP_DIV] | var_a = 14
var_b = 2
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | The sum of 7 consecutive natural numbers is 63 Find the first number | 6 | 63 0 7 1 [OP_SUB] 1 [OP_LIST_ARANGE] [OP_LIST_SUM] [OP_SUB] 7 [OP_DIV] | var_a = 63
var_b = 0
var_c = 7
var_d = 1
var_e = var_c - var_d
var_f = 1
list_a = [i for i in range(var_b, var_e + 1, var_f)]
list_a = [float(i) for i in list_a]
var_g = sum(list_a)
var_h = var_a - var_g
var_i = 7
var_j = var_h / var_i
print(int(var_j)) |
Arithmetic calculation | 7 times a certain number is equal to 4 times the certain number plus 12 plus 6. Find the certain number. | 6 | 12 6 [OP_ADD] 7 4 [OP_SUB] [OP_DIV] | var_a = 12
var_b = 6
var_c = var_a + var_b
var_d = 7
var_e = 4
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g)) |
Geometry | The area of a triangle with a side length of 8 centimeters (cm) is 36 square centimeters (cm2). Find the distance in centimeters (cm) from a side of length 8 centimeters (cm) to the vertex opposite the side. | 9 | 36 2 [OP_MUL] 8 [OP_DIV] | var_a = 36
var_b = 2
var_c = var_a * var_b
var_d = 8
var_e = var_c / var_d
print(int(var_e)) |
Geometry | The perimeter of a regular nonagon is 171 centimeters (cm). Find the length of one side of this figure. | 19 | 171 9 [OP_DIV] | var_a = 171
var_b = 9
var_c = var_a / var_b
print(int(var_c)) |
Comparison | Among the students sitting on the playground, Yujeong is 12th from the right, 11th from the left, 18th from the back, and 8th from the front. If the number of students in each row is the same, how many students are sitting on the playground? | 550 | 12 11 [OP_ADD] 1 [OP_SUB] 18 8 [OP_ADD] 1 [OP_SUB] [OP_MUL] | var_a = 12
var_b = 11
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 18
var_g = 8
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 | Yeri bought 5 candies that cost 120 won each and 3 chocolates that cost 350 won each and handed over 2500 won at the store. How much should Yeri get in change? | 850 | 2500 120 5 [OP_MUL] 350 3 [OP_MUL] [OP_ADD] [OP_SUB] | var_a = 2500
var_b = 120
var_c = 5
var_d = var_b * var_c
var_e = 350
var_f = 3
var_g = var_e * var_f
var_h = var_d + var_g
var_i = var_a - var_h
print(int(var_i)) |
Geometry | If the base of a parallelogram that has an area of 24 square centimeters (cm2) is 4 centimeters (cm), find the difference between the height and the length of the base. | 2 | 24 4 [OP_DIV] 4 [OP_SUB] [OP_ABS] | var_a = 24
var_b = 4
var_c = var_a / var_b
var_d = 4
var_e = var_c - var_d
var_f = abs(var_e)
print(int(var_f)) |
Arithmetic calculation | How many times does 3 appear in a list of natural numbers less than or equal to 100 that are multiples of 3? | 8 | 1 100 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] [OP_LIST2NUM] [OP_NUM2LIST] 3 [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 = 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=""
for i in list_b:
i = str(i)
var_e = var_e + i
list_c = []
var_e = int(var_e)
while var_e//10 > 0:
list_c.append(var_e%10)
var_e = var_e//10
list_c.append(var_e%10)
list_c = list_c[::-1]
var_f = 3
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 | At each vertex of a particular cube (A), a cube shape with one edge 2 centimeters (cm) long was cut out. If the length of one edge of cube (A) is 8 centimeters (cm), what is the surface area of the remaining portion of the initial cube? | 384 | 8 8 [OP_MUL] 6 [OP_MUL] | var_a = 8
var_b = 8
var_c = var_a * var_b
var_d = 6
var_e = var_c * var_d
print(int(var_e)) |
Geometry | If you cut a piece of string that is 12 centimeters (cm) in half, choose one of the cut pieces and cut it in half again, find the length in centimeters (cm) of the current shortest piece of string. | 3 | 12 2 [OP_DIV] 2 [OP_DIV] | var_a = 12
var_b = 2
var_c = var_a / var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Comparison | How many numbers among 0.8, 1/2, and 0.9 are greater than or equal to 0.4? | 3 | [OP_LIST_SOL] 0.8 1/2 0.9 [OP_LIST_EOL] 0.4 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
var_c = 0.9
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.4
list_b = []
for i in list_a:
if i >= var_d:
list_b.append(i)
var_e = len(list_b)
print(int(var_e)) |
Arithmetic calculation | When water was poured into 300 grams (g) of 8% sugar water, it became 5% sugar water. How many grams (g) of water did you pour in? | 180 | 300 8 100 [OP_DIV] [OP_MUL] 100 5 [OP_DIV] [OP_MUL] 300 [OP_SUB] | var_a = 300
var_b = 8
var_c = 100
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 100
var_g = 5
var_h = var_f / var_g
var_i = var_e * var_h
var_j = 300
var_k = var_i - var_j
print(int(var_k)) |
Arithmetic calculation | When I went to the bank from my house, I walked a straight line at 2 kilometers (km) per hour, and when I went home from the bank, I walked 2 kilometers (km) further at 3 kilometers (km) per hour. If it took 4 hours in total, how far is it from the bank to the house? | 6 | 2 4 [OP_MUL] 3 [OP_MUL] 4 [OP_SUB] 3 2 [OP_ADD] [OP_DIV] 2 [OP_ADD] | var_a = 2
var_b = 4
var_c = var_a * var_b
var_d = 3
var_e = var_c * var_d
var_f = 4
var_g = var_e - var_f
var_h = 3
var_i = 2
var_j = var_h + var_i
var_k = var_g / var_j
var_l = 2
var_m = var_k + var_l
print(int(var_m)) |
Arithmetic calculation | Yoongi, Eunji, and Yuna have several books. If Yoongi gives 5 books to Eunji, Eunji gives 10 books to Yuna, and Yuna gives 15 books to Yoongi, all three of them will have 45 books each. How many books did Yoongi have at first? | 35 | 45 15 [OP_SUB] 5 [OP_ADD] | var_a = 45
var_b = 15
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | They drank 215 liters (l) of water on the first day, 76 liters (l) more on the second day than on the first day, and 53 liters (l) less on the last day than on the second day. How many liters (l) of water did you drink on average? | 248 | 215 215 76 [OP_ADD] [OP_ADD] 215 76 [OP_ADD] 53 [OP_SUB] [OP_ADD] 3 [OP_DIV] | var_a = 215
var_b = 215
var_c = 76
var_d = var_b + var_c
var_e = var_a + var_d
var_f = 215
var_g = 76
var_h = var_f + var_g
var_i = 53
var_j = var_h - var_i
var_k = var_e + var_j
var_l = 3
var_m = var_k / var_l
print(int(var_m)) |
Geometry | A horse is running along a square-shaped track. If the length of one side of this track is 40 meters (m), how many meters (m) does the horse take in one turn? | 160 | 40 4 [OP_MUL] | var_a = 40
var_b = 4
var_c = var_a * var_b
print(int(var_c)) |
Geometry | How many diagonals can you draw in a heptagon? | 14 | 7 7 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] | var_a = 7
var_b = 7
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)) |
Geometry | Add the number of edges of the triangular pyramid to the number of edges of the triangular prism. | 15 | 3 2 [OP_MUL] 3 3 [OP_MUL] [OP_ADD] | var_a = 3
var_b = 2
var_c = var_a * var_b
var_d = 3
var_e = 3
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g)) |
Arithmetic calculation | When the book was opened, the sum of the pages on both sides was 217. What is the product of both of these page numbers? | 11772 | 217 2 [OP_FDIV] 217 2 [OP_FDIV] 1 [OP_ADD] [OP_MUL] | var_a = 217
var_b = 2
var_c = var_a // var_b
var_d = 217
var_e = 2
var_f = var_d // var_e
var_g = 1
var_h = var_f + var_g
var_i = var_c * var_h
print(int(var_i)) |
Arithmetic calculation | Roses are 22 more than lilies and 20 fewer than tulips. If there are 100 flowers of all three types, how many roses are there? | 34 | 100 22 [OP_ADD] 20 [OP_SUB] 3 [OP_DIV] | var_a = 100
var_b = 22
var_c = var_a + var_b
var_d = 20
var_e = var_c - var_d
var_f = 3
var_g = var_e / var_f
print(int(var_g)) |
Geometry | If you put 4 yellow balls in a box containing 3 red, 2 blue and 5 yellow balls, how many blue balls are there? | 2 | 2 | var_a = 2
print(int(var_a)) |
Arithmetic calculation | Kahi has a 1.6 meter (m) ribbon tape. If she used 0.8 meters (m) of ribbon to make a ribbon and 0.3 meters (m) to wrap a gift, how many meters (m) of ribbon tape is left? | 0.5 | 1.6 0.8 [OP_SUB] 0.3 [OP_SUB] | var_a = 1.6
var_b = 0.8
var_c = var_a - var_b
var_d = 0.3
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Geometry | Hyeonsu went to the mart and picked up candy, and the number coincided with the number of diagonals that could be drawn from one vertex of a regular decagon. How many candies did Hyeonsu pick up? | 7 | 10 3 [OP_SUB] | var_a = 10
var_b = 3
var_c = var_a - var_b
print(int(var_c)) |
Geometry | You want to know the length of the hypotenuse of a right triangle. If the two non-hypotenuse sides have lengths of 6 and 8 respectively, what is the length of the hypotenuse? | 10 | 6 2 [OP_POW] 8 2 [OP_POW] [OP_ADD] 1/2 [OP_POW] | var_a = 6
var_b = 2
var_c = var_a ** var_b
var_d = 8
var_e = 2
var_f = var_d ** var_e
var_g = var_c + var_f
var_h = 0.5
var_i = var_g ** var_h
print(int(var_i)) |
Arithmetic calculation | You bought 12 pencils and pens in total. The pencils cost 1000 won each and the pens cost 1300 won each. You payed 15,000 won for them with no change. Find how many pencils you purchased. | 2 | 1300 12 [OP_MUL] 15000 [OP_SUB] 1300 1000 [OP_SUB] [OP_DIV] | var_a = 1300
var_b = 12
var_c = var_a * var_b
var_d = 15000
var_e = var_c - var_d
var_f = 1300
var_g = 1000
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Arithmetic calculation | You have 10.4 kilograms (kg) of dough. Taehyung wants to subdivide this dough into bags by 0.8 kilograms (kg) and store them. Find out how many envelopes he needs at this time. | 13 | 10.4 0.8 [OP_DIV] 1 [OP_CEIL] | var_a = 10.4
var_b = 0.8
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))
print(int(var_e)) |
Arithmetic calculation | The distance from Jeonghyeok's house to my grandmother's house is 100 kilometers (km), and it took 1 hour and 15 minutes to arrive by bus. What is the average distance traveled in 1 hour? | 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)) |
Geometry | Jungkook has 5 red balls, 4 blue balls, and 3 yellow balls. When Yoongi gives Jungkook 1 yellow ball, how many blue balls does Jungkook have? | 4 | 4 | var_a = 4
print(int(var_a)) |
Arithmetic calculation | There are 24 apples in the supermarket. There are 6 times as many tangerines as there are apples, and 8 persimmons. How many times the number of tangerines is the number of persimmons? | 18 | 24 6 [OP_MUL] 8 [OP_DIV] | var_a = 24
var_b = 6
var_c = var_a * var_b
var_d = 8
var_e = var_c / var_d
print(int(var_e)) |
Correspondence | Find the number between 24 and 28 among 20, 23, 26, and 29. | 26 | [OP_LIST_SOL] 20 23 26 29 [OP_LIST_EOL] 24 [OP_LIST_MORE] 28 [OP_LIST_LESS] 1 [OP_LIST_GET] | var_a = 20
var_b = 23
var_c = 26
var_d = 29
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 = 24
list_b = []
for i in list_a:
if i > var_e:
list_b.append(i)
var_f = 28
list_c = []
for i in list_b:
if i < var_f:
list_c.append(i)
var_g = 1
var_h = list_c[var_g-1]
print(int(var_h)) |
Geometry | A point P inside the polygon. When each vertex were connected with P, 20 triangles were created. How many diagonals does this polygon have? | 170 | 20 20 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] | var_a = 20
var_b = 20
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)) |
Geometry | Cube with an edge length of 2 centimeters (cm) was stacked to make a large cube with an edge length of 10 centimeters (cm). If all sides of the large cube are painted orange, how many cubes have only one side painted orange? | 54 | 10 2 [OP_DIV] 2 [OP_SUB] 2 [OP_POW] 6 [OP_MUL] | var_a = 10
var_b = 2
var_c = var_a / var_b
var_d = 2
var_e = var_c - 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 | If a pencil sold at a store is 20 won cheaper than 5,000 won, find the price of the pencil in units of 10,000 won. | 0.5 | 5000 20 [OP_SUB] 10000 [OP_DIV] | var_a = 5000
var_b = 20
var_c = var_a - var_b
var_d = 10000
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | When 26 is divided by 4, the quotient is A and the remainder is B. What is B in this case? | 2 | 26 4 [OP_MOD] | var_a = 26
var_b = 4
var_c = var_a % var_b
print(int(var_c)) |
Comparison | There are a total of three numbers: 0.8, 1/2, and 0.6. What is the sum of all numbers greater than or equal to 0.1? | 1.9 | [OP_LIST_SOL] 0.8 1/2 0.6 [OP_LIST_EOL] 0.1 [OP_LIST_MORE_EQUAL] [OP_LIST_SUM] | var_a = 0.8
var_b = 0.5
var_c = 0.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 = 0.1
list_b = []
for i in list_a:
if i >= var_d:
list_b.append(i)
list_b = [float(i) for i in list_b]
var_e = sum(list_b)
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | There are 37 loaves of bread, and I brought bottles of milk to eat with the bread. There are 52 loaves of bread and bottles of milk in total. How many bottles of milk are there? | 15 | 52 37 [OP_SUB] | var_a = 52
var_b = 37
var_c = var_a - var_b
print(int(var_c)) |
Comparison | Among 1.4, 9/10, 1.2, 0.5, and 13/10, if you list all the numbers greater than or equal to 1.1, what is the smallest or equal number among them? | 1.2 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE_EQUAL] 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))) |
Geometry | The cuboid-shaped swimming pool is 20 meters (m) long, 12 meters (m) wide, and 2 meters (m) deep. If you want to paint all of the side walls and floor of the pool, how many square meters (m2) of the area needs to be painted? | 368 | 20 12 [OP_MUL] 20 2 [OP_MUL] 2 [OP_MUL] [OP_ADD] 12 2 [OP_MUL] 2 [OP_MUL] [OP_ADD] | var_a = 20
var_b = 12
var_c = var_a * var_b
var_d = 20
var_e = 2
var_f = var_d * var_e
var_g = 2
var_h = var_f * var_g
var_i = var_c + var_h
var_j = 12
var_k = 2
var_l = var_j * var_k
var_m = 2
var_n = var_l * var_m
var_o = var_i + var_n
print(int(var_o)) |
Arithmetic calculation | Seonghyeon wants to go to his grandfather's house, which is 180 kilometers (km) away. If it takes 2 hours and 30 minutes to travel by car, how many kilometers (km) does the car travel in 1 hour? | 72 | 180 2 30 60 [OP_DIV] [OP_ADD] [OP_DIV] | var_a = 180
var_b = 2
var_c = 30
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)) |
Correspondence | Subtracting 5 from a certain number gives 2. What number do you get when you add 3 to it? | 10 | 2 5 [OP_ADD] 3 [OP_ADD] | var_a = 2
var_b = 5
var_c = var_a + var_b
var_d = 3
var_e = var_c + var_d
print(int(var_e)) |
Possibility | A convenience store has four kinds of sandwiches, and three kinds of triangular gimbap. In how many ways can you choose one sandwich and one gimbap? | 12 | 4 1 [OP_COMB] 3 1 [OP_COMB] [OP_MUL] | var_a = 4
var_b = 1
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
var_c = var_c / (i+1)
var_d = 3
var_e = 1
var_f = 1
var_d = int(var_d)
var_e = int(var_e)
for i, elem in enumerate(range(var_e)):
var_f = var_f * (var_d-i)
for i, elem in enumerate(range(var_e)):
var_f = var_f / (i+1)
var_g = var_c * var_f
print(int(var_g)) |
Geometry | Inside a rectangular parallelepiped with dimensions of 350 cm (cm), 260 cm (cm), and 165 cm (cm), there is another rectangular parallelepiped spaced apart by 5 cm (cm) in width, length, and height. We want to fill the cuboid inside it with building blocks with a volume of 1 cubic centimeter (cm3). If one building block costs 1600 won, how much will need? | 21080000000 | 350 5 2 [OP_MUL] [OP_SUB] 260 5 2 [OP_MUL] [OP_SUB] [OP_MUL] 165 5 2 [OP_MUL] [OP_SUB] [OP_MUL] 1600 [OP_MUL] | var_a = 350
var_b = 5
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 260
var_g = 5
var_h = 2
var_i = var_g * var_h
var_j = var_f - var_i
var_k = var_e * var_j
var_l = 165
var_m = 5
var_n = 2
var_o = var_m * var_n
var_p = var_l - var_o
var_q = var_k * var_p
var_r = 1600
var_s = var_q * var_r
print(int(var_s)) |
Correspondence | 10 times a certain number is 17. What is the result of a certain number multiplied by 1/100 and than multiplied by 3? | 0.05 | 17 10 [OP_DIV] 1/100 [OP_MUL] 3 [OP_MUL] | var_a = 17
var_b = 10
var_c = var_a / var_b
var_d = 0.01
var_e = var_c * var_d
var_f = 3
var_g = var_e * var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Correspondence | What is the number of possible A which is from 1 to 9 to make A888<5001? | 4 | A888<5001 A [OP_DIGIT_UNK_SOLVER] [OP_LIST_LEN] | var_a = 'A888<5001'
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)
print(int(var_c)) |
Arithmetic calculation | Eunji is 16 years old this year. Eunji's mother was 35 when Eunji was 8 years old. How old is the mother this year? | 43 | 35 16 8 [OP_SUB] [OP_ADD] | var_a = 35
var_b = 16
var_c = 8
var_d = var_b - var_c
var_e = var_a + var_d
print(int(var_e)) |
Arithmetic calculation | If the sum of two consecutive odd numbers is 48, find the larger of the two odd numbers. | 25 | 48 2 [OP_DIV] 1 [OP_ADD] | var_a = 48
var_b = 2
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Possibility | Given that 2 coins and 1 dice are tossed at the same time, what is the number of cases that two coins come out on different sides and the dice divided by 3 gives a remainder of 1? | 4 | 2 1 6 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] [OP_MUL] | var_a = 2
var_b = 1
var_c = 6
var_d = 1
list_a = [i for i in range(var_b, var_c + 1, var_d)]
var_e = 3
list_b = []
var_e = int(var_e)
for i in list_a:
i = int(i)
if i % var_e == 0:
list_b.append(i)
var_f = len(list_b)
var_g = var_a * var_f
print(int(var_g)) |
Possibility | I'm trying to make a two-digit number, but I only want to use 3 and 5 once. How many different two-digit numbers can you make? | 2 | [OP_LIST_SOL] 3 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 3
var_b = 5
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, 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)) |
Geometry | There is a rectangular shaped playground with a width of 480 meters (m) and a length of 360 meters (m). Find how many kilometers (km) it is if you go around the edge of the field once. | 1.68 | 480 1000 [OP_DIV] 360 1000 [OP_DIV] [OP_ADD] 2 [OP_MUL] 2 [OP_ROUND] | var_a = 480
var_b = 1000
var_c = var_a / var_b
var_d = 360
var_e = 1000
var_f = var_d / var_e
var_g = var_c + var_f
var_h = 2
var_i = var_g * var_h
var_j = 2
var_k = round(float(var_i)+1e-10, var_j)
print('{:.2f}'.format(round(var_k+1e-10,2))) |
Arithmetic calculation | There were 2754 baseballs and 1938 ping pong balls in the shop. Among them, 1095 baseballs and a few ping-pong balls were sold, and a total of 3021 balls were left. How many ping-pong balls were sold? | 576 | 2754 1938 [OP_ADD] 1095 [OP_SUB] 3021 [OP_SUB] | var_a = 2754
var_b = 1938
var_c = var_a + var_b
var_d = 1095
var_e = var_c - var_d
var_f = 3021
var_g = var_e - var_f
print(int(var_g)) |
Correspondence | I mistakenly subtracted 7 from this number when I was supposed to multiply it, and I got 0.45. How much is it if I calculate it correctly? | 52.15 | 0.45 7 [OP_ADD] 7 [OP_MUL] | var_a = 0.45
var_b = 7
var_c = var_a + var_b
var_d = 7
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | Sanghyun's class donated unread books to the library. There are 20 students in her class and they planned to donate 15 books per student. If the library got 6 books less than they expected, how many books the library got? | 294 | 15 20 [OP_MUL] 6 [OP_SUB] | var_a = 15
var_b = 20
var_c = var_a * var_b
var_d = 6
var_e = var_c - var_d
print(int(var_e)) |
Comparison | There are 19 toys in all, each in a different sizes. If you put these toys in order from the smallest, toy (a) is at 9th and toy (b) is at 15th place. How many toys are there between toy (a) and toy (b)? | 5 | 15 9 [OP_SUB] 1 [OP_SUB] | var_a = 15
var_b = 9
var_c = var_a - var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | Your older brother is 1/10 meter (m) taller than you, and your younger brother is 0.2 meter (m) shorter than you. If the younger brother is 1.1 meters (m), how tall is the older brother in meters (m)? | 1.4 | 0.2 1.1 [OP_ADD] 1/10 [OP_ADD] | var_a = 0.2
var_b = 1.1
var_c = var_a + var_b
var_d = 0.1
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | Subtracting 3 from the number is a multiple of 6, and subtracting 1 from the number is a multiple of 8. Find the number. However, any number is a natural number greater than 35 and less than 70. | 57 | 35 70 1 [OP_SUB] 1 [OP_LIST_ARANGE] 6 3 [OP_LIST_DIVIDE_AND_REMAIN] 8 1 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET] | var_a = 35
var_b = 70
var_c = 1
var_d = var_b - var_c
var_e = 1
list_a = [i for i in range(var_a, var_d + 1, var_e)]
var_f = 6
var_g = 3
list_b = []
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
var_g = var_g + var_f
for i in list_a:
i = int(i)
if i%var_f == var_g:
list_b.append(i)
var_h = 8
var_i = 1
list_c = []
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
var_i = var_i + var_h
for i in list_b:
i = int(i)
if i%var_h == var_i:
list_c.append(i)
var_j = 1
var_k = list_c[var_j-1]
print(int(var_k)) |
Possibility | There are 4 cards numbered 3, 8, 2, and 7. If each card is used only once when forming a number with two-digit decimal number, what is the third largest number? | 83.72 | [OP_LIST_SOL] 3 8 2 7 [OP_LIST_EOL] 4 [OP_LIST_GET_PERM] 3 [OP_LIST_MAX] 10 [OP_LIST_POP] [OP_LIST_LEN] 2 [OP_SUB] [OP_POW] [OP_DIV] | var_a = 3
var_b = 8
var_c = 2
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 = 4
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 3
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
var_h = 10
var_i = len(list_a)
var_j = 2
var_k = var_i - var_j
var_l = var_h ** var_k
var_m = var_g / var_l
print('{:.2f}'.format(round(var_m+1e-10,2))) |
Comparison | Jungkook has a 0.8 number card and Yoongi has a 1/2 number card. How many people have a number card less than 0.3? | 0 | [OP_LIST_SOL] 0.8 1/2 [OP_LIST_EOL] 0.3 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 0.3
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 | There is a rectangular farm. If the circumference of this farm is 46 kilometers (km) and the width is 7 kilometers (km) longer than the length, how many kilometers (km) is the width of this farm? | 15 | 46 2 [OP_DIV] 7 [OP_SUB] 2 [OP_DIV] 7 [OP_ADD] | var_a = 46
var_b = 2
var_c = var_a / var_b
var_d = 7
var_e = var_c - var_d
var_f = 2
var_g = var_e / var_f
var_h = 7
var_i = var_g + var_h
print(int(var_i)) |
Comparison | You are comparing the heights of 20 students. Jungkook is shorter than Yoongi, and there are 5 students between Yoongi and Jungkook. There are 6 students who are taller than Jungkook. How many students are shorter than Yoongi? | 19 | 20 6 [OP_SUB] 5 [OP_ADD] | var_a = 20
var_b = 6
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
print(int(var_e)) |
Comparison | Yuri ate 6 hamburgers in a hamburger eating contest, and Jisoo ate 8 hamburgers. Changhyun ate more than Yuri and less than Jisu. How many hamburgers did Changhyun eat? | 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 | If 1/1000 of a certain number is 0.735, what number is 10 times that certain number? | 7350 | 0.735 1/1000 [OP_DIV] 10 [OP_MUL] | var_a = 0.735
var_b = 0.001
var_c = var_a / var_b
var_d = 10
var_e = var_c * var_d
print(int(var_e)) |
Possibility | Seung-hee wants to make a three-digit number by throwing the dice three times and using all the numbers that come out. When 3, 4, and 6 came out after rolling the dice, how many cases are possible to make a number bigger than 450? | 3 | [OP_LIST_SOL] 3 4 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 450 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 3
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 = 450
list_c = []
for i in list_b:
if i > var_e:
list_c.append(i)
var_f = len(list_c)
print(int(var_f)) |
Possibility | I'm going to give 7 identical books to Yoongi and Hoseok. Yoongi and Hoseok will receive at least one book. How many ways can the books be distributed in total? | 6 | 7 2 1 [OP_MUL] [OP_SUB] 1 [OP_ADD] | var_a = 7
var_b = 2
var_c = 1
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 1
var_g = var_e + var_f
print(int(var_g)) |
Arithmetic calculation | How many numbers from 1 to 100 are even and multiples of 3? | 16 | 1 100 [OP_LIST_EVEN] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 1
var_b = 100
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 = 3
list_b = []
var_c = int(var_c)
for i in list_a:
i = int(i)
if i % var_c == 0:
list_b.append(i)
var_d = len(list_b)
print(int(var_d)) |
Arithmetic calculation | There are 17 dogs and cats in total. If there are 8 cats, how many dogs are there? | 9 | 17 8 [OP_SUB] | var_a = 17
var_b = 8
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | There are three different natural numbers A, B, and C. When A is divided by 25, the quotient is B and the remainder is C. Find the largest number that can be C. | 24 | 25 1 [OP_SUB] | var_a = 25
var_b = 1
var_c = var_a - var_b
print(int(var_c)) |
Comparison | 13 students stand in a line. Minyoung stands at the 8th from the left, and Hoseok stands at the 9th from the right. How many students are standing between Minyoung and Hoseok? | 2 | 8 9 [OP_ADD] 13 [OP_SUB] 2 [OP_SUB] | var_a = 8
var_b = 9
var_c = var_a + var_b
var_d = 13
var_e = var_c - var_d
var_f = 2
var_g = var_e - var_f
print(int(var_g)) |
Possibility | If 3 male students and 3 female students pass through the door one by one, find the number of cases in which 3 male students pass through the door in succession. | 144 | 3 3 [OP_ADD] 3 1 [OP_SUB] [OP_SUB] 3 3 [OP_ADD] 3 1 [OP_SUB] [OP_SUB] [OP_PERM] 3 3 [OP_PERM] [OP_MUL] | var_a = 3
var_b = 3
var_c = var_a + var_b
var_d = 3
var_e = 1
var_f = var_d - var_e
var_g = var_c - var_f
var_h = 3
var_i = 3
var_j = var_h + var_i
var_k = 3
var_l = 1
var_m = var_k - var_l
var_n = var_j - var_m
var_o = 1
var_g = int(var_g)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
var_o = var_o * (var_g-i)
var_p = 3
var_q = 3
var_r = 1
var_p = int(var_p)
var_q = int(var_q)
for i, elem in enumerate(range(var_q)):
var_r = var_r * (var_p-i)
var_s = var_o * var_r
print(int(var_s)) |
Comparison | When students are lined up in a single line, how many students are there when 6 people are in front of Yoonjung? (Yoonjung is at 5th from the back.) | 11 | 6 5 [OP_ADD] | var_a = 6
var_b = 5
var_c = var_a + var_b
print(int(var_c)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.