category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Arithmetic calculation | 2 rabbits eat 4 carrots a day. How many days will it take for 3 rabbits to eat 54 carrots? | 9 | 54 4 2 [OP_DIV] 3 [OP_MUL] [OP_DIV] | var_a = 54
var_b = 4
var_c = 2
var_d = var_b / var_c
var_e = 3
var_f = var_d * var_e
var_g = var_a / var_f
print(int(var_g)) |
Possibility | Find the sum of the smallest and fourth smallest three-digit numbers that can be made by drawing three different numbers from 2, 0, 7, 5, and 9. | 455 | [OP_LIST_SOL] 2 0 7 5 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 1 [OP_LIST_MIN] 4 [OP_LIST_MIN] [OP_ADD] | var_a = 2
var_b = 0
var_c = 7
var_d = 5
var_e = 9
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_f))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = 4
list_d=list_b.copy()
list_d.sort()
var_j = list_d[var_i-1]
var_k = var_h + var_j
print(int(var_k)) |
Correspondence | Dividing 3 times of a certain number by 5, and subtracting 220, and multiplying that by 4 resulted in 320. Find out that number in question. | 500 | 320 4 [OP_DIV] 220 [OP_ADD] 5 [OP_MUL] 3 [OP_DIV] | var_a = 320
var_b = 4
var_c = var_a / var_b
var_d = 220
var_e = var_c + var_d
var_f = 5
var_g = var_e * var_f
var_h = 3
var_i = var_g / var_h
print(int(var_i)) |
Geometry | We want to draw a circle with a radius of 2 centimeters (cm) inside a square with a side length of 8 centimeters (cm) without overlapping. How many can you draw in all? | 4 | 8 2 2 [OP_MUL] [OP_DIV] 2 [OP_POW] | var_a = 8
var_b = 2
var_c = 2
var_d = var_b * var_c
var_e = var_a / var_d
var_f = 2
var_g = var_e ** var_f
print(int(var_g)) |
Possibility | There are five number cards 1, 3, 5, 7, and 9. How many three-digit natural numbers that can be made using this card are greater than 500? (However, the card can be used repeatedly.) | 75 | [OP_LIST_SOL] 1 3 5 7 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PRODUCT] 500 [OP_LIST_MORE] [OP_LIST_LEN] | var_a = 1
var_b = 3
var_c = 5
var_d = 7
var_e = 9
list_a= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_f = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.product(list_b, repeat=var_f))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_g = 500
list_c = []
for i in list_b:
if i > var_g:
list_c.append(i)
var_h = len(list_c)
print(int(var_h)) |
Possibility | Using 3 of 4, 5, 8, and 9, what is the second smallest number whose hundredth place is 5? | 459 | [OP_LIST_SOL] 4 5 8 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 10 5 [OP_LIST_SEARCH_FIXED_DIGIT] 2 [OP_LIST_MIN] | var_a = 4
var_b = 5
var_c = 8
var_d = 9
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 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)) |
Comparison | Yujeong had 4 erasers, and she got 3 more from her sister. Eunji gave 7 of the 13 erasers she had to her sister. Who has more erasers, Yujeong or Eunji? | Yujeong | [OP_LIST_SOL] Yujeong Eunji [OP_LIST_EOL] [OP_LIST_SOL] 4 3 [OP_ADD] 13 7 [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yujeong'
var_b = 'Eunji'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 4
var_d = 3
var_e = var_c + var_d
var_f = 13
var_g = 7
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) |
Possibility | When three different numbers are drawn from 4, 0, 9, and 8 to form a three-digit number, find the third smallest number among them. | 480 | [OP_LIST_SOL] 4 0 9 8 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 3 [OP_LIST_MIN] | var_a = 4
var_b = 0
var_c = 9
var_d = 8
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 3
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_e))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_f = 3
list_c=list_b.copy()
list_c.sort()
var_g = list_c[var_f-1]
print(int(var_g)) |
Comparison | Taehyung entered the house as the 13th person, and Seokjin entered the house as the 18th person after Taehyung. How many times did Seokjin enter the house? | 31 | 13 18 [OP_ADD] | var_a = 13
var_b = 18
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | There are 18 boxes that can fit 15 masks. If there are 3 masks lacking in each box, what is the total number of masks? | 216 | 15 3 [OP_SUB] 18 [OP_MUL] | var_a = 15
var_b = 3
var_c = var_a - var_b
var_d = 18
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | In the calculation of adding two-digit numbers, the number 7 in the ones was mistaken for 1 and the number 4 in the tens was mistaken for 6, and the result was 146. Find out the result when correctly calculated. | 132 | 146 10 4 6 [OP_SUB] [OP_MUL] [OP_ADD] 1 7 1 [OP_SUB] [OP_MUL] [OP_ADD] | var_a = 146
var_b = 10
var_c = 4
var_d = 6
var_e = var_c - var_d
var_f = var_b * var_e
var_g = var_a + var_f
var_h = 1
var_i = 7
var_j = 1
var_k = var_i - var_j
var_l = var_h * var_k
var_m = var_g + var_l
print(int(var_m)) |
Comparison | Among 1/4, 0.2, 1/3, 2/7, 0.25, and 1/6, how many are less than or equal to 0.3? | 5 | [OP_LIST_SOL] 1/4 0.2 1/3 2/7 0.25 1/6 [OP_LIST_EOL] 0.3 [OP_LIST_LESS_EQUAL] [OP_LIST_LEN] | var_a = 0.25
var_b = 0.2
var_c = 0.3333333333333333
var_d = 0.2857142857142857
var_e = 0.25
var_f = 0.16666666666666666
list_a= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_g = 0.3
list_b = []
for i in list_a:
if i <= var_g:
list_b.append(i)
var_h = len(list_b)
print(int(var_h)) |
Arithmetic calculation | Injun has a running race. If Injun runs for 20 seconds without stopping, he can run 150 meters (m). How many meters (m) can Injun run for 1 minute without rest? | 450 | 1 60 [OP_MUL] 20 [OP_DIV] 150 [OP_MUL] | var_a = 1
var_b = 60
var_c = var_a * var_b
var_d = 20
var_e = var_c / var_d
var_f = 150
var_g = var_e * var_f
print(int(var_g)) |
Correspondence | If A82+B4=216 is valid, what number should go in A? | 1 | A82+B4=216 A [OP_DIGIT_UNK_SOLVER] | var_a = 'A82+B4=216'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Possibility | When 4 students who are Hyunji, Eunjeong, Migeum, and Youngmi are lined up in a row, find the number of cases where Eunjeong stands at the front or at the back. | 12 | [OP_LIST_SOL] Hyunji Eunjeong Migeum Youngmi [OP_LIST_EOL] [OP_LIST_SOL] Eunjeong [OP_LIST_EOL] [OP_SET_DIFFERENCE] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] [OP_LIST_SOL] Front Back [OP_LIST_EOL] [OP_LIST_LEN] [OP_MUL] | var_a = 'Hyunji'
var_b = 'Eunjeong'
var_c = 'Migeum'
var_d = 'Youngmi'
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 = 'Eunjeong'
list_b= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
list_c = list(set(list_a) - set(list_b))
var_f = len(list_c)
var_g = len(list_c)
var_h = 1
var_f = int(var_f)
var_g = int(var_g)
for i, elem in enumerate(range(var_g)):
var_h = var_h * (var_f-i)
var_i = 'Front'
var_j = 'Back'
list_d= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_d.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_d.append(var_i)
list_d.reverse()
var_k = len(list_d)
var_l = var_h * var_k
print(int(var_l)) |
Correspondence | AB3+36=269. How much is A? | 2 | AB3+36=269 A [OP_DIGIT_UNK_SOLVER] | var_a = 'AB3+36=269'
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 | The sum of A4 and 3B is 79. what is A? | 4 | A4+3B=79 A [OP_DIGIT_UNK_SOLVER] | var_a = 'A4+3B=79'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Possibility | You want to create an eight-digit number by using the four numbers 4, 0, 2, and 6 twice. Find the sum of the largest and smallest possible numbers. | 86466666 | [OP_LIST_SOL] 4 4 0 0 2 2 6 6 [OP_LIST_EOL] 8 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD] | var_a = 4
var_b = 4
var_c = 0
var_d = 0
var_e = 2
var_f = 2
var_g = 6
var_h = 6
list_a= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_a.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_a.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_a.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_a.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_i = 8
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_i))
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_j = 1
list_c=list_b.copy()
list_c.sort()
var_k = list_c[-var_j]
var_l = 1
list_d=list_b.copy()
list_d.sort()
var_m = list_d[var_l-1]
var_n = var_k + var_m
print(int(var_n)) |
Possibility | I'm trying to find a two-digit number that is divisible by 3 and 4 and has a remainder of 4 when divided by 5. How many two-digit numbers can you make? | 2 | 10 99 1 [OP_LIST_ARANGE] 3 4 [OP_LCM] [OP_LIST_DIVISIBLE] 5 4 [OP_LIST_DIVIDE_AND_REMAIN] [OP_LIST_LEN] | var_a = 10
var_b = 99
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)) |
Correspondence | The teacher distributes chocolate to students evenly. There will be the following leftovers when each 6, 8, and 10 are distributed with an equal amount of candies: 4, 6, and 8. What is the minimum number of chocolates the teacher has? | 118 | 0 9999 1 [OP_LIST_ARANGE] 6 4 [OP_LIST_DIVIDE_AND_REMAIN] 8 6 [OP_LIST_DIVIDE_AND_REMAIN] 10 8 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_MIN] | var_a = 0
var_b = 9999
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 6
var_e = 4
list_b = []
var_d = int(var_d)
var_e = int(var_e)
if var_e < 0:
var_e = var_e + var_d
for i in list_a:
i = int(i)
if i%var_d == var_e:
list_b.append(i)
var_f = 8
var_g = 6
list_c = []
var_f = int(var_f)
var_g = int(var_g)
if var_g < 0:
var_g = var_g + var_f
for i in list_b:
i = int(i)
if i%var_f == var_g:
list_c.append(i)
var_h = 10
var_i = 8
list_d = []
var_h = int(var_h)
var_i = int(var_i)
if var_i < 0:
var_i = var_i + var_h
for i in list_c:
i = int(i)
if i%var_h == var_i:
list_d.append(i)
var_j = 1
list_e=list_d.copy()
list_e.sort()
var_k = list_e[var_j-1]
print(int(var_k)) |
Geometry | How many vertices are there in a regular octahedron? | 6 | 6 | var_a = 6
print(int(var_a)) |
Arithmetic calculation | There are four numbers 10, 11, 12, and 13. What is the remainder of the largest number divided by the next largest number? | 1 | [OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MAX] [OP_MOD] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 2
list_c=list_a.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = var_f % var_h
print(int(var_i)) |
Correspondence | Subtracting some number from 913 gives 514. How much is 514 minus some number? | 115 | 514 913 514 [OP_SUB] [OP_SUB] | var_a = 514
var_b = 913
var_c = 514
var_d = var_b - var_c
var_e = var_a - var_d
print(int(var_e)) |
Correspondence | A number is multiples of 5, and when divided by 5, the quotient is 25. Find the value of subtracting 17 from the number and then 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)) |
Arithmetic calculation | You are going to put 235 bracelets in a bag of 10 each and sell them for 3,000 won. What is the maximum amount you can get for selling a bagged bracelet? | 69000 | 235 10 [OP_FDIV] 3000 [OP_MUL] | var_a = 235
var_b = 10
var_c = var_a // var_b
var_d = 3000
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | There are four numbers 10, 11, 12, and 13. What is the remainder of the largest number divided by the next largest number? | 130 | [OP_LIST_SOL] 10 11 12 13 [OP_LIST_EOL] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_MUL] | var_a = 10
var_b = 11
var_c = 12
var_d = 13
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 1
list_b=list_a.copy()
list_b.sort()
var_f = list_b[-var_e]
var_g = 1
list_c=list_a.copy()
list_c.sort()
var_h = list_c[var_g-1]
var_i = var_f * var_h
print(int(var_i)) |
Correspondence | I mistakenly added what should have subtracted 2.95 from a number, and I got 9.28. Find the correct calculated value. | 3.38 | 9.28 2.95 [OP_SUB] 2.95 [OP_SUB] | var_a = 9.28
var_b = 2.95
var_c = var_a - var_b
var_d = 2.95
var_e = var_c - var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Arithmetic calculation | When you put the snail on the table and measured the distance it moved for an hour, it was 4.25 centimeters (cm). After a few hours, the snail moved 29.75 centimeters (cm) from the position where the distance was measured earlier. How many hours have passed since the snail was placed on the table? | 8 | 29.75 4.25 [OP_ADD] 4.25 [OP_DIV] | var_a = 29.75
var_b = 4.25
var_c = var_a + var_b
var_d = 4.25
var_e = var_c / var_d
print(int(var_e)) |
Correspondence | When you subtract 2A from A5, you get B7. Find the sum of A and B | 13 | A5-2A=B7 A [OP_DIGIT_UNK_SOLVER] A5-2A=B7 B [OP_DIGIT_UNK_SOLVER] [OP_ADD] | var_a = 'A5-2A=B7'
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 = 'A5-2A=B7'
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)) |
Correspondence | A particular number multiplied by 4 results in 5/2. What number do you get when you divide that particular number by 5/24? | 3 | 5/2 4 [OP_DIV] 5/24 [OP_DIV] | var_a = 2.5
var_b = 4
var_c = var_a / var_b
var_d = 0.20833333333333334
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | A water tank has 13/4 liters (L) of water. You remove 12/5 liters (L) of water from the tank and then add back 11/6 liters (L) of water. Calculate the remaining amount of water in the tank in liters (L). | 2.68 | 13/4 12/5 [OP_SUB] 11/6 [OP_ADD] | var_a = 3.25
var_b = 2.4
var_c = var_a - var_b
var_d = 1.8333333333333333
var_e = var_c + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Possibility | There are four types of milk sold at a store: chocolate milk, strawberry milk, banana milk, and coffee milk. When selecting milk from this store, find the number of ways to select 2 cartons of milk, allowing duplicatio. | 10 | [OP_LIST_SOL] chocolate strawberry banana coffee [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_ADD] 1 [OP_SUB] 2 [OP_COMB] | var_a = 'chocolate'
var_b = 'strawberry'
var_c = 'banana'
var_d = 'coffee'
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 = var_e + var_f
var_h = 1
var_i = var_g - var_h
var_j = 2
var_k = 1
var_i = int(var_i)
var_j = int(var_j)
for i, elem in enumerate(range(var_j)):
var_k = var_k * (var_i-i)
for i, elem in enumerate(range(var_j)):
var_k = var_k / (i+1)
print(int(var_k)) |
Correspondence | The equation A82+3B=216 holds. What number should go in A? | 1 | A82+3B=216 A [OP_DIGIT_UNK_SOLVER] | var_a = 'A82+3B=216'
var_b = 'A'
ans_dict = dict()
var_a = var_a.replace('×','*')
var_a = var_a.replace('x','*')
var_a = var_a.replace('÷','/')
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 1
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
term_list = []
op_list = []
temp_c = ''
for tc in temp:
if tc not in '+-*/=><().':
temp_c += tc
else:
op_list.append(tc)
term_list.append(temp_c)
temp_c = ''
term_list.append(temp_c)
new_eq = ''
for i in range(len(op_list)):
new_eq += str(int(term_list[i]))+op_list[i]
new_eq += str(int(term_list[-1]))
if len(new_eq) == len(var_a):
new_eq=new_eq.replace('=', '==')
new_eq=new_eq.replace('>==', '>=')
new_eq=new_eq.replace('<==', '<=')
eval_result = False
try:
eval_result = eval(new_eq)
except:
pass
if eval_result:
for i, (k, _) in enumerate(ans_dict.items()):
ans_dict[k] = int(c[i])
var_c = ans_dict[var_b]
print(int(var_c)) |
Possibility | There are 5 marbles: red, blue, yellow, purple, and black. You want to choose two of these and give one to your younger brother and the other to your older brother as a gift. Find the number of cases in this situation. | 20 | 5 2 [OP_PERM] | var_a = 5
var_b = 2
var_c = 1
var_a = int(var_a)
var_b = int(var_b)
for i, elem in enumerate(range(var_b)):
var_c = var_c * (var_a-i)
print(int(var_c)) |
Arithmetic calculation | One bottle of grape juice contains 1 liter (L) and 200 milliliters (㎖). Three friends, Taeyeon, Jimin, and Jisoo, poured grape juice into a glass to share, and a friend complained about the difference in the amount of juice. If after the 200 milliliters (ml) of juice in Taeyeon's glass was poured into Jimin's glass and 100 milliliters (ml) into Jisoo's glass it became fair, how many milliliters (ml) of juice was originally in Jisoo's glass? | 300 | 1 1000 [OP_MUL] 200 [OP_ADD] 200 [OP_SUB] 100 [OP_SUB] 3 [OP_DIV] | var_a = 1
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 = 100
var_i = var_g - var_h
var_j = 3
var_k = var_i / var_j
print(int(var_k)) |
Arithmetic calculation | There is a two-digit natural number whose tens place is 3. Let A and B be the quotient of this number by 10 and the remainder of division by 10, respectively. If B multiplied by 10 plus A is 9 less than A multiplied by 10 plus B, what is the first number? | 32 | 3 10 [OP_MUL] 9 [OP_SUB] 3 [OP_SUB] 10 1 [OP_SUB] [OP_DIV] 3 10 [OP_MUL] [OP_ADD] | var_a = 3
var_b = 10
var_c = var_a * var_b
var_d = 9
var_e = var_c - var_d
var_f = 3
var_g = var_e - var_f
var_h = 10
var_i = 1
var_j = var_h - var_i
var_k = var_g / var_j
var_l = 3
var_m = 10
var_n = var_l * var_m
var_o = var_k + var_n
print(int(var_o)) |
Correspondence | The four-digit number 14AB is divisible by 9. If A and B are different numbers from 0 to 9, how many numbers can be 14AB? | 11 | 14AB [OP_GEN_POSSIBLE_LIST] 9 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = '14AB'
ans_dict = dict()
var_a = str(var_a)
list_a = []
variable_candi = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
for v in set(var_a):
if v in variable_candi:
ans_dict[v] = 0
candi = list(itertools.product('0123456789', repeat=len(ans_dict)))
for c in candi:
temp = var_a
for i, (k, _) in enumerate(ans_dict.items()):
temp = temp.replace(k, str(c[i]))
if len(var_a) == len(str(int(temp))):
new_elem = int(temp)
list_a.append(new_elem)
var_b = 9
list_b = []
var_b = int(var_b)
for i in list_a:
i = int(i)
if i % var_b == 0:
list_b.append(i)
var_c = len(list_b)
print(int(var_c)) |
Correspondence | When you add 30 to a number, you get 55. What is the result of subtracting the number by 23? | 2 | 55 30 [OP_SUB] 23 [OP_SUB] | var_a = 55
var_b = 30
var_c = var_a - var_b
var_d = 23
var_e = var_c - var_d
print(int(var_e)) |
Possibility | Find the number of cases in which A or B is at the forefront when three of the four students are selected from A, B, C, and D and placed in a line. | 12 | [OP_LIST_SOL] A B [OP_LIST_EOL] [OP_LIST_LEN] 4 1 [OP_SUB] 3 1 [OP_SUB] [OP_COMB] [OP_MUL] 3 1 [OP_SUB] 3 1 [OP_SUB] [OP_PERM] [OP_MUL] | var_a = 'A'
var_b = 'B'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = len(list_a)
var_d = 4
var_e = 1
var_f = var_d - var_e
var_g = 3
var_h = 1
var_i = var_g - var_h
var_j = 1
var_f = int(var_f)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
var_j = var_j * (var_f-i)
for i, elem in enumerate(range(var_i)):
var_j = var_j / (i+1)
var_k = var_c * var_j
var_l = 3
var_m = 1
var_n = var_l - var_m
var_o = 3
var_p = 1
var_q = var_o - var_p
var_r = 1
var_n = int(var_n)
var_q = int(var_q)
for i, elem in enumerate(range(var_q)):
var_r = var_r * (var_n-i)
var_s = var_k * var_r
print(int(var_s)) |
Arithmetic calculation | Taeyeon and Yura solved the problem book. Taeyeon solved 16 questions a day for 7 days and Yura solved 25 questions a day for 6 days. How many problems did Taeyeon and Yura solve? | 262 | 16 7 [OP_MUL] 25 6 [OP_MUL] [OP_ADD] | var_a = 16
var_b = 7
var_c = var_a * var_b
var_d = 25
var_e = 6
var_f = var_d * var_e
var_g = var_c + var_f
print(int(var_g)) |
Arithmetic calculation | You want to place the desks at 3 meter (m) intervals on a 114 meter (m) playground. How many desks will you need in total if you place them at the beginning and at the end of the playground? | 39 | 114 3 [OP_DIV] 1 [OP_ADD] | var_a = 114
var_b = 3
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | Use the three number cards 3, 4, and 7 to create a three-digit number. In here, find the largest value among the numbers with 7 at the front. (However, you cannot use number cards repeatedly.) | 743 | [OP_LIST_SOL] 3 4 7 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 100 7 [OP_LIST_SEARCH_FIXED_DIGIT] 1 [OP_LIST_MAX] | var_a = 3
var_b = 4
var_c = 7
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 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 = 100
var_f = 7
list_c = []
var_e = int(var_e)
var_f = int(var_f)
for i in list_b:
i = int(i)
if (i//var_e)%10 == var_f:
list_c.append(i)
var_g = 1
list_d=list_c.copy()
list_d.sort()
var_h = list_d[-var_g]
print(int(var_h)) |
Arithmetic calculation | Four friends want to eat food and split the money equally. If you ate 5 fish-shaped bread which is 200 won each and 7 hotteoks which is 800 won each, how much would each person pay? | 1650 | 200 5 [OP_MUL] 800 7 [OP_MUL] [OP_ADD] 4 [OP_DIV] | var_a = 200
var_b = 5
var_c = var_a * var_b
var_d = 800
var_e = 7
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 4
var_i = var_g / var_h
print(int(var_i)) |
Possibility | Two of the numbers 3, 5, and 9 were drawn and used only once to create the largest two-digit number. Find the number twice as large as the two-digit number you created. | 190 | [OP_LIST_SOL] 3 5 9 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 1 [OP_LIST_MAX] 2 [OP_MUL] | var_a = 3
var_b = 5
var_c = 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 = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_d))
list_b = [''.join(num_list) for num_list in list_b]
list_b = [str_num for str_num in list_b if str_num[0] != '0']
list_b = [float(i) for i in list_b]
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[-var_e]
var_g = 2
var_h = var_f * var_g
print(int(var_h)) |
Arithmetic calculation | Yuna threaded 380 beads in an hour, and Eunji threaded 325 beads in an hour. When the two of them threaded beads at a constant speed for 8 hours, how many more beads did Yuna thread than Eunji? | 440 | 380 325 [OP_SUB] 8 [OP_MUL] | var_a = 380
var_b = 325
var_c = var_a - var_b
var_d = 8
var_e = var_c * var_d
print(int(var_e)) |
Comparison | At a constant speed, a bus travels a distance of 17.28 kilometers (km) in 16 minutes, and a car travels a distance of 8.52 kilometers (km) in 6 minutes. If a bus and a car start at the same time from the same place, which one will go farther after 15 minutes? | car | [OP_LIST_SOL] bus car [OP_LIST_EOL] [OP_LIST_SOL] 17.28 16 [OP_DIV] 15 [OP_MUL] 8.52 6 [OP_DIV] 15 [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'bus'
var_b = 'car'
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 = 17.28
var_d = 16
var_e = var_c / var_d
var_f = 15
var_g = var_e * var_f
var_h = 8.52
var_i = 6
var_j = var_h / var_i
var_k = 15
var_l = var_j * var_k
list_b= []
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_m = 1
list_c=list_b.copy()
list_c.sort()
var_n = list_c[-var_m]
var_o = list_b.index(var_n)+1
var_p = list_a[var_o-1]
print(var_p) |
Comparison | What is the sum of the numbers greater than 1.1 in 1.4, 9/10, 1.2, 0.5, and 13/10? | 3.9 | [OP_LIST_SOL] 1.4 9/10 1.2 0.5 13/10 [OP_LIST_EOL] 1.1 [OP_LIST_MORE] [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))) |
Geometry | Taeyoung and Minji have the same length of wire. Using all of these wires without overlapping each other, Taeyoung made a regular hexagon with a side length of 4 centimeters (cm), and Minji made a square. What is the area of Minji's square in square centimeters (cm2) ? | 36 | 4 6 [OP_MUL] 4 [OP_DIV] 2 [OP_POW] | var_a = 4
var_b = 6
var_c = var_a * var_b
var_d = 4
var_e = var_c / var_d
var_f = 2
var_g = var_e ** var_f
print(int(var_g)) |
Possibility | Among Jungkook, Jimin, and Yoongi, you are going to vote 2 people by allowing duplication anonymously. How many possible cases are there? | 6 | [OP_LIST_SOL] Jungkook Jimin Yoongi [OP_LIST_EOL] [OP_LIST_LEN] 2 [OP_ADD] 1 [OP_SUB] 2 [OP_COMB] | var_a = 'Jungkook'
var_b = 'Jimin'
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 = len(list_a)
var_e = 2
var_f = var_d + var_e
var_g = 1
var_h = var_f - var_g
var_i = 2
var_j = 1
var_h = int(var_h)
var_i = int(var_i)
for i, elem in enumerate(range(var_i)):
var_j = var_j * (var_h-i)
for i, elem in enumerate(range(var_i)):
var_j = var_j / (i+1)
print(int(var_j)) |
Possibility | How many fractions with a two-digit denominator have the same magnitude as 7/8? | 11 | 10 99 1 [OP_LIST_ARANGE] 8 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 10
var_b = 99
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 8
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 = len(list_b)
print(int(var_e)) |
Geometry | Among faces in a cube, find the number of pairs of faces that are parallel to each other. | 3 | 6 2 [OP_DIV] | var_a = 6
var_b = 2
var_c = var_a / var_b
print(int(var_c)) |
Arithmetic calculation | The sum of the number of marbles that Yunjae and Minjeong have is 43, and Yunjae has 5 more than Minjeong. Find how many marbles Minjeong has. | 19 | 43 5 [OP_SUB] 2 [OP_DIV] | var_a = 43
var_b = 5
var_c = var_a - var_b
var_d = 2
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | Find the number of natural numbers between 30 and 50. | 21 | 30 50 1 [OP_LIST_ARANGE] [OP_LIST_LEN] | var_a = 30
var_b = 50
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = len(list_a)
print(int(var_d)) |
Arithmetic calculation | Among 48 children, 38 children could do A and 29 children could do B. How many children can do both A and B if there is no child who can neither A nor B? | 19 | 38 29 [OP_ADD] 48 [OP_SUB] | var_a = 38
var_b = 29
var_c = var_a + var_b
var_d = 48
var_e = var_c - var_d
print(int(var_e)) |
Correspondence | The number is two digits between 70 and 80. This number is divisible by 8. Find the number. | 72 | 70 1 [OP_ADD] 80 1 [OP_SUB] 1 [OP_LIST_ARANGE] 8 [OP_LIST_DIVISIBLE] 1 [OP_LIST_GET] | var_a = 70
var_b = 1
var_c = var_a + var_b
var_d = 80
var_e = 1
var_f = var_d - var_e
var_g = 1
list_a = [i for i in range(var_c, var_f + 1, var_g)]
var_h = 8
list_b = []
var_h = int(var_h)
for i in list_a:
i = int(i)
if i % var_h == 0:
list_b.append(i)
var_i = 1
var_j = list_b[var_i-1]
print(int(var_j)) |
Comparison | How many three-digit numbers with a hundredth digit of 3 and less than 306? | 6 | 3 100 [OP_MUL] 3 100 [OP_MUL] 99 [OP_ADD] 1 [OP_LIST_ARANGE] 306 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 3
var_b = 100
var_c = var_a * var_b
var_d = 3
var_e = 100
var_f = var_d * var_e
var_g = 99
var_h = var_f + var_g
var_i = 1
list_a = [i for i in range(var_c, var_h + 1, var_i)]
var_j = 306
list_b = []
for i in list_a:
if i < var_j:
list_b.append(i)
var_k = len(list_b)
print(int(var_k)) |
Arithmetic calculation | Grandpa bought 15 apples and gave 7 of them to Yoongi. How many apples are left for Grandpa? | 8 | 15 7 [OP_SUB] | var_a = 15
var_b = 7
var_c = var_a - var_b
print(int(var_c)) |
Comparison | There are three numbers A, B and C. A is the number of 4 groups of 10 and 8 units. B is one less than 50. C is 7 greater than 40. Which number is the largest? | B | [OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_SOL] 10 4 [OP_MUL] 8 [OP_ADD] 50 1 [OP_SUB] 40 7 [OP_ADD] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'A'
var_b = 'B'
var_c = 'C'
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 = 10
var_e = 4
var_f = var_d * var_e
var_g = 8
var_h = var_f + var_g
var_i = 50
var_j = 1
var_k = var_i - var_j
var_l = 40
var_m = 7
var_n = var_l + var_m
list_b= []
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_o = 1
list_c=list_b.copy()
list_c.sort()
var_p = list_c[-var_o]
var_q = list_b.index(var_p)+1
var_r = list_a[var_q-1]
print(var_r) |
Comparison | Jimin was presented with (a) box and (b) box. Which box is lighter when (b) box is heavier than (a) box? | (a) | [OP_LIST_SOL] (a) (b) [OP_LIST_EOL] [OP_LIST_SOL] (a) (b) < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = '(a)'
var_b = '(b)'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = '(a)'
var_d = '(b)'
var_e = '<'
list_b= []
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_b.append(var_c)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
if cond_ in ("<", ">", "="):
operand_right = temp_stack.pop()
operand_left = temp_stack.pop()
if cond_ == "=":
cond_ = "=="
conditions.append(f"{operand_left} {cond_} {operand_right}")
else:
if not cond_.isdigit():
cond_ = "{" + cond_ + "}"
temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
item_name_index_dict = dict(zip(items_name_list, perm))
formatted_conditions = \
[condition.format_map(item_name_index_dict) for condition in conditions]
if all(map(eval, formatted_conditions)):
break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_f = len(list_c)
var_g = list_c[var_f-1]
print(var_g) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. What is the smallest number multiplied by the next smallest number? | 110 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 1 [OP_LIST_MIN] 2 [OP_LIST_MIN] [OP_MUL] | 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 = 1
list_b=list_a.copy()
list_b.sort()
var_g = list_b[var_f-1]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g * var_i
print(int(var_j)) |
Arithmetic calculation | Seokgi buys school supplies with half of his money and sweets with the other half of his remaining money. If Seokgi has 1250 won left over after buying sweets, how much money did he have at the beginning? | 5000 | 1250 2 [OP_MUL] 2 [OP_MUL] | var_a = 1250
var_b = 2
var_c = var_a * var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Geometry | Pencils and ballpoint pens were arranged in 10 rows both horizontally and vertically. If you place a ballpoint pen around the perimeter and a pencil inside, how many pencils are there in all? | 64 | 10 2 [OP_SUB] 2 [OP_POW] | 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)) |
Correspondence | When you mistakenly add a certain number that should be multiplied by 3, the result is 226. Find out the value if you calculate it correctly. | 669 | 226 3 [OP_SUB] 3 [OP_MUL] | var_a = 226
var_b = 3
var_c = var_a - var_b
var_d = 3
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | At A345>5555, we want to write the numbers 1 through 9 in A. How many digits can you write in A? | 4 | A345>5555 A [OP_DIGIT_UNK_SOLVER] [OP_LIST_LEN] | var_a = 'A345>5555'
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 | It is 1 kilometer (km) 700 meters (m) from Shinyoung's house to the village office, and the distance from the village office to the school is 900 meters (m). How far is the midpoint of the distance starting from Shin-Young's house to the district office through the school, from Shin-Young's house in meters (m)? | 1300 | 1 1000 [OP_MUL] 700 [OP_ADD] 900 [OP_ADD] 2 [OP_DIV] | var_a = 1
var_b = 1000
var_c = var_a * var_b
var_d = 700
var_e = var_c + var_d
var_f = 900
var_g = var_e + var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i)) |
Comparison | Doyeon estimated 1 liter (L) of grape juice as 1100 milliliters (㎖) and Mingyu estimated it as 850 milliliters (㎖). Which of the two people came closer to estimating the amount of juice? | Doyeon | [OP_LIST_SOL] Doyeon Mingyu [OP_LIST_EOL] [OP_LIST_SOL] 1000 1100 [OP_SUB] [OP_ABS] 1000 850 [OP_SUB] [OP_ABS] [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Doyeon'
var_b = 'Mingyu'
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 = 1000
var_d = 1100
var_e = var_c - var_d
var_f = abs(var_e)
var_g = 1000
var_h = 850
var_i = var_g - var_h
var_j = abs(var_i)
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
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-1]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Geometry | Find the number of all diagonals of the octadecagon. | 135 | 18 18 3 [OP_SUB] [OP_MUL] 2 [OP_DIV] | var_a = 18
var_b = 18
var_c = 3
var_d = var_b - var_c
var_e = var_a * var_d
var_f = 2
var_g = var_e / var_f
print(int(var_g)) |
Arithmetic calculation | When you add a number plus 3/5 of that number, you get 240. What number is it? | 150 | 240 1 3/5 [OP_ADD] [OP_DIV] | var_a = 240
var_b = 1
var_c = 0.6
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e)) |
Comparison | Hanbyeol and Seulgi ran. During the same period, Hanbyeol ran 10.2 kilometers (km) at 1/100, and Seulgi ran 100 meters (m). Who ran more? | Hanbyeol | [OP_LIST_SOL] Hanbyeol Seulgi [OP_LIST_EOL] [OP_LIST_SOL] 10.2 1000 [OP_MUL] 100 [OP_DIV] 100 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Hanbyeol'
var_b = 'Seulgi'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 10.2
var_d = 1000
var_e = var_c * var_d
var_f = 100
var_g = var_e / var_f
var_h = 100
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Arithmetic calculation | Jungkook is 12 years younger than his uncle. Three years later, Jungkook and his uncle's combined ages will be 38 years old. How old is Jungkook this year? | 10 | 38 3 2 [OP_MUL] [OP_SUB] 12 [OP_SUB] 2 [OP_DIV] | var_a = 38
var_b = 3
var_c = 2
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 12
var_g = var_e - var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i)) |
Arithmetic calculation | There are 17 (a) candies and 19 (b) candies in the bag. If you distribute these candies in this bag equally to 9 people regardless of type, how many candies can each person get? | 4 | 17 19 [OP_ADD] 9 [OP_FDIV] | var_a = 17
var_b = 19
var_c = var_a + var_b
var_d = 9
var_e = var_c // var_d
print(int(var_e)) |
Correspondence | A, B, and C are different numbers. 1 is 8 less than C, and adding 5 to A is equal to B. If 9 minus 4 is A, what is the difference between B and C? | 1 | 9 4 [OP_SUB] 5 [OP_ADD] 8 1 [OP_ADD] [OP_SUB] | var_a = 9
var_b = 4
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
var_f = 8
var_g = 1
var_h = var_f + var_g
var_i = var_e - var_h
print(int(var_i)) |
Correspondence | ABCDE divided by 6 equals 13579 with a remainder of 0. Add DE to ABC of the five-digit number ABCDE. | 888 | 6 13579 [OP_MUL] [OP_NUM2LIST] 1 [OP_LIST_GET] 100 [OP_MUL] 2 [OP_LIST_GET] 10 [OP_MUL] 3 [OP_LIST_GET] [OP_ADD] [OP_ADD] 4 [OP_LIST_GET] 10 [OP_MUL] 5 [OP_LIST_GET] [OP_ADD] [OP_ADD] | var_a = 6
var_b = 13579
var_c = var_a * var_b
list_a = []
var_c = int(var_c)
while var_c//10 > 0:
list_a.append(var_c%10)
var_c = var_c//10
list_a.append(var_c%10)
list_a = list_a[::-1]
var_d = 1
var_e = list_a[var_d-1]
var_f = 100
var_g = var_e * var_f
var_h = 2
var_i = list_a[var_h-1]
var_j = 10
var_k = var_i * var_j
var_l = 3
var_m = list_a[var_l-1]
var_n = var_k + var_m
var_o = var_g + var_n
var_p = 4
var_q = list_a[var_p-1]
var_r = 10
var_s = var_q * var_r
var_t = 5
var_u = list_a[var_t-1]
var_v = var_s + var_u
var_w = var_o + var_v
print(int(var_w)) |
Correspondence | There are 100 monks and 100 dumplings, and we handed out 3 dumplings per each great monk and 1 dumpling for every three little monks. When there are no monks that did not receive dumpling, how many great monks are there? | 25 | 100 3 [OP_MUL] 100 [OP_SUB] 3 3 [OP_MUL] 1 [OP_SUB] [OP_DIV] | var_a = 100
var_b = 3
var_c = var_a * var_b
var_d = 100
var_e = var_c - var_d
var_f = 3
var_g = 3
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)) |
Correspondence | When 15 is multiplied by a certain number, the result is 45. What is the result of subtracting 1 from the certain number? | 2 | 45 15 [OP_DIV] 1 [OP_SUB] | var_a = 45
var_b = 15
var_c = var_a / var_b
var_d = 1
var_e = var_c - var_d
print(int(var_e)) |
Comparison | There are two numbers 0.8 and 1/2. How many numbers are greater than 3? | 0 | [OP_LIST_SOL] 0.8 1/2 [OP_LIST_EOL] 3 [OP_LIST_MORE] [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 = 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)) |
Arithmetic calculation | There is a ball that bounces 1/3 of the height it fell. The ball was dropped from a height of 2+4/7 meters (m). What is the height in meters (m) when the ball hits the ground and bounces back to its maximum? | 0.86 | 2 4/7 [OP_ADD] 1/3 [OP_MUL] | var_a = 2
var_b = 0.5714285714285714
var_c = var_a + var_b
var_d = 0.3333333333333333
var_e = var_c * var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | A number with 5 1s, 7 0.1s, 21 0.01s, and 53 0.001s equals 1/10 of the variable. How much is the variable including the decimal point? | 59.63 | 1 5 [OP_MUL] 0.1 7 [OP_MUL] [OP_ADD] 0.01 21 [OP_MUL] [OP_ADD] 0.001 53 [OP_MUL] [OP_ADD] 1/10 [OP_DIV] | var_a = 1
var_b = 5
var_c = var_a * var_b
var_d = 0.1
var_e = 7
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 0.01
var_i = 21
var_j = var_h * var_i
var_k = var_g + var_j
var_l = 0.001
var_m = 53
var_n = var_l * var_m
var_o = var_k + var_n
var_p = 0.1
var_q = var_o / var_p
print('{:.2f}'.format(round(var_q+1e-10,2))) |
Geometry | There are eight rectangular-shaped parks in Hyeonju's neighborhood. The length of all libraries is the same with 300 meters (m) and the area is the same as well, and if the sum of the areas of the libraries is 0.6 square kilometers (km2), what is the width of the library in meters (m)? | 250 | 0.6 1000 1000 [OP_MUL] [OP_MUL] 8 [OP_DIV] 300 [OP_DIV] | var_a = 0.6
var_b = 1000
var_c = 1000
var_d = var_b * var_c
var_e = var_a * var_d
var_f = 8
var_g = var_e / var_f
var_h = 300
var_i = var_g / var_h
print(int(var_i)) |
Correspondence | You want to write an even number from 1 to 100. How many times should the number 0 be written in all? | 26 | 1 200 [OP_LIST_EVEN] [OP_LIST2NUM] [OP_NUM2LIST] 0 [OP_LIST_FIND_NUM] | 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)
var_c=""
for i in list_a:
i = str(i)
var_c = var_c + i
list_b = []
var_c = int(var_c)
while var_c//10 > 0:
list_b.append(var_c%10)
var_c = var_c//10
list_b.append(var_c%10)
list_b = list_b[::-1]
var_d = 0
var_e = 0
var_d = int(var_d)
for i in list_b:
i = int(i)
if i == var_d:
var_e = var_e + 1
print(int(var_e)) |
Possibility | You want to paint each of the 5 fences with one of 3 different colors of paint. How many ways can you paint? | 243 | 3 5 [OP_POW] | var_a = 3
var_b = 5
var_c = var_a ** var_b
print(int(var_c)) |
Geometry | Some numbers are multiples of 3 and multiples of 4. Find the smallest of all possible numbers. | 12 | 3 4 [OP_LCM] | var_a = 3
var_b = 4
var_c = var_b * var_a / math.gcd(int(var_b), int(var_a))
print(int(var_c)) |
Geometry | What is the sum of the sides of a hexagon, triangle, and quadrilateral? | 13 | 6 3 [OP_ADD] 4 [OP_ADD] | var_a = 6
var_b = 3
var_c = var_a + var_b
var_d = 4
var_e = var_c + var_d
print(int(var_e)) |
Comparison | Yumi walked 8 kilometers (km) in 2 hours, and Woong walked 13 kilometers (km) in 3 hours. Which of the two walks faster? | Woong | [OP_LIST_SOL] Yumi Woong [OP_LIST_EOL] [OP_LIST_SOL] 24 2 [OP_DIV] 39 3 [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Yumi'
var_b = 'Woong'
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 = 24
var_d = 2
var_e = var_c / var_d
var_f = 39
var_g = 3
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) |
Correspondence | When 7 identical marbles were placed on a scale, and it read 50.68 grams (g). If you put 1 marble on the scale, what number will the scale indicate? | 7.24 | 50.68 7 [OP_DIV] | var_a = 50.68
var_b = 7
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Arithmetic calculation | When a basket containing several watermelons of the same weight was 63 kilograms (kg), its weight changed to 34 kilograms (kg) after half of the watermelon was removed. What is the weight of watermelons in total? | 58 | 63 34 [OP_SUB] 2 [OP_MUL] | var_a = 63
var_b = 34
var_c = var_a - var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Possibility | If you use the number cards 4, 5, and 6 once to form a 3-digit number less than 560, how many cases match the condition? | 3 | [OP_LIST_SOL] 4 5 6 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 560 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 4
var_b = 5
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 = 560
list_c = []
for i in list_b:
if i < var_e:
list_c.append(i)
var_f = len(list_c)
print(int(var_f)) |
Arithmetic calculation | Jungkook has 5 bundles of 8 pieces of colored paper. He is going to arrange this colored paper into 9 rows of 6 sheets each. How many more sheets of colored paper does he need? | 14 | 6 9 [OP_MUL] 8 5 [OP_MUL] [OP_SUB] | var_a = 6
var_b = 9
var_c = var_a * var_b
var_d = 8
var_e = 5
var_f = var_d * var_e
var_g = var_c - var_f
print(int(var_g)) |
Geometry | There is a trapezoid with an upper side of 10 centimeters (cm) and a lower side that is twice the length of the upper side. If the height of this trapezoid is 5 centimeters (cm), What is the area of this trapezoid in square centimeters (cm2)? | 75 | 10 10 2 [OP_MUL] [OP_ADD] 5 [OP_MUL] 2 [OP_DIV] | var_a = 10
var_b = 10
var_c = 2
var_d = var_b * var_c
var_e = var_a + var_d
var_f = 5
var_g = var_e * var_f
var_h = 2
var_i = var_g / var_h
print(int(var_i)) |
Geometry | The perimeter of a square with one side length of 80 centimeters (cm) is equal to the perimeter of a rectangle with a vertical length of 100 centimeters (cm). How many centimeters (cm) is the horizontal length of the rectangle? | 60 | 80 4 [OP_MUL] 2 [OP_DIV] 100 [OP_SUB] | var_a = 80
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
var_f = 100
var_g = var_e - var_f
print(int(var_g)) |
Correspondence | Hoseok multiplied a certain number by 8 to get 64. Find the result of multiplying this number by 7. | 56 | 64 8 [OP_DIV] 7 [OP_MUL] | var_a = 64
var_b = 8
var_c = var_a / var_b
var_d = 7
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | 12 boxes of 25 apples were sold in 4 days. On average, how many apples are sold per day? | 75 | 12 25 [OP_MUL] 4 [OP_DIV] | var_a = 12
var_b = 25
var_c = var_a * var_b
var_d = 4
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | There are five numbers 10, 11, 12, 13, and 14. What is the largest number divided by the second smallest number? | 1.27 | [OP_LIST_SOL] 10 11 12 13 14 [OP_LIST_EOL] 1 [OP_LIST_MAX] 2 [OP_LIST_MIN] [OP_DIV] | 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 = 1
list_b=list_a.copy()
list_b.sort()
var_g = list_b[-var_f]
var_h = 2
list_c=list_a.copy()
list_c.sort()
var_i = list_c[var_h-1]
var_j = var_g / var_i
print('{:.2f}'.format(round(var_j+1e-10,2))) |
Correspondence | 1A+4B3=469. How much is B? | 5 | 1A+4B3=469 B [OP_DIGIT_UNK_SOLVER] | var_a = '1A+4B3=469'
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 | Three students order snacks at a cafe. Sangwoo ordered 8 snacks and Jaehyuk ordered 10. Minsu bought more snacks than Sangwoo and less than Jaehyuk. How many snacks did Minsu buy? | 9 | 8 10 [OP_ADD] 2 [OP_FDIV] | var_a = 8
var_b = 10
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e)) |
Comparison | In the multiplication of two-digit numbers, the number 5 in the tens place of the multiplying number was mistakenly calculated as 3, and the product value was 1485. If the correctly calculated value is 2385, write the larger two-digit numbers. | 53 | [OP_LIST_SOL] 1485 2385 [OP_SUB] 3 5 [OP_SUB] 10 [OP_MUL] [OP_DIV] 2385 1485 2385 [OP_SUB] 3 5 [OP_SUB] 10 [OP_MUL] [OP_DIV] [OP_DIV] [OP_LIST_EOL] 1 [OP_LIST_MAX] | var_a = 1485
var_b = 2385
var_c = var_a - var_b
var_d = 3
var_e = 5
var_f = var_d - var_e
var_g = 10
var_h = var_f * var_g
var_i = var_c / var_h
var_j = 2385
var_k = 1485
var_l = 2385
var_m = var_k - var_l
var_n = 3
var_o = 5
var_p = var_n - var_o
var_q = 10
var_r = var_p * var_q
var_s = var_m / var_r
var_t = var_j / var_s
list_a= []
if "/" in str(var_t):
var_t = eval(str(var_t))
list_a.append(var_t)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_a.append(var_i)
list_a.reverse()
var_u = 1
list_b=list_a.copy()
list_b.sort()
var_v = list_b[-var_u]
print(int(var_v)) |
Correspondence | When you multiply a certain number by 8 and add 5400 and divide it by 12, the resulting quotient is 530. Find that number. | 120 | 530 12 [OP_MUL] 5400 [OP_SUB] 8 [OP_DIV] | var_a = 530
var_b = 12
var_c = var_a * var_b
var_d = 5400
var_e = var_c - var_d
var_f = 8
var_g = var_e / var_f
print(int(var_g)) |
Comparison | Jungkook, Yoojeong, and Seokjin are standing on the stairs. The stairs Jungkook is standing on are the 19th stairs. If Yoojeong climbed 8 steps higher than Jungkook and Seokjin climbed 5 steps less than Yoojung, how many steps is Seokjin higher than Jungkook? | 3 | 19 8 [OP_ADD] 5 [OP_SUB] 19 [OP_SUB] | var_a = 19
var_b = 8
var_c = var_a + var_b
var_d = 5
var_e = var_c - var_d
var_f = 19
var_g = var_e - var_f
print(int(var_g)) |
Correspondence | Yoongi got 15 after subtracting 46 from a certain number. Next, Hoseok subtracted 29 from this same number to get the result. What is the value of this result? | 32 | 15 46 [OP_ADD] 29 [OP_SUB] | var_a = 15
var_b = 46
var_c = var_a + var_b
var_d = 29
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | Find the sum of the largest and smallest odd numbers from 5 to 12. | 16 | 5 12 [OP_LIST_ODD] 1 [OP_LIST_MAX] 1 [OP_LIST_MIN] [OP_ADD] | var_a = 5
var_b = 12
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)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.