ChenDRAG/VeRL_math_validation huggingface dataset:
Problem: The MIG is planning a lottery to give out prizes after the written tests, and the plan is very special. Contestants will be divided into prize groups to potentially receive a prize. However, based on the number of contestants, the ideal number of groups doesn't work as expected. Consider the following scenarios:

- When dividing into $4$ groups, there are $3$ left over.
- When dividing into $5$ groups, there are $2$ left over.
- When dividing into $6$ groups, there is $1$ left over.
- When dividing into $7$ groups, there are $2$ left over.

Given that there are fewer than $300$ participants in the MIG, how many participants are there?
Answer: 247
Problem: A $1 \times n$ rectangle ($n \geq 1$) is divided into $n$ unit ($1 \times 1$) squares. Each square of this rectangle is colored red, blue, or green. Let $f(n)$ be the number of colorings of the rectangle in which there are an even number of red squares. What is the largest prime factor of $\frac{f(9)}{f(3)}$? (The number of red squares can be zero.)
Answer: 37
Problem: Determine the greatest value of the sum $M = 11xy + 3x + 2012yz$, where $x, y, z$ are non-negative integers satisfying the condition $x + y + z = 1000$.
Answer: 503000000
Problem: Arnold has plates weighing $5$, $15$, $25$, $35$, or $45$ pounds. He lifts a barbell, which consists of a $45$-pound bar and any number of plates that he has. Vlad looks at Arnold's bar and is impressed to see him bench-press $600$ pounds. Unfortunately, Vlad mistook each plate on Arnold's bar for the plate one size heavier, and Arnold was actually lifting $470$ pounds. How many plates did Arnold have on the bar?
Answer: 13
Problem: Find the least positive integer $k$ such that for any $a \in [0, 1]$ and any positive integer $n$,  
\[a^k(1 - a)^n < \frac{1}{(n+1)^3}.\]
Answer: 4
Problem: Let $x$, $y$, and $z$ be consecutive integers such that \[ \frac{1}{x} + \frac{1}{y} + \frac{1}{z} > \frac{1}{45}. \] Find the maximum value of $x + y + z$.
Answer: 405
Problem: A circumference was divided into $n$ equal parts. On each of these parts, a number from $1$ to $n$ was placed such that the distance between consecutive numbers is always the same. Numbers $11$, $4$, and $17$ were in consecutive positions. In how many parts was the circumference divided?
Answer: 20
Problem: In the following diagram, a semicircle is folded along a chord $AN$ and intersects its diameter $MN$ at $B$. Given that $MB : BN = 2 : 3$ and $MN = 10$. If $AN = x$, find $x^2$.
Answer: 80
Problem: At the Intergalactic Math Olympiad held in the year 9001, there are 6 problems, and on each problem, you can earn an integer score from 0 to 7. The contestant's score is the product of the scores on the 6 problems, and ties are broken by the sum of the 6 problems. If 2 contestants are still tied after this, their ranks are equal. In this olympiad, there are $8^6 = 262144$ participants, and no two get the same score on every problem. Find the score of the participant whose rank was $7^6 = 117649$.
Answer: 1
Problem: Jar #1 contains five red marbles, three blue marbles, and one green marble. Jar #2 contains five blue marbles, three green marbles, and one red marble. Jar #3 contains five green marbles, three red marbles, and one blue marble.

You randomly select one marble from each jar. Given that you select one marble of each color, the probability that the red marble came from jar #1, the blue marble came from jar #2, and the green marble came from jar #3 can be expressed as $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m + n$.
Answer: 323
Problem: Let $a_d$ be the number of non-negative integer solutions $(a, b)$ to $a + b = d$ where $a \equiv b \pmod{n}$ for a fixed $n \in \mathbb{Z}^+$. Consider the generating function $M(t) = a_0 + a_1t + a_2t^2 + \ldots$ Consider
$$P(n) = \lim_{t\to 1} \left( nM(t) - \frac{1}{(1 - t)^2} \right).$$
Then $P(n)$, $n \in \mathbb{Z}^+$ is a polynomial in $n$, so we can extend its domain to include all real numbers while having it remain a polynomial. Find $P(0)$.
Answer: 0
Problem: A Yule log is shaped like a right cylinder with height $10$ and diameter $5$. Freya cuts it parallel to its bases into $9$ right cylindrical slices. After Freya cut it, the combined surface area of the slices of the Yule log increased by $a\pi$. Compute $a$.
Answer: 100
Problem: A candy store has $100$ pieces of candy to give away. When you get to the store, there are five people in front of you, numbered from $1$ to $5$. The $i$th person in line considers the set of positive integers congruent to $i$ modulo $5$ which are at most the number of pieces of candy remaining. If this set is empty, then they take no candy. Otherwise, they pick an element of this set and take that many pieces of candy. For example, the first person in line will pick an integer from the set $\{1,6,\dots,96\}$ and take that many pieces of candy. How many ways can the first five people take their share of candy so that after they are done there are at least $35$ pieces of candy remaining?
Answer: 3003
Problem: Find the number of degree $8$ polynomials $f(x)$ with nonnegative integer coefficients satisfying both $f(1) = 16$ and $f(-1) = 8$.
Answer: 47775
Problem: Find the number of three-digit palindromes that are divisible by $3$. Recall that a palindrome is a number that reads the same forward and backward, such as $727$ or $905509$.
Answer: 30
Problem: Let $\triangle ABC$ have $AB=6$, $BC=7$, and $CA=8$, and denote by $\omega$ its circumcircle. Let $N$ be a point on $\omega$ such that $AN$ is a diameter of $\omega$. Furthermore, let the tangent to $\omega$ at $A$ intersect $BC$ at $T$, and let the second intersection point of $NT$ with $\omega$ be $X$. The length of $\overline{AX}$ can be written in the form $\frac{m}{\sqrt{n}}$ for positive integers $m$ and $n$, where $n$ is not divisible by the square of any prime. Find $100m+n$.
Answer: 9799
Problem: Calculate the sum $\sum_{n=1}^{1,000,000} \lfloor \sqrt{n} \rfloor$.

You may use the formula $\sum_{i=1}^{k} i^2=\frac{k(k +1)(2k +1)}{6}$ without a proof.
Answer: 666167500
Problem: Let $\text{lcm} (a,b)$ denote the least common multiple of $a$ and $b$. Find the sum of all positive integers $x$ such that $x \le 100$ and $\text{lcm}(16,x) = 16x$.
Answer: 2500
Problem: Determine the sum of all positive integers $n$ between $1$ and $100$ inclusive such that \(\gcd(n,2^n - 1) = 3.\)
Answer: 360
Problem: Compute the positive integer $n$ such that $\log_3 n < \log_2 3 < \log_3 (n + 1)$.
Answer: 5
Problem: Find the sum of all prime numbers that can be expressed both as a sum of two prime numbers and as a difference of two prime numbers.
Answer: 5
Problem: The roots of a monic cubic polynomial $p$ are positive real numbers forming a geometric sequence. Suppose that the sum of the roots is equal to $10$. Under these conditions, the largest possible value of $|p(-1)|$ can be written as $\frac{m}{n}$, where $m$, $n$ are relatively prime integers. Find $m + n$.
Answer: 2224
Problem: Rectangle $ABCD$ has sides $AB = 10$ and $AD = 7$. Point $G$ lies in the interior of $ABCD$, a distance $2$ from side $\overline{CD}$ and a distance $2$ from side $\overline{BC}$. Points $H, I, J$, and $K$ are located on sides $\overline{BC}, \overline{AB}, \overline{AD}$, and $\overline{CD}$, respectively, so that the path $GHIJKG$ is as short as possible. Then $AJ = \frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m + n$.
Answer: 8
Problem: Compute the smallest positive integer $n$ for which $\sqrt{100+\sqrt{n}} + \sqrt{100-\sqrt{n}}$ is an integer.
Answer: 6156
Problem: Keith has $10$ coins labeled $1$ through $10$, where the $i$th coin has weight $2^i$. The coins are all fair, so the probability of flipping heads on any of the coins is $\frac{1}{2}$. After flipping all of the coins, Keith takes all of the coins which land heads and measures their total weight, $W$. If the probability that $137 \leq W \leq 1061$ is $\frac{m}{n}$ for coprime positive integers $m,n$, determine $m+n$.
Answer: 743
Problem: At a concert, $10$ singers will perform. For each singer $x$, either there is a singer $y$ such that $x$ wishes to perform right after $y$, or $x$ has no preferences at all. Suppose that there are $n$ ways to order the singers such that no singer has an unsatisfied preference, and let $p$ be the product of all possible nonzero values of $n$. Compute the largest nonnegative integer $k$ such that $2^k$ divides $p$.
Answer: 38
Problem: $P(x)$ is a polynomial of degree $3n$ such that:

\[
\begin{align*}
P(0) = P(3) = \cdots &= P(3n) = 2, \\
P(1) = P(4) = \cdots &= P(3n-2) = 1, \\
P(2) = P(5) = \cdots &= P(3n-1) = 0, \\
\text{and } & P(3n+1) = 730.
\end{align*}
\]

Determine $n$.
Answer: 4
Problem: Let $C$ be the number of ways to arrange the letters of the word CATALYSIS, $T$ be the number of ways to arrange the letters of the word TRANSPORT, $S$ be the number of ways to arrange the letters of the word STRUCTURE, and $M$ be the number of ways to arrange the letters of the word MOTION. What is $\frac{C - T + S}{M}$?
Answer: 126
Problem: Let $X = \{1, 2, \ldots, 2017\}$. Let $k$ be a positive integer. Given any $r$ such that $1 \le r \le k$, there exist $k$ subsets of $X$ such that the union of any $r$ of them is equal to $X$, but the union of any fewer than $r$ of them is not equal to $X$. Find, with proof, the greatest possible value for $k$.
Answer: 2017
Problem: Let $z_1$ and $z_2$ be the zeros of the polynomial $f(x) = x^2 + 6x + 11$. Compute $(1 + z_1^2 z_2)(1 + z_1 z_2^2)$.
Answer: 1266
Problem: At a meeting of $12k$ people, each person exchanges greetings with exactly $3k + 6$ others. For any two people, the number of people who exchange greetings with both is the same. How many people are at the meeting?
Answer: 36
Problem: For odd positive integers $n$, define $f(n)$ to be the smallest odd integer greater than $n$ that is not relatively prime to $n$. Compute the smallest $n$ such that $f(f(n))$ is not divisible by $3$.
Answer: 161
Problem: Reimu invented a new number base system that uses exactly five digits. The number $0$ in the decimal system is represented as $00000$. Whenever a number is incremented, Reimu finds the leftmost digit (of the five digits) that is equal to the "units" (rightmost) digit, increments this digit, and sets all the digits to its right to 0. 

For example, an analogous system that uses three digits would begin with $000$, $100$, $110$, $111$, $200$, $210$, $211$, $220$, $221$, $222$, $300$, $\ldots$.

Compute the decimal representation of the number that Reimu would write as $98765$.
Answer: 1727
Problem: Let $A, B, C, D$ be points, in order, on a straight line such that $AB = BC = CD$. Let $E$ be a point closer to $B$ than $D$ such that $BE = EC = CD$ and let $F$ be the midpoint of $DE$. Let $AF$ intersect $EC$ at $G$ and let $BF$ intersect $EC$ at $H$. If $[BHC] + [GHF] = 1$, then $AD^2 = \frac{a\sqrt{b}}{c}$ where $a, b,$ and $c$ are positive integers, $a$ and $c$ are relatively prime, and $b$ is not divisible by the square of any prime. Find $a + b + c$.
Answer: 374
Problem: In the diagram below, $\angle B = 43^\circ$ and $\angle D = 102^\circ$. Find $\angle A + \angle B + \angle C + \angle D + \angle E + \angle F$.
Answer: 720
Problem: Noew is writing a $15$-problem mock AIME consisting of four subjects: algebra, geometry, combinatorics, and number theory. The AIME is considered somewhat evenly distributed if there is at least one problem of each subject and at least six combinatorics problems. Two AIMEs are considered similar if they have the same subject distribution (same number of each subject). How many non-similar somewhat evenly distributed mock AIMEs can Noew write?
Answer: 84
Problem: A trapezoid $ABCD$ lies on the $xy$-plane. The slopes of lines $BC$ and $AD$ are both $\frac{1}{3}$, and the slope of line $AB$ is $-\frac{2}{3}$. Given that $AB = CD$ and $BC < AD$, the absolute value of the slope of line $CD$ can be expressed as $\frac{m}{n}$, where $m$ and $n$ are two relatively prime positive integers. Find $100m + n$.
Answer: 1706
Problem: Compute \[\sum_{n_{60}=0}^2\sum_{n_{59}=0}^{n_{60}}\cdots\sum_{n_2=0}^{n_3}\sum_{n_1=0}^{n_2}\sum_{n_0=0}^{n_1}1.\]
Answer: 1953
Problem: Let $a$ be the sum of the numbers:

$$99 \times 0.9$$
$$999 \times 0.9$$
$$9999 \times 0.9$$
$$\vdots$$
$$999\cdots 9 \times 0.9$$

where the final number in the list is $0.9$ times a number written as a string of $101$ digits all equal to $9$. Find the sum of the digits in the number $a$.
Answer: 891
Problem: The $260$ volumes of the *Encyclopedia Galactica* are out of order in the library. Fortunately for the librarian, the books are numbered. Due to his religion, which holds both encyclopedias and the concept of parity in high esteem, the librarian can only rearrange the books two at a time, and then only by switching the position of an even-numbered volume with that of an odd-numbered volume. Find the minimum number of such transpositions sufficient to get the books back into ordinary sequential order, regardless of the starting positions of the books. (Find the minimum number of transpositions in the worst-case scenario.)
Answer: 130
Problem: All of the roots of $x^3 + ax^2 + bx + c$ are positive integers greater than 2, and the coefficients satisfy $a + b + c + 1 = -2009$. Find $a$.
Answer: -58
Problem: Find the sum of all natural numbers from $1$ to $500$ that are not divisible by $5$ or $7$.
Answer: 85783
Problem: Find the largest divisor of $2800$ that is a perfect square.
Answer: 400
Problem: At a meeting, each person is familiar with 22 people. If two persons $A$ and $B$ know each other, among the remaining people, they do not have a common friend. For each pair of individuals $A$ and $B$ who are not familiar with each other, there are six common acquaintances among the remaining people. How many people were at the meeting?
Answer: 100
Problem: Let $f(X, Y, Z) = X^5Y - XY^5 + Y^5Z - YZ^5 + Z^5X - ZX^5$.

Find \( \frac{f(2009, 2010, 2011) + f(2010, 2011, 2009) - f(2011, 2010, 2009)}{f(2009, 2010, 2011)} \)
Answer: 3
Problem: A positive integer is called *cool* if it can be expressed in the form $a! \cdot b! + 315$ where $a$ and $b$ are positive integers. For example, $1! \cdot 1! + 315 = 316$ is a cool number. Find the sum of all cool numbers that are also prime numbers.
Answer: 317
Problem: A regular pentagon can have the line segments forming its boundary extended to lines, resulting in an arrangement of lines that intersect at ten points. How many ways are there to choose five points from these ten such that no three of the points are collinear?
Answer: 12
Problem: A nine-digit number has the form $\overline{6ABCDEFG3}$, where every three consecutive digits sum to $13$. Find $D$.
Answer: 4
Problem: We randomly choose 5 distinct positive integers less than or equal to 90. What is the floor of 10 times the expected value of the fourth largest number?
Answer: 606
Problem: Let $\triangle ABC$ be a triangle in a plane such that $AB=13$, $BC=14$, and $CA=15$. Let $D$ be a point in three-dimensional space such that $\angle{BDC}=\angle{CDA}=\angle{ADB}=90^\circ$. Let $d$ be the distance from $D$ to the plane containing $\triangle ABC$. The value $d^2$ can be expressed as $\frac{m}{n}$ for relatively prime positive integers $m$ and $n$. Compute $m+n$.
Answer: 511
Problem: Consider a rectangle $ABCD$ with $AB = 30$ and $BC = 60$. Construct a circle $T$ whose diameter is $AD$. Construct another circle $S$ whose diameter is $AB$. Let circles $S$ and $T$ intersect at a point $P$ such that $P \neq A$. Let the line $AP$ intersect $BC$ at point $E$. Define point $F$ on $AB$ such that the line $EF$ is tangent to the circle with diameter $AD$. Find the area of triangle $\triangle AEF$.
Answer: 75
Problem: There are $36$ participants at a BdMO event. Some of the participants shook hands with each other, but no two participants shook hands more than once. Each participant recorded the number of handshakes they made. It was found that no two participants with the same number of handshakes had shaken hands with each other. Find the maximum possible number of handshakes at the party, providing proof.

(When two participants shake hands with each other, this is counted as one handshake.)
Answer: 546
Problem: Which is the largest positive integer $n$ satisfying the inequality: $n^{2007} > (2007)^n$?
Answer: 2006
Problem: Let $\triangle ABC$ be an equilateral triangle and $P$ a point on $\overline{BC}$. If $PB=50$ and $PC=30$, compute $PA$.
Answer: 70
Problem: A dartboard consists of three concentric circles with radii 4, 6, and 8. Three darts are thrown at the board, sticking at random locations. Determine the probability that each dart lands in a different region of the dartboard. The probability can be expressed as \( \frac{m}{n} \), where \( m \) and \( n \) are relatively prime positive integers. Calculate \( m + n \).
Answer: 617
Problem: Let $\triangle ABC$ be a triangle with side lengths $AB = 9$, $BC = 10$, $CA = 11$. Let $O$ be the circumcenter of $\triangle ABC$. Denote $D = AO \cap BC$, $E = BO \cap CA$, $F = CO \cap AB$. If $\frac{1}{AD} + \frac{1}{BE} + \frac{1}{CF}$ can be written in simplest form as $\frac{a \sqrt{b}}{c}$, find $a + b + c$.
Answer: 43
Problem: In a right-angled triangle where all side lengths are integers, one of the catheti has a length of $1994$. Determine the length of the hypotenuse.
Answer: 994010
Problem: Determine the last three digits of $374^{2022}$.
Answer: 376
Problem: Determine the largest prime which divides both $2^{24} - 1$ and $2^{16} - 1$.
Answer: 17
Problem: Consider a triangle $ABC$ and let $M$ be the midpoint of the side $BC$. Suppose $\angle MAC = \angle ABC$ and $\angle BAM = 105^\circ$. Find the measure of $\angle ABC$.
Answer: 30
Problem: Find the sum of the indexes of the singular points other than zero of the vector field:
\[ z\overline{z}^2 + z^4 + 2\overline{z}^4 \]
Answer: 3
Problem: What is the remainder when $1234^{567} + 89^{1011}$ is divided by $12$?
Answer: 9
Problem: Compute the number of ordered pairs $(a,b)$ of positive integers satisfying $a^b=2^{100}$.
Answer: 9
Problem: Consider an arithmetic progression made up of $100$ terms. If the sum of all the terms of the progression is $150$ and the sum of the even terms is $50$, find the sum of the squares of the $100$ terms of the progression.
Answer: 83550
Problem: Each of the numbers $x_1, x_2, \ldots, x_{101}$ is $\pm 1$. What is the smallest positive value of $\sum_{1\leq i < j \leq 101} x_i x_j$?
Answer: 10
Problem: Let $ABCD$ be a square with side length $10$. Point $P$ is located on side $BC$. By folding the paper along line $AP$, point $B$ maps to point $Q$. The line $PQ$ intersects side $CD$ at point $R$. Calculate the perimeter of triangle $PCR$.
Answer: 20
Problem: Three palaces, each rotating on a duck leg, make a full round in $30$, $50$, and $70$ days, respectively. Today, at noon, all three palaces face northwards. In how many days will they all face southwards?
Answer: 525
Problem: Let $f(n)$ be the sum of the digits of $n$. Find $\sum_{n=1}^{99}f(n)$.
Answer: 900
Problem: Find the value of $|xy|$ given that $x$ and $y$ are integers and $6x^2y^2 + 5x^2 - 18y^2 = 17253$.
Answer: 54
Problem: In the diagram below, three squares are inscribed in right triangles. Their areas are $A$, $M$, and $N$, as indicated in the diagram. If $M = 5$ and $N = 12$, then $A$ can be expressed as $a + b\sqrt{c}$, where $a$, $b$, and $c$ are positive integers and $c$ is not divisible by the square of any prime. Compute $a + b + c$.
Answer: 36
Problem: How many positive integers $n$ are there such that $n$ is an exact divisor of at least one of the numbers $10^{40}$ and $20^{30}$?
Answer: 2301
Problem: Let $N_{15}$ be the answer to problem 15.

For a positive integer $x$ expressed in base ten, let $x'$ be the result of swapping its first and last digits. For example, if $x = 2024$, then $x' = 4022$. Let $C$ be the number of $N_{15}$-digit positive integers $x$ with a nonzero leading digit that satisfy the property that both $x$ and $x'$ are divisible by $11$. Note: $x'$ is allowed to have a leading digit of zero. Compute the sum of the digits of $C$ when $C$ is expressed in base ten.
Answer: 9
Problem: Find the smallest positive integer $n$ such that both the sum $n + 10$ and the product $n \times 10$ are perfect squares.
Answer: 90
Problem: Each of the natural numbers from $1$ to $n$ is colored either red or blue, with each color being used at least once. It turns out that:
- Every red number is a sum of two distinct blue numbers; and
- Every blue number is a difference between two red numbers.

Determine the smallest possible value of $n$ for which such a coloring exists.
Answer: 9
Problem: Wendy takes Honors Biology at school, a small class with only fourteen students (including Wendy) who sit around a circular table. Wendy's friends Lucy, Starling, and Erin are also in that class. Last Monday, none of the fourteen students were absent from class. Before the teacher arrived, Lucy and Starling stretched out a blue piece of yarn between them. Then Wendy and Erin stretched out a red piece of yarn between them at about the same height so that the yarn would intersect if possible. If all possible positions of the students around the table are equally likely, let $\frac{m}{n}$ be the probability that the yarns intersect, where $m$ and $n$ are relatively prime positive integers. Compute $m+n$.
Answer: 4
Problem: A class of $10$ students took a math test. Each problem was solved by exactly $7$ of the students. If the first nine students each solved $4$ problems, how many problems did the tenth student solve?
Answer: 6
Problem: Let $N$ be the greatest positive integer that can be expressed using all seven Roman numerals $I$, $V$, $X$, $L$, $C$, $D$, and $M$ exactly once each, and let $n$ be the least positive integer that can be expressed using these numerals exactly once each. Find $N - n$. Note that the arrangement $CM$ is never used in a number along with the numeral $D$.
Answer: 222
Problem: Fred chooses a positive two-digit number with distinct nonzero digits. Laura takes Fred’s number and swaps its digits. She notices that the sum of her number and Fred’s number is a perfect square, and the positive difference between them is a perfect cube. Find the greater of the two numbers.
Answer: 74
Problem: Find the number of ordered pairs of integers $(m, n)$ that satisfy $20m - 10n = mn$.
Answer: 24
Problem: You are given an unlimited supply of red, blue, and yellow cards to form a hand. Each card has a point value, and your score is the sum of the point values of those cards. The point values are as follows: the value of each red card is $1$, the value of each blue card is equal to twice the number of red cards, and the value of each yellow card is equal to three times the number of blue cards. What is the maximum score you can get with fifteen cards?
Answer: 168
Problem: Sam spends his days walking around the following $2 \times 2$ grid of squares:
\[
\begin{array}{|c|c|}
\hline
1 & 2 \\
\hline
4 & 3 \\
\hline
\end{array}
\]
Two squares are considered adjacent if they share a side. Sam starts at the square labeled $1$ and every second, he walks to an adjacent square. How many paths can Sam take such that the sum of the numbers on every square he visits in his path is equal to $20$, excluding the square he started on?
Answer: 167
Problem: Given a real number $a$, the floor of $a$, written $\lfloor a \rfloor$, is the greatest integer less than or equal to $a$. For how many real numbers $x$ such that $1 \le x \le 20$ is \[ x^2 + \lfloor 2x \rfloor = \lfloor x^2 \rfloor + 2x \? \]
Answer: 362
Problem: Vera has several identical matches, from which she forms a triangle. She wants any two sides of this triangle to differ in length by at least $10$ matches. However, it is impossible to create such a triangle with the available matches (without leaving any extra matches). What is the maximum number of matches Vera can have?
Answer: 62
Problem: Let $L$ be the number formed by 2022 digits equal to $1$, that is, $L=111\ldots111$ (2022 times). Compute the sum of the digits of the number $9L^2 + 2L$.
Answer: 4044