{"split_role": "calib", "id": "amc-0", "grader": "num", "question": "Consider the set of complex numbers $z$ satisfying $|1+z+z^{2}|=4$. The maximum value of the imaginary part of $z$ can be written in the form $\\tfrac{\\sqrt{m}}{n}$, where $m$ and $n$ are relatively prime positive integers. What is $m+n$?", "answer": "21"} {"split_role": "calib", "id": "amc-1", "grader": "num", "question": "Rows 1, 2, 3, 4, and 5 of a triangular array of integers are shown below.\n1\n1 1\n1 3 1\n1 5 5 1\n1 7 11 7 1\nEach row after the first row is formed by placing a 1 at each end of the row, and each interior entry is 1 greater than the sum of the two numbers diagonally above it in the previous row. What is the units digits of the sum of the 2023 numbers in the 2023rd row?", "answer": "5"} {"split_role": "calib", "id": "amc-2", "grader": "num", "question": "What is the value of \\[(\\log 5)^{3}+(\\log 20)^{3}+(\\log 8)(\\log 0.25)\\] where $\\log$ denotes the base-ten logarithm?", "answer": "2"} {"split_role": "calib", "id": "amc-3", "grader": "num", "question": "Ant Amelia starts on the number line at $0$ and crawls in the following manner. For $n=1,2,3,$ Amelia chooses a time duration $t_n$ and an increment $x_n$ independently and uniformly at random from the interval $(0,1).$ During the $n$th step of the process, Amelia moves $x_n$ units in the positive direction, using up $t_n$ minutes. If the total elapsed time has exceeded $1$ minute during the $n$th step, she stops at the end of that step; otherwise, she continues with the next step, taking at most $3$ steps in all. What is the denominator plus the numerator of thethe probability that Amelia’s position when she stops will be greater than $1$?", "answer": "5"} {"split_role": "calib", "id": "amc-4", "grader": "num", "question": "Mrs. Jones is pouring orange juice into four identical glasses for her four sons. She fills the first three glasses completely but runs out of juice when the fourth glass is only $\\frac{1}{3}$ full. What fraction of a glass must Mrs. Jones pour from each of the first three glasses into the fourth glass so that all four glasses will have the same amount of juice? The final answer can be written in the form $\\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. What is $m+n$?", "answer": "7"} {"split_role": "calib", "id": "amc-5", "grader": "num", "question": "Points $A$ and $B$ lie on the graph of $y=\\log_{2}x$. The midpoint of $\\overline{AB}$ is $(6, 2)$. What is the positive difference between the $x$-coordinates of $A$ and $B$? The final answer can be written in the form $m \\sqrt{n}$, where $m$ and $n$ are relatively prime positive integers. What is $m+n$?", "answer": "9"} {"split_role": "calib", "id": "amc-6", "grader": "num", "question": "What is the product of all solutions to the equation\n\\[\\log_{7x}2023\\cdot \\log_{289x}2023=\\log_{2023x}2023\\]", "answer": "1"} {"split_role": "calib", "id": "amc-7", "grader": "num", "question": "For how many values of the constant $k$ will the polynomial $x^{2}+kx+36$ have two distinct integer roots?", "answer": "8"} {"split_role": "calib", "id": "amc-8", "grader": "num", "question": "Janet rolls a standard $6$-sided die $4$ times and keeps a running total of the numbers she rolls. What is the probability that at some point, her running total will equal $3$? The final answer can be written in the form $\\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. What is $m+n$?", "answer": "265"} {"split_role": "calib", "id": "amc-9", "grader": "num", "question": "What is the degree measure of the acute angle formed by lines with slopes $2$ and $\\frac{1}{3}$?", "answer": "45"} {"split_role": "calib", "id": "amc-10", "grader": "num", "question": "How many $4 \\times 4$ arrays whose entries are $0$s and $1$s are there such that the row sums (the sum of the entries in each row) are $1, 2, 3,$ and $4,$ in some order, and the column sums (the sum of the entries in each column) are also $1, 2, 3,$ and $4,$ in some order? Output the remainder when the answer is divided by 100.\n\nFor example, the array\n\\[\\left[ \\begin{array}{cccc} 1 & 1 & 1 & 0 \\\\ 0 & 1 & 1 & 0 \\\\ 1 & 1 & 1 & 1 \\\\ 0 & 1 & 0 & 0 \\\\ \\end{array} \\right]\\]\nsatisfies the condition.", "answer": "76"} {"split_role": "calib", "id": "amc-11", "grader": "num", "question": "Maureen is keeping track of the mean of her quiz scores this semester. If Maureen scores an $11$ on the next quiz, her mean will increase by $1$. If she scores an $11$ on each of the next three quizzes, her mean will increase by $2$. What is the mean of her quiz scores currently?", "answer": "7"} {"split_role": "calib", "id": "amc-12", "grader": "num", "question": "The least common multiple of a positive integer $n$ and $18$ is $180$, and the greatest common divisor of $n$ and $45$ is $15$. What is the sum of the digits of $n$?", "answer": "6"} {"split_role": "calib", "id": "amc-13", "grader": "num", "question": "Four regular hexagons surround a square with side length 1, each one sharing an edge with the square,\nas shown in the figure below. The area of the resulting 12-sided outer nonconvex polygon can be\nwritten as $m \\sqrt{n} + p$, where $m$, $n$, and $p$ are integers and $n$ is not divisible by the square of any prime.\nWhat is the absolute value of $m+n+p$?\n[asy] import geometry; unitsize(3cm); draw((0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle); draw(shift((1/2,1-sqrt(3)/2))*polygon(6)); draw(shift((1/2,sqrt(3)/2))*polygon(6)); draw(shift((sqrt(3)/2,1/2))*rotate(90)*polygon(6)); draw(shift((1-sqrt(3)/2,1/2))*rotate(90)*polygon(6)); draw((0,1-sqrt(3))--(1,1-sqrt(3))--(3-sqrt(3),sqrt(3)-2)--(sqrt(3),0)--(sqrt(3),1)--(3-sqrt(3),3-sqrt(3))--(1,sqrt(3))--(0,sqrt(3))--(sqrt(3)-2,3-sqrt(3))--(1-sqrt(3),1)--(1-sqrt(3),0)--(sqrt(3)-2,sqrt(3)-2)--cycle,linewidth(2)); [/asy]", "answer": "4"} {"split_role": "calib", "id": "amc-14", "grader": "num", "question": "For how many ordered pairs $(a,b)$ of integers does the polynomial $x^3+ax^2+bx+6$ have $3$ distinct integer roots?", "answer": "5"} {"split_role": "calib", "id": "amc-15", "grader": "num", "question": "Isosceles trapezoid $ABCD$ has parallel sides $\\overline{AD}$ and $\\overline{BC},$ with $BC < AD$ and $AB = CD.$ There is a point $P$ in the plane such that $PA=1, PB=2, PC=3,$ and $PD=4.$ Let $\\frac{r}{s}=frac{BC}{AD}$ is irreducible fraction, what is the value of $r+s$?", "answer": "4"} {"split_role": "calib", "id": "amc-16", "grader": "num", "question": "Let $S$ be the set of circles in the coordinate plane that are tangent to each of the three circles with equations $x^{2}+y^{2}=4$, $x^{2}+y^{2}=64$, and $(x-5)^{2}+y^{2}=3$. What is the sum of the areas of all circles in $S$?Output the remainder when the answer is divided by 100.\n\n\n", "answer": "36"} {"split_role": "calib", "id": "amc-17", "grader": "num", "question": "The $\\textit{taxicab distance}$ between points $(x_1, y_1)$ and $(x_2, y_2)$ in the coordinate plane is given by \\[|x_1 - x_2| + |y_1 - y_2|.\\]\nFor how many points $P$ with integer coordinates is the taxicab distance between $P$ and the origin less than or equal to $20$?", "answer": "841"} {"split_role": "calib", "id": "amc-18", "grader": "num", "question": "What is the sum of the x and y coordinates of the new position of the point $(-1, -2)$ after rotating $270^{\\circ}$ counterclockwise about the point $(3, 1)$?", "answer": "5"} {"split_role": "calib", "id": "amc-19", "grader": "num", "question": "Calculate the maximum area of an isosceles trapezoid that has legs of length $1$ and one base twice as long as the other. The final answer can be written in the form $\\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. What is $m^2+n^2$?", "answer": "13"} {"split_role": "calib", "id": "amc-20", "grader": "num", "question": "What is the value of\n\\[2^3 - 1^3 + 4^3 - 3^3 + 6^3 - 5^3 + \\dots + 18^3 - 17^3?\\]", "answer": "3159"} {"split_role": "calib", "id": "amc-21", "grader": "num", "question": "Let $\\mathcal{R}$ be the region in the complex plane consisting of all complex numbers $z$ that can be written as the sum of complex numbers $z_1$ and $z_2$, where $z_1$ lies on the segment with endpoints $3$ and $4i$, and $z_2$ has magnitude at most $1$. What integer is closest to the area of $\\mathcal{R}$? ", "answer": "13"} {"split_role": "calib", "id": "amc-22", "grader": "num", "question": "Let $K$ be the number of sequences $A_1$, $A_2$, $\\dots$, $A_n$ such that $n$ is a positive integer less than or equal to $10$, each $A_i$ is a subset of $\\{1, 2, 3, \\dots, 10\\}$, and $A_{i-1}$ is a subset of $A_i$ for each $i$ between $2$ and $n$, inclusive. For example, $\\{\\}$, $\\{5, 7\\}$, $\\{2, 5, 7\\}$, $\\{2, 5, 7\\}$, $\\{2, 5, 6, 7, 9\\}$ is one such sequence, with $n = 5$.What is the remainder when $K$ is divided by $10$?", "answer": "5"} {"split_role": "calib", "id": "amc-23", "grader": "num", "question": "If $A$ and $B$ are vertices of a polyhedron, define the distance $d(A,B)$ to be the minimum number of edges of the polyhedron one must traverse in order to connect $A$ and $B$. For example, if $\\overline{AB}$ is an edge of the polyhedron, then $d(A, B) = 1$, but if $\\overline{AC}$ and $\\overline{CB}$ are edges and $\\overline{AB}$ is not an edge, then $d(A, B) = 2$. Let $Q$, $R$, and $S$ be randomly chosen distinct vertices of a regular icosahedron (regular polyhedron made up of 20 equilateral triangles). Find the probability that $d(Q, R) > d(R, S)$. The final answer can be written in the form $\\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. What is $m+n$?", "answer": "29"} {"split_role": "calib", "id": "amc-24", "grader": "num", "question": "Cities $A$ and $B$ are $45$ miles apart. Alicia lives in $A$ and Beth lives in $B$. Alicia bikes towards $B$ at 18 miles per hour. Leaving at the same time, Beth bikes toward $A$ at 12 miles per hour. How many miles from City $A$ will they be when they meet?", "answer": "27"} {"split_role": "calib", "id": "amc-25", "grader": "num", "question": "On Halloween $31$ children walked into the principal's office asking for candy. They can be classified into three types: Some always lie; some always tell the truth; and some alternately lie and tell the truth. The alternaters arbitrarily choose their first response, either a lie or the truth, but each subsequent statement has the opposite truth value from its predecessor. The principal asked everyone the same three questions in this order. \"Are you a truth-teller?\" The principal gave a piece of candy to each of the $22$ children who answered yes. \"Are you an alternater?\" The principal gave a piece of candy to each of the $15$ children who answered yes. \"Are you a liar?\" The principal gave a piece of candy to each of the $9$ children who answered yes. How many pieces of candy in all did the principal give to the children who always tell the truth?", "answer": "7"} {"split_role": "calib", "id": "amc-26", "grader": "num", "question": "In rhombus $ABCD$, point $P$ lies on segment $\\overline{AD}$ so that $\\overline{BP}$ $\\perp$ $\\overline{AD}$, $AP = 3$, and $PD = 2$. What is the area of $ABCD$? (Note: The figure is not drawn to scale.)\n", "answer": "20"} {"split_role": "calib", "id": "amc-27", "grader": "num", "question": "The figure below depicts a regular $7$-gon inscribed in a unit circle.\n[asy] import geometry; unitsize(3cm); draw(circle((0,0),1),linewidth(1.5)); for (int i = 0; i < 7; ++i) { for (int j = 0; j < i; ++j) { draw(dir(i * 360/7) -- dir(j * 360/7),linewidth(1.5)); } } for(int i = 0; i < 7; ++i) { dot(dir(i * 360/7),5+black); } [/asy]\nWhat is the sum of the $4$th powers of the lengths of all $21$ of its edges and diagonals?Output the remainder when the answer is divided by 100.\n\n", "answer": "47"} {"split_role": "calib", "id": "amc-28", "grader": "num", "question": "The roots of the polynomial $10x^3 - 39x^2 + 29x - 6$ are the height, length, and width of a rectangular box (right rectangular prism). A new rectangular box is formed by lengthening each edge of the original box by $2$\nunits. What is the volume of the new box?", "answer": "30"} {"split_role": "calib", "id": "amc-29", "grader": "num", "question": "Define $x\\diamond y$ to be $|x-y|$ for all real numbers $x$ and $y.$ What is the value of \\[((1\\diamond2)\\diamond3)-(1\\diamond(2\\diamond3))?\\]", "answer": "2"} {"split_role": "test", "id": "amc-30", "grader": "num", "question": "Triangle $ABC$ has side lengths in arithmetic progression, and the smallest side has length $6.$ If the triangle has an angle of $120^\\circ,$ Find the area of $ABC$. The final answer can be simplified in the form $m \\sqrt{n}$, where $m$ and $n$ are positive integers and $n$ without square factore. What is $m+n$?", "answer": "18"} {"split_role": "test", "id": "amc-31", "grader": "num", "question": "The infinite product\n\\[\\sqrt[3]{10} \\cdot \\sqrt[3]{\\sqrt[3]{10}} \\cdot \\sqrt[3]{\\sqrt[3]{\\sqrt[3]{10}}} \\cdots\\]\nevaluates to a real number $\\sqrt{m}$. What is the value of m?", "answer": "10"} {"split_role": "test", "id": "amc-32", "grader": "num", "question": "In the state of Coinland, coins have values $6,10,$ and $15$ cents. Suppose $x$ is the value in cents of the most expensive item in Coinland that cannot be purchased using these coins with exact change. What is the sum of the digits of $x?$", "answer": "11"} {"split_role": "test", "id": "amc-33", "grader": "num", "question": "Consider the following $100$ sets of $10$ elements each:\n\\begin{align*} &\\{1,2,3,\\ldots,10\\}, \\\\ &\\{11,12,13,\\ldots,20\\},\\\\ &\\{21,22,23,\\ldots,30\\},\\\\ &\\vdots\\\\ &\\{991,992,993,\\ldots,1000\\}. \\end{align*}\nHow many of these sets contain exactly two multiples of $7$?", "answer": "42"} {"split_role": "test", "id": "amc-34", "grader": "num", "question": "Let $c$ be a real number, and let $z_1$ and $z_2$ be the two complex numbers satisfying the equation\n$z^2 - cz + 10 = 0$. Points $z_1$, $z_2$, $\\frac{1}{z_1}$, and $\\frac{1}{z_2}$ are the vertices of (convex) quadrilateral $\\mathcal{Q}$ in the complex plane. When the area of $\\mathcal{Q}$ obtains its maximum possible value, let $c=\\sqrt{m}$. what is the value of m", "answer": "20"} {"split_role": "test", "id": "amc-35", "grader": "num", "question": "Let $f$ be the unique function defined on the positive integers such that \\[\\sum_{d\\mid n}d\\cdot f\\left(\\frac{n}{d}\\right)=1\\] for all positive integers $n$. What is $f(2023)$?", "answer": "96"} {"split_role": "test", "id": "amc-36", "grader": "num", "question": "How many ordered pairs of positive real numbers $(a,b)$ satisfy the equation\n\\[(1+2a)(2+2b)(2a+b) = 32ab?\\]", "answer": "1"} {"split_role": "test", "id": "amc-37", "grader": "num", "question": "Each square in a $5 \\times 5$ grid is either filled or empty, and has up to eight adjacent neighboring squares, where neighboring squares share either a side or a corner. The grid is transformed by the following rules:\n\nAny filled square with two or three filled neighbors remains filled.\nAny empty square with exactly three filled neighbors becomes a filled square.\nAll other squares remain empty or become empty.\nA sample transformation is shown in the figure below.\n\nSuppose the $5 \\times 5$ grid has a border of empty squares surrounding a $3 \\times 3$ subgrid. How many initial configurations will lead to a transformed grid consisting of a single filled square in the center after a single transformation? (Rotations and reflections of the same configuration are considered different.)", "answer": "22"} {"split_role": "test", "id": "amc-38", "grader": "num", "question": "When the roots of the polynomial \n\\[P(x) = (x-1)^1 (x-2)^2 (x-3)^3 \\cdot \\cdot \\cdot (x-10)^{10}\\]\nare removed from the number line, what remains is the union of $11$ disjoint open intervals. On how many of these intervals is $P(x)$ positive?", "answer": "6"} {"split_role": "test", "id": "amc-39", "grader": "num", "question": "A circle with integer radius $r$ is centered at $(r, r)$. Distinct line segments of length $c_i$ connect points $(0, a_i)$ to $(b_i, 0)$ for $1 \\le i \\le 14$ and are tangent to the circle, where $a_i$, $b_i$, and $c_i$ are all positive integers and $c_1 \\le c_2 \\le \\cdots \\le c_{14}$. What is the ratio $\\frac{c_{14}}{c_1}$ for the least possible value of $r$?", "answer": "17"} {"split_role": "test", "id": "amc-40", "grader": "num", "question": "Let $M$ be the midpoint of $\\overline{AB}$ in regular tetrahedron $ABCD$. $\\frac{p}{q}=\\cos(\\angle CMD)$ is irreducible fraction, what is the value of $p+q$?", "answer": "4"} {"split_role": "test", "id": "amc-41", "grader": "num", "question": "In a table tennis tournament every participant played every other participant exactly once. Although there were twice as many right-handed players as left-handed players, the number of games won by left-handed players was $40\\%$ more than the number of games won by right-handed players. (There were no ties and no ambidextrous players.) What is the total number of games played?", "answer": "36"} {"split_role": "test", "id": "amc-42", "grader": "num", "question": "$\\frac{m}{n}$ is the Irreducible fraction value of \\[3+\\frac{1}{3+\\frac{1}{3+\\frac13}}\\], what is the value of $m+n$?", "answer": "142"} {"split_role": "test", "id": "amc-43", "grader": "num", "question": "For how many integers $n$ does the expression\\[\\sqrt{\\frac{\\log (n^2) - (\\log n)^2}{\\log n - 3}}\\]represent a real number, where log denotes the base $10$ logarithm?", "answer": "901"} {"split_role": "test", "id": "amc-44", "grader": "num", "question": "The diagram below shows a rectangle with side lengths $4$ and $8$ and a square with side length $5$. Three vertices of the square lie on three different sides of the rectangle, as shown. What is the numerator of the simplest fraction that represents the area of the region inside both the square and the rectangle?", "answer": "5"} {"split_role": "test", "id": "amc-45", "grader": "num", "question": "What is the area of the region in the coordinate plane defined by\n$| | x | - 1 | + | | y | - 1 | \\le 1$?", "answer": "8"} {"split_role": "test", "id": "amc-46", "grader": "num", "question": "Let $P(x)$ be a polynomial with rational coefficients such that when $P(x)$ is divided by the polynomial\n$x^2 + x + 1$, the remainder is $x+2$, and when $P(x)$ is divided by the polynomial $x^2+1$, the remainder\nis $2x+1$. There is a unique polynomial of least degree with these two properties. What is the sum of\nthe squares of the coefficients of that polynomial?", "answer": "23"} {"split_role": "test", "id": "cruxeval_o-0", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(s1, s2):\n position = 1\n count = 0\n while position > 0:\n position = s1.find(s2, position)\n count += 1\n position += 1\n return count\n```\nWhat is the output of f('xinyyexyxx', 'xx')? Give the exact Python value.", "answer": "2"} {"split_role": "test", "id": "cruxeval_o-1", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(sequence, value):\n i = max(sequence.index(value) - len(sequence) // 3, 0)\n result = ''\n for j, v in enumerate(sequence[i:]):\n if v == '+':\n result += value\n else:\n result += sequence[i + j]\n return result\n```\nWhat is the output of f('hosu', 'o')? Give the exact Python value.", "answer": "'hosu'"} {"split_role": "test", "id": "cruxeval_o-2", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(postcode):\n return postcode[postcode.index('C'):]\n```\nWhat is the output of f('ED20 CW')? Give the exact Python value.", "answer": "'CW'"} {"split_role": "test", "id": "cruxeval_o-3", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text, m, n):\n text = \"{}{}{}\".format(text, text[:m], text[n:])\n result = \"\"\n for i in range(n, len(text)-m):\n result = text[i] + result\n return result\n```\nWhat is the output of f(\"abcdefgabc\", 1, 2)? Give the exact Python value.", "answer": "'bagfedcacbagfedc'"} {"split_role": "test", "id": "cruxeval_o-4", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(d):\n result = {}\n for ki, li in d.items():\n result.update({ki: []})\n for kj, dj in enumerate(li):\n result[ki].append({})\n for kk, l in dj.items():\n result[ki][kj][kk] = l.copy()\n return result\n```\nWhat is the output of f({})? Give the exact Python value.", "answer": "{}"} {"split_role": "test", "id": "cruxeval_o-5", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(sentences):\n if all([sentence.isdecimal() for sentence in sentences.split('.')]):\n return 'oscillating' \n else:\n return 'not oscillating'\n```\nWhat is the output of f('not numbers')? Give the exact Python value.", "answer": "'not oscillating'"} {"split_role": "test", "id": "cruxeval_o-6", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(d):\n result = []\n while len(d.keys()) > 0:\n result.append(d.popitem())\n return result\n```\nWhat is the output of f({5: 1, 'abc': 2, 'defghi': 2, 87.29: 3})? Give the exact Python value.", "answer": "[(87.29, 3), ('defghi', 2), ('abc', 2), (5, 1)]"} {"split_role": "test", "id": "cruxeval_o-7", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(nums, n):\n pos = len(nums) - 1\n for i in range(-len(nums), 0):\n nums.insert(pos, nums[i])\n return nums\n```\nWhat is the output of f([], 14)? Give the exact Python value.", "answer": "[]"} {"split_role": "test", "id": "cruxeval_o-8", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(c, index, value):\n c[index] = value\n if value >= 3:\n c.update({'message' : 'xcrWt'})\n else: \n del c['message']\n return c\n```\nWhat is the output of f({1: 2, 3: 4, 5: 6, 'message': 'qrTHo'}, 8, 2)? Give the exact Python value.", "answer": "{1: 2, 3: 4, 5: 6, 8: 2}"} {"split_role": "test", "id": "cruxeval_o-9", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text, search):\n return search.startswith(text) or False\n```\nWhat is the output of f('123', '123eenhas0')? Give the exact Python value.", "answer": "True"} {"split_role": "test", "id": "cruxeval_o-10", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(values):\n values.sort()\n return values\n```\nWhat is the output of f([1, 1, 1, 1])? Give the exact Python value.", "answer": "[1, 1, 1, 1]"} {"split_role": "test", "id": "cruxeval_o-11", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text, tab_size):\n return text.replace('\\t', ' '*tab_size)\n```\nWhat is the output of f('a', 100)? Give the exact Python value.", "answer": "'a'"} {"split_role": "test", "id": "cruxeval_o-12", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(letters):\n a = [] \n for i in range(len(letters)):\n if letters[i] in a:\n return 'no'\n a.append(letters[i]) \n return 'yes'\n```\nWhat is the output of f(['b', 'i', 'r', 'o', 's', 'j', 'v', 'p'])? Give the exact Python value.", "answer": "'yes'"} {"split_role": "test", "id": "cruxeval_o-13", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text):\n (k, l) = (0, len(text) - 1)\n while not text[l].isalpha():\n l -= 1\n while not text[k].isalpha():\n k += 1\n if k != 0 or l != len(text) - 1:\n return text[k: l+1]\n else:\n return text[0]\n```\nWhat is the output of f(\"timetable, 2mil\")? Give the exact Python value.", "answer": "'t'"} {"split_role": "test", "id": "cruxeval_o-14", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(n, s):\n if s.startswith(n):\n pre, _ = s.split(n, 1)\n return pre + n + s[len(n):]\n return s\n```\nWhat is the output of f('xqc', 'mRcwVqXsRDRb')? Give the exact Python value.", "answer": "'mRcwVqXsRDRb'"} {"split_role": "test", "id": "cruxeval_o-15", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text):\n arr = text.split()\n result = []\n for item in arr:\n if item.endswith('day'):\n item += 'y'\n else:\n item += 'day'\n result.append(item)\n return ' '.join(result)\n```\nWhat is the output of f(\"nwv mef ofme bdryl\")? Give the exact Python value.", "answer": "'nwvday mefday ofmeday bdrylday'"} {"split_role": "test", "id": "cruxeval_o-16", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(nums):\n count = len(nums)\n if count == 0:\n nums = [0] * int(nums.pop())\n elif count % 2 == 0:\n nums.clear()\n else:\n del nums[:count//2:]\n return nums\n```\nWhat is the output of f([-6, -2, 1, -3, 0, 1])? Give the exact Python value.", "answer": "[]"} {"split_role": "test", "id": "cruxeval_o-17", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(parts):\n return list(dict(parts).values())\n```\nWhat is the output of f([('u', 1), ('s', 7), ('u', -5)])? Give the exact Python value.", "answer": "[-5, 7]"} {"split_role": "test", "id": "cruxeval_o-18", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text, chars):\n num_applies = 2\n extra_chars = ''\n for i in range(num_applies):\n extra_chars += chars\n text = text.replace(extra_chars, '')\n return text\n```\nWhat is the output of f('zbzquiuqnmfkx', 'mk')? Give the exact Python value.", "answer": "'zbzquiuqnmfkx'"} {"split_role": "test", "id": "cruxeval_o-19", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(nums, idx, added):\n nums[idx:idx] = (added,)\n return nums\n```\nWhat is the output of f([2, 2, 2, 3, 3], 2, 3)? Give the exact Python value.", "answer": "[2, 2, 3, 2, 3, 3]"} {"split_role": "test", "id": "cruxeval_o-20", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text):\n t = 5\n tab = []\n for i in text:\n if i.lower() in 'aeiouy':\n tab.append(i.upper() * t)\n else:\n tab.append(i * t)\n return ' '.join(tab)\n```\nWhat is the output of f('csharp')? Give the exact Python value.", "answer": "'ccccc sssss hhhhh AAAAA rrrrr ppppp'"} {"split_role": "test", "id": "cruxeval_o-21", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(nums, target):\n if nums.count(0):\n return 0\n elif nums.count(target) < 3:\n return 1\n else:\n return nums.index(target)\n```\nWhat is the output of f([1, 1, 1, 2], 3)? Give the exact Python value.", "answer": "1"} {"split_role": "test", "id": "cruxeval_o-22", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(array, elem):\n array.extend(elem)\n return array\n```\nWhat is the output of f([[1, 2, 3], [1, 2], 1], [[1, 2, 3], 3, [2, 1]])? Give the exact Python value.", "answer": "[[1, 2, 3], [1, 2], 1, [1, 2, 3], 3, [2, 1]]"} {"split_role": "test", "id": "cruxeval_o-23", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(matr, insert_loc):\n matr.insert(insert_loc, [])\n return matr\n```\nWhat is the output of f([[5, 6, 2, 3], [1, 9, 5, 6]], 0)? Give the exact Python value.", "answer": "[[], [5, 6, 2, 3], [1, 9, 5, 6]]"} {"split_role": "test", "id": "cruxeval_o-24", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(a, b):\n a.sort()\n b.sort(reverse=True)\n return a + b\n```\nWhat is the output of f([666], [])? Give the exact Python value.", "answer": "[666]"} {"split_role": "test", "id": "cruxeval_o-25", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text, suffix):\n if text.endswith(suffix):\n return text[:-len(suffix)]\n return text\n```\nWhat is the output of f('zejrohaj', 'owc')? Give the exact Python value.", "answer": "'zejrohaj'"} {"split_role": "test", "id": "cruxeval_o-26", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text, width):\n result = \"\"\n lines = text.split('\\n')\n for l in lines:\n result += l.center(width)\n result += '\\n'\n\n # Remove the very last empty line\n result = result[:-1]\n return result\n```\nWhat is the output of f('l\\nl', 2)? Give the exact Python value.", "answer": "'l \\nl '"} {"split_role": "test", "id": "cruxeval_o-27", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(lst, mode):\n result = [el for el in lst]\n if mode:\n result.reverse()\n return result\n```\nWhat is the output of f([1, 2, 3, 4], 1)? Give the exact Python value.", "answer": "[4, 3, 2, 1]"} {"split_role": "test", "id": "cruxeval_o-28", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text):\n result = \"\"\n for i in range(len(text)):\n if i % 2 == 0:\n result += text[i].swapcase()\n else:\n result += text[i]\n return result\n```\nWhat is the output of f(\"vsnlygltaw\")? Give the exact Python value.", "answer": "'VsNlYgLtAw'"} {"split_role": "test", "id": "cruxeval_o-29", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text):\n out = \"\"\n for i in range(len(text)):\n if text[i].isupper():\n out += text[i].lower()\n else:\n out += text[i].upper()\n return out\n```\nWhat is the output of f(',wPzPppdl/')? Give the exact Python value.", "answer": "',WpZpPPDL/'"} {"split_role": "test", "id": "cruxeval_o-30", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text):\n if text.islower():\n return True\n return False\n```\nWhat is the output of f(\"54882\")? Give the exact Python value.", "answer": "False"} {"split_role": "test", "id": "cruxeval_o-31", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(text, delimiter):\n text = text.rpartition(delimiter)\n return text[0] + text[-1]\n```\nWhat is the output of f('xxjarczx', 'x')? Give the exact Python value.", "answer": "'xxjarcz'"} {"split_role": "test", "id": "cruxeval_o-32", "grader": "value", "question": "Here is a Python function:\n```python\ndef f(lst):\n lst[1:4] = lst[1:4][::-1]\n return lst\n```\nWhat is the output of f([1, 2, 3])? Give the exact Python value.", "answer": "[1, 3, 2]"}