category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Correspondence | Divide 3 times a number by 5, subtract 220, multiply by 4, add 40, and you get 360. Find the number. | 500 | 360 40 [OP_SUB] 4 [OP_DIV] 220 [OP_ADD] 5 [OP_MUL] 3 [OP_DIV] | var_a = 360
var_b = 40
var_c = var_a - var_b
var_d = 4
var_e = var_c / var_d
var_f = 220
var_g = var_e + var_f
var_h = 5
var_i = var_g * var_h
var_j = 3
var_k = var_i / var_j
print(int(var_k)) |
Comparison | Seokjin drank 11/10 liters (l) of milk, and Jungkook drank 1.3 liters (l). When Yoongi drank 7/6 liters (l), who drank the least amount of milk? | Seokjin | [OP_LIST_SOL] Jungkook Seokjin Yoongi [OP_LIST_EOL] [OP_LIST_SOL] 1.3 11 10 [OP_DIV] 7 5 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jungkook'
var_b = 'Seokjin'
var_c = 'Yoongi'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 1.3
var_e = 11
var_f = 10
var_g = var_e / var_f
var_h = 7
var_i = 5
var_j = var_h / var_i
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_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_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[var_k-1]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Comparison | If a factory produces 500 soccer balls in 30 minutes and 800 basketball balls in 1 hour, which ball will be produced more after 5 hours? | soccer | [OP_LIST_SOL] soccer basketball [OP_LIST_EOL] [OP_LIST_SOL] 5 60 [OP_MUL] 30 [OP_FDIV] 500 [OP_MUL] 5 60 [OP_MUL] 60 [OP_FDIV] 800 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'soccer'
var_b = 'basketball'
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 = 5
var_d = 60
var_e = var_c * var_d
var_f = 30
var_g = var_e // var_f
var_h = 500
var_i = var_g * var_h
var_j = 5
var_k = 60
var_l = var_j * var_k
var_m = 60
var_n = var_l // var_m
var_o = 800
var_p = var_n * var_o
list_b= []
if "/" in str(var_p):
var_p = eval(str(var_p))
list_b.append(var_p)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
list_b.reverse()
var_q = 1
list_c=list_b.copy()
list_c.sort()
var_r = list_c[-var_q]
var_s = list_b.index(var_r)+1
var_t = list_a[var_s-1]
print(var_t) |
Correspondence | When 3×7=7×A=B, what is the sum of A and B? | 24 | 3×7=7×A=B A [OP_NUM_UNK_SOLVER] 3×7=7×A=B B [OP_NUM_UNK_SOLVER] [OP_ADD] | var_a = '3×7=7×A=B'
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] = 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_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] = int(c[i])
var_c = ans_dict[var_b]
var_d = '3×7=7×A=B'
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] = 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_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)):
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_f = ans_dict[var_e]
var_g = var_c + var_f
print(int(var_g)) |
Correspondence | A number divided by 6 equals 1/10. Find the value of the number divided by 3/25. | 5 | 1/10 6 [OP_MUL] 3/25 [OP_DIV] | var_a = 0.1
var_b = 6
var_c = var_a * var_b
var_d = 0.12
var_e = var_c / var_d
print(int(eval('{:.2f}'.format(round(var_e+1e-10,2))))) |
Possibility | If there are 5 people A, B, C, D, and E, find the number of ways to select 3 representatives. | 10 | 5 3 [OP_COMB] | var_a = 5
var_b = 3
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
var_c = var_c / (i+1)
print(int(var_c)) |
Arithmetic calculation | A clock tower bell in a village rings once every hour on the hour. If a year is counted as 365 days, how many times does the clock tower bell ring in a year? | 8760 | 24 365 [OP_MUL] | var_a = 24
var_b = 365
var_c = var_a * var_b
print(int(var_c)) |
Possibility | Using the four numbers 1, 5, 6, and 9 once, find the second smallest two-digit number when the hundredth number is 5. | 56 | [OP_LIST_SOL] 1 5 6 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 10 5 [OP_LIST_SEARCH_FIXED_DIGIT] 2 [OP_LIST_MIN] | var_a = 1
var_b = 5
var_c = 6
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 = 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 = 10
var_g = 5
list_c = []
var_f = int(var_f)
var_g = int(var_g)
for i in list_b:
i = int(i)
if (i//var_f)%10 == var_g:
list_c.append(i)
var_h = 2
list_d=list_c.copy()
list_d.sort()
var_i = list_d[var_h-1]
print(int(var_i)) |
Geometry | I made a square with a long piece of string, and each side was 21 centimeters (cm). If you use this string to make the largest triangle among triangles with a length of the three sides equal, how many centimeters (cm) will each lengths of a side be? | 28 | 21 4 [OP_MUL] 3 [OP_DIV] | var_a = 21
var_b = 4
var_c = var_a * var_b
var_d = 3
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | When the five numbers 9867, 8976, 9876, 9687, and 9689 are arranged from smallest to largest, write the 4th smallest number. | 9867 | [OP_LIST_SOL] 9867 8976 9876 9687 9689 [OP_LIST_EOL] 4 [OP_LIST_MIN] | var_a = 9867
var_b = 8976
var_c = 9876
var_d = 9687
var_e = 9689
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 4
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
print(int(var_g)) |
Correspondence | B minus A equals 211.5. Multiplying the decimal number A by 10 equals B. Calculate A, including the decimal point. | 23.5 | 211.5 10 1 [OP_SUB] [OP_DIV] | var_a = 211.5
var_b = 10
var_c = 1
var_d = var_b - var_c
var_e = var_a / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | A, B, and C are all different single-digit natural numbers. What is B that satisfies AB+CB=CC6? | 8 | AB+CB=CC6 B [OP_DIGIT_UNK_SOLVER] | var_a = 'AB+CB=CC6'
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)) |
Arithmetic calculation | A box with 16 basketballs of the same weight weighs 17.88 kilograms (kg). Consider that the empty box weighs 0.6 kilograms (kg), find out how much 7 basketballs weigh in kilograms (kg). | 7.56 | 17.88 0.6 [OP_SUB] 16 [OP_DIV] 7 [OP_MUL] | var_a = 17.88
var_b = 0.6
var_c = var_a - var_b
var_d = 16
var_e = var_c / var_d
var_f = 7
var_g = var_e * var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Correspondence | ABCD+ABCD=5472. If different letters mean different numbers, what is D? | 6 | ABCD+ABCD=5472 D [OP_DIGIT_UNK_SOLVER] | var_a = 'ABCD+ABCD=5472'
var_b = 'D'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Arithmetic calculation | The distance from Hyoseong's house to Mimi's house is 2.5 kilometers. The two started at the same time from their respective homes and walked towards each other at a steady pace. If Hyosung walks at 0.08 kilometers (km) per minute and Mimi walks at 2.4 kilometers (km) per hour, how many kilometers (km) is the distance between the two after 15 minutes? | 0.7 | 2.5 0.08 15 [OP_MUL] [OP_SUB] 2.4 60 [OP_DIV] 15 [OP_MUL] [OP_SUB] | var_a = 2.5
var_b = 0.08
var_c = 15
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 2.4
var_g = 60
var_h = var_f / var_g
var_i = 15
var_j = var_h * var_i
var_k = var_e - var_j
print('{:.2f}'.format(round(var_k+1e-10,2))) |
Comparison | How many numbers are greater than or equal to 0.4 out of 0.8 and 1/2? | 2 | [OP_LIST_SOL] 0.8 1/2 [OP_LIST_EOL] 0.4 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 0.4
list_b = []
for i in list_a:
if i >= var_c:
list_b.append(i)
var_d = len(list_b)
print(int(var_d)) |
Arithmetic calculation | There are wicks that are 25 centimeters (cm) long. If you light this wick, it is said to burn 1.75 centimeters (cm) in 10 seconds. How many seconds after lighting will the wick be 11 centimeters (cm) long? | 80 | 25 11 [OP_SUB] 1.75 10 [OP_DIV] [OP_DIV] | var_a = 25
var_b = 11
var_c = var_a - var_b
var_d = 1.75
var_e = 10
var_f = var_d / var_e
var_g = var_c / var_f
print(int(var_g)) |
Correspondence | You are given two different numbers, A and B. Find the sum of A and B in the two-digit addition equation 4A+B4=86. | 6 | 4A+B4=86 A [OP_DIGIT_UNK_SOLVER] 4A+B4=86 B [OP_DIGIT_UNK_SOLVER] [OP_ADD] | var_a = '4A+B4=86'
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 = '4A+B4=86'
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 | While running, Yoongi was in 7th place and passed 4 others students. When 9 students are running in total , how many students are behind Yoongi? | 6 | 9 7 4 [OP_SUB] [OP_SUB] | var_a = 9
var_b = 7
var_c = 4
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e)) |
Possibility | I'm going to give 7 scissors to Yoongi and Hoseok. Yoongi and Hoseok take at least one pair of scissors. How many ways are there to distribute scissors? | 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)) |
Geometry | The perimeter of one side of the cube is 24 centimeters (cm). What is the surface area of this cube in square centimeters? | 216 | 24 4 [OP_DIV] 24 4 [OP_DIV] [OP_MUL] 6 [OP_MUL] | var_a = 24
var_b = 4
var_c = var_a / var_b
var_d = 24
var_e = 4
var_f = var_d / var_e
var_g = var_c * var_f
var_h = 6
var_i = var_g * var_h
print(int(var_i)) |
Correspondence | Bitna Elementary School decided to hand out 11 pencils to all students. If Bitna Elementary School purchased 10395 pencils and distributed them to students, how many students would there be in Bitna Elementary School? | 945 | 10395 11 [OP_DIV] | var_a = 10395
var_b = 11
var_c = var_a / var_b
print(int(var_c)) |
Geometry | There is a rectangle with a length of 10 centimeters (cm) and a width of 8 centimeters (cm). We want to draw a square with the same perimeter as this rectangle. How many centimeters (cm) should be the length of one side of the square? | 9 | 10 8 [OP_ADD] 2 [OP_MUL] 4 [OP_DIV] | var_a = 10
var_b = 8
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
var_f = 4
var_g = var_e / var_f
print(int(var_g)) |
Arithmetic calculation | Find the greatest divisor of 28. | 28 | 28 [OP_LIST_GET_DIVISOR] 1 [OP_LIST_MAX] | var_a = 28
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 = 1
list_b=list_a.copy()
list_b.sort()
var_c = list_b[-var_b]
print(int(var_c)) |
Possibility | Find the number of ways to draw an odd number of two cards out of nine cards numbered 1 through 9. | 40 | 1 9 1 [OP_LIST_ARANGE] 2 [OP_LIST_GET_PERM] [OP_LIST_NUM2SUM] 2 1 [OP_LIST_DIVIDE_AND_REMAIN] [OP_LIST_LEN] | 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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
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 = 2
var_g = 1
list_d = []
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
var_g = var_g + var_f
for i in list_c:
i = int(i)
if i%var_f == var_g:
list_d.append(i)
var_h = len(list_d)
print(int(var_h)) |
Arithmetic calculation | Suhyeon's one step is 0.75 meters (m). If it takes Suhyeon 70 steps to go to the convenience store from home, find the total distance in meters (m) Suhyeon walked when she went to the convenience store 13 times. | 682.5 | 0.75 70 [OP_MUL] 13 [OP_MUL] | var_a = 0.75
var_b = 70
var_c = var_a * var_b
var_d = 13
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | Gyeong-hun climbed the mountain, walking at 3 kilometers per hour (km) when going up, and walking at 4 kilometers (km) per hour when going down, taking a 2 kilometers (km) longer route when going down, for a total of 4 hours. How long distance did Gyeong-hun climb? | 6 | 4 2 4 [OP_DIV] [OP_SUB] 1 3 [OP_DIV] 1 4 [OP_DIV] [OP_ADD] [OP_DIV] | var_a = 4
var_b = 2
var_c = 4
var_d = var_b / var_c
var_e = var_a - var_d
var_f = 1
var_g = 3
var_h = var_f / var_g
var_i = 1
var_j = 4
var_k = var_i / var_j
var_l = var_h + var_k
var_m = var_e / var_l
print(int(eval('{:.2f}'.format(round(var_m+1e-10,2))))) |
Arithmetic calculation | Keun-bae decided to jump rope 15 times on the first day, twice the first day on the second day, and twice the second day on the third day. If Keun-bae jumps rope in the same pattern, how many times will he have to do on the fourth day? | 120 | 15 2 4 1 [OP_SUB] [OP_POW] [OP_MUL] | var_a = 15
var_b = 2
var_c = 4
var_d = 1
var_e = var_c - var_d
var_f = var_b ** var_e
var_g = var_a * var_f
print(int(var_g)) |
Correspondence | Subtracting 29 from a number gives you 63. What is the number obtained when 47 is subtracted from the number? | 45 | 63 29 [OP_ADD] 47 [OP_SUB] | var_a = 63
var_b = 29
var_c = var_a + var_b
var_d = 47
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | When you divide 15/14 by a particular number, you get 9/14. Find that particular number. | 1.67 | 15/14 9/14 [OP_DIV] | var_a = 1.0714285714285714
var_b = 0.6428571428571429
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Comparison | Seongkuk's orchard picked 40680 tangerines from 60 tangerine trees, and Hyukjun's orchard picked 37510 tangerines from 55 tangerine trees. Whose orchard averaged more tangerines per tangerine tree? | Hyukjun | [OP_LIST_SOL] Seongkuk Hyukjun [OP_LIST_EOL] [OP_LIST_SOL] 40680 60 [OP_DIV] 37510 55 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Seongkuk'
var_b = 'Hyukjun'
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 = 40680
var_d = 60
var_e = var_c / var_d
var_f = 37510
var_g = 55
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) |
Comparison | How many of 0.8, 1/2, and 0.9 are less than 0.4? | 0 | [OP_LIST_SOL] 0.8 1/2 0.9 [OP_LIST_EOL] 0.4 [OP_LIST_LESS] [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)) |
Geometry | How many balls are left when Jungkook removes 3 balls from a box containing 10 balls? | 7 | 10 3 [OP_SUB] | var_a = 10
var_b = 3
var_c = var_a - var_b
print(int(var_c)) |
Correspondence | When you divide a number by 5, you get 2. What do you get if you subtract 6 from this number? | 4 | 5 2 [OP_MUL] 6 [OP_SUB] | var_a = 5
var_b = 2
var_c = var_a * var_b
var_d = 6
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | How many odd two-digit numbers and even single-digit numbers exist? | 49 | 10 99 [OP_LIST_ODD] 1 9 [OP_LIST_EVEN] [OP_SET_UNION] [OP_LIST_LEN] | var_a = 10
var_b = 99
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
var_d = 9
list_b = []
if var_c%2!=0:
for i in range(var_c+1, var_d+1, 2):
list_b.append(i)
else:
for i in range(var_c, var_d+1, 2):
list_b.append(i)
list_c = list(set(list_a) | set(list_b))
var_e = len(list_c)
print(int(var_e)) |
Correspondence | While Yoongi was adding 57 to the three-digit number, he mistook the three-digit units digit 9 for a 6. If the sum obtained by Yoongi is 823, what is the correct calculation result? | 826 | 823 57 [OP_SUB] 6 9 [OP_SUB] [OP_SUB] 57 [OP_ADD] | var_a = 823
var_b = 57
var_c = var_a - var_b
var_d = 6
var_e = 9
var_f = var_d - var_e
var_g = var_c - var_f
var_h = 57
var_i = var_g + var_h
print(int(var_i)) |
Comparison | Which one has the least number of faces among a triangular-prism, quadrangular-prism, triangular-pyramid, quadrangular-pyramid, and truncated-quadrangular-pyramid? | triangular-pyramid | [OP_LIST_SOL] triangular-prism quadrangular-prism triangular-pyramid quadrangular-pyramid truncated-quadrangular-pyramid [OP_LIST_EOL] [OP_LIST_SOL] 3 2 [OP_ADD] 4 2 [OP_ADD] 3 1 [OP_ADD] 4 1 [OP_ADD] 4 2 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'triangular-prism'
var_b = 'quadrangular-prism'
var_c = 'triangular-pyramid'
var_d = 'quadrangular-pyramid'
var_e = 'truncated-quadrangular-pyramid'
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 = 2
var_h = var_f + var_g
var_i = 4
var_j = 2
var_k = var_i + var_j
var_l = 3
var_m = 1
var_n = var_l + var_m
var_o = 4
var_p = 1
var_q = var_o + var_p
var_r = 4
var_s = 2
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_q):
var_q = eval(str(var_q))
list_b.append(var_q)
if "/" in str(var_n):
var_n = eval(str(var_n))
list_b.append(var_n)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
list_b.reverse()
var_u = 1
list_c=list_b.copy()
list_c.sort()
var_v = list_c[var_u-1]
var_w = list_b.index(var_v)+1
var_x = list_a[var_w-1]
print(var_x) |
Comparison | Mincheol, Taehoon, and Chaejeong are standing in a row. When Taehoon is behind Mincheol and in front of Chaejeong, who is the student standing at the very back? | Chaejeong | [OP_LIST_SOL] Mincheol Taehoon Chaejeong [OP_LIST_EOL] [OP_LIST_SOL] Taehoon Mincheol < Taehoon Chaejeong > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'Mincheol'
var_b = 'Taehoon'
var_c = 'Chaejeong'
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 = 'Taehoon'
var_e = 'Mincheol'
var_f = '<'
var_g = 'Taehoon'
var_h = 'Chaejeong'
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 = len(list_c)
var_k = list_c[var_j-1]
print(var_k) |
Arithmetic calculation | Eunji's math score is 25 points lower than Yoongi's, and Yuna's math score is 20 points lower than Eunji's. If Yuna's math score is 8, what score did Yoongi get? | 53 | 8 20 [OP_ADD] 25 [OP_ADD] | var_a = 8
var_b = 20
var_c = var_a + var_b
var_d = 25
var_e = var_c + var_d
print(int(var_e)) |
Comparison | What is the sum of the numbers among 1.4, 9/10, 1.2, 0.5, and 13/10 that is less than 1.1? | 1.4 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_LESS] [OP_LIST_SUM] | 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)
list_b = [float(i) for i in list_b]
var_g = sum(list_b)
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Arithmetic calculation | 8 people decided to take turns riding 5 bikes. If the riding time is 2 hours 32 minutes, how long does one person ride the bike on average in minutes? | 95 | 2 60 [OP_MUL] 32 [OP_ADD] 8 [OP_DIV] 5 [OP_MUL] | var_a = 2
var_b = 60
var_c = var_a * var_b
var_d = 32
var_e = var_c + var_d
var_f = 8
var_g = var_e / var_f
var_h = 5
var_i = var_g * var_h
print(int(var_i)) |
Possibility | We are trying to make a two-digit number by using 2, 4, 7, and 9 once each. What is the third smallest two-digit number with 7 in the tens place? | 79 | [OP_LIST_SOL] 2 4 7 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 10 7 [OP_LIST_SEARCH_FIXED_DIGIT] 3 [OP_LIST_MIN] | var_a = 2
var_b = 4
var_c = 7
var_d = 9
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 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 = 10
var_g = 7
list_c = []
var_f = int(var_f)
var_g = int(var_g)
for i in list_b:
i = int(i)
if (i//var_f)%10 == var_g:
list_c.append(i)
var_h = 3
list_d=list_c.copy()
list_d.sort()
var_i = list_d[var_h-1]
print(int(var_i)) |
Geometry | You are trying to draw as many circles with a radius of 3 cm on a piece of paper that is 30 centimeters (cm) wide and 24 centimeters (cm) long, without overlapping them. How many circles can you draw? | 20 | 30 3 2 [OP_MUL] [OP_DIV] 24 3 2 [OP_MUL] [OP_DIV] [OP_MUL] | var_a = 30
var_b = 3
var_c = 2
var_d = var_b * var_c
var_e = var_a / var_d
var_f = 24
var_g = 3
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)) |
Arithmetic calculation | There are 120 liters (L) of water in the water tank. When you open the faucet in this water tank, 4 liters (L) of water flow out per minute. How many liters (L) of water are left in the water tank after 20 minutes you open the faucet? | 40 | 120 4 20 [OP_MUL] [OP_SUB] | var_a = 120
var_b = 4
var_c = 20
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e)) |
Possibility | I am trying to make a number that is bigger than 550. Think of ways in which a number is made up of 4, 5, and 8, and the figure in each digit is different from each other. How many numbers are there? | 3 | [OP_LIST_SOL] 4 5 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 550 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 4
var_b = 5
var_c = 8
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 550
list_c = []
for i in list_b:
if i > var_e:
list_c.append(i)
var_f = len(list_c)
print(int(var_f)) |
Geometry | If the base of a parallelogram is 3.8 meters (m) and the height is 6.36 meters (m), what is the area? | 24.17 | 3.8 6.36 [OP_MUL] | var_a = 3.8
var_b = 6.36
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Arithmetic calculation | There are a total of 18 cucumbers, and the number of watermelons is 8 more than that of cucumbers. What is the total number of watermelons and cucumbers? | 44 | 18 18 8 [OP_ADD] [OP_ADD] | var_a = 18
var_b = 18
var_c = 8
var_d = var_b + var_c
var_e = var_a + var_d
print(int(var_e)) |
Possibility | You have 2 purple candies, 1 white candy, and 1 red candy. If candies of the same color are indistinguishable from each other, how many different ways can you place 4 different candies in a row? | 12 | 2 1 [OP_ADD] 1 [OP_ADD] 2 1 [OP_ADD] 1 [OP_ADD] [OP_PERM] 2 [OP_DIV] | var_a = 2
var_b = 1
var_c = var_a + var_b
var_d = 1
var_e = var_c + var_d
var_f = 2
var_g = 1
var_h = var_f + var_g
var_i = 1
var_j = var_h + var_i
var_k = 1
var_e = int(var_e)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
var_k = var_k * (var_e-i)
var_l = 2
var_m = var_k / var_l
print(int(var_m)) |
Arithmetic calculation | As a second foreign language, Japanese, Chinese, and French can be selected. The number of Japanese selectors is three times the number of Chinese selectors, and the number of Chinese selectors is 15 more than the number of French selectors. When the number of all students is 165, find the number of Japanese selectors. | 108 | 165 15 [OP_ADD] 3 1 1 [OP_ADD] [OP_ADD] [OP_DIV] 3 [OP_MUL] | var_a = 165
var_b = 15
var_c = var_a + var_b
var_d = 3
var_e = 1
var_f = 1
var_g = var_e + var_f
var_h = var_d + var_g
var_i = var_c / var_h
var_j = 3
var_k = var_i * var_j
print(int(var_k)) |
Comparison | There are 5 numbers 1, 4, 25, 16 and 22. What is the 2nd largest number? | 22 | [OP_LIST_SOL] 1 4 25 16 22 [OP_LIST_EOL] 2 [OP_LIST_MAX] | var_a = 1
var_b = 4
var_c = 25
var_d = 16
var_e = 22
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 2
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
print(int(var_g)) |
Correspondence | I need to subtract 23 from a certain number, but I mistakenly took 32 away, so I got 25. Find the correctly calculated value. | 34 | 25 32 [OP_ADD] 23 [OP_SUB] | var_a = 25
var_b = 32
var_c = var_a + var_b
var_d = 23
var_e = var_c - var_d
print(int(var_e)) |
Geometry | Find the perimeter in centimeters (cm) of a parallelogram with one side measuring 18 centimeters (cm) and the other side measuring 12 centimeters (cm). | 60 | 18 12 [OP_ADD] 2 [OP_MUL] | var_a = 18
var_b = 12
var_c = var_a + var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | You have a piece of wire that is 2 meters (m) 80 centimeters (cm) long. If you cut all the 40 centimeters (cm) lengths of this wire, how many cuts will you have to make? | 6 | 2 100 [OP_MUL] 80 [OP_ADD] 40 [OP_DIV] 1 [OP_SUB] | var_a = 2
var_b = 100
var_c = var_a * var_b
var_d = 80
var_e = var_c + var_d
var_f = 40
var_g = var_e / var_f
var_h = 1
var_i = var_g - var_h
print(int(var_i)) |
Arithmetic calculation | Minha's hair grows at a rate of 0.39 millimeters (mm) per day. If Minha's hair was 32.8 centimeters (cm) today, find how many centimeters (cm) it will be in 30 days. | 33.97 | 0.39 10 [OP_DIV] 30 [OP_MUL] 32.8 [OP_ADD] | var_a = 0.39
var_b = 10
var_c = var_a / var_b
var_d = 30
var_e = var_c * var_d
var_f = 32.8
var_g = var_e + var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Geometry | How many faces does a cube-shaped gift box have? | 6 | 6 | var_a = 6
print(int(var_a)) |
Arithmetic calculation | If you leave money with your mother, you get 300 won every day, and if you leave money with your father, you get 500 won every day. Kyu-won gave 8,000 won to her mother, and Seok-gi left 5,000 won to her father. If you want Kyu-won and Seok-gi to have the same amount of money when they each get their money back, how many days are needned? | 15 | 8000 5000 [OP_SUB] 500 300 [OP_SUB] [OP_DIV] | var_a = 8000
var_b = 5000
var_c = var_a - var_b
var_d = 500
var_e = 300
var_f = var_d - var_e
var_g = var_c / var_f
print(int(var_g)) |
Arithmetic calculation | There are 445 yellow fish and 38 more blue fish than yellow fish. How many yellow and blue fish are there? | 928 | 445 445 38 [OP_ADD] [OP_ADD] | var_a = 445
var_b = 445
var_c = 38
var_d = var_b + var_c
var_e = var_a + var_d
print(int(var_e)) |
Arithmetic calculation | You would like to distribute 3 liters (L) of cooking oil to three people: A, B, and C. If you gives A 200 milliliters (㎖) more than B, and B 200 milliliters (㎖) more than C, how many milliliters (㎖) of cooking oil should be given to B? | 1000 | 3 1000 [OP_MUL] 200 [OP_ADD] 200 [OP_SUB] 3 [OP_DIV] | var_a = 3
var_b = 1000
var_c = var_a * var_b
var_d = 200
var_e = var_c + var_d
var_f = 200
var_g = var_e - var_f
var_h = 3
var_i = var_g / var_h
print(int(var_i)) |
Arithmetic calculation | Find the sum of even numbers from 1 to 200. | 10100 | 1 200 [OP_LIST_EVEN] [OP_LIST_SUM] | var_a = 1
var_b = 200
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)
list_a = [float(i) for i in list_a]
var_c = sum(list_a)
print(int(var_c)) |
Geometry | There is a rhombus with an area of 64/5 square centimeters (cm2). If one diagonal is 64/9 centimeters (cm), how long is the other diagonal in cm (cm)? | 3.6 | 64/5 2 [OP_MUL] 64/9 [OP_DIV] | var_a = 12.8
var_b = 2
var_c = var_a * var_b
var_d = 7.111111111111111
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Possibility | How many edges are there on a face of an icosahedron? | 3 | 3 | var_a = 3
print(int(var_a)) |
Geometry | If the lengths of each diagonal of a rhombus are 14 centimeters (cm) and 24 centimeters (cm), what is the area of the rhombus? | 168 | 14 24 [OP_MUL] 2 [OP_DIV] | var_a = 14
var_b = 24
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | There is a three-digit number with 4 in the hundreds digit and 8 in the tens digit. The ones digit is called A, and any number from 0 to 9 can be used for A. What is the sum of the largest and smallest possible numbers? | 969 | [OP_LIST_SOL] 4 8 A [OP_LIST_EOL] [OP_LIST2NUM] [OP_GEN_POSSIBLE_LIST] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD] | var_a = 4
var_b = 8
var_c = 'A'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d=""
for i in list_a:
i = str(i)
var_d = var_d + i
ans_dict = dict()
var_d = str(var_d)
list_b = []
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_d):
if v in variable_candi:
ans_dict[v] = 0
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_d
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
if len(var_d) == len(str(int(temp))):
new_elem = int(temp)
list_b.append(new_elem)
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 1
list_d=list_b.copy()
list_d.sort()
var_h = list_d[var_g-1]
var_i = var_f + var_h
print(int(var_i)) |
Arithmetic calculation | If there is a pizza divided into 10 pieces, Minyoung and Yoojung plan to share it. If Minyoung eats 2 more pizzas than Yoojung, find how many slices of pizza Yoojung takes. | 4 | 10 2 [OP_SUB] 2 [OP_DIV] | var_a = 10
var_b = 2
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Geometry | Find the number of faces of the regular octahedron. | 8 | 8 | var_a = 8
print(int(var_a)) |
Arithmetic calculation | Minhyung's father walks 3.8 kilometers (km) an hour. How many kilometers (km) did Minhyeong's father walk for 2 hours and 45 minutes at a constant pace? | 10.45 | 3.8 2 45 60 [OP_DIV] [OP_ADD] [OP_MUL] | var_a = 3.8
var_b = 2
var_c = 45
var_d = 60
var_e = var_c / var_d
var_f = var_b + var_e
var_g = var_a * var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Correspondence | A is not a zero, and A and B are single digits. Given that AB40C is a multiple of 45, find the number of all possible numbers. | 20 | AB40C [OP_GEN_POSSIBLE_LIST] 45 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 'AB40C'
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 = 45
list_b = []
var_b = int(var_b)
for i in list_a:
i = int(i)
if i % var_b == 0:
list_b.append(i)
var_c = len(list_b)
print(int(var_c)) |
Geometry | There are 6 boxes containing 3 red balls, 2 blue balls and 5 yellow balls. What is the total number of yellow balls? | 30 | 5 6 [OP_MUL] | var_a = 5
var_b = 6
var_c = var_a * var_b
print(int(var_c)) |
Correspondence | If the six-digit number A15B94 is a multiple of 99, find A. | 5 | A15B94 [OP_GEN_POSSIBLE_LIST] 99 [OP_LIST_DIVISIBLE] A15B94 A [OP_LIST_FIND_UNK] | var_a = 'A15B94'
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 = 99
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 = 'A15B94'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
var_e = 0
for elem in list_b:
elem = str(elem)
var_e = int(elem[unk_idx])
print(int(var_e)) |
Arithmetic calculation | One mobile is made with 4 meters (m) of wire. How many mobiles of the same size can be made with 105.8 meters (m) of wire? | 26 | 105.8 4 [OP_FDIV] | var_a = 105.8
var_b = 4
var_c = var_a // var_b
print(int(var_c)) |
Correspondence | When you add 17 to a number and divide it by 5, you get 25. Find the value of the number divided by 6. | 18 | 25 5 [OP_MUL] 17 [OP_SUB] 6 [OP_DIV] | var_a = 25
var_b = 5
var_c = var_a * var_b
var_d = 17
var_e = var_c - var_d
var_f = 6
var_g = var_e / var_f
print(int(var_g)) |
Correspondence | 159 is a number you can get when you subtract 45 from a number multiplied by 3. Find the value of adding 32 to this number and multiplying it by 12. | 1200 | 159 45 [OP_ADD] 3 [OP_DIV] 32 [OP_ADD] 12 [OP_MUL] | var_a = 159
var_b = 45
var_c = var_a + var_b
var_d = 3
var_e = var_c / var_d
var_f = 32
var_g = var_e + var_f
var_h = 12
var_i = var_g * var_h
print(int(var_i)) |
Geometry | 60 centimeters (cm) long wire was used to make a square with a side of 9 centimeters (cm). How many centimeters (cm) is the length of the remaining wire? | 24 | 60 9 4 [OP_MUL] [OP_SUB] | var_a = 60
var_b = 9
var_c = 4
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e)) |
Possibility | I am going to distribute 12 basketballs to 3 students, Jungkook, Jimin, and Hoseok. If each student receives at least one ball, how many different ways can the balls be distributed? | 55 | 3 12 [OP_ADD] 3 1 [OP_MUL] [OP_SUB] 1 [OP_SUB] 12 3 1 [OP_MUL] [OP_SUB] [OP_COMB] | var_a = 3
var_b = 12
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 = 1
var_i = var_g - var_h
var_j = 12
var_k = 3
var_l = 1
var_m = var_k * var_l
var_n = var_j - var_m
var_o = 1
var_i = int(var_i)
var_n = int(var_n)
for i, elem in enumerate(range(var_n)):
var_o = var_o * (var_i-i)
for i, elem in enumerate(range(var_n)):
var_o = var_o / (i+1)
print(int(var_o)) |
Arithmetic calculation | There were 35 people on the bus. At this stop, 18 people got off and 15 got on. How many fewer people are on the bus now than at the beginning? | 3 | 35 35 18 [OP_SUB] 15 [OP_ADD] [OP_SUB] | var_a = 35
var_b = 35
var_c = 18
var_d = var_b - var_c
var_e = 15
var_f = var_d + var_e
var_g = var_a - var_f
print(int(var_g)) |
Geometry | You have a cookie in the shape of a circle with a radius of 3 centimeters (cm). You are going to place this cookie on a rectangular piece of paper measuring 30 centimeters (cm) wide by 24 centimeters (cm) long. If you want to stack as many cookies as possible without overlapping, how many can you stack? | 20 | 30 3 2 [OP_MUL] [OP_DIV] 24 3 2 [OP_MUL] [OP_DIV] [OP_MUL] | var_a = 30
var_b = 3
var_c = 2
var_d = var_b * var_c
var_e = var_a / var_d
var_f = 24
var_g = 3
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)) |
Geometry | The name tag of Hanuel's elementary school is in a square with one side measuring 11 centimeters (cm). What is the area of one name tag? | 121 | 11 2 [OP_POW] | var_a = 11
var_b = 2
var_c = var_a ** var_b
print(int(var_c)) |
Correspondence | If A45+27B=418 is true, what number should go in B? | 3 | A45+27B=418 B [OP_DIGIT_UNK_SOLVER] | var_a = 'A45+27B=418'
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 | Find the number greater than or equal to 1.1 among the five numbers 1.4, 9/10, 1.2, 0.5, 13/10, and find the number of those numbers. | 3 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE_EQUAL] [OP_LIST_LEN] | 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 = len(list_b)
print(int(var_g)) |
Geometry | It is said that the snail at the bottom of the well climbs 25 centimeters (cm) during the day and slides 3 centimeters (cm) at night. On day 64, find the depth of the well when the snail crawled 25 centimeters (cm) out of the well during the day. | 1411 | 25 64 [OP_MUL] 3 64 1 [OP_SUB] [OP_MUL] [OP_SUB] | var_a = 25
var_b = 64
var_c = var_a * var_b
var_d = 3
var_e = 64
var_f = 1
var_g = var_e - var_f
var_h = var_d * var_g
var_i = var_c - var_h
print(int(var_i)) |
Arithmetic calculation | If you add 6 marbles in the drawer and the marbles on the desk, you have 8 marbles in all. How many marbles are on the desk? | 2 | 8 6 [OP_SUB] | var_a = 8
var_b = 6
var_c = var_a - var_b
print(int(var_c)) |
Arithmetic calculation | You are trying to find a three-digit number that is divisible by 3 and 4 and dividing by 5 gives a remainder of 4. How many three-digit numbers can you make? | 15 | 100 999 1 [OP_LIST_ARANGE] 3 4 [OP_LCM] [OP_LIST_DIVISIBLE] 5 4 [OP_LIST_DIVIDE_AND_REMAIN] [OP_LIST_LEN] | var_a = 100
var_b = 999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
var_e = 4
var_f = var_e * var_d / math.gcd(int(var_e), int(var_d))
list_b = []
var_f = int(var_f)
for i in list_a:
i = int(i)
if i % var_f == 0:
list_b.append(i)
var_g = 5
var_h = 4
list_c = []
var_g = int(var_g)
var_h = int(var_h)
if var_h < 0:
var_h = var_h + var_g
for i in list_b:
i = int(i)
if i%var_g == var_h:
list_c.append(i)
var_i = len(list_c)
print(int(var_i)) |
Geometry | Nine people are standing in a line, in order from shortest to tallest. Hoseok is the fourth shortest person. If they were to line up again in order from tallest to shortest, where would Hoseok be standing from the back? | 4 | 4 | var_a = 4
print(int(var_a)) |
Possibility | Two were removed from a basket containing one each of apple, peach, pear, and melon. How many cases of fruit are left in the basket? | 6 | [OP_LIST_SOL] apple peach pear melon [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_COMB] | var_a = 'apple'
var_b = 'peach'
var_c = 'pear'
var_d = 'melon'
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = len(list_a)
var_f = 2
var_g = 1
var_e = int(var_e)
var_f = int(var_f)
for i, elem in enumerate(range(var_f)):
var_g = var_g * (var_e-i)
for i, elem in enumerate(range(var_f)):
var_g = var_g / (i+1)
print(int(var_g)) |
Correspondence | When A is divided by 3, the quotient is 8 and the remainder is 2. A is a natural number. What is A? | 26 | 3 8 [OP_MUL] 2 [OP_ADD] | var_a = 3
var_b = 8
var_c = var_a * var_b
var_d = 2
var_e = var_c + var_d
print(int(var_e)) |
Comparison | Cheolsu bought 230 milliliters (ml) of cooking oil, and Jimin bought 123 milliliters (ml). Who bought more cooking oil? | Cheolsu | [OP_LIST_SOL] Cheolsu Jimin [OP_LIST_EOL] [OP_LIST_SOL] 230 123 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Cheolsu'
var_b = 'Jimin'
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 = 230
var_d = 123
list_b= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = list_b.index(var_f)+1
var_h = list_a[var_g-1]
print(var_h) |
Correspondence | When you divide a number by 9, you get a result of 8. What do you get from adding 11 to the 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)) |
Arithmetic calculation | There are 32 dogs in the zoo. Among them, males make up 5/8 of the total. Among males, Chihuahuas account for 3/4 of all males. Of the total dogs in the zoo, how many are non-Chihuahua males? | 5 | 32 5/8 [OP_MUL] 1 3/4 [OP_SUB] [OP_MUL] | var_a = 32
var_b = 0.625
var_c = var_a * var_b
var_d = 1
var_e = 0.75
var_f = var_d - var_e
var_g = var_c * var_f
print(int(var_g)) |
Arithmetic calculation | Yuna went to the stationery store. She bought a notebook with half of the money she took, and she spent half of the remaining money on a pencil. If the remaining money is 800 won, how much money did Yuna take at the beginning? | 3200 | 800 2 [OP_MUL] 2 [OP_MUL] | var_a = 800
var_b = 2
var_c = var_a * var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Possibility | How many four-digit numbers can be formed by using even numbers less than 10 once? | 36 | 0 10 1 [OP_SUB] [OP_LIST_EVEN] 4 [OP_LIST_GET_PERM] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 0
var_b = 10
var_c = 1
var_d = var_b - var_c
list_a = []
if var_a%2!=0:
for i in range(var_a+1, var_d+1, 2):
list_a.append(i)
else:
for i in range(var_a, var_d+1, 2):
list_a.append(i)
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 = []
var_f = int(var_f)
for i in list_b:
i = int(i)
if i % var_f == 0:
list_c.append(i)
var_g = len(list_c)
print(int(var_g)) |
Arithmetic calculation | A ball dropped from 3.05 meters (m) bounces 0.7 of its height. Find how many meters (m) the ball moves until it hits the ground for the third time. | 10.31 | 3.05 3.05 0.7 [OP_MUL] 2 [OP_MUL] [OP_ADD] 3.05 0.7 2 [OP_POW] [OP_MUL] 2 [OP_MUL] [OP_ADD] | var_a = 3.05
var_b = 3.05
var_c = 0.7
var_d = var_b * var_c
var_e = 2
var_f = var_d * var_e
var_g = var_a + var_f
var_h = 3.05
var_i = 0.7
var_j = 2
var_k = var_i ** var_j
var_l = var_h * var_k
var_m = 2
var_n = var_l * var_m
var_o = var_g + var_n
print('{:.2f}'.format(round(var_o+1e-10,2))) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. Which number is the second largest? | 13 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 2 [OP_LIST_MAX] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
var_e = 14
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 2
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
print(int(var_g)) |
Possibility | Find the sum of the largest and the third largest three-digit number that can be made using the all the numbers 1, 6, and 8 once. | 1479 | [OP_LIST_SOL] 1 6 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 3 [OP_LIST_GET] [OP_ADD] | var_a = 1
var_b = 6
var_c = 8
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 3
var_h = list_b[var_g-1]
var_i = var_f + var_h
print(int(var_i)) |
Arithmetic calculation | Which four-digit number is the largest among multiples of 3? | 9999 | 1000 9999 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MAX] | 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]
print(int(var_f)) |
Arithmetic calculation | One hotteok requires 6.64 grams (g) of dough. Find the maximum number of hotteok you can make using 212.48 grams (g) of dough. | 32 | 212.48 6.64 [OP_FDIV] | var_a = 212.48
var_b = 6.64
var_c = var_a // var_b
print(int(var_c)) |
Arithmetic calculation | There were 52 kilograms (kg) of rice. I ate 9 kilograms (kg) each day for 3 days. How many kilograms (kg) of rice are left? | 25 | 52 3 9 [OP_MUL] [OP_SUB] | var_a = 52
var_b = 3
var_c = 9
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e)) |
Arithmetic calculation | There are three numbers 10, 11 and 12. Which number is the smallest? | 10 | [OP_LIST_SOL] 10 11 12 [OP_LIST_EOL] 1 [OP_LIST_MIN] | var_a = 10
var_b = 11
var_c = 12
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 1
list_b=list_a.copy()
list_b.sort()
var_e = list_b[var_d-1]
print(int(var_e)) |
Possibility | Yoongi wants to buy 3 out of 5 books at the bookstore. How many possible ways can Yoongi buy 3 books? | 10 | 5 3 [OP_COMB] | var_a = 5
var_b = 3
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
for i, elem in enumerate(range(var_b)):
var_c = var_c / (i+1)
print(int(var_c)) |
Comparison | Students lined up to go to the pool. Yoojeong stands in the 5th position, and Hoseok stands right behind Yoojeong. What number does Hoseok stand on? | 6 | 5 1 [OP_ADD] | var_a = 5
var_b = 1
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | Find the number of cases when a dice is rolled, and the number that comes up is an odd number and a multiple of 3. | 1 | 1 6 [OP_LIST_ODD] 3 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 1
var_b = 6
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)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.