p1. Determine the unit digit of the number resulting from the following sum $$2013^1 + 2013^2 + 2013^3 + ... + 2013^{2012} + 2013^{2013}$$


2. Every real number a can be uniquely written as $a = [a] +\{a\}$, where $[a]$ is an integer and $0\le \{a\}<1$. For example, if $a = 2.12$, then $[2.12] = 2$ and $\{2.12\} = 0.12$.
Given the: $x + [y] + \{z\} = 4.2$
$y + [z] + \{x\} = 3.6$
$z + [x] + \{y\} = 2.0$
Determine the value of $x - y + z$.


p3. Determine all pairs of positive integers $(x, y)$ such that $2 (x + y) + xy = x^2 + y^2$.


p4. Consider the following arrangement of dots on the board in the figure. Determine the number of ways three of these points can be selected, to be the vertices of a right triangle whose legs are parallel to the sides of the board.
[img]https://cdn.artofproblemsolving.com/attachments/3/1/a9025e6e6f41f6a8d745a1c695b61640e9c691.png[/img]


p5. In an acute triangle $ABC$, $\angle A=30^o$. Let $D$ and $E$ be the feet of the altitudes drawn from  $ B$ and $C$, respectively. Let $F$ and $G$ be the midpoints of sides $AC$ and $AB$, respectively. Prove that segments $DG$ and $EF$ are perpendicular.
1. Determine the unit digit of the number resulting from the following sum:
   \[
   2013^1 + 2013^2 + 2013^3 + \ldots + 2013^{2012} + 2013^{2013}
   \]

   To find the unit digit of the sum, we need to determine the unit digit of each term in the sum. We start by examining the unit digit of powers of 2013. Notice that the unit digit of 2013 is 3, so we only need to consider the unit digit of powers of 3.

   Let's find the unit digits of the first few powers of 3:
   \[
   \begin{align*}
   3^1 & = 3 \quad (\text{unit digit is } 3) \\
   3^2 & = 9 \quad (\text{unit digit is } 9) \\
   3^3 & = 27 \quad (\text{unit digit is } 7) \\
   3^4 & = 81 \quad (\text{unit digit is } 1) \\
   3^5 & = 243 \quad (\text{unit digit is } 3) \\
   \end{align*}
   \]

   We observe that the unit digits repeat every 4 terms: 3, 9, 7, 1. This is a cyclic pattern with a period of 4.

   To determine the unit digit of \(2013^k\), we need to find the remainder when \(k\) is divided by 4:
   \[
   k \mod 4
   \]

   For \(k = 1, 2, 3, \ldots, 2013\), we have:
   \[
   \begin{align*}
   2013 \mod 4 & = 1 \quad (\text{since } 2013 = 4 \times 503 + 1)
   \end{align*}
   \]

   Therefore, the unit digit of \(2013^k\) for \(k \equiv 1 \mod 4\) is 3.

   Now, we sum the unit digits of the terms:
   \[
   3 + 9 + 7 + 1 + 3 + 9 + 7 + 1 + \ldots + 3
   \]

   Since the pattern repeats every 4 terms, we can group the terms into sets of 4:
   \[
   (3 + 9 + 7 + 1) + (3 + 9 + 7 + 1) + \ldots + 3
   \]

   Each group of 4 terms sums to:
   \[
   3 + 9 + 7 + 1 = 20
   \]

   There are \(2013 \div 4 = 503\) complete groups of 4 terms, plus 1 extra term (since \(2013 \mod 4 = 1\)).

   The sum of the unit digits of the complete groups is:
   \[
   503 \times 20 = 10060
   \]

   Adding the unit digit of the extra term:
   \[
   10060 + 3 = 10063
   \]

   The unit digit of 10063 is 3.

   Therefore, the unit digit of the sum \(2013^1 + 2013^2 + 2013^3 + \ldots + 2013^{2012} + 2013^{2013}\) is:
   \[
   \boxed{3}
   \]