category
stringclasses 5
values | question
stringlengths 20
555
| answer
stringlengths 1
20
| solution_abst
stringlengths 1
287
| solution_code
stringlengths 27
5.97k
|
---|---|---|---|---|
Geometry | A cube has an edge length of 3 centimeters (cm). If a cube with an edge length of 1 centimeters (cm) is cut out from this cube as many times as the number of the faces of the cube, what is the volume of the remaining part? | 21 | 3 3 [OP_POW] 1 3 [OP_POW] 6 [OP_MUL] [OP_SUB] | var_a = 3
var_b = 3
var_c = var_a ** var_b
var_d = 1
var_e = 3
var_f = var_d ** var_e
var_g = 6
var_h = var_f * var_g
var_i = var_c - var_h
print(int(var_i)) |
Arithmetic calculation | Express the quotient of the number obtained from dividing the larger number by a smaller number out of numbers 8 and 22, as a decimal number. | 2.75 | 22 8 [OP_DIV] | var_a = 22
var_b = 8
var_c = var_a / var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Correspondence | When 13 is divided by A, the quotient is B and the remainder is 3. A and B are both natural numbers. What is the largest number among possible A's? | 10 | 13 3 [OP_SUB] | var_a = 13
var_b = 3
var_c = var_a - var_b
print(int(var_c)) |
Arithmetic calculation | The sum of the weight of 9 comic books and 7 children's books was 10.98 kilograms (kg). If a comic book weighs 0.8 kilograms (kg), how many kilograms (kg) does a children's book weigh? | 0.54 | 10.98 0.8 9 [OP_MUL] [OP_SUB] 7 [OP_DIV] | var_a = 10.98
var_b = 0.8
var_c = 9
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 7
var_g = var_e / var_f
print('{:.2f}'.format(round(var_g+1e-10,2))) |
Correspondence | Hancho used 1/5 of the colored tape he had to make a work of art and gave 3/4 of the remaining to Gayeong. If the remaining length of the colored tape was 1 meter (m) and 50 centimeters (cm), how many meters (m) was the length of the colored tape that Hancho had at the beginning? | 7.5 | 1 50 100 [OP_DIV] [OP_ADD] 1 3/4 [OP_SUB] [OP_DIV] 1 1/5 [OP_SUB] [OP_DIV] | var_a = 1
var_b = 50
var_c = 100
var_d = var_b / var_c
var_e = var_a + var_d
var_f = 1
var_g = 0.75
var_h = var_f - var_g
var_i = var_e / var_h
var_j = 1
var_k = 0.2
var_l = var_j - var_k
var_m = var_i / var_l
print('{:.2f}'.format(round(var_m+1e-10,2))) |
Comparison | How many numbers among 0.8, 1/2, 0.9, 1/3 are less than 0.4? | 1 | [OP_LIST_SOL] 0.8 1/2 0.9 1/3 [OP_LIST_EOL] 0.4 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
var_c = 0.9
var_d = 0.3333333333333333
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 = 0.4
list_b = []
for i in list_a:
if i < var_e:
list_b.append(i)
var_f = len(list_b)
print(int(var_f)) |
Arithmetic calculation | It takes 800 meters (m) from the mart to home,1 kilometer (km) and 300 meters (m) from home to the academy, and 1700 meters (m) from the academy to the restaurant. How many meters (m) from the mart to the academy via home is longer than from the academy to the restaurant? | 400 | 800 1 1000 [OP_MUL] 300 [OP_ADD] [OP_ADD] 1700 [OP_SUB] | var_a = 800
var_b = 1
var_c = 1000
var_d = var_b * var_c
var_e = 300
var_f = var_d + var_e
var_g = var_a + var_f
var_h = 1700
var_i = var_g - var_h
print(int(var_i)) |
Possibility | We are going to use 2 of our 3 number cards 2, 4, 5 to create a double-digit number. How many possible numbers from those are divisible by 4? | 2 | [OP_LIST_SOL] 2 4 5 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] 4 [OP_LIST_DIVISIBLE] [OP_LIST_LEN] | var_a = 2
var_b = 4
var_c = 5
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 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 = 4
list_c = []
var_e = int(var_e)
for i in list_b:
i = int(i)
if i % var_e == 0:
list_c.append(i)
var_f = len(list_c)
print(int(var_f)) |
Geometry | You bought 60 centimeters (cm) of wire from a stationery store to make a square with a side length of 9 centimeters (cm). If you use this wire to make a square, how many centimeters (cm) of wire will you have left? | 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)) |
Comparison | Jiseong drank 9/25 liters (L) of milk, and Youngpyo drank 0.41 liters (L). Who drank more milk? | Youngpyo | [OP_LIST_SOL] Jiseong Youngpyo [OP_LIST_EOL] [OP_LIST_SOL] 9/25 0.41 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jiseong'
var_b = 'Youngpyo'
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.36
var_d = 0.41
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 | Giving the marbles in the bag to 7 people, 12 each, and 5 left. If you divide these marbles equally among 8 people, how many marbles can you divide for each people? | 11 | 12 7 [OP_MUL] 5 [OP_ADD] 8 [OP_FDIV] | var_a = 12
var_b = 7
var_c = var_a * var_b
var_d = 5
var_e = var_c + var_d
var_f = 8
var_g = var_e // var_f
print(int(var_g)) |
Correspondence | If you multiply Jinwoo's younger sibling's age by some natural number, you get 90. Find the age of all possible Jinwoo's younger sibling. | 12 | 90 [OP_LIST_GET_DIVISOR] [OP_LIST_LEN] | var_a = 90
list_a = []
num_sqrt = int(math.sqrt(var_a))
for i in range(1, num_sqrt+1):
if var_a % i == 0:
list_a.append(i)
list_a.append(int(var_a/i))
list_a = sorted(set(list_a))
var_b = len(list_a)
print(int(var_b)) |
Geometry | There are three pyramids (a), (b), and (c). Given that the sum of the vertices of the three pyramids is 40, what is the sum of the edges of these pyramids? | 74 | 40 3 [OP_SUB] 2 [OP_MUL] | var_a = 40
var_b = 3
var_c = var_a - var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | You mistakenly divided 7 to a number instead of adding 36, and got 8. What is the correct calculation result? | 92 | 8 7 [OP_MUL] 36 [OP_ADD] | var_a = 8
var_b = 7
var_c = var_a * var_b
var_d = 36
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | In the calculation of subtracting a two-digit number, the number 2 in the tens digit of the subtracting number was mistakenly read as 5, and the number 4 in the units digit was mistakenly read as 9, and the result was 14. How much do get when you calculate correctly? | 49 | 14 1 4 9 [OP_SUB] [OP_MUL] [OP_SUB] 10 2 5 [OP_SUB] [OP_MUL] [OP_SUB] | var_a = 14
var_b = 1
var_c = 4
var_d = 9
var_e = var_c - var_d
var_f = var_b * var_e
var_g = var_a - var_f
var_h = 10
var_i = 2
var_j = 5
var_k = var_i - var_j
var_l = var_h * var_k
var_m = var_g - var_l
print(int(var_m)) |
Possibility | Choose three of the natural numbers 5, 3, 1, and 9 to form three-digit numbers. When writing the numbers in order from largest to smallest, find the 10th number. | 531 | [OP_LIST_SOL] 5 3 1 9 [OP_LIST_EOL] 3 [OP_LIST_GET_PERM] 10 [OP_LIST_MAX] | var_a = 5
var_b = 3
var_c = 1
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
list_c=list_b.copy()
list_c.sort()
var_g = list_c[-var_f]
print(int(var_g)) |
Arithmetic calculation | There are a total of 24 students in Year 1 and Year 2. Of these, 50 chocolates were distributed equally to only the first-year students, and two chocolates were left. If the number of second-year students is twice the number of first-year students, how many chocolates did the first-year students get? | 6 | 50 2 [OP_SUB] 24 2 1 [OP_ADD] [OP_FDIV] [OP_FDIV] | var_a = 50
var_b = 2
var_c = var_a - var_b
var_d = 24
var_e = 2
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)) |
Correspondence | 24 is the value of a number multiplied by 2/5. What number do you get when the number is multiplied by 1/15? | 4 | 24 1 2/5 [OP_DIV] [OP_MUL] 1/15 [OP_MUL] | var_a = 24
var_b = 1
var_c = 0.4
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 0.06666666666666667
var_g = var_e * var_f
print(int(var_g)) |
Arithmetic calculation | At first there were 6 more roosters on the farm compared to hens. Today I bought 4 more roosters and 8 more hens, bringing the total to 20 hens. How many roosters are currently on the farm? | 22 | 20 8 [OP_SUB] 6 [OP_ADD] 4 [OP_ADD] | var_a = 20
var_b = 8
var_c = var_a - var_b
var_d = 6
var_e = var_c + var_d
var_f = 4
var_g = var_e + var_f
print(int(var_g)) |
Arithmetic calculation | Seonwoo's school's 3rd graders have 4 classes with 21 students in each class. All 3rd graders are trying to plant 2 seeds in their pots. How many seeds do they need in all? | 168 | 21 4 [OP_MUL] 2 [OP_MUL] | var_a = 21
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c * var_d
print(int(var_e)) |
Correspondence | Hoseok added 8 to a certain number and got 88. Find the exact result of dividing this number by 10. | 8 | 88 8 [OP_SUB] 10 [OP_DIV] | var_a = 88
var_b = 8
var_c = var_a - var_b
var_d = 10
var_e = var_c / var_d
print(int(var_e)) |
Arithmetic calculation | How much is 1 dollar in Korean money when 140 dollars is converted into 158,760 won in Korean money? | 1134 | 158760 140 [OP_DIV] | var_a = 158760
var_b = 140
var_c = var_a / var_b
print(int(var_c)) |
Geometry | There is a cube with a side perimeter of 52 centimeters (cm). What is the surface area of this cube in square centimeters (cm2)? | 1014 | 52 4 [OP_DIV] 52 4 [OP_DIV] [OP_MUL] 6 [OP_MUL] | var_a = 52
var_b = 4
var_c = var_a / var_b
var_d = 52
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)) |
Geometry | One farm has a rectangular fence. This fence is 30 meters (m) in circumference, and its width is twice as long as its length. Find the width of the fence in meters (m). | 10 | 30 2 [OP_DIV] 1 2 [OP_ADD] [OP_DIV] 2 [OP_MUL] | var_a = 30
var_b = 2
var_c = var_a / var_b
var_d = 1
var_e = 2
var_f = var_d + var_e
var_g = var_c / var_f
var_h = 2
var_i = var_g * var_h
print(int(var_i)) |
Correspondence | When we divide 17 by 5, the quotient is 3, and the remainder is A. Find A here. | 2 | 17 5 3 [OP_MUL] [OP_SUB] | var_a = 17
var_b = 5
var_c = 3
var_d = var_b * var_c
var_e = var_a - var_d
print(int(var_e)) |
Arithmetic calculation | There are baseballs, soccer balls and volleyballs in the gym. The number of baseballs is 5 times the number of soccer balls, and the number of volleyballs is 3 times the number of soccer balls. If the sum of baseballs and volleyballs is 160, how many soccer balls are there? | 20 | 160 5 3 [OP_ADD] [OP_DIV] | var_a = 160
var_b = 5
var_c = 3
var_d = var_b + var_c
var_e = var_a / var_d
print(int(var_e)) |
Arithmetic calculation | If a watermelon sold at a store costs 200 won more than 5,000 won, find the price of the watermelon in units of 1,000 won. | 5.2 | 5 2 10 [OP_DIV] [OP_ADD] | var_a = 5
var_b = 2
var_c = 10
var_d = var_b / var_c
var_e = var_a + var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Comparison | Yuna, Yoojung, and Minyoung took number tickets at the bank. Yuna's number is higher than Yoojung's, and Minyoung's number is lower than Yuna's. Who has the largest number? | Yuna | [OP_LIST_SOL] Yuna Yoojung Minyoung [OP_LIST_EOL] [OP_LIST_SOL] Yuna Yoojung > Minyoung Yuna < [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] 1 [OP_LIST_GET] | var_a = 'Yuna'
var_b = 'Yoojung'
var_c = 'Minyoung'
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 = 'Yuna'
var_e = 'Yoojung'
var_f = '>'
var_g = 'Minyoung'
var_h = 'Yuna'
var_i = '<'
list_b= []
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
if "/" in str(var_d):
var_d = eval(str(var_d))
list_b.append(var_d)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
if cond_ in ("<", ">", "="):
operand_right = temp_stack.pop()
operand_left = temp_stack.pop()
if cond_ == "=":
cond_ = "=="
conditions.append(f"{operand_left} {cond_} {operand_right}")
else:
if not cond_.isdigit():
cond_ = "{" + cond_ + "}"
temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
item_name_index_dict = dict(zip(items_name_list, perm))
formatted_conditions = \
[condition.format_map(item_name_index_dict) for condition in conditions]
if all(map(eval, formatted_conditions)):
break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_j = 1
var_k = list_c[var_j-1]
print(var_k) |
Comparison | 20 students are lined up in a single line. Jungkook is standing in front of Yoongi, and there are 5 students between Yoongi and Jungkook. There are 6 students standing behind Jungkook. How many students are standing in front of Yoongi? | 19 | 20 6 [OP_SUB] 5 [OP_ADD] | var_a = 20
var_b = 6
var_c = var_a - var_b
var_d = 5
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | Electric poles were erected on the road at intervals of 25 meters (m). If the distance between the first and last telephone poles is 1500 m (m), how many telephone poles are there? | 61 | 1500 25 [OP_DIV] 1 [OP_ADD] | var_a = 1500
var_b = 25
var_c = var_a / var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Correspondence | The least common multiple of 24 and a number is 168. If the greatest common divisor is 4, what number is it? | 28 | 168 4 [OP_MUL] 24 [OP_FDIV] | var_a = 168
var_b = 4
var_c = var_a * var_b
var_d = 24
var_e = var_c // var_d
print(int(var_e)) |
Arithmetic calculation | What is the smallest three-digit number that is divisible by 2? | 100 | 100 999 1 [OP_LIST_ARANGE] 2 [OP_LIST_DIVISIBLE] 1 [OP_LIST_MIN] | 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 = 2
list_b = []
var_d = int(var_d)
for i in list_a:
i = int(i)
if i % var_d == 0:
list_b.append(i)
var_e = 1
list_c=list_b.copy()
list_c.sort()
var_f = list_c[var_e-1]
print(int(var_f)) |
Comparison | There are 24 vehicles. Of these, red cars make up a quarter of the total, blue cars outnumber red cars by six, and yellow cars make up the rest. What color cars are there the most? | blue | [OP_LIST_SOL] red blue yellow [OP_LIST_EOL] [OP_LIST_SOL] 24 4 [OP_DIV] 24 4 [OP_DIV] 6 [OP_ADD] 24 24 4 [OP_DIV] 6 [OP_ADD] [OP_SUB] 24 4 [OP_DIV] [OP_SUB] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'red'
var_b = 'blue'
var_c = 'yellow'
list_a= []
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_d = 24
var_e = 4
var_f = var_d / var_e
var_g = 24
var_h = 4
var_i = var_g / var_h
var_j = 6
var_k = var_i + var_j
var_l = 24
var_m = 24
var_n = 4
var_o = var_m / var_n
var_p = 6
var_q = var_o + var_p
var_r = var_l - var_q
var_s = 24
var_t = 4
var_u = var_s / var_t
var_v = var_r - var_u
list_b= []
if "/" in str(var_v):
var_v = eval(str(var_v))
list_b.append(var_v)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_w = 1
list_c=list_b.copy()
list_c.sort()
var_x = list_c[-var_w]
var_y = list_b.index(var_x)+1
var_z = list_a[var_y-1]
print(var_z) |
Arithmetic calculation | During the athletic meeting, the students in Jimin's class stand at the same intervals back and forth. If the distance between the student in the front and the student at the back is 242 meters (m), and the distance between Jimin and the next student is 5.5 meters (m), how many students are in Jimin's class? | 45 | 242 5.5 [OP_FDIV] 1 [OP_ADD] | var_a = 242
var_b = 5.5
var_c = var_a // var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | Today, 35046 tourists visited the cherry blossom festival. A third of them used their own cars, and half came from Seoul. Check out how many people came to the cherry blossom festival by car from Seoul. | 5841 | 35046 1 3 [OP_DIV] [OP_MUL] 1 2 [OP_DIV] [OP_MUL] | var_a = 35046
var_b = 1
var_c = 3
var_d = var_b / var_c
var_e = var_a * var_d
var_f = 1
var_g = 2
var_h = var_f / var_g
var_i = var_e * var_h
print(int(var_i)) |
Geometry | There can be some polygon with A as the number of vertices inside the square if you draw two diagonals in it. If B stands for the number of polygons, what is the answer for the following equation: AxB? | 12 | 3 4 [OP_MUL] | var_a = 3
var_b = 4
var_c = var_a * var_b
print(int(var_c)) |
Arithmetic calculation | We are going to install a rockfall warning sign to prepare for landslides. If the sign is installed from the beginning to the end by dividing it into 4 sections equally from the 0.35 kilometer (km) point to the 0.37 kilometer (km) point, indicate the kilometers (km) of the location of the sign installed at the fourth point as a decimal number. | 0.37 | 0.35 0.37 0.35 [OP_SUB] 4 [OP_DIV] 4 1 [OP_SUB] [OP_MUL] [OP_ADD] | var_a = 0.35
var_b = 0.37
var_c = 0.35
var_d = var_b - var_c
var_e = 4
var_f = var_d / var_e
var_g = 4
var_h = 1
var_i = var_g - var_h
var_j = var_f * var_i
var_k = var_a + var_j
print('{:.2f}'.format(round(var_k+1e-10,2))) |
Geometry | What is the total volume of a box measuring 30 centimeters (cm) long, 1 centimeter (cm) wide, and 1 centimeter (cm) high when stacked in 7 horizontal rows, 5 vertical rows, and 3 floors? | 3150 | 30 7 [OP_MUL] 1 5 [OP_MUL] [OP_MUL] 1 3 [OP_MUL] [OP_MUL] | var_a = 30
var_b = 7
var_c = var_a * var_b
var_d = 1
var_e = 5
var_f = var_d * var_e
var_g = var_c * var_f
var_h = 1
var_i = 3
var_j = var_h * var_i
var_k = var_g * var_j
print(int(var_k)) |
Comparison | The distance from Suji's house to the supermarket is 2 kilometers (km) and 280 meters (m), and the distance to the bakery is 4125 meters (m). Which is closer to Suji's house, a supermarket or a bakery? | supermarket | [OP_LIST_SOL] supermarket bakery [OP_LIST_EOL] [OP_LIST_SOL] 2 1000 [OP_MUL] 280 [OP_ADD] 4125 [OP_LIST_EOL] 1 [OP_LIST_MIN] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'supermarket'
var_b = 'bakery'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 2
var_d = 1000
var_e = var_c * var_d
var_f = 280
var_g = var_e + var_f
var_h = 4125
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-1]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Comparison | Draw one of the cards numbered 1 through 9 and find the sum of all the numbers that, when multiplied by 44, are less than 55 multiplied by 4. | 10 | 1 9 1 [OP_LIST_ARANGE] 55 4 [OP_MUL] 44 [OP_DIV] [OP_LIST_LESS] [OP_LIST_SUM] | 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 = 55
var_e = 4
var_f = var_d * var_e
var_g = 44
var_h = var_f / var_g
list_b = []
for i in list_a:
if i < var_h:
list_b.append(i)
list_b = [float(i) for i in list_b]
var_i = sum(list_b)
print(int(var_i)) |
Geometry | What is the perimeter in centimeters (cm) of a square with a side of 47/20 centimeters (cm)? | 9.4 | 47/20 4 [OP_MUL] | var_a = 2.35
var_b = 4
var_c = var_a * var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Possibility | If there are 3 drinks, 2 salads, and 5 pizzas, how many ways can you order 1 drink, 1 salad, and 1 pizza? | 30 | 3 2 [OP_MUL] 5 [OP_MUL] | var_a = 3
var_b = 2
var_c = var_a * var_b
var_d = 5
var_e = var_c * var_d
print(int(var_e)) |
Comparison | Hanbyul and Seulgi run around the park. During the same time, Hanbyul ran a distance of 1/100 of 10.2 kilometers (km), and Seulgi ran a distance of 100 meters (m). Hanbyul or Seulgi, who ran longer distances? | Hanbyul | [OP_LIST_SOL] Hanbyul Seulgi [OP_LIST_EOL] [OP_LIST_SOL] 10.2 1000 [OP_MUL] 1/100 [OP_MUL] 100 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Hanbyul'
var_b = 'Seulgi'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 10.2
var_d = 1000
var_e = var_c * var_d
var_f = 0.01
var_g = var_e * var_f
var_h = 100
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
list_b.reverse()
var_i = 1
list_c=list_b.copy()
list_c.sort()
var_j = list_c[-var_i]
var_k = list_b.index(var_j)+1
var_l = list_a[var_k-1]
print(var_l) |
Comparison | Minwoo is 1.3 meters (m) tall and Hyojin is 1.4 meters (m) tall. Who is taller Minwoo and Hyojin? | Hyojin | [OP_LIST_SOL] Minwoo Hyojin [OP_LIST_EOL] [OP_LIST_SOL] 1.3 1.4 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Minwoo'
var_b = 'Hyojin'
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 = 1.3
var_d = 1.4
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) |
Possibility | If there are 2 ways to get from point A to point B and 3 ways to get from point B to point C, find the number of ways to go from point A to point C via point B. | 6 | 2 3 [OP_MUL] | var_a = 2
var_b = 3
var_c = var_a * var_b
print(int(var_c)) |
Comparison | In the swimming competition, Namjoon placed second and Yoongi placed fourth. Hoseok was faster than Yoongi, but slower than Namjoon. What is Hoseok's rank? | 3 | 2 4 [OP_ADD] 2 [OP_FDIV] | var_a = 2
var_b = 4
var_c = var_a + var_b
var_d = 2
var_e = var_c // var_d
print(int(var_e)) |
Correspondence | A is a single digit number. How many numbers can fit inside A in division 9A5÷5<197? | 8 | 9A5÷5<197 A [OP_DIGIT_UNK_SOLVER] [OP_LIST_LEN] | var_a = '9A5÷5<197'
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)) |
Geometry | There is a clock in the shape of a square with sides measuring 30 centimeters (cm). What is the area of this clock in square centimeters (cm2)? | 900 | 30 2 [OP_POW] | var_a = 30
var_b = 2
var_c = var_a ** var_b
print(int(var_c)) |
Comparison | Among 0.8 and 1/2, how many of them are less than 0.4? | 0 | [OP_LIST_SOL] 0.8 1/2 [OP_LIST_EOL] 0.4 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 0.8
var_b = 0.5
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 0.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)) |
Comparison | There are three numbers 0.8, 1/2, and 0.9. How many numbers are less than 3? | 3 | [OP_LIST_SOL] 0.8 1/2 0.9 [OP_LIST_EOL] 3 [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 = 3
list_b = []
for i in list_a:
if i < var_d:
list_b.append(i)
var_e = len(list_b)
print(int(var_e)) |
Correspondence | There is a six-digit number 25A735 which is 260000 when rounded to the thousandth place. If you can write the numbers 0 through 9 in A, how many possible numbers are there? | 5 | 25A735 [OP_GEN_POSSIBLE_LIST] 255000 [OP_LIST_MORE_EQUAL] 25A735 A [OP_LIST_FIND_UNK] [OP_LIST_LEN] | var_a = '25A735'
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 = 255000
list_b = []
for i in list_a:
if i >= var_b:
list_b.append(i)
var_c = '25A735'
var_d = 'A'
var_c = str(var_c)
var_d = str(var_d)
unk_idx = var_c.index(var_d)
list_c = []
for elem in list_b:
elem = str(elem)
list_c.append(int(elem[unk_idx]))
list_c = list(set(list_c))
var_e = len(list_c)
print(int(var_e)) |
Arithmetic calculation | Juwon has 105.8 meters (m) of wire. If you need 4 meters (m) of wire to make one mobile, find the number of mobiles Juwon can make. | 26 | 105.8 4 [OP_FDIV] | var_a = 105.8
var_b = 4
var_c = var_a // var_b
print(int(var_c)) |
Arithmetic calculation | Three 217 centimeters (cm) long tapes were attached together with the same overlapping parts. If the length of the attached tape is 627 centimeters (cm), how many centimeters (cm) is the length of one overlapping portion of the tape? | 12 | 217 3 [OP_MUL] 627 [OP_SUB] 3 1 [OP_SUB] [OP_DIV] | var_a = 217
var_b = 3
var_c = var_a * var_b
var_d = 627
var_e = var_c - var_d
var_f = 3
var_g = 1
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Correspondence | You mistakenly added 21 to a particular number when you were supposed to add 40, and the result was 52. Find out the answer when correctly calculated. | 71 | 52 21 [OP_SUB] 40 [OP_ADD] | var_a = 52
var_b = 21
var_c = var_a - var_b
var_d = 40
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | There are a total of 20 telephone poles on one side of the road. The distance between the poles is 25 meters (m), and there are no poles at the beginning and end. What is the total length of the road in meters (m)? | 525 | 20 1 [OP_ADD] 25 [OP_MUL] | var_a = 20
var_b = 1
var_c = var_a + var_b
var_d = 25
var_e = var_c * var_d
print(int(var_e)) |
Possibility | The swimming club has three first graders, two second graders, and two third graders. Find the number of ways to select 3 representatives of a club. | 35 | 3 2 [OP_ADD] 2 [OP_ADD] 3 [OP_COMB] | var_a = 3
var_b = 2
var_c = var_a + var_b
var_d = 2
var_e = var_c + var_d
var_f = 3
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)) |
Comparison | The school has a total of 3 grades. Each grade has 12 classes, and each class has the same number of students. Miyoung is ranked 12th from the front and 12th from the back in math scores in a class. How many students are there in this school? | 828 | 12 12 [OP_ADD] 1 [OP_SUB] 12 [OP_MUL] 3 [OP_MUL] | var_a = 12
var_b = 12
var_c = var_a + var_b
var_d = 1
var_e = var_c - var_d
var_f = 12
var_g = var_e * var_f
var_h = 3
var_i = var_g * var_h
print(int(var_i)) |
Geometry | The base and hypotenuse of the triangular pizza are 9 centimeters (cm) and 15 centimeters (cm), respectively. How big is the pizza? | 54 | 15 2 [OP_POW] 9 2 [OP_POW] [OP_SUB] 1/2 [OP_POW] 9 [OP_MUL] 2 [OP_DIV] | var_a = 15
var_b = 2
var_c = var_a ** var_b
var_d = 9
var_e = 2
var_f = var_d ** var_e
var_g = var_c - var_f
var_h = 0.5
var_i = var_g ** var_h
var_j = 9
var_k = var_i * var_j
var_l = 2
var_m = var_k / var_l
print(int(var_m)) |
Geometry | I made a square by sticking the stickers regularly without any gaps. If I need 6 stickers to make one side of a square, find how many stickers are on the perimeter. | 20 | 6 4 [OP_MUL] 4 [OP_SUB] | var_a = 6
var_b = 4
var_c = var_a * var_b
var_d = 4
var_e = var_c - var_d
print(int(var_e)) |
Arithmetic calculation | The age difference between Yoongi's aunt and Yoongi is 23 years, and Hoseok is 4 years younger than Yoongi. If his aunt is 38 years old, find the sum of the ages of Yoongi and Hoseok. | 26 | 38 23 [OP_SUB] 38 23 [OP_SUB] 4 [OP_SUB] [OP_ADD] | var_a = 38
var_b = 23
var_c = var_a - var_b
var_d = 38
var_e = 23
var_f = var_d - var_e
var_g = 4
var_h = var_f - var_g
var_i = var_c + var_h
print(int(var_i)) |
Geometry | A rectangle with a width of 9 centimeters (cm) and a square with a side length of 12 centimeters (cm) is equal to the sum of the lengths of the four sides. How many centimeters (cm) is the length of the rectangle? | 15 | 12 4 [OP_MUL] 2 [OP_DIV] 9 [OP_SUB] | var_a = 12
var_b = 4
var_c = var_a * var_b
var_d = 2
var_e = var_c / var_d
var_f = 9
var_g = var_e - var_f
print(int(var_g)) |
Arithmetic calculation | Find how many times 0 appears in a list of all natural numbers less than 100 that are multiples of 3 and multiples of 5. | 3 | 1 100 1 [OP_LIST_ARANGE] 3 [OP_LIST_DIVISIBLE] 5 [OP_LIST_DIVISIBLE] [OP_LIST2NUM] [OP_NUM2LIST] 0 [OP_LIST_FIND_NUM] | var_a = 1
var_b = 100
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 3
list_b = []
var_d = int(var_d)
for i in list_a:
i = int(i)
if i % var_d == 0:
list_b.append(i)
var_e = 5
list_c = []
var_e = int(var_e)
for i in list_b:
i = int(i)
if i % var_e == 0:
list_c.append(i)
var_f=""
for i in list_c:
i = str(i)
var_f = var_f + i
list_d = []
var_f = int(var_f)
while var_f//10 > 0:
list_d.append(var_f%10)
var_f = var_f//10
list_d.append(var_f%10)
list_d = list_d[::-1]
var_g = 0
var_h = 0
var_g = int(var_g)
for i in list_d:
i = int(i)
if i == var_g:
var_h = var_h + 1
print(int(var_h)) |
Arithmetic calculation | Of the 25 cars, 18 went out and 12 came in. How many cars have been reduced? | 6 | 25 25 18 [OP_SUB] 12 [OP_ADD] [OP_SUB] | var_a = 25
var_b = 25
var_c = 18
var_d = var_b - var_c
var_e = 12
var_f = var_d + var_e
var_g = var_a - var_f
print(int(var_g)) |
Arithmetic calculation | After grandmother had drunk 0.4 of the total milk, the remaining milk was 0.69 liters (L). Find how many liters (L) of milk were there in the beginning. | 1.15 | 0.69 1 0.4 [OP_SUB] [OP_DIV] | var_a = 0.69
var_b = 1
var_c = 0.4
var_d = var_b - var_c
var_e = var_a / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Comparison | Suppose there is a line of 9 people in order starting with the smallest person. Hoseok is the 5th tallest person. If the line is rearranged in an order from the tallest person, what number does Hoseok take from the back of the line? | 5 | 9 5 [OP_SUB] 1 [OP_ADD] | var_a = 9
var_b = 5
var_c = var_a - var_b
var_d = 1
var_e = var_c + var_d
print(int(var_e)) |
Arithmetic calculation | When submarines can go down into the sea at 3.8 kilometers (km) per hour, find how deep the submarine can descend for 2 hours and 45 minutes in kilometers (km). (Given that it descends at a constant speed without any stop.) | 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 | There are numbers with two decimal places that give 1.7 if rounded to two decimal places. Find the value of subtracting the smallest of these numbers from the largest, including the decimal point. | 0.09 | 1.74 1.65 [OP_SUB] | var_a = 1.74
var_b = 1.65
var_c = var_a - var_b
print('{:.2f}'.format(round(var_c+1e-10,2))) |
Possibility | How many two-digit numbers can you make from 3, 4, 5, and 6 using two different numbers? | 12 | [OP_LIST_SOL] 3 4 5 6 [OP_LIST_EOL] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 3
var_b = 4
var_c = 5
var_d = 6
list_a= []
if "/" in str(var_d):
var_d = eval(str(var_d))
list_a.append(var_d)
if "/" in str(var_c):
var_c = eval(str(var_c))
list_a.append(var_c)
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_e = 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 = len(list_b)
print(int(var_f)) |
Arithmetic calculation | There are 156 red marbles and 267 blue marbles. Of these, 115 fell off and broke. How many marbles are left? | 308 | 156 267 [OP_ADD] 115 [OP_SUB] | var_a = 156
var_b = 267
var_c = var_a + var_b
var_d = 115
var_e = var_c - var_d
print(int(var_e)) |
Possibility | There are five people: A, B, C, D, and E. When A, B, and C are placed before D and E, find the number of cases in which 5 people can line up in order. | 6 | [OP_LIST_SOL] A B C D E [OP_LIST_EOL] [OP_LIST_SOL] A B C [OP_LIST_EOL] [OP_LIST_LEN] [OP_LIST_LEN] [OP_PERM] | var_a = 'A'
var_b = 'B'
var_c = 'C'
var_d = 'D'
var_e = 'E'
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 = 'A'
var_g = 'B'
var_h = 'C'
list_b= []
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
list_b.reverse()
var_i = len(list_b)
var_j = len(list_b)
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)
print(int(var_k)) |
Possibility | How many two-digit numbers can be formed by taking two odd numbers greater than 1 and less than 9 and using them once? | 6 | 1 1 [OP_ADD] 9 1 [OP_SUB] [OP_LIST_ODD] 2 [OP_LIST_GET_PERM] [OP_LIST_LEN] | var_a = 1
var_b = 1
var_c = var_a + var_b
var_d = 9
var_e = 1
var_f = var_d - var_e
list_a = []
if var_c%2==0:
for i in range(var_c+1, var_f+1, 2):
list_a.append(i)
else:
for i in range(var_c, var_f+1, 2):
list_a.append(i)
var_g = 2
list_b = [str(i) for i in list_a]
list_b = list(itertools.permutations(list_b, var_g))
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_h = len(list_b)
print(int(var_h)) |
Geometry | A rectangle has a perimeter of 28 centimeters (cm) and a width of 6 centimeters (cm). Find the area of this rectangle. | 48 | 28 2 [OP_DIV] 6 [OP_SUB] 6 [OP_MUL] | var_a = 28
var_b = 2
var_c = var_a / var_b
var_d = 6
var_e = var_c - var_d
var_f = 6
var_g = var_e * var_f
print(int(var_g)) |
Arithmetic calculation | A bottle needs to be poured 10 times to fill it with a (a) cup, or 5 times to fill it with a (b) cup. How many times the size of the (b) cup is than the (a) cup? | 2 | 10 5 [OP_DIV] | var_a = 10
var_b = 5
var_c = var_a / var_b
print(int(var_c)) |
Correspondence | When 229 is divided by a particular number, the remainder is said to be 5 less than that particular number. Also, when 197 is divided by that particular number, the remainder is 2, and when 160 is divided by that particular number, the remainder is 4. Find the largest of that particular number. | 39 | 197 2 [OP_SUB] 160 4 [OP_SUB] [OP_GCD] 229 5 [OP_ADD] [OP_GCD] | var_a = 197
var_b = 2
var_c = var_a - var_b
var_d = 160
var_e = 4
var_f = var_d - var_e
var_g = math.gcd(int(var_f), int(var_c))
var_h = 229
var_i = 5
var_j = var_h + var_i
var_k = math.gcd(int(var_j), int(var_g))
print(int(var_k)) |
Correspondence | If you divide a piece of wire into 8 equal parts and then divide it into 8 equal parts, find how many centimeters (cm) it is. However, the length of the wire is 69.76 centimeters (cm). | 1.09 | 69.76 8 [OP_DIV] 8 [OP_DIV] | var_a = 69.76
var_b = 8
var_c = var_a / var_b
var_d = 8
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Comparison | Eunkyu and Minyoung are 3/8 meters (m) and 1.4 meters (m) respectively. Please indicate whose height is taller. | Minyoung | [OP_LIST_SOL] Eunkyu Minyoung [OP_LIST_EOL] [OP_LIST_SOL] 3/8 1.4 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Eunkyu'
var_b = 'Minyoung'
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.375
var_d = 1.4
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) |
Arithmetic calculation | Hyuna said that she ate chicken every day from the 3rd to the 8th. If the chicken costs 20,000 won per chicken, how much money did Hyuna spend to eat the chicken? | 120000 | 20000 8 3 [OP_SUB] 1 [OP_ADD] [OP_MUL] | var_a = 20000
var_b = 8
var_c = 3
var_d = var_b - var_c
var_e = 1
var_f = var_d + var_e
var_g = var_a * var_f
print(int(var_g)) |
Comparison | Seonmi is shorter than Seongju and Seongju is shorter than Minyoung. Who is the shortest person when Minyoung is shorter than Suho? | Seonmi | [OP_LIST_SOL] Suho Minyoung Seongju Seonmi [OP_LIST_EOL] [OP_LIST_SOL] Suho Minyoung > Seongju Minyoung < Seongju Seonmi > [OP_LIST_EOL] [OP_LIST_COND_MAX_MIN] [OP_LIST_LEN] [OP_LIST_GET] | var_a = 'Suho'
var_b = 'Minyoung'
var_c = 'Seongju'
var_d = 'Seonmi'
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 = 'Suho'
var_f = 'Minyoung'
var_g = '>'
var_h = 'Seongju'
var_i = 'Minyoung'
var_j = '<'
var_k = 'Seongju'
var_l = 'Seonmi'
var_m = '>'
list_b= []
if "/" in str(var_m):
var_m = eval(str(var_m))
list_b.append(var_m)
if "/" in str(var_l):
var_l = eval(str(var_l))
list_b.append(var_l)
if "/" in str(var_k):
var_k = eval(str(var_k))
list_b.append(var_k)
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_i):
var_i = eval(str(var_i))
list_b.append(var_i)
if "/" in str(var_h):
var_h = eval(str(var_h))
list_b.append(var_h)
if "/" in str(var_g):
var_g = eval(str(var_g))
list_b.append(var_g)
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
global item_name_index_dict
items_name_list = list_a.copy()
conditions = []
condition_list = list_b.copy()
temp_stack = []
for index_, cond_ in enumerate(map(str, condition_list)):
if cond_ in ("<", ">", "="):
operand_right = temp_stack.pop()
operand_left = temp_stack.pop()
if cond_ == "=":
cond_ = "=="
conditions.append(f"{operand_left} {cond_} {operand_right}")
else:
if not cond_.isdigit():
cond_ = "{" + cond_ + "}"
temp_stack.append(cond_)
item_name_index_dict = {}
for perm in itertools.permutations(range(1, len(items_name_list) + 1)):
item_name_index_dict = dict(zip(items_name_list, perm))
formatted_conditions = \
[condition.format_map(item_name_index_dict) for condition in conditions]
if all(map(eval, formatted_conditions)):
break
list_c = list(item_name_index_dict.keys())
list_c.sort(key=item_name_index_dict.get, reverse=True)
var_n = len(list_c)
var_o = list_c[var_n-1]
print(var_o) |
Geometry | There is a cuboid whose three distinct sides' surface areas are respectively 4 square centimeters (cm2), 3 square centimeters (cm2), and 6 square centimeters (cm2). What is the surface area of this cubioid's planar figure in square centimeters (cm2)? | 26 | 4 3 6 [OP_ADD] [OP_ADD] 2 [OP_MUL] | var_a = 4
var_b = 3
var_c = 6
var_d = var_b + var_c
var_e = var_a + var_d
var_f = 2
var_g = var_e * var_f
print(int(var_g)) |
Geometry | Find the difference between a square with side lengths of 8 centimeters (cm) and a rectangle with side lengths of 10 centimeters (cm) and 5 centimeters (cm). | 14 | 8 2 [OP_POW] 10 5 [OP_MUL] [OP_SUB] [OP_ABS] | var_a = 8
var_b = 2
var_c = var_a ** var_b
var_d = 10
var_e = 5
var_f = var_d * var_e
var_g = var_c - var_f
var_h = abs(var_g)
print(int(var_h)) |
Arithmetic calculation | You bought 18 boxes, including boxes of 50 tangerines each and boxes of 70 tangerines each. If you counted these tangerines individually and there were 1020 in total, how many boxes of 70 did you buy? | 6 | 1020 50 18 [OP_MUL] [OP_SUB] 70 50 [OP_SUB] [OP_DIV] | var_a = 1020
var_b = 50
var_c = 18
var_d = var_b * var_c
var_e = var_a - var_d
var_f = 70
var_g = 50
var_h = var_f - var_g
var_i = var_e / var_h
print(int(var_i)) |
Correspondence | You had to divide a number by 12 but mistakenly multiplied by 2 instead to get 622. Find the sum of the quotient and the remainder of the number divided by 12. | 36 | 622 2 [OP_DIV] 12 [OP_FDIV] 622 2 [OP_DIV] 12 [OP_MOD] [OP_ADD] | var_a = 622
var_b = 2
var_c = var_a / var_b
var_d = 12
var_e = var_c // var_d
var_f = 622
var_g = 2
var_h = var_f / var_g
var_i = 12
var_j = var_h % var_i
var_k = var_e + var_j
print(int(var_k)) |
Comparison | There are bags weighing 1.2 kilograms (kg), 3.1 kilograms (kg), 2.4 kilograms (kg), 3.0 kilograms (kg), and 1.8 kilograms (kg), respectively. If Hyeon-joo wants to buy a bag that is lighter than 2 kg (kg), how many types of bags can Hyeon-joo buy? | 2 | [OP_LIST_SOL] 1.2 3.1 2.4 3.0 1.8 [OP_LIST_EOL] 2 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 1.2
var_b = 3.1
var_c = 2.4
var_d = 3
var_e = 1.8
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 = []
for i in list_a:
if i < var_f:
list_b.append(i)
var_g = len(list_b)
print(int(var_g)) |
Comparison | Jimin's bag weighs 1.2 kilograms (kg) and Seokjin's bag weighs 1350 grams (g). Whose bag is heavier? | Seokjin | [OP_LIST_SOL] Jimin Seokjin [OP_LIST_EOL] [OP_LIST_SOL] 1.2 1000 [OP_MUL] 1350 [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = 'Jimin'
var_b = 'Seokjin'
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 = 1.2
var_d = 1000
var_e = var_c * var_d
var_f = 1350
list_b= []
if "/" in str(var_f):
var_f = eval(str(var_f))
list_b.append(var_f)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_g = 1
list_c=list_b.copy()
list_c.sort()
var_h = list_c[-var_g]
var_i = list_b.index(var_h)+1
var_j = list_a[var_i-1]
print(var_j) |
Correspondence | A three digit number 7A5 is greater than 751. If A can use numbers from 0 to 9 and is a tens digit, find how many numbers can fit in A. | 5 | 7A5 [OP_GEN_POSSIBLE_LIST] 751 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = '7A5'
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 = 751
list_b = []
for i in list_a:
if i < var_b:
list_b.append(i)
var_c = len(list_b)
print(int(var_c)) |
Correspondence | 5 is a result of dividing a particular number by 4 and adding 3. What number is that particular number? | 8 | 5 3 [OP_SUB] 4 [OP_MUL] | var_a = 5
var_b = 3
var_c = var_a - var_b
var_d = 4
var_e = var_c * var_d
print(int(var_e)) |
Possibility | When there are six different people, what is the number of cases in which you select two of them and make one president and the other one secretary? | 30 | 6 1 1 [OP_ADD] [OP_PERM] | var_a = 6
var_b = 1
var_c = 1
var_d = var_b + var_c
var_e = 1
var_a = int(var_a)
var_d = int(var_d)
for i, elem in enumerate(range(var_d)):
var_e = var_e * (var_a-i)
print(int(var_e)) |
Comparison | In the cinema, the audience sat in rows of chairs. If there are 30 people sitting in the chairs between the audience sitting on the far right and the audience sitting on the far left, how many people are sitting in the chairs? | 32 | 30 2 [OP_ADD] | var_a = 30
var_b = 2
var_c = var_a + var_b
print(int(var_c)) |
Arithmetic calculation | On one side of the road, 10 trees are planted at intervals of 10 meters (m) from start to finish. Find the length in meters (m) of this road. | 90 | 10 1 [OP_SUB] 10 [OP_MUL] | var_a = 10
var_b = 1
var_c = var_a - var_b
var_d = 10
var_e = var_c * var_d
print(int(var_e)) |
Arithmetic calculation | The certain amount of salt in 10 liters (L) of salt water is 7/10. If you divide the salt water equally into 4 cups, how many liters of salt are in each cup? | 1.75 | 10 7/10 [OP_MUL] 4 [OP_DIV] | var_a = 10
var_b = 0.7
var_c = var_a * var_b
var_d = 4
var_e = var_c / var_d
print('{:.2f}'.format(round(var_e+1e-10,2))) |
Correspondence | The average of Cheolsu's weight, the mother's weight, and the father's weight is equal to the mother's weight. If Cheolsu's weight is 2/3 of his mother's weight and his father's weight is 72 kilograms (kg), what is Cheolsu's weight? | 36 | 72 2 1 2/3 [OP_DIV] [OP_MUL] 1 [OP_SUB] [OP_DIV] | var_a = 72
var_b = 2
var_c = 1
var_d = 0.6666666666666666
var_e = var_c / var_d
var_f = var_b * var_e
var_g = 1
var_h = var_f - var_g
var_i = var_a / var_h
print(int(var_i)) |
Arithmetic calculation | Of 1 liter (L) of milk, Ye-seul drank 0.1 liters (L), and Ga-young drank 0.2 liters (L) more than Ye-seul, and Hancho drank several liters (L) more and the remaining amount of the milk was 0.3 liters (L). Find how many liters (L) of milk Hancho drank. | 0.3 | 1 0.1 [OP_SUB] 0.1 0.2 [OP_ADD] [OP_SUB] 0.3 [OP_SUB] | var_a = 1
var_b = 0.1
var_c = var_a - var_b
var_d = 0.1
var_e = 0.2
var_f = var_d + var_e
var_g = var_c - var_f
var_h = 0.3
var_i = var_g - var_h
print('{:.2f}'.format(round(var_i+1e-10,2))) |
Correspondence | A number is a two-digit number between 30 and 40. The number has a units digit of 2. Find the number. | 32 | 30 40 1 [OP_LIST_ARANGE] 10 2 [OP_LIST_DIVIDE_AND_REMAIN] 1 [OP_LIST_GET] | var_a = 30
var_b = 40
var_c = 1
list_a = [i for i in range(var_a, var_b + 1, var_c)]
var_d = 10
var_e = 2
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 = 1
var_g = list_b[var_f-1]
print(int(var_g)) |
Arithmetic calculation | There are five numbers, 3.3, 7/2, 1.9, 14/5, and 2.1. How many of these numbers are greater than 2 and less than 3? | 2 | [OP_LIST_SOL] 3.3 7/2 1.9 14/5 2.1 [OP_LIST_EOL] 2 [OP_LIST_MORE] 3 [OP_LIST_LESS] [OP_LIST_LEN] | var_a = 3.3
var_b = 3.5
var_c = 1.9
var_d = 2.8
var_e = 2.1
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 = []
for i in list_a:
if i > var_f:
list_b.append(i)
var_g = 3
list_c = []
for i in list_b:
if i < var_g:
list_c.append(i)
var_h = len(list_c)
print(int(var_h)) |
Arithmetic calculation | Among natural numbers greater than 14 and less than 105, what is the quotient of the largest number divided by the smallest number? | 7 | 105 1 [OP_SUB] 14 [OP_FDIV] | var_a = 105
var_b = 1
var_c = var_a - var_b
var_d = 14
var_e = var_c // var_d
print(int(var_e)) |
Geometry | There is a prism with the sum of the number of verticles and the number of edges equal to 40. How many faces does this prism have? | 10 | 40 2 3 [OP_ADD] [OP_DIV] 2 [OP_ADD] | var_a = 40
var_b = 2
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 | I divided 38 dolls into 5 boxes, and there are 3 dolls left. How many boxes are there? | 7 | 38 3 [OP_SUB] 5 [OP_FDIV] | var_a = 38
var_b = 3
var_c = var_a - var_b
var_d = 5
var_e = var_c // var_d
print(int(var_e)) |
Geometry | You are going to make a cube with one edge 13 centimeters (cm) long from a wire. At least how many centimeters (cm) of wire do you need? | 156 | 13 4 [OP_MUL] 13 4 [OP_MUL] [OP_ADD] 13 4 [OP_MUL] [OP_ADD] | var_a = 13
var_b = 4
var_c = var_a * var_b
var_d = 13
var_e = 4
var_f = var_d * var_e
var_g = var_c + var_f
var_h = 13
var_i = 4
var_j = var_h * var_i
var_k = var_g + var_j
print(int(var_k)) |
Comparison | Which one is larger between a cube (a) with all edges 5 centimeters (cm) long and a cuboid (b) with width, length, and height 4 centimeters (cm), 5 centimeters (cm), and 6 centimeters (cm), respectively? | (a) | [OP_LIST_SOL] (a) (b) [OP_LIST_EOL] [OP_LIST_SOL] 5 3 [OP_POW] 4 5 6 [OP_MUL] [OP_MUL] [OP_LIST_EOL] 1 [OP_LIST_MAX] [OP_LIST_INDEX] [OP_LIST_POP] [OP_LIST_GET] | var_a = '(a)'
var_b = '(b)'
list_a= []
if "/" in str(var_b):
var_b = eval(str(var_b))
list_a.append(var_b)
if "/" in str(var_a):
var_a = eval(str(var_a))
list_a.append(var_a)
list_a.reverse()
var_c = 5
var_d = 3
var_e = var_c ** var_d
var_f = 4
var_g = 5
var_h = 6
var_i = var_g * var_h
var_j = var_f * var_i
list_b= []
if "/" in str(var_j):
var_j = eval(str(var_j))
list_b.append(var_j)
if "/" in str(var_e):
var_e = eval(str(var_e))
list_b.append(var_e)
list_b.reverse()
var_k = 1
list_c=list_b.copy()
list_c.sort()
var_l = list_c[-var_k]
var_m = list_b.index(var_l)+1
var_n = list_a[var_m-1]
print(var_n) |
Arithmetic calculation | The circumference of pond, which has a circumference of 3km (km), started from the same place as Cheol-su and Young-hee at the same time and walked in opposite directions. If Cheol-su walks at a speed of 100 meters (m) per minute and Young-hee walks at a speed of 150 meters (m) per minute, find the two meet again for the first time in a few minutes. | 12 | 3 100 1000 [OP_DIV] 150 1000 [OP_DIV] [OP_ADD] [OP_DIV] | var_a = 3
var_b = 100
var_c = 1000
var_d = var_b / var_c
var_e = 150
var_f = 1000
var_g = var_e / var_f
var_h = var_d + var_g
var_i = var_a / var_h
print(int(var_i)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.