Navvye/Olympiad-Problems-CSV huggingface dataset:
Problem: Find the number of subsets of $\{1, 2, 3, 4, 5, 6, 7, 8\}$ that are subsets of neither $\{1, 2, 3, 4, 5\}$ nor $\{4, 5, 6, 7, 8\}$

Solution: The number of subsets of a set with $n$ elements is $2^n$ . The total number of subsets of $\{1, 2, 3, 4, 5, 6, 7, 8\}$ is equal to $2^8$ . The number of sets that are subsets of at least one of $\{1, 2, 3, 4, 5\}$ or $\{4, 5, 6, 7, 8\}$ can be found using complementary counting. There are $2^5$ subsets of $\{1, 2, 3, 4, 5\}$ and $2^5$ subsets of $\{4, 5, 6, 7, 8\}$ . It is easy to make the mistake of assuming there are $2^5+2^5$ sets that are subsets of at least one of $\{1, 2, 3, 4, 5\}$ or $\{4, 5, 6, 7, 8\}$ , but the $2^2$ subsets of $\{4, 5\}$ are overcounted. There are $2^5+2^5-2^2$ sets that are subsets of at least one of $\{1, 2, 3, 4, 5\}$ or $\{4, 5, 6, 7, 8\}$ , so there are $2^8-(2^5+2^5-2^2)$ subsets of $\{1, 2, 3, 4, 5, 6, 7, 8\}$ that are subsets of neither $\{1, 2, 3, 4, 5\}$ nor $\{4, 5, 6, 7, 8\}$ $2^8-(2^5+2^5-2^2)=\boxed{196}$

Answer:  196
Problem: Find the number of subsets of $\{1, 2, 3, 4, 5, 6, 7, 8\}$ that are subsets of neither $\{1, 2, 3, 4, 5\}$ nor $\{4, 5, 6, 7, 8\}$

Solution: Upon inspection, a viable set must contain at least one element from both of the sets $\{1, 2, 3, 4, 5\}$ and $\{4, 5, 6, 7, 8\}$ . Since 4 and 5 are included in both of these sets, then they basically don't matter, i.e. if set A is a subset of both of those two then adding a 4 or a 5 won't change that fact. Thus, we can count the number of ways to choose at least one number from 1 to 3 and at least one number from 6 to 8, and then multiply that by the number of ways to add in 4 and 5. The number of subsets of a 3 element set is $2^3=8$ , but we want to exclude the empty set, giving us 7 ways to choose from $\{1, 2, 3\}$ or $\{6, 7, 8\}$ . We can take each of these $7 \times 7=49$ sets and add in a 4 and/or a 5, which can be done in 4 different ways (by adding both, none, one, or the other one). Thus, the answer is $49 \times 4=\boxed{196}$

Answer:  196
Problem: Find the number of subsets of $\{1, 2, 3, 4, 5, 6, 7, 8\}$ that are subsets of neither $\{1, 2, 3, 4, 5\}$ nor $\{4, 5, 6, 7, 8\}$

Solution: This solution is very similar to Solution $2$ . The set of all subsets of $\{1,2,3,4,5,6,7,8\}$ that are disjoint with respect to $\{4,5\}$ and are not disjoint with respect to the complements of sets (and therefore not a subset of) $\{1,2,3,4,5\}$ and $\{4,5,6,7,8\}$ will be named $S$ , which has $7\cdot7=49$ members. The union of each member in $S$ and the $2^2=4$ subsets of $\{4,5\}$ will be the members of set $Z$ , which has $49\cdot4=\boxed{196}$ members. $\blacksquare$

Answer:  196
Problem: Find the number of subsets of $\{1, 2, 3, 4, 5, 6, 7, 8\}$ that are subsets of neither $\{1, 2, 3, 4, 5\}$ nor $\{4, 5, 6, 7, 8\}$

Solution: Consider that we are trying to figure out how many subsets are possible of $\{1,2,3,4,5,6,7,8\}$ that are not in violation of the two subsets $\{1,2,3,4,5\}$ and $\{4,5,6,7,8\}$ . Assume that the number of numbers we pick from the subset $\{1,2,3,4,5,6,7,8\}$ is $n$ . Thus, we can compute this problem with simple combinatorics:
If $n=1$ $\binom{8}{1}$ $-$ $\binom{5}{1}$ $\binom{5}{1}$ $-  2$ ) [subtract $2$ to eliminate the overcounting of the subset $\{4\}$ or $\{5\}$ ] = $8 - 8$ $0$
If $n=2$ $\binom{8}{2}$ $-$ $\binom{5}{2}$ $\binom{5}{2}$ $-  1$ ) [subtract $1$ to eliminate the overcounting of the subset $\{4,5\}$ ] = $28 - 19$ $9$
If $n=3$ $\binom{8}{3}$ $-$ $\binom{5}{3}$ $\binom{5}{3}$ ) = $56 - 20$ $36$
If $n=4$ $\binom{8}{4}$ $-$ $\binom{5}{4}$ $\binom{5}{4}$ ) = $70 - 10$ $60$
If $n=5$ $\binom{8}{5}$ $-$ $\binom{5}{5}$ $\binom{5}{5}$ ) = $56 - 2$ $54$
If $n>5$ , then the set $\{1,2,3,4,5,6,7,8\}$ is never in violation of the two subsets $\{1,2,3,4,5\}$ and $\{4,5,6,7,8\}$ . Thus,
If $n=6$ $\binom{8}{6}$ $28$
If $n=7$ $\binom{8}{7}$ $8$
If $n=8$ $\binom{8}{8}$ $1$
Adding these together, our solution becomes $0$ $9$ $36$ $60$ $54$ $28$ $8$ $1$ $=\boxed{196}$

Answer:  196
Problem: The teams $T_1$ $T_2$ $T_3$ , and $T_4$ are in the playoffs. In the semifinal matches, $T_1$ plays $T_4$ , and $T_2$ plays $T_3$ . The winners of those two matches will play each other in the final match to determine the champion. When $T_i$ plays $T_j$ , the probability that $T_i$ wins is $\frac{i}{i+j}$ , and the outcomes of all the matches are independent. The probability that $T_4$ will be the champion is $\frac{p}{q}$ , where $p$ and $q$ are relatively prime positive integers. Find $p+q$

Solution: There are two scenarios in which $T_4$ wins. The first scenario is where $T_4$ beats $T_1$ $T_3$ beats $T_2$ , and $T_4$ beats $T_3$ , and the second scenario is where $T_4$ beats $T_1$ $T_2$ beats $T_3$ , and $T_4$ beats $T_2$ . Consider the first scenario. The probability $T_4$ beats $T_1$ is $\frac{4}{4+1}$ , the probability $T_3$ beats $T_2$ is $\frac{3}{3+2}$ , and the probability $T_4$ beats $T_3$ is $\frac{4}{4+3}$ . Therefore the first scenario happens with probability $\frac{4}{4+1}\cdot\frac{3}{3+2}\cdot\frac{4}{4+3}$ . Consider the second scenario. The probability $T_4$ beats $T_1$ is $\frac{4}{1+4}$ , the probability $T_2$ beats $T_3$ is $\frac{2}{2+3}$ , and the probability $T_4$ beats $T_2$ is $\frac{4}{4+2}$ . Therefore the second scenario happens with probability $\frac{4}{1+4}\cdot\frac{2}{2+3}\cdot\frac{4}{4+2}$ . By summing these two probabilities, the probability that $T_4$ wins is $\frac{4}{4+1}\cdot\frac{3}{3+2}\cdot\frac{4}{4+3}+\frac{4}{1+4}\cdot\frac{2}{2+3}\cdot\frac{4}{4+2}$ . Because this expression is equal to $\frac{256}{525}$ , the answer is $256+525=\boxed{781}$

Answer:  781
Problem: A triangle has vertices $A(0,0)$ $B(12,0)$ , and $C(8,10)$ . The probability that a randomly chosen point inside the triangle is closer to vertex $B$ than to either vertex $A$ or vertex $C$ can be written as $\frac{p}{q}$ , where $p$ and $q$ are relatively prime positive integers. Find $p+q$

Solution: [asy] pair A,B,C,D,X,Z,P; A=(0,0); B=(12,0); C=(8,10); X=(10,5); Z=(6,0); P=(6,3.4); fill(B--X--P--Z--cycle,lightgray); draw(A--B--C--cycle); dot(A); label("$A$",A,SW); dot(B); label("$B$",B,SE); dot(C); label("$C$",C,N); draw(X--P,dashed); draw(Z--P,dashed); dot(X); label("$X$",X,NE); dot(Z); label("$Z$",Z,S); dot(P); label("$P$",P,NW); [/asy]
The set of all points closer to point $B$ than to point $A$ lie to the right of the perpendicular bisector of $AB$ (line $PZ$ in the diagram), and the set of all points closer to point $B$ than to point $C$ lie below the perpendicular bisector of $BC$ (line $PX$ in the diagram). Therefore, the set of points inside the triangle that are closer to $B$ than to either vertex $A$ or vertex $C$ is bounded by quadrilateral $BXPZ$ . Because $X$ is the midpoint of $BC$ and $Z$ is the midpoint of $AB$ $X=(10,5)$ and $Z=(6,0)$ . The coordinates of point $P$ is the solution to the system of equations defined by lines $PX$ and $PZ$ . Using the point-slope form of a linear equation and the fact that the slope of the line perpendicular to a line with slope $m$ is $-\frac{1}{m}$ , the equation for line $PX$ is $y=\frac{2}{5}x+1$ and the equation for line $PZ$ is $x=6$ . The solution of this system is $P=\left(6,\frac{17}{5}\right)$ . Using the shoelace formula on quadrilateral $BXPZ$ and triangle $ABC$ , the area of quadrilateral $BXPZ$ is $\frac{109}{5}$ and the area of triangle $ABC$ is $60$ . Finally, the probability that a randomly chosen point inside the triangle is closer to vertex $B$ than to vertex $A$ or vertex $C$ is the ratio of the area of quadrilateral $BXPZ$ to the area of $ABC$ , which is $\frac{\frac{109}{5}}{60}=\frac{109}{300}$ . The answer is $109+300=\boxed{409}$

Answer:  409
Problem: A triangle has vertices $A(0,0)$ $B(12,0)$ , and $C(8,10)$ . The probability that a randomly chosen point inside the triangle is closer to vertex $B$ than to either vertex $A$ or vertex $C$ can be written as $\frac{p}{q}$ , where $p$ and $q$ are relatively prime positive integers. Find $p+q$

Solution: Since we know the coordinates of all three vertices of the triangle, we can find the side lengths: $AB=12$ $AC=2\sqrt{41}$ , and $BC=2\sqrt{29}$ . We notice that the point where the three distances are the same is the circumcenter - so we use one of the triangle area formulas to find the circumradius, since we know what the area is. \[\frac{12 \cdot 2\sqrt{41} \cdot 2\sqrt{29}}{4 \cdot R}=\frac{12 \cdot 10}{2}.\] We rearrange to get \[R=\frac{\sqrt{41} \cdot \sqrt{29}}{5}.\] [asy] draw((0,0)--(12,0)--(8,10)--(0,0)); draw((6,0)--(6,3.4)--(10,5)); draw((6,3.4)--(4,5)); label("$A$", (0,0), SW); label("$B$", (12,0), SE); label("$C$", (8, 10), N); label("$P$", (6, 3.4), NNE); label("$R$", (10, 5), NE); label("$S$", (6, 0), S); label("$T$", (4, 5), NW); [/asy] We know that $AP=\frac{\sqrt{41} \cdot \sqrt{29}}{5}$ , and $AS=6$ , so using the Pythagorean Theorem gives $SP=\frac{17}{5}$ . This means $[ASP]=[BSP]=\frac{17}{5} \cdot 6 \cdot \frac{1}{2} = \frac{51}{5}$ .
Similarly, we know that $BP=\frac{\sqrt{41} \cdot \sqrt{29}}{5}$ , and $BR=\sqrt{29}$ , so we get that $PR=\frac{4\sqrt{29}}{5}$ , and so $[BRP]=[CRP]=\frac{4\sqrt{29}}{5} \cdot \sqrt{29} \cdot \frac{1}{2} = \frac{58}{5}$ .
Lastly, we know that $CP=\frac{\sqrt{41} \cdot \sqrt{29}}{5}$ , and $CT=\sqrt{41}$ , so we get that $PT=\frac{2\sqrt{41}}{5}$ , and $[ATP]=[CTP]=\frac{2\sqrt{41}}{5} \cdot \sqrt{41} \cdot \frac{1}{2} = \frac{41}{5}$ .
Therefore, our answer is $\frac{51+58}{2(51+58+41)}=\frac{109}{300} \rightarrow \boxed{409}$

Answer:  409
Problem: A triangle has vertices $A(0,0)$ $B(12,0)$ , and $C(8,10)$ . The probability that a randomly chosen point inside the triangle is closer to vertex $B$ than to either vertex $A$ or vertex $C$ can be written as $\frac{p}{q}$ , where $p$ and $q$ are relatively prime positive integers. Find $p+q$

Solution: To start the problem, identify the two midpoints that connect $AB$ and $BC$ . This is because the midpoints of such lines is the mark at which the point will sway closer to vertex $A$ $C$ or vertex $B$ . The midpoint of $AB$ is $(6,0)$ , and the midpoint of $BC$ is $(10,5)$ . Then,  determine the line at which the distance between vertex $B$ and vertex $C$ are the same. Assuming that $x$ is the real value of $x$ and $y$ is the real value of $y$ , we can create a simple equation:
$\sqrt{|x-8|^2 + (10-y)^2}$ $\sqrt{(12-x)^2 + y^2}$
where the left side of the equation is for the distance to vertex $C$ and the right side of the equation is the distance to vertex $B$
Squaring both sides and then distributing, we get
$x^2 - 16x + 64 + y^2 - 20y + 100 = x^2 - 24x + 144 + y^2$
Notice that $(x-8)^2 = (-x+8)^2$ , and thus there is no need to create another equation.
Simplifying, we get $8x + 20 = 20y$
Divide both sides by 20, then simplify, and the line that represents equivalent distance between vertex $B$ and vertex $C$ is $y = \frac{2x}{5} + 1$
This line starts at the midpoint of $BC$ , which is $(10,5)$ , and ends at the line $x=6$ , as $x=6$ represents equivalent distance between vertex $A$ and vertex $B$ . Plug in $x=6$ to the equation $y = \frac{2x}{5} + 1$ , and we get $y = \frac{17}{5}$ . Now that we have our four points that are $(6,0), (6,\frac{17}{5}), (10,5)$ , and $(12,0)$ , we can calculate the area of the quadrilateral in which a point is closer to vertex $B$ as opposed to either vertex $A$ or vertex $C$ . Simply draw a rectangle that has the points $(6,0), (6,5), (12,5)$ and $(12,0)$ , and then subtract the two triangles that appear in between.
Thus, the area of the quadrilateral is $6\cdot5 - (\frac{\frac{8}{5}\cdot4}{2} + \frac{5\cdot2}{2}) \rightarrow 30 - \frac{41}{5} = \frac{109}{5}$ . 
Since the problem asks us for the probability that a point chosen inside the triangle is inside the quadrilateral, and because the area of $\triangle ABC$ is $\frac{12\cdot10}{2} = 60$ , the probability is $\frac{\frac{109}{5}}{60}=\frac{109}{300}$ , which means the final answer is $109+300=\boxed{409}$

Answer:  409
Problem: A triangle has vertices $A(0,0)$ $B(12,0)$ , and $C(8,10)$ . The probability that a randomly chosen point inside the triangle is closer to vertex $B$ than to either vertex $A$ or vertex $C$ can be written as $\frac{p}{q}$ , where $p$ and $q$ are relatively prime positive integers. Find $p+q$

Solution: Calculate the area of the triangle using the Shoelace Theorem on $(0,0), (12,0), (8,10)$ \[\frac{1}{2}|(0+120+0)-(0+0+0)|=60\]
Get the four points $(6,0), (6,\frac{17}{5}), (10,5)$ , and $(12,0)$ by any method from the above solutions. Then use the Shoelace Theorem to find the area of the region we want: \[\frac{1}{2}|(0+60+34+0)-(0+0+30+\frac{102}{5})|=\frac{109}{5}\]
Therefore the probability is $\frac{\frac{109}{5}}{60}=\frac{109}{300}$ . Thus giving the final answer of $109+300=\boxed{409}$

Answer:  409
Problem: A triangle has vertices $A(0,0)$ $B(12,0)$ , and $C(8,10)$ . The probability that a randomly chosen point inside the triangle is closer to vertex $B$ than to either vertex $A$ or vertex $C$ can be written as $\frac{p}{q}$ , where $p$ and $q$ are relatively prime positive integers. Find $p+q$

Solution: Draw the circumradii from the circumcenter to the three vertices. Drop perpendicular from the circumcenter to the sides. Note that since the triangle is isosceles, the perpendicular are in fact perpendicular bisectors. Therefore the region containing the points closer to B are in $\triangle{OBP_{1}} , \triangle{OBP_{2}}$ where $O$ is the circumcenter and $P_{1}, P_{2}$ points of contact of the perpendiculars and the sides. Therefore our fraction is $\frac{109}{300}$ . Our answer is then $\boxed{409}$

Answer:  409
Problem: A triangle has vertices $A(0,0)$ $B(12,0)$ , and $C(8,10)$ . The probability that a randomly chosen point inside the triangle is closer to vertex $B$ than to either vertex $A$ or vertex $C$ can be written as $\frac{p}{q}$ , where $p$ and $q$ are relatively prime positive integers. Find $p+q$

Solution: Using the same graph and methods as Solution 1, find the coordinates of $P$ $X$ $B$ , and $Z$ . Also, note that angles $PXB$ and $PZB$ are right angles, so $PXBZ$ is a cyclic quadrilateral. Then, use Brahmagupta's formula to determine the area of the quadrilateral, which is $\frac{109}{5}$ . Then find the area of triangle $ABC$ , which is $60$ . The probability is $\frac{109}{300}$ . Finally, we get our answer of $\boxed{409}$

Answer:  409
Problem: Find the number of positive integers less than or equal to $2017$ whose base-three representation contains no digit equal to $0$

Solution: The base- $3$ representation of $2017_{10}$ is $2202201_3$ . Because any $7$ -digit base- $3$ number that starts with $22$ and has no digit equal to $0$ must be greater than $2017_{10}$ , all $7$ -digit numbers that have no digit equal to $0$ must start with $21$ or $1$ in base $3$ . Of the base- $3$ numbers that have no digit equal to $0$ , there are $2^5$ $7$ -digit numbers that start with $21$ $2^6$ $7$ -digit numbers that start with $1$ $2^6$ $6$ -digit numbers, $2^5$ $5$ -digit numbers, $2^4$ $4$ -digit numbers, $2^3$ $3$ -digit numbers, $2^2$ $2$ -digit numbers, and $2^1$ $1$ -digit numbers. Summing these up, we find that the answer is $2^5+2^6+2^6+2^5+2^4+2^3+2^2+2^1=\boxed{222}$

Answer:  222
Problem: Find the number of positive integers less than or equal to $2017$ whose base-three representation contains no digit equal to $0$

Solution: Note that $2017=2202201_{3}$ , and $2187=3^7=10000000_{3}$ . There can be a $1,2,...,7$ digit number less than $2187$ , and each digit can either be $1$ or $2$ . So $2^1$ one digit numbers and so on up to $2^7$ $7$ digit.
Now we have to subtract out numbers from $2018$ to $2187$
Then either the number must begin $221...$ or $222...$ with  four more digits at the end
Using $1$ s and $2$ s there are $2^4$ options for each so:
$2+4+8+16+32+64+128-2*16=256-2-32=\boxed{222}$

Answer:  222
Problem: Find the number of positive integers less than or equal to $2017$ whose base-three representation contains no digit equal to $0$

Solution: Since the greatest power of $3$ that can be used is $3^6$ , we can do these cases.
Coefficient of $3^6=0$ : Then if the number has only $3^0$ , it has 2 choices (1 or 2). Likewise if the number has both a $3^1$ and $3^0$ term, there are 4 choices, and so on until $3^5$ , so the sum is $2+4+...+64=127-1=126$
Coefficient of $3^6=1$ : Any combination of $1$ or $2$ for the remaining coefficients works, so $2^6=64$ . Why is this less than $126$ ? Because the first time around, leading zeroes didn't count. But this time, all coefficients $3^n$ of $n<6$ need 1 and 2.
Coefficient of $3^6=2$ : Look at $3^5$ coefficient. If 1, all of them work because $3^7=2187-3^5=243<<2017$ . That's 32 cases. Now of this coefficient is 2, then at the coefficient of $3^4=81$ is at least 1. However, $3^6*2+3^5*2+3^4>>2017$ , so our answer is $126+64+32=\boxed{222}$

Answer:  222
Problem: A set contains four numbers. The six pairwise sums of distinct elements of the set, in no particular order, are $189$ $320$ $287$ $234$ $x$ , and $y$ . Find the greatest possible value of $x+y$

Solution: Let these four numbers be $a$ $b$ $c$ , and $d$ , where $a>b>c>d$ $x+y$ needs to be maximized, so let $x=a+b$ and $y=a+c$ because these are the two largest pairwise sums. Now $x+y=2a+b+c$ needs to be maximized. Notice that $2a+b+c=3(a+b+c+d)-(a+2b+2c+3d)=3((a+c)+(b+d))-((a+d)+(b+c)+(b+d)+(c+d))$ . No matter how the numbers $189$ $320$ $287$ , and $234$ are assigned to the values $a+d$ $b+c$ $b+d$ , and $c+d$ , the sum $(a+d)+(b+c)+(b+d)+(c+d)$ will always be $189+320+287+234$ . Therefore we need to maximize $3((a+c)+(b+d))-(189+320+287+234)$ . The maximum value of $(a+c)+(b+d)$ is achieved when we let $a+c$ and $b+d$ be $320$ and $287$ because these are the two largest pairwise sums besides $x$ and $y$ . Therefore, the maximum possible value of $x+y=3(320+287)-(189+320+287+234)=\boxed{791}$

Answer:  791
Problem: A set contains four numbers. The six pairwise sums of distinct elements of the set, in no particular order, are $189$ $320$ $287$ $234$ $x$ , and $y$ . Find the greatest possible value of $x+y$

Solution: Let the four numbers be $a$ $b$ $c$ , and $d$ , in no particular order. Adding the pairwise sums, we have $3a+3b+3c+3d=1030+x+y$ , so $x+y=3(a+b+c+d)-1030$ . Since we want to maximize $x+y$ , we must maximize $a+b+c+d$
Of the four sums whose values we know, there must be two sums that add to $a+b+c+d$ . To maximize this value, we choose the highest pairwise sums, $320$ and $287$ . Therefore, $a+b+c+d=320+287=607$
We can substitute this value into the earlier equation to find that $x+y=3(607)-1030=1821-1030=\boxed{791}$

Answer:  791
Problem: A set contains four numbers. The six pairwise sums of distinct elements of the set, in no particular order, are $189$ $320$ $287$ $234$ $x$ , and $y$ . Find the greatest possible value of $x+y$

Solution: There are two cases we can consider. Let the elements of our set be denoted $a,b,c,d$ , and say that the largest sums $x$ and $y$ will be consisted of $b+d$ and $c+d$ . Thus, we want to maximize $b+c+2d$ , which means $d$ has to be as large as possible, and $a$ has to be as small as possible to maximize $b$ and $c$ . So, the two cases we look at are:
Case 1:
\[a+d = 287\] \[b+c = 320\] \[a+b = 234\] \[a+c = 189\]
Case 2:
\[a+d = 320\] \[b+c = 189\] \[a+b = 234\] \[a+c = 287\]
Note we have determined these cases by maximizing the value of $a+d$ determined by our previous conditions. So, the answers for each ( after some simple substitution ) will be:
Case 1:
\[(a,b,c,d) = (\frac{103}{2},\frac{365}{2},\frac{275}{2},\frac{471}{2})\]
Case 2:
\[(a,b,c,d) = (166,68,121,154)\]
See the first case has our largest $d$ , so our answer will be $471+\frac{640}{2} = \boxed{791}$

Answer:  791
Problem: Find the sum of all positive integers $n$ such that $\sqrt{n^2+85n+2017}$ is an integer.

Solution: Manipulating the given expression, $\sqrt{n^2+85n+2017}=\frac{1}{2}\sqrt{4n^2+340n+8068}=\frac{1}{2}\sqrt{(2n+85)^2+843}$ . The expression under the radical must be an square number for the entire expression to be an integer, so $(2n+85)^2+843=s^2$ . Rearranging, $s^2-(2n+85)^2=843$ . By difference of squares, $(s-(2n+85))(s+(2n+85))=1\times843=3\times281$ . It is easy to check that those are all the factor pairs of 843. Considering each factor pair separately, $2n+85$ is found to be $421$ and $139$ . The two values of $n$ that satisfy one of the equations are $168$ and $27$ . Summing these together gives us the answer ; $168+27=\boxed{195}$

Answer:  195
Problem: Find the sum of all positive integers $n$ such that $\sqrt{n^2+85n+2017}$ is an integer.

Solution: Clearly, the result when $n$ is plugged into the given expression is larger than $n$ itself. Let $x$ be the positive difference between that result and $n$ , so that $\sqrt{n^2+85n+2017}=n+x$ . Squaring both sides and canceling the $n^2$ terms gives $85n+2017=2xn+x^2$ . Combining like terms, $(85-2x)n=x^2-2017$ , so
\[n=\frac{x^2-2017}{85-2x}.\]
Since $n$ is positive, there are two cases, which are simple (luckily). Remembering that $x$ is a positive integer, then $x^2-2017$ and $85-2x$ are either both positive or both negative. The smallest value for which $x^2>2017$ is 45, which makes the denominator, and the entire expression, negative. Evaluating the other case where numerator and denominator are both negative, then we have that $x<45$ (from the numerator) and $85-2x<0$ , which means $x>42$ . This only gives two solutions, $x=43, 44$ . Plugging these into the expression for $n$ , we find that they result in 27 and 168, which both satisfy the initial question. Therefore, the answer is $168+27=\boxed{195}$

Answer:  195
Problem: Find the sum of all positive integers $n$ such that $\sqrt{n^2+85n+2017}$ is an integer.

Solution: Let the integer given by the square root be represented by $x$ . Then $0 = n^2 + 85n + 2017 - x^2$ . For this to have rational solutions for $n$ (checking whether they are integers is done later), the discriminant of this quadratic must be a perfect square. (This can be easily shown using the quadratic formula.)
Thus, $b^2 - 4ac = 7225 + 4x^2 - 8068 = y^2$ for some integer $y$ . Then $4x^2 - 843 = y^2$ . Rearranging this equation yields that $843 = (2x+y)(2x-y)$ . Noticing that there are 2 factor pairs of $843$ , namely, $1*843$ and $3*281$ , there are 2 systems to solve for $x$ and $y$ that create rational $n$ . These yield solutions $(x,y)$ of $(211, 421)$ and $(71, 139)$
The solution to the initial quadratic in $n$ must then be $\frac{-85 \pm \sqrt{85^2 - 4(2017 - x^2)}}{2}$ . Noticing that for each value of $x$ that has rational solutions for $n$ , the corresponding value of the square root of the discriminant is $y$ , the formula can be rewritten as $n = \frac{-85 \pm y}{2}$ . One solution is $\frac{421 - 85}{2} = 168$ and the other solution is $\frac{139 - 85}{2} = 27$ . Thus the answer is $168 + 27 = \boxed{195}$ as both rational solutions are integers.

Answer:  195
Problem: Find the sum of all positive integers $n$ such that $\sqrt{n^2+85n+2017}$ is an integer.

Solution: Notice that $(n+42)^2= n^2+84n+1764$ . Also note that $(n+45)^2= n^2+90n+2025$ . Thus, \[(n+42)^2< n^2+85n+2017<(n+45)^2\] where $n^2+85n+2017$ is a perfect square. Hence, \[n^2+85n+2017= (n+43)^2\] or \[n^2+85n+2017= (n+44)^2.\] Solving the two equations yields the two solutions $n= 168, 27$ . Therefore, our answer is $\boxed{195}$

Answer:  195
Problem: Find the sum of all positive integers $n$ such that $\sqrt{n^2+85n+2017}$ is an integer.

Solution: Let the expression be equal to $a$ . This expression can be factored into $\sqrt{(n+44)^2-3n+81}$ . Then square both sides, and the expression becomes $(n+44)^2-3n+81=a^2$ . We have a difference of two squares. Rearranging, we have $(n+44+a)(n+44-a)=3(n-27)$ . By inspection, the only possible values for $(n+44-a)$ are 0 and 1. When $(n+44-a)=0$ , we must have $n-27=0$ . Therefore, $27$ is a solution. When we have $(n+44-a)=1$ , so $n=a-43$ . Plugging this back to $(n+44+a)=3(n-27)$ (since $(n+44-a)=1$ ), we find that $a=211 \implies n=168$ . Thus, the answer is $27+168= \boxed{195}$

Answer:  195